Author Topic: LED Flicker  (Read 5536 times)

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
LED Flicker
« 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.
« Last Edit: October 10, 2011, 02:28:32 PM by magic_man185 »

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: LED Flicker
« Reply #1 on: October 10, 2011, 02:33:14 PM »
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.

Offline FOOKz™

  • Hardware Modder
  • Moderator
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: LED Flicker
« Reply #2 on: October 10, 2011, 11:16:36 PM »
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.


Follow my Instagram and subscribe to my YouTube

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: LED Flicker
« Reply #3 on: October 11, 2011, 06:06:23 AM »
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.
« Last Edit: October 11, 2011, 06:08:42 AM by magic_man185 »

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: LED Flicker
« Reply #4 on: October 11, 2011, 08:00:25 AM »
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 ;)

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: LED Flicker
« Reply #5 on: October 11, 2011, 08:01:55 AM »
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.

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: LED Flicker
« Reply #6 on: October 11, 2011, 08:08:47 AM »
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

Offline 3D0kassiah

  • Acid Modder
  • *
  • Posts: 809
  • Post quality +19/-2
  • Gender: Male
  • Acidmods User
Re: LED Flicker
« Reply #7 on: October 11, 2011, 08:17:27 AM »
better link posted

why not get something like that and rip them apart?
« Last Edit: October 11, 2011, 09:01:05 AM by edokassiah »
Tracey: f off Rodent
rodent:i would of flew it to bill gates and shoved it up his a$$

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: LED Flicker
« Reply #8 on: October 11, 2011, 08:26:51 AM »
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.
« Last Edit: October 11, 2011, 08:31:26 AM by magic_man185 »

Offline 3D0kassiah

  • Acid Modder
  • *
  • Posts: 809
  • Post quality +19/-2
  • Gender: Male
  • Acidmods User
Re: LED Flicker
« Reply #9 on: October 11, 2011, 09:00:39 AM »
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
« Last Edit: October 11, 2011, 09:01:57 AM by edokassiah »
Tracey: f off Rodent
rodent:i would of flew it to bill gates and shoved it up his a$$

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: LED Flicker
« Reply #10 on: October 11, 2011, 09:29:14 AM »
I found this one, 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.
« Last Edit: October 11, 2011, 10:01:11 AM by magic_man185 »

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal