Project: Long Duration OFF Timer Circuit for LED's - Page 1
Forum section: electronics / beginners

author: BergRD
author_rank: Contributor
timestamp: August 20, 2018, 02:23:07 pm
content: Greets!Wife picked up an antique light that was retrofitted with LED's (3 AA Battery Pack) which looks nice but she would love to have it, alike another lamp she has; has a 4 hour OFF timer.Been trying to find a circuit that I could build that would bring power to the LED's and start a 4-6 hour timer to turn them off once timer hits. 555 and 556 are minutes and beyond the scope (I think) of this project so I have found a few utilizing CD4060 CMOS IC's but wanted to come to the smartest people I know, here at the EEVBLOG! Would the oscillator/binary counter be the most logical? What of the voltage requirements? Will it work or drive 2 standard LED's (Unsure at this point the voltage drop across them but have others could supplement).. More questions as I find info so wanted to get your input.I believe they (online) refer to these as ONE SHOT timers and she has another lamp with a small circuit board and likely a custom rolled IC that already does this (board is about 4mm x 10mm total) and drives a set of 'Fairy Lights' which are those strings of small LED's and hoping I can find something to retrofit this newer piece.Thanks!

author: sokoloff
author_rank: Super Contributor
timestamp: August 20, 2018, 03:01:09 pm
content: Quote from: BergRD on August 20, 2018, 02:23:07 pmAlmost anyone nowadays would do the timing with a sub-$1 micro-controller. (ATTinys can be had for $0.30 or so.)Add a suitable output drive and you'd be looking at a couple bucks for the parts and PCB.

author: BergRD
author_rank: Contributor
timestamp: August 20, 2018, 03:48:52 pm
content: Quote from: sokoloff on August 20, 2018, 03:01:09 pmWhat's odd is I'm not finding much using micro and I would have thought the same but also haven't worked much with CMOS logic so thought it might also be a chance to expand my own knowledge. I'll have to dig deeper on an pic/arduino/atmel micro route and thought about an attiny micro but was stumped when I didn't find a thousand circuits out on the google near instantly. Did a double take and thought maybe I was thinking incorrectly, lol. Thanks!

author: Seekonk
author_rank: Super Contributor
timestamp: August 20, 2018, 04:08:16 pm
content: At camp I made a 12V fan box and that has a 3 hour timer that turns it off using a NANO. Since the micro doesn't have much to do, the last 30 minutes the fan ramps down in speed before shutting off. I always keep a stock of a half dozen NANO for little projects. I used the RANDOM function in another project to make it look like a flickering flame. Fortunately I have a number od decade timers as we used to build them. Last time I looked at those chip prices they were as much as a micro. There is a lot of simple programming that can create impressive results. Download a free development system and give it a try. An education ought to be worth $3. This is one of my animation projects. It had a ghost plane theme with lots of flickering.

author: sokoloff
author_rank: Super Contributor
timestamp: August 20, 2018, 04:54:55 pm
content: I have an Arduino and a relay board driving a piece of home automation that cycles the relay 1 minute out of every 120 minutes. Took me longer to find a USB power supply in the drawer than to write the code. (It's so simple that may be the reason why it's hard to find the code on google.)In your case, using low power sleep mode is going to be a driving factor in the design (so you don't have to change the batteries all the time).Have a look at pages likehttps://learn.sparkfun.com/tutorials/reducing-arduino-power-consumptionto get a handle on sleep mode and other power conserving strategies.If you can run the AVR directly on the 4 alkaline batteries with just a regular diode in series, you'll be better off than any design that uses a linear regulator.

author: BergRD
author_rank: Contributor
timestamp: August 20, 2018, 05:48:47 pm
content: Quote from: sokoloff on August 20, 2018, 04:54:55 pmYeah, this isn't something for a relay or whatnot as it's only 2 white LED's that run off a 3 AA battery pack. Right now you switch it on and off manual and since wife forgets she wanted something that once turned on; it would turn off after X hours (preferably 4-6 hours) so not to run through batteries quickly. The MC or CD4060 route looks to be the most promising and since I have done very little with CMOS Logic I figured I would try to see if that sort of concept is viable. I think it is with a single CD4060 but have none or assortment on hand. Just haven't needed them to-date and trying to find some assortment to learn with. Always trying to learn more and more as I go. Thanks for the posts!

author: sokoloff
author_rank: Super Contributor
timestamp: August 20, 2018, 06:07:12 pm
content: If you do decide to go down the AVR/Arduino route, I'm happy to play along remotely and help (if you need it). Just send a PM or update this thread later.It's something that I've been interested in semi-passively for a while (low power, constantly powered devices, in my case for automotive [12V and 24V nominal] applications). This might be enough to kick me over the activation energy threshold.

author: Jeff1946
author_rank: Regular Contributor
timestamp: August 20, 2018, 07:41:17 pm
content: Another way. Use a low voltage MOSFET, for example a NTD4970N to drive LEDS (with suitable resistor). Connect a 1000 ufd capacitor in parallel with a 10M resistor between gate and source of MOSFET. Use a push button switch to connect MOSFET gate to plus side of battery via a 1k resistor.The capacitor should be a quality one so the self leakage isn't too large for the time you want. To see if this will work charge the capacitor with a battery, then measure its voltage every hour. Note the LEDS will slowly dim as the gate source voltage goes below about 3V.If you use a larger resistor in place of the 1k, you can adjust the brightness by only holding down the push button until the LEDs reach the desired brightness.

author: mdszy
author_rank: Unknown
timestamp: August 20, 2018, 07:48:39 pm
content: Quote from: BergRD on August 20, 2018, 05:48:47 pmSeems like doing CD4060 + watch crystal + MCU would work out. Use a 32.768kHz xtal, divide it down to 1Hz with the CD4060 and use the MC to count pulses until you've reached the timing you want.Here's an example of the frequency division circuit

author: capt bullshot
author_rank: Super Contributor
timestamp: August 20, 2018, 07:56:47 pm
content: Quote from: BergRD on August 20, 2018, 02:23:07 pmI second the plan to use the 4060 as the main timing element. You'll want to use some output transistor to turn on the LEDs, presumably a small MOSFET, since a standard 4000 CMOS chips cannot drive the LEDs directly. Three AA batteries will provide enough voltage to supply the 4060.