loading

Building a flasher circuit with a single led to flash Once, then Twice, then Three times, and then loop it?

I've built some simple flasher circuits in high school, but what I need now requires a bit more than a simple flasher. I want to avoid using a micro controller or arduino. I hope there is a simple way to just loop a simple flasher circuit through multiple stages of capacitors or something, but that's why I've come here. :) This is what I need:

A flasher circuit with a single LED, flashing in 3 sets before looping.

It will flash ONCE (Beep). And then TWICE in quick succession (BeepBeep). And then THREE times in quick succession (BeepBeepBeep).

There needs to be a delay between each set of flashes. After the 3 sets of flashes, it will loop and do it again and again.

I would love lots of help on this! Thanks so much.

sort by: active | newest | oldest
rickharris11 months ago

Sorry I missed the bit where you want them to work in opposition

I will leave the other prog up as well though

Start:

High c.2
for b1=1 to 3
sound c.1, (126,50)
next b1
low c.2
wait 2

for b1=1 to 2
High c.2
sound c.1, (126,50)
pause 25
low c.2
next b1
wait 2

for b1=1 to 3
High c.2
pause 25
low c.2
next b1
sound c.1, (126,50)

wait 2

goto start

AdysonW (author)  rickharris11 months ago

Am I on the right track with this? :P

Circuit diagram.PNG
rickharris AdysonW11 months ago

More or less the interface manual I linked to has drawings of how to connect various things.

To program the device your going to need a programming cable, you can make one if you have a serial port on your PC.

Your going to need to build or buy the programming circuit, this is a couple of resistors. See the manual or my Instructable.

Your speaker doesn't need to go through the resistor.

The manuals contain all you need to know.

LED.JPGSonder.JPG

I should have added the images come from the Picaxe manuals, thanks Picaxe,

No connection to c.3. required

You can download the programming editor for free, it contains a simulator that allows you to run your program without having the processor.

The prog is text so you can cut and paste my work into the editor.

AdysonW (author)  rickharris11 months ago

I'm reading through the manuals, thanks so much. You've all been a lot of help.

AdysonW (author)  rickharris11 months ago

And I just noticed this update to your last answer, thank you so much! :D

iceng AdysonW11 months ago

A little chip is the way to go, welcome to the soft-ware group.

A bit of advice everyone can do C programming, so if you have a natural gift of uP ability, do take the time to learn machine code to make you way more employable...

Machine code can do those things that a compiled language like C is too slow to do a desired function like radar or satellite packet re-assembly...

AdysonW (author) 11 months ago

Wow, such fast replies! That's wonderful, thank you for the explanations, and the links. That's perfect.

Since we're using a microprocessor, if I wanted to include a second, identical circuit where instead of a flasher, it had a beeper, could I use the same microprocessor?

To clarify: I want to expand this project to include a beeper with the flasher, in the same 1 2 3 pattern, but opposite in rhythm.

Flasher Rhythm: 1 2 3

Beeper Rhythm: 3 2 1

What would that look like and can I use the same microprocessor, or is it just easier to have two duplicate, separate circuits?

rickharris AdysonW11 months ago

No it will all fit in the one micro. Slightly more sophisticated but understandable I think.

Start:

High c.2
wait 1
low c.2
sound c.1, (126,50)

wait 2

for b1=1 to 2
High c.2
sound c.1, (126,50)
pause 25
low c.2

next b1
wait 2

for b1=1 to 3
High c.2
sound c.1, (126,50)
pause 25
low c.2

next b1

wait 2

goto start

this has been simulated and works fine. No idea on the timings you want/need but they are easily altered. Wait = seconds pause = milli seconds (ie 1/1000 of a second)

AdysonW (author)  rickharris11 months ago

Aha, that's perfect! Thank you so much for all of your help, I learned something! :)

rickharris AdysonW11 months ago

Yes easily, just combine he 2 programs and interlace the commands for beep and LED. using a different output c.1 for example.

recommended reading

http://www.picaxe.com/docs/picaxe_manual1.pdf

http://www.picaxe.com/docs/picaxe_manual2.pdf

http://www.picaxe.com/docs/picaxe_manual3.pdf

iceng11 months ago

Here is that circuit with quick LED flash blips followed by longer pauses endlessly repeating on a 12V power supply.all the timing is easily controlled by R1,R2,R3 and a 1uF 25v capacitor

Be sure to click on the pic to see the entire image !

I designed this circuit just for your application. Any opto-isolator should work by bypassing a resistor to accelerate the 555 timer.

If this is the best answer then click that button for me please

Blink once twice thrice.bmp
steveastrouk iceng11 months ago

Very clever. Just shows you don't HAVE to use a micro, but you have to admit, with something like a Tiny or an 8 pin PIC, its easier.

iceng steveastrouk11 months ago

Yes, a micro would be my first choice like every one here...

It's sooo much easier but what is life if you don't try to do a convolution now and then :-)

steveastrouk iceng11 months ago

I passed your solution round to my junior colleagues to show them how it should be done, old school. Its an important lesson

steveastrouk11 months ago

It can be done with discrete logic - lots of discrete logic - but really, it would be vastly simpler to use a single chip like an ATtiny.

Taylor made for a microprocessor! (sorry for the pun)

picaxe 08M

Code:

start:

sound c2,(126,50)

wait 10

sound c2,(126,50)

wait 1

sound c2,(126,50)

wait 10

sound c2,(126,50)

wait 1

sound c2,(126,50)

wait 1

sound c2,(126,50)

wait 5

goto start

This makes a sharp beep for 1/2 a second, waits 10 seconds makes 2 beeps 1 second apart waits 10 seconds makes 3 beeps 1 second apart. waits 5 seconds and does it all again.

You can make this more complicated, change the time intervals and even make it play a tune rather than a beep if you like.

Needs a piezo sounder attached to the output c.2 it is pretty loud I have something similar for a door bell.

https://www.instructables.com/id/Lets-Program-a-PIC...

Sorry just reread the question and I see you want to flash an LED.

Easier.

Start:

High c.2

wait 1

low c.2

wait 10

high c.2

wait 1

low c.2

wait 1

high c.2

wait 1

low c,2

wait 10

high c.2

wait 1

low c.2

wait 1

high c.2

wait 1

low c,2

wait 1

high c.2

wait 1

low c,2

wait 10

goto start

As before the LED is connected between output c.2 and ground with a 330 r resistor in series.

+1