Acidmods
AcidMods Resources ----- ( These are helpful tools for modding ) => Electronics Projects => Topic started by: magic_man185 on October 10, 2011, 08:35:59 AM
-
I need to come up with a something to flicker an LED, like the flameless LED candles that flicker. I could do it in hardware, or with a microchip, but it needs to be as cheap as possible. I am going to look into the chip side of it, but can anyone give me any ideas on doing it in hardware? There are a few other requirements. I need to apply power ahead of time (possibly like a day ahead) and have the LED stay off, then come on automatically. The circuit needs to run on a 2032 battery, (240mAh, 3V) and needs to last the day or so before powering the LED and at lease 5-6 hours with LED on. Can anyone help? FOOKz? Hyper?
Thanks.
-
For the flickering you could write a program in C and use the random function to output random brightnesses with PWM perhaps.
As for making the battery last that will probably involve putting the PIC to sleep whenever possible.
-
Thinking the same thing too. Heres a link to some code that flickers an LED as a flame for a match.
http://www.instructables.com/id/Fire-free-LED-Matchstick/
But if you want something that has no programming required use a 4093 quad schmidt trigger. I presume this circuit only flashes on and off so add a capacitor from Vdd to the base of the BC640 transistor. You could use any PNP or NPN transistor in this circuit because its just used for switching.
(https://acidmods.com/forum/proxy.php?request=http%3A%2F%2Fwww.alia.com.au%2Flinks%2Fflicker.gif&hash=0aef01d3b1fb17a7b6a3dc092813e812bf1634ae)
-
FOOKz,
Thanks for the info, it looks like the circuitry would be a little too complicated, I am trying to make it simple and cheap (I understand this might not be possible). Also, I think the flicker would look better if it is varying the brightness of the LED instead of just turning it off and on. For ease of assembly a pic would probably be the way to go. I did find an LED online that has the flicker built in, but I still need something that will let me apply power approximately 24 hours in advance, then have the LED turn on. I would need something that would draw very little power, since it will be running from a CR2032. As for the code you referenced, they don't give the source code, and it is an atmel chip, and I only have worked with PICs.
Hyper,
I was thinking about putting the PIC to sleep. I am thinking of using a 12f615 or something in that range. If I put the PIC to sleep with the WDT enabled, the WDT has a maximum of 2.3 seconds with its prescaler. So, I could set it to wake up by WDT, when it wakes up have it increment Timer1 (16 bit counter) and go back to sleep. The 16 bit counter would be more than enough to get me 24 hours (16 bits is a maximum number of 65,025. 24 hours * 60 minutes * 60 seconds = 86,400 seconds in 24 hours / 2.3 second WDT timeout = 37,565) I could set the LED to turn on when TMR1 reaches the specified value. So, I think I have that figured out, but I have never worked with PWM, so I will have to figure out how to control an LED with PWM.
Thanks both of you.
-
sounds like a plan but I have never worked with PWM or the WDT.
This project could be completed in about 2 seconds if you had an arduino ;)
-
I wouldn't even know where to begin with an arduino, never touched or seen one before. Also, isn't arduino like a project development board? I need to make like 30 of these.
-
I wouldn't even know where to begin with an arduino, never touched or seen one before. Also, isn't arduino like a project development board? I need to make like 30 of these.
Arduino is really easy and I think most people should buy/make one cos they are just useful to have around :P
And no an arduino will not be suitable if you want to cheaply make 30 haha
-
better link posted
why not get something like that and rip them apart?
-
I was actually just looking at some other ones, and I didn't realize you could get them that cheap. It would be cheaper to buy these than I could build my own, and if I built them it wouldn't even have the plastic housing and flame. I might play around with something like this, and add a microchip in to achieve my time delay needs.
-
if your in the states and have a big lots near they have them super cheap
funny because my fiance bought some at big lots like 12 of those led candles something similar for like 5 bucks
yeah itll be cheaper to buy those and tear them apart heres another link
http://www.ebay.com/itm/12-FLICKER-LIGHT-FLAMELESS-LED-TEALIGHT-TEA-CANDLES-NEW-/170397219610?pt=Candles&hash=item27ac773b1a#ht_500wt_1139
-
I found this one, http://www.batteryoperatedcandles.net/everlasting-led-p-tea-lights.html?gclid=CITokZj24KsCFYdrKgodXC7jPw (http://www.batteryoperatedcandles.net/everlasting-led-p-tea-lights.html?gclid=CITokZj24KsCFYdrKgodXC7jPw), which looks decent, I think this is actually what my fiance already bought. She bought a 6 pack for ~$6 over the weekend from Flower Factory.