Jump to content
 

Alternate flashing LED circuit


JDW

Recommended Posts

  • RMweb Premium

Soooo, I'm in need of some help and calling on the might of RMWeb collective knowledge to solve a problem for me.  I need a simple circuit to flash two LEDs alternately, but with a pause in between - FlashA>pause>FlashB>pause>FlashA>pause etc, what would be the best way?  Oh, and it needs to be small, simple and compact enough to fit inside a model aeroplane!

 

Thanks :-)

Link to post
Share on other sites

Try PICAXE probably even cheaper,

 

http://www.picaxe.com/

 

Software is free, including several flowchart programs for beginners. No special downloader required just a simple USB lead. Extensive manuals free to download with plenty of examples of both circuits and programs along the lines you require. Also a very helpful forum if you get stuck. PM me if you are interested.

 

I have no connection to the company.

 

Richard

Link to post
Share on other sites

  • RMweb Gold

Soooo, I'm in need of some help and calling on the might of RMWeb collective knowledge to solve a problem for me.  I need a simple circuit to flash two LEDs alternately, but with a pause in between - FlashA>pause>FlashB>pause>FlashA>pause etc, what would be the best way?  Oh, and it needs to be small, simple and compact enough to fit inside a model aeroplane!

 

Thanks :-)

So good to see 'alternate' being used correctly, rather than as an alternative to 'alternative'!

Link to post
Share on other sites

Have you considered a level crossing flasher unit? Maybe a US-type so there's no steady amber before the reds flash. I've no doubt the options above are great, but they would assume some understanding of electronics. A mystery. To me, at least!

Link to post
Share on other sites

  • RMweb Premium

Thanks for the answers, its food for thought and will require a lot of investigating, I think I'll need to start off with a dictionary to understand most of it!  (But at least I used alternate right - thank goodness my degree has come in useful for something!)

Link to post
Share on other sites

  • RMweb Gold

What are the flash-pause-flash-pause timings?

 

post-12815-0-18211000-1480848112.png

 

What are the times of A, B, C and D? (try and give a "prototypical" range or tolerance.)

 

Does A=C?

Does B=D?

Does A=B=C=D?

What Colour is A and C?

 

What will the power supply be? (Battery, Wall-Wart, voltage range, endurance?)

Is the aircraft remote-controlled or is it a static model?

How to power (switch) the circuit on or off?

 

 

Kev.

 

Link to post
Share on other sites

Are you trying to model the two blinking lights you see the on a plane where one blinks then there's a pause, then the other blinks and vise versa?

 

An astable wouldn't work unless it had a fairly long duty cycle equal to the pause, with edge triggered monostables to provide the blink on each rise cycle.

 

A microcontroller could handle this fairly easily with a bit of code. Alternatively a two phase clock circuit similar to that used on a 6800 microprocessor would provide two non overlapping pulses. You would need a 555 timer plus a couple of logic chips would do it. You could use a 4027 JK flip flop in toggle mode plus a couple of AND gates to gate the 555 clock in combination with the two flip flop outputs.

Link to post
Share on other sites

The Arduino Uno is a fairly cheap AVR based platform. The Bootloader can be used to programme the ATmega328 chip, then it can be put on a smaller circuit board with a couple of extra components such as a crystal and a couple of small capacitors for the clock. The Arduino comes preloaded with a demo programme called blink which is fairly easy to follow and understand. This programme could easily be modified to add another output and LED with delays to provide the effect you are looking for. as Dutch_Master has pointed out, there are smaller AVR'sout there, but AVR studio is not as easy as Arduino because the Arduino libraries take a lot of the complex stuff out of the code writing.

Link to post
Share on other sites

Here's a block diagram of the two phase clock circuit which will blink the two LED's with a pause in between. I have only done an outline sketch showing the main fundamentals without detailing all of the pin connections and components required. I would need to build the circuit on a breadboard to refresh my memory as to where all the other pins connect such as Preset and Clear on the JK bistable. The main point is that when J and K are connected to the positive rail, the flip flop toggles between Q and Q COMPLEMENT on the rise of every clock cycle so they are effectively dividing it by two. The gap between the rise and fall of the 555 waveform, or the mark/space ratio, does not have to be equal. By choosing the resistor and capacitor values for the 555 circuit you can set as short a blink and as long a pause as you like. The flip flop will maintain the balance between both LED's because it uses the rising edge of each clock cycle to toggle which gate is enabled, and therefore which LED can be lit by the pulse. The AND gates are necessary to combine the outputs of the flip flop with the 'high' pulse of the 555 output in order to ensure that the LED's are only lit when the flip flop output is high for that AND gate, and the 555 pulse is high. Be careful if choosing an edge triggered flip flop to make sure it is triggered by the rising edge and not the falling edge. I think the 4027 is rising edge, so a 4027 dual JK flip flop will probably do it. The AND gates can be a 4081 quad AND gate I.C.See sketch drawn on BD CAD 2.0 below.

 

post-6737-0-90547700-1480853937_thumb.jpg

 

Aternatively you could use a 4017 decade counter/divider, which has 10 outputs which rise and fall in sequence with each clock pulse provided by the 555. You don't get the same pulse/ space ratio control as you would using the two phase clock, but each LED will be lit on every 10th pulse, or with two LED's on Q0 and Q5, they will flash 5 pulses apart which will probably give the desired effect. See sketch below:

 

post-6737-0-82336400-1480854138_thumb.jpg

Link to post
Share on other sites

  • RMweb Premium

Wow, thanks for all the responses guys, and for going to so much trouble to post diagrams as well as long explanations, its all very much new territory for me!  I should maybe have been more specific, but BabyDeltic seems to have hit the nail on the head in the post above.  Yes, its the wingtip strobe lights we're talking about, a strobe flash on one side, followed by a pause, followed by a strobe on the other side.  Apparently.  I'm no aircraft enthusiast, just got roped in to help with a friend's kit build on which he wants to go the whole hog and add working lights etc too.  He's a very accomplished modeller, and produces some fantastically detailed planes, so don't want to let him down if i can help.  It'll likely be a while yet before anything much happens, we were just trying to figure out if its possible and how, and how to fit it all inside (its a 1:48 scale Hercules, so not exactly tiny!), and it is sounding do-able...

 

Thanks again for all your input

Link to post
Share on other sites

  • RMweb Premium

Oh, I forgot to answer SHMD's other questions - its a static model, I'm not sure yet what the power supply will be, again it should be easily concealable, and rechargeable, all suggestions appreciated!  Although something like a large watch battery should be ok too if positioned somewhere it could be changed frequently.  There will probably be other lighting effects too, interior, instruments, possibly landing lights, the difficult bit being the alternating strobes, if we couldn't crack that nut, the whole thing was a none starter so we haven't given much thought to the rest, as that can be made to fit in fairly easily now we know this is doable!  I'm not sure how long the pause should be, probably a second or two - can of worms alert: Do we scale down the pause like we scale down colour...?   :O  

 

Thanks again

Link to post
Share on other sites

Oh, I forgot to answer SHMD's other questions - its a static model, I'm not sure yet what the power supply will be, again it should be easily concealable, and rechargeable, all suggestions appreciated!  Although something like a large watch battery should be ok too if positioned somewhere it could be changed frequently.  There will probably be other lighting effects too, interior, instruments, possibly landing lights, the difficult bit being the alternating strobes, if we couldn't crack that nut, the whole thing was a none starter so we haven't given much thought to the rest, as that can be made to fit in fairly easily now we know this is doable!  I'm not sure how long the pause should be, probably a second or two - can of worms alert: Do we scale down the pause like we scale down colour...?   :O  

 

Thanks again

 

On the 4017 circuit, which is the simpler to build of the two, if you wanted exactly two seconds in between you would need a 500mS duty cycle on the 555 timer so you would get a 2000mS pause followed by a 500mS flash on LED1 and vise versa for LED2. Or four clock counts then a flash on the fifth, followed by the same again for the each alternate LED.

Link to post
Share on other sites

  • RMweb Gold

I had some boards already built (that I could quickly program) to run the aircraft's "Strobe" lighting.

Here is the simplified circuit, only 5 components if ran from 4.5v batteries :-

 

post-12815-0-78276900-1480866064_thumb.png

Just 9, or so, solder joints if you don't bother with a board (vero) and just directly solder the components to the chip.

 

 

Below is the "Basic" program I put into the PIC to run the lights :-

post-12815-0-09971300-1480867119_thumb.png

I hope you can understand it. (Most of my {green} typing is just for the comments!)

I found that a "quick flash" and the nothing for the rest of the 1 second period (before repeating on the other wing tip) looked best.

 

 

The compiler I used is (free) from MikroElektronika but you will need to find a way to "program" the PIC.

But if you don't want to "compile" the code then here is a copy of the "hex" file that the programmer will need:-

post-12815-0-50846900-1480866922.png

 

 

Advantages :-

Easy to alter

Very few components

Expandable

 

Disadvantages :-

Needs a Programmer

 

 

 

Or alternatively, here is a different project/solution, for aircraft lights, I randomly found on the web:-

 

http://picprojects.org.uk/projects/navlights/index.htm

 

 

Kev.

 

 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...