Flashing light

Discussion in 'The Projects Forum' started by topsoil, Jan 13, 2011.

  1. topsoil

    Thread Starter New Member

    Jan 13, 2011
    11
    0
    Hi all!

    I'm asking what is probably a very simple question, so I apologize in advance (but I'm not an electronics engineer)

    What I'm looking for is a way to flash a very bright red LED with a bit of randomness. As I see it a flashing light has two variables. 1) duration of the light and 2) frequency of the flash. What I need is something simple and small that will vary both of these. The duration needs to be between 1/10th of a second and 1 second. the frequency needs to be between 2 seconds and 10 seconds. Both need to appear random. As long as you cant really see a pattern it should be fine. Especially if two of these devises are used in close proximity.

    I'd really like it to be simple and cheap to build and fit in a 4 inch piece of 3/4 or 1 inch PVC pipe. it would be cool if it could run off 1 or 2 C cell batteries. (length of PVC pipe is not really critical.)

    Here's why...

    Animal behavior experts, through scientific research, have determined that predators/deer feel threatened when they see a flash of light because they believe that flash to be the eye of another animal. The sense of being watched is the greatest fear night animals have.

    I live and work on a farm and have a deer problem. I'm hoping that moving three or four of these around every few days will help deter the deer. it should help against coyotes as well.

    thanks

    -topsoil (aka Farmer Dale)
     
  2. jason 77

    New Member

    Jul 27, 2009
    6
    0
    Does it "have" to be a changing flash rate/duration? I am interested in seeing if something like this would actually work, sounds like a cool project.
     
  3. wayneh

    Expert

    Sep 9, 2010
    12,103
    3,038
    Interesting application. I think it would wise to consider using a solar charger for this, so you could just leave it. I'm guessing it only needs to run at night, so it could charge during the day.

    I think multiple 555-based timers (maybe a couple 556 dual timer ICs) running at different cycles could give you varied flashing. Set an AND gate so that the light only goes on if/when all the timers are "on" at the same time. The fastest timer would be a square wave at 1 sec, so the LED would never be on more than one second. The details aren't at the tip of my tongue, but I think that's a starting strategy.
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    How random must the flashing be?
    A LFSR (linear feedback shift register) is a random generator that cycles:
    http://en.wikipedia.org/wiki/LFSR

    The size of the shiftregister determens the randomness.

    Bertus
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    An LFSR programmed into a small and cheap uC (microcontroller), a pair of rechargeable batteries and a solar cell for charging would seem to be one approach - but if sunlight were not available for a period of time the devices wouldn't work.

    If the uC were programmed "smart" enough, it could keep track of battery performance over various sunlight/darkness conditions so that it could last through the nights.
     
  6. topsoil

    Thread Starter New Member

    Jan 13, 2011
    11
    0
    Thanks for the responses.

    I want to keep this cheap and simple. I think micro-controllers would add too much complexity and if I'm not mistaken suck more power.

    I know 555 timers are cheap and that was the direction I was thinking. If it gets too complex to very the length of time the LED stays on, that could be eliminated. (1/2 second would be fine)

    As for how random... Deer will get used to things pretty easily. If the on/off cycle is predictable, a deer will lose its fear of it in a few days. I realize that a electronic circuit can't be made to be truly random (not for a few $$ anyway) but if I can't see a pattern in the flash cycle I assume a deer won't be able to either. Even so I will most likely need to move these every few days to keep the deer jumpy.

    As for solar charged, that's a good idea, but again adds complexity. I wonder if it would be necessary anyway. I have an LED chaser circuit that I pulled out of an old advertising display. It has 24 LEDs and runs off 2 D cell batteries. I'ts been in my sons room running continuously for almost a year now.

    -topsoil
     
  7. Len Whistler

    Member

    Dec 10, 2010
    44
    3
    Since you will be moving around the LED every few days and the deer will lose its fear in a few days you could use two potentiometers to control the duration and frequency of the 555 timer, just a quick random turn every time you change the location. I think even one potentiometer might be all you need.

    The second circuit is the one I have in mind:

    http://www.horrorseek.com/home/halloween/wolfstone/TechBase/com555_555TimerCalc.html



    ------
     
    Last edited: Jan 13, 2011
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Not true--a microntroller can run on a tiny amount of power. And you can easily program one with a pseudo-random pattern for the output light. If the cycle lasts (say) 10 minutes, you'd need to be "smarter than the average deer" to figure out that it was repeating. I'm skeptical about whether this would work, but it would be fun to try.

    You could do the same thing with a chain of shift registers--it's what you'd be likely to program the microcontroller to do:
    http://en.wikipedia.org/wiki/Linear_feedback_shift_register
     
  9. topsoil

    Thread Starter New Member

    Jan 13, 2011
    11
    0
    a micro-controller sounds like a neat idea, but how do you program it. Remember I know very little about this stuff and I have nothing but a soldering iron and a shallow pocket book. I'd like to be able to build these things as I need them and not have to buy a bunch of equipment that I'll never use for anything else.

    What would be the minimum required equipment for programing a micro-controller?

    -topsoil
     
  10. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    How many dollars does a shallow purse hold?

    hgmjr
     
  11. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
    PC
    Development software
    Programmer hardware
    Programmer software
    Time
    Time
    Time

    Check out Microchip: http://www.microchip.com/
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Microchip has a PICkit 1 kit that's available for around $35. The small 8-pin 12F series flash-programmable uC's are under a buck each. They can be programmed to spend most of their time "sleeping", where they use very little power. They can also be programmed to use a very low-speed clock; 32kHz; which saves even more power.

    Besides the uC itself, you'd need a couple of capacitors, a few resistors, maybe a MOSFET or two. If you want the thing to charge itself, you'll also need some solar cells. If not, you'll at least need a Cds cell (light-dependent resistor), photodiode, or other means of detecting when it's light or dark out - no sense in running the thing during the day, right?
     
  13. topsoil

    Thread Starter New Member

    Jan 13, 2011
    11
    0
    well, you can buy a product called Night guard for about $20.00. it's where I got the idea. It has a few drawbacks tho' 1) as far as I can tell the light flashes at a constant rate. 2) it's only visible from one direction. So if you want to protect an area you need at least 2 of them, or better yet 4. and you would need even more if you are trying to protect a larger area. and 3) they only last about 2 years!! so need to be replaced often.

    That being said. If I could build these for under $10.00 each and have them work in 360 degrees (i.e. the light on the top) I'd only need 4. Total cost of $40.00 (and some time) instead of the $320 I'd need to spend on a commercial product.

    I mean really! it's just a flashing light. How much can that really cost?

    -topsoil
     
  14. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    ATMEL has the AVRISPMKII ISP programmer that's available for around $35. The small 8-pin ATTINY series flash-programmable uC's are under two bucks each. They can be programmed to spend most of their time "sleeping", where they use very little power. They can also be programmed to use a very low-speed clock; 32kHz; which saves even more power.

    Besides the uC itself, you'd need a couple of capacitors, a few resistors, maybe a MOSFET or two. If you want the thing to charge itself, you'll also need some solar cells. If not, you'll at least need a Cds cell (light-dependent resistor), photodiode, or other means of detecting when it's light or dark out - no sense in running the thing during the day, right?

    All of the software tools you need are FREE.

    hgmjr
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Icwhutudidthar. ;)
     
  16. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I was just saving typing time:).

    hgmjr
     
  17. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    An 8 pin uC (PIC12F683) could do everything you'd like, including drawing virtually zero power in the daytime while the battery recharges.

    After the battery management and 2 LEDs, you would even have enough I/O left over to only turn the LEDs on (randomly) when movement is detected by an IR sensor.
     
  18. k7elp60

    Senior Member

    Nov 4, 2008
    478
    69
    Here is one I created several years ago. All the LED's appear to flash in a random fashion. If you only used 1 LED in the circuit it just might do what you want.
     
  19. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    That is a nice "random" circuit k7elp60.
    You could build it with 4 leds that point to the different directions.

    Bertus
     
  20. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    At the risk of making k7elp60's clever random generator a little more complex, you could add a 555 timer that output a pulse every few seconds and connect it to the G2 pin of the HC138. That would result in a flash of whichever LED happen to be addressed at that moment.

    hgmjr
     
Loading...