Analogue timer circuit ...

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, I've started using a old mains powered night light for my 3 year old ... The thing it, it's way too bright and needs to be plugged in, which limits its location.

I intend remove the mains lead and bulb, and install a white LED and AA battery instead.

However, I only need it on for maybe 1-2 hours (if that) and it would be nice if it turned its self off. I was considering using a simple RC circuit to turn a transistor off, to turn off the LED, but I wonder if this is the best option for such a long time delay and when its "off" I really want it to be "off - off" ... I was wondering if anyone had any other simple bright ideas (excuse the pun :-) that didn't involve and AVR ! ;-)

Ta.

Jon.

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, lets try a few numbers. 10Meg is about as large a resistor that you can get in 1/4 W size. And, maybe 100uf. That has a time constant of 1000 seconds. Which is 16 minutes. To get 1 hour, you would need at 4X larger and 8X for 2 hours.

You might be able to do something with a single VMOS. The base current on a regular transistor is too high.

You will really want 2 batteries and a current limit ing resistor since most LEDs take over 2V to operate correctly.

Now, here is the rub. It is hard to find a FET with a gate threshold below 1.5V. That is about what you would need to even come close to make it work. As the cap charges or discharges, the FET will start to reduce current near the gate threshold, and the LED will go dim rather than turn off with a snap. But, maybe thats OK.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So an ATtiny43U is the only option then ... built in boost circuit so it can run from a single AA cell ... couple of external compoenets, and a push button and I'm done ? Take the ouput pin high, wait for 2 hours, then halt the uC ... ?

Jon.

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a tiny with as built-in boost to work from a single cell.

Have you verified that you can get proper LED operation from a single AA cell?

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

IIUIC, the tiny43 will give me 3v on the output pin using its boost circuit, even if I give it 1.0-1.5 on Vbat ?

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So you are going to design an emergency luminaire. The needed standards are the EN60598-1 and EN60598-2-22

All you need to know about this issue are in there.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This sounds like a one-off home project. "Night Lights" are used for young children going to sleep but are "afraid" of the dark. Not an emergency luminaire.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Table 20-7 says 2.7V to 3.3V with a nominal value of 3.0V. And, same table says that it will supply up to 30ma so long as the input is 1.0V or higher.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yup. The issue now is that reading the LED data sheets, white LEDs need 4v ! My "simple" project is fraught with issues all ready. Apparently blue LEDs are the same, so I can’t even mixed three RGB ones either to make white. :-(

So, maybe I should switch tack and generate 5v from a separate boost circuit, then use a smaller / simpler AVR, as I only need one output pin. Searching Google, I found a circuit for generating 5v from 1.5v using a MAX1724 (EZK50)

So now I’m thinking, generate 5v using the MAX1724, to drive a small (6 or 8 pin ?) AVR, which will drive the white LED directly from an output pin.

Jon.

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, "white" LEDs are really blue/UV LEDs with a phosphor that converts the UV down to green/yellow/orange. So, blue LEDs and white ones have very similar voltage requirements.

Yes, you are experiencing the delights of "system design". This is often what will "get" you, rather than the circuit stuff. Its easy enough to turn an LED on and off. But as soon as you need to deal with the LED's power, the required drive voltages for the LED switch, the difference between what one IC needs for power vs another, you are bound to get lost. :)

Have fun and don't be afraid to ask questions!

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the 'old' days you probably would use something like a CD4060 which is an oscillator followed by a 14 stage binary divider. Hook up one of the outputs to the clock input with a diode and it stops after 'x' time after is has been reset. Just a few caps, resistor, and a BJT to control the LED and a button to trigger it.

Advantage is that is can run from up to 15V and virtually consumes nothing when idle.

A while ago I designed such little circuit for the sport of doing it the 'old' way. It's sooo easy nowadays to grab a little MCU for these tasks that it's almost no fun :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there no way you can fit in a 9v battery in there? All you would need is a LDO with a shutdown pin and a small AVR. You could control the LED brighness with PWM.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jayjay1974 wrote:
In the 'old' days you probably would use something like a CD4060 which is an oscillator followed by a 14 stage binary divider.

Yup. That would work. Thanks ! :-)

If I could get the oscillator to run a 1 Hz, a 14 stage divider would give me over 200 seconds ... ? well worth a try... I still have my 4v problem for the white LED, but it seems I will have that whatever I do. However, the CD4060 runs from 1v-15v. I could run the same boost IC to generate 5v from the AA cell and the final output of the CD4060 driving a transistor for the LED. Thanks for the idea ...

Jon.

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Over 2000 seconds, each stage divides the frequency by two.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yup. sorry, typo. I meant over 200 minutes... :-)

Jon Russell