Go Down

Topic: Use an Attiny85 to make a "torch locator" (Read 277 times) previous topic - next topic

Nick Gammon

A few nights ago the lights went out (power failure). I have torches scattered around the house, but the trick is to find them in the pitch darkness.

It occurred to me that it would be nice if there was a flashing light on or near a torch, so you could head for the light, and find the torch. Hence this project was born.



Close up:



This sleeps most of the time (lazy thing!) but wakes every two seconds to check the light level. If it is low, it flashes the LED for 2 mS, and then goes back to sleep. The idea is that the flash helps you home in on your torch, switchboard, emergency exit, or whatever.

Schematic, more photos, code, and description at: http://www.gammon.com.au/forum/?id=12769

According to my calculations it should last for over 3 years, after which you pop out the battery and put a new one in.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Coding Badly


dtokez

smart project :) just out of interest, did you calculate the power with it flashing through the night (I presume it is dark at night in your house?)

thanks for sharing

Nick Gammon

I don't have any easy way of calculating average power over time, especially when I know the "high drain" intervals are very short (like under a millisecond to measure the light, and two milliseconds to flash the LED). I measured the power consumption when it was off, which agreed with the datasheet. I temporarily extended the flash time so I could measure the power consumed when the LED was on. The rest was just done by calculation.

I made a slightly simpler one in October 2013. That did not measure the light but flashed an LED for one millisecond every two seconds, continuously (ie. during the day as well).

That is still working on the original battery, so that proves that it can run for at least 17 months. Since the original one flashed all day but for half the time, you can probably reckon on 3/2 times the LED consumption compared to my calculation (which was 2.31 µA) so the newer design is probably slightly more efficient.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

flyboy

I bought a light a few years ago that uses PWM to keep the light (LED) on at a minimum level all the time.  This is so you can find it in the dark.  Pushing the button cycles through Low, High, Strobe, Idle (minimum).  It uses an Attiny85 running on a 9V battery.  Specs say that it will sit in Idle mode, very low PWM, for up to 2 years on a 9V battery.  Nice little light.  Unfortunately, the website I bought it from is no longer online.

Nick Gammon

Interesting idea, although a PWM output of the same consumption as I used (0.002 / 2) would probably be hard to see, especially if the lights just went off and your eyes hadn't adjusted yet.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

flyboy

Yes, it certainly depends on your intended purpose.  In my case, I use it in the mornings before the sun comes up.  I can find it easily.  I also tend to put it in a certain location all of the time.  That helps too.

Go Up