• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need build a circuit that flashes 4x

Gabriel R.T.br

New Member
Guys, I need some help.

I need to build a circuit, that flashes a LED 4 times (only 4x, in a short time, like less than 1/2 second), every time that i click a bottom (click switch).

If you can draw me a circuit that may work, I'll be grateful (cuz I'm still learning circuits).
 

alec_t

Well-Known Member
Most Helpful Member
Welcome to ETO!
Is this a school/college assignment?
 

ronsimpson

Well-Known Member
Most Helpful Member
Here is a place to start. (expanding on what AnalogKid said) The two transistors forms a oscillator and the 4017 turns on one LED at a time. (one output at a time goes high)
1574954555625.png
Next: Like all internet schematics this has problems. You need a resistor with the LEDs to set the current. The 1N4007 could be a small 1n914 or 1n4148.
Here we see some diode logic. Green LED is on when 1,5,7 or 10 is on. Yellow is on for 6 or 4 and Red is on if 3,2 or 9 is high.
The LM555 makes a nice oscillator.
1574955046320.png
This is what the 4017 does. To get the LED to blink 4 time, connect 4 diodes from output 1,3,5,7 to the LED and then a resistor to ground. The LED will be on off,on,off, on off on off like you want.
1574955365593.png
How to get this thing to work with a switch and blink only 4 times.
Connect output-9 to "clock inhibit". When the 4017 counts down to time-9 it will stop working and wait.
Connect you switch to "reset" pin so the switch pulls up and a 10k resistor pulls down to ground. When the switch is not pushed reset is low and the 4017 runs. When the switch is pushed the 4017 goes into reset mode or time-0. As soon as the switch is released it will start stepping 1,2,3.....to 9 and then hold.
1574955717314.png
I never really drew a schematic. I hope this helps you understand how the 4017 works and gives you some ideas.
 

AnalogKid

Well-Known Member
Most Helpful Member
What I was thinking of is that the 555 is both the clock and the LED driver because of its fat output stage. The 4017 or the shift register is a 4-clock delay line that drives the 555 reset input. The Go button resets the shift register or 4017 to enable another 4-clock cycle.

things are a bit different with the 4060 because it is its own clock oscillator and delay line, but it needs an external transistor (2N7000) to drive the LED. Overall, fewer parts.

ak
 

Gabriel R.T.br

New Member
Wow!
(It's a hobby project.)

I'm gonna try all your suggestions guys and see what works best for me.
I REALLY appreciate your help!

(I'm still open to suggestions and schematic ideas if you got any).
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Wow!
(It's a hobby project.)

I'm gonna try all your suggestions guys and see what works best for me.
I REALLY appreciate your help!

(I'm still open to suggestions and schematic ideas if you got any).
Well if you're wanting something to actually 'do it', rather than a school project, the obvious answer is a PIC and a little bit of software - total hardware, 1 x 8 pin PIC (12F1840), one push button switch, one LED and one series resistor for the LED (and a second pull-up resistor for the switch, if you don't want to enable the internal one in the PIC).

So a great deal simpler (and smaller) than a hardware solution, and easily altered in the software to make it do various things, and alter the number and timing of the flashes etc.
 

Gabriel R.T.br

New Member
I think that it's better if I explain exactly what I want to do...

I'm a guitarrist, and I have a effects processor (boss gt 10).

The boss have Manual mode, that can be turned on/off by pressing 4x the "DISPLAY" bottom.

What I'm talking to do is, wire (parallel) the positive and negative wires connect to de "Display mode" bottom swtch, to a 1/4 inch jack input. Drill a hole (carefully) in the back of my Boss GT, and place the 1/4 inch Jack.

I wish to build a circuit and put on a footswitch pedal, plugged on the 1/4 inch jack. So I can turn on and off the "manual" mode in a single click on the footswitch.

(I've used the LED exemple to make easy to understand what i need. But I think that the circuit may be the same, the difference is that the Boss GT is the power source... (If it was for a LED light, I would use a 9V battery or a 12V DC ).
IMG_20191129_175319.jpg
 

Gabriel R.T.br

New Member
Ahh, It doesn't matter the LED on the footswitch (image)
(If it can be added to work with the footswitch, good. If doesn't, don't worry about it)
 

AnalogKid

Well-Known Member
Most Helpful Member
Are you sure the Boss device can respond to four button presses in under 0.5 s? For either simulated or actual button pressing, that's pretty fast. There are a lot of buttons on the unit, which increases the odds of them being polled or scanned rather than direct inputs, which increases the minimum time required between valid entries.

ak
 

Gabriel R.T.br

New Member
I think that it will respond to 4 presses in 0.5,s.
If it doesn't, I can change the pressing rate to a slower response (I could try 150ms ).

I'll keep you informed about this project.

Thank you very much for your help.
 

AnalogKid

Well-Known Member
Most Helpful Member
The output of the circuit in #9 is a 50% duty cycle square wave, so the activation on and off times are equal. For small changes, adjust R1; for larger changes, adjust C1. R1 should always be no more than 10% of R2. The 4060 datasheet has the equation for calculating the oscillator frequency.

ak
 

DrG

Active Member
After looking on p55 of the manual, I second the embedded controller approach. A PIC202 (or an 1840 as has been mentioned) would probably work as would a whole host of others, including an Arduino nano (the cheap clones). There are some advantages and disadvantages to each choice depending, in part, on your programming experience.

First, I would take a look at that switch from the other side. How many connectors are coming out of it? What voltage is there? Not sure if you have already done that. If not, I would advise getting a grasp on what the switch is doing. I have been able to mimic a manual switch press (on, for example, a photographic flash unit) using a micro and an npn transistor (an optoisolator) where the collector and emitter went to the two poles of a switch. That would make things easier, but until you have have poked around the switch, you don't know.

The manual (p55) says to press that button "several times" to get to manual mode. You are saying 4 times and my guess is that is based on experience. Still, the way it is phrased in the manual suggests that there may be timing considerations which are much easy to manipulate in code.

Where is the circuit power coming from and what is the voltage and how much current do you have available? So, if it is 12V and ~100 mA, you could run a 4-wire plug from the base to the pedal (+12, GND, Switch1, switch2). Using promini, for example, you could make use of an onboard regulator. In the case of a PIC202, you would supply the regulator. Similar considerations if you want to use a 9V battery in the pedal.

It is not that I am against a non-micro approach, but at this stage, a micro approach makes more sense...to me anyways.
 

AnalogKid

Well-Known Member
Most Helpful Member
(cuz I'm still learning circuits).
All of the OP's posts suggest to me someone with little experience in any aspect of creating an electronic something. Nothing wrong with that at all, but it does limit the scope of realistic solutions.

Cutting some perf board to size and wiring up the #9 circuit would take me around 30 minutes, so figure 2 hours for the OP. How long does it take to select a compiler, learn it, learn the basics of C++, write the code, debug the code to the point that it compiles without errors, get a programmer, program the device, and then re-debug the code so it actually works? That is a lot of effort to avoid soldering 20 pins.

I've danced with PICs since the 80's and have all the toys, and I still wouldn't use one here.

ak
 

dr pepper

Well-Known Member
Most Helpful Member
The button on the boss is almost certainly going to be multiplexed, relay contacts would work, or you could use something like a 4066 analogue switch to trigger it.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
All of the OP's posts suggest to me someone with little experience in any aspect of creating an electronic something. Nothing wrong with that at all, but it does limit the scope of realistic solutions.

Cutting some perf board to size and wiring up the #9 circuit would take me around 30 minutes, so figure 2 hours for the OP. How long does it take to select a compiler, learn it, learn the basics of C++, write the code, debug the code to the point that it compiles without errors, get a programmer, program the device, and then re-debug the code so it actually works? That is a lot of effort to avoid soldering 20 pins.

I've danced with PICs since the 80's and have all the toys, and I still wouldn't use one here.
You've not danced enough then :D

There are sound reasons that almost everything uses microcontrollers - and in this case it's particularly important, as it's so easily configurable to make it work, uses so few parts, is dead cheap to make, and will be much smaller.

BTW, if using a small PIC it would be C not C++ :D

We're well in the 21th century, microcontrollers make everything easier.
 

AnalogKid

Well-Known Member
Most Helpful Member
Easier is a relative term. Note that the 12F1840 data sheet is 397 p.a.g.e.s long. Think about how long it would take a complete and total noob to figure out how to set the I/O port configuration register bits.

Again, in the time it would take him to wade into the PIC universe and just select the tools he needs, let alone get around to typing his first line of code, he could have a working unit in his lap.

ak
 
Last edited:

gophert

Well-Known Member
Most Helpful Member
Easier is a relative term. Note that the 12F1840 data sheet is 397 p.a.g.e.s long. Think about how long it would take a complete and total noob to figure out how to set the I/O port configuration register bits.

Again, in the time it would take him to wade in the PIC universe and just select the tools he needs, let alone get around to typing his first line of code, he could have a working unit in his lap.

ak
Thank you. I couldn't agree more. I've said this a dozen times on various forums but just get crap. Your two-chip solutions aren't great, both simple on a perf-board and easily understandable.

PS: reading the datasheet is just one level. Then the OP would need to install the software (half-day ordeal if he knows what the various terms mean. Then there is the cost of the programmer, the extra circuitry to load the program onto the chip, and finally writing the code. Each is "easy" but, AnalogKid's solution would be running before the IDE from Microchip is done downloading.
 

Latest threads

EE World Online Articles

Loading

 
Top