10f200 or ? cheap pic led candle

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

10f200 or ? cheap pic led candle

Post by MrDEB » Wed Jan 30, 2013 12:09 am

My parish recently held the 8th annual Italian dinner which I was unable to attend BUT due to last years power outage (main power line caught fire, real excitement) we used lots of candles on the tables. Well there are fire odes so I got to thinkiong of a simple RGB led candle project (need 30-40 candles).
Using a 10f200 for the cheap price and a simple PWM code, 2-AAA batteries but unable to write code in C or assy. Anyone have a simple code for this simple project. Been searching but have yet to locate. Now I am home I need to locate the PIC basic books, maybe a code in there?

Garth
I practically live here!
I practically live here!
Posts: 232
Joined: Wed Jan 16, 2013 1:17 pm
Contact:

Re: 10f200 or ? cheap pic led candle

Post by Garth » Wed Jan 30, 2013 4:02 pm

Search for an algorithm for a noise generator to program. They're pretty simple, having a series of XORs and a couple of other logic functions. In this case, you'll want numbers that you can feed to the PWM. There will be a repeating period, but it should be easy to make it long enough that it's not obvious. If the color doesn't need to change, you can probably set it with resistors and your program can ignore it if you don't use any PWM filtering. Blue LEDs' forward voltage is in the range of 3.4 to 4V though, so I don't think you'll get the blue LED in an RGB LED to illuminate on two AAA batteries. The longer the wavelength, the less voltage the LED requires. This could give a nice effect if you do minor RC filtering on the PWM output such that as the duty cycle increases for greater brightness, the green LED begins to come up more than the red, and blue (if you use it) will only start to come on at the highest duty cycles. IOW, the color temperature of the "flame" increases as the brightness comes up from "getting more air to burn" (to use lingo from the flickering flame you're trying to immitate). I haven't tried it, but it should be interesting.
http://WilsonMinesCo.com/ lots of 6502 resources

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: 10f200 or ? cheap pic led candle

Post by Chuckt » Fri Feb 01, 2013 2:23 pm

Make sure you use a resistor with the LED or you might burn out the microcontroller.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 8 guests