1
\$\begingroup\$

I'm using an app to explore different 555 timer uses and getting my head around the logic. The app states that this circuit will flip-flop the two LED's on each press of the button, but I can't see why it would work, and I've breadboarded it and it DOESN'T work, for me.

On powering up, pin 3 (output) is low and the top LED illuminates, on pressing the switch pin 3 / output goes high and the lower LED illuminates. After this, no more pressing of the switch does anything, the circuit remains pin3 high, if I power cycle and reset the circuit I get the top LED to illuminate again and the behaviour resumes.

I can reset the circuit by shorting the reset pin, 4, to ground, (which I expected) and my power supply (rated safe for short circuit FWIW) temporarily goes into SC protect mode and the circuit returns to pin3 low. But with no way of the circuit influencing the reset pin in normal use I can't see the logic behind how this would work.

I am probably missing something, however, and I've only got a cheap breadboard so it's always in the back of my mind that it's a bad connection on that, somewhere. But I wanted to just ask if this circuit could legitimately do what it is supposed to do, if so then I'll keep searching for bad connections in my prototype!

555 timer proposed bistable circuit


EDIT, Post Answer

I simmed this circuit and will put the results here for any fellow beginner trying to get their head around it's operation;

555 bistable circuit

readouts of nodes

You can see where the voltage controlled switch presents the cap charge to the threshold/trigger pins causing it to go one way or another when the switch is 'pulsed' by the voltage control on the switch, in this case, or the user in the real circuit. Note, the trigger only happens just after the switch is pressed for a few ms, before the circuit settles down.

Without the 100k resistor the LTspice 'run' command suddenly slows down to snail pace when the virtual switch is pressed, with it rendering the graph going back and forth between states as fast as the model can handle, as Simon Fitch explained below.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I've used a version of that circuit before to toggle a relay on/off with good success. In the version I made use of the two 47k resistors were 10k and the 100nF capacitor was a 1uF. \$\endgroup\$
    – James
    Aug 26, 2021 at 8:42

3 Answers 3

3
\$\begingroup\$

When the switch closes, pins 2 & 6 are momentarily pulled to whatever voltage the 100nF capacitor is charged to in its resting state. So for the circuit to work properly the capacitor must charge to less than 1/3Vcc and more than 2/3Vcc for low and high outputs respectively. If the load on the 555's output is too high it will reduce the output swing range and the capacitor will not charge and discharge to high enough and low enough voltages.

Try reducing the output load by increasing the value of the LEDs' series resistors (reducing LED brightness) to make sure the capacitor is charging to above 2/3Vcc and below 1/3Vcc in the circuit's resting state.

The circuit operates by pulling pin 2 below 1/3Vcc to make the output go high and then pulling pin 6 above 2/3Vcc to make the output go low. The 555 is operating in bistable mode. The resistor values are sized to ensure that neither pin 2 or pin 6 are pulled across the other threshold after the output has switched and before the switch is released, to prevent oscillation.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thanks, I get it! And it looks like it was the output load issue you mentioned, I upped the resistors a bit and it now work's perfectly, thanks! \$\endgroup\$
    – OwenM
    Aug 26, 2021 at 19:10
1
\$\begingroup\$

Based on your description of the circuit's operation, the connections to pin 2 appear to be ok.

Check the connection to pin 6, the threshold input. This must go above (2/3 x Vcc) for the output to go low.

Also, increase the value of the 100 nF capacitor (reference designators?) to 1 uF or more to better reduce the effects of switch bounce.

\$\endgroup\$
1
\$\begingroup\$

Update & Correction

What I have written below makes an assumption regarding the function of the 100kΩ resistor (\$R_\tau\$) and the 100nF capacitor (\$C_\tau\$) which is incorrect.

That circuit works well with those original values, as shown, and does not exhibit astable behaviour as I suggest. Where I state that \$R_\tau\$ should be smaller, in fact it must be much larger than 47kΩ, and it is \$C_\tau\$ that is responsible for momentarily taking the threshold/trigger potential to the opposite extreme.

Please refer to the correct and accepted answer, by James. I will leave this answer here, as I believe it contains some aposite observations, but at its core it does (as Dave Tweed pointed out) miss the point regarding the purpose and function of \$R_\tau\$ and \$C_\tau\$.

Original answer

There are two problems with this circuit that make it unlikely to work, but both can be fixed.

The first problem is with the combination of the resistor 100kΩ (which I will call \$R_\tau\$) and the 100nF capacitor (\$C_\tau\$) connected to the 555 output. The purpose of these is to present a delay between the output state change and the effect this change has on the voltage at pin 6, the threshold input.

If that delay were not present, then as the switch is pressed, the 555's output would go high, as required, but that would immediately cause a rise in potential at the threshold input (to more than 2/3 Vin), and the output would immediately go low again. This would instantly lower the voltage at the threshold input to below 1/3 Vin, which would cause the output to go high again, and so on, for as long as the switch is pressed. It would oscillate like crazy, which you do not want.

Their solution is to introduce a short RC delay between the output changing states, and that change's influence at the threshold input. This delay is chosen to be longer than the duration you expect the button to remain depressed, but shorter than the minimum interval between button presses.

I estimate this to be around 200ms, so if you choose \$ R_\tau \$ and \$ C_\tau \$ to have a time constant in that ballpark, such that \$R_\tau \times C_\tau = 200ms \$, and you are careful to close the switch for less than 200ms, I can see why this circuit will indeed flip and flop between states with each press.

The second issue is that \$ R_\tau \$ is too large to have the required influence on the threshold voltage at pin 6. It has to be less than 47kΩ, to cause voltage excursions there to breach the \$ \frac{1}{3}V_{IN} \$ and \$ \frac{2}{3}V_{IN} \$ thresholds to trigger a flip of output state.

I think a more appropriate value for \$ R_\tau \$ would be 22kΩ. Let's use that value to find an appropriate \$ C_\tau \$:

$$ R_\tau = 22k\Omega $$ $$ C_\tau = \frac{200ms}{R_{\tau}} = \frac{200ms}{22k\Omega} \approx 10uF$$

I think those values should work OK. However, I expect this circuit to oscillate with a period in the region of \$ 2 \times 200ms \$ if you keep the switch depressed.

If this is the behaviour you call "legitimate", then my answer is yes, this circuit can legitimately be used to do what I just described. Here's a CircuitLab version to play with:

schematic

simulate this circuit – Schematic created using CircuitLab

However, I suspect that you do not want this astable behaviour if the switch remains depressed, in which case the 555 is not the solution you need. The thing to grok is that the 555 is designed with timing in mind. Its purpose is to implement time-dependent behaviour, and it contains analogue comparators and other analogue elements that leverage some external capacitive timing element, to that end.

If all you need is something to flip states each time a button is pressed, then you have no need for any kind of temporal consideration. You press the button, it flips. You press it again, it flops. No timing elements necessary.

In that case you need a purely digital solution. Here's one approach:

schematic

simulate this circuit

R1 and SW1 together provide a "power-supply-safe" way of producing a digital high that changes to low when the switch is closed. R2 and C1 just mitigate false transitions due to switch contact bouncing.

You could have used this same switch configuration to drive the reset pin of your original 555 timer circuit, if you wish to solve the problem of temporarily short-circuiting the power supply when closing the switch (you may not even need C1 and R2, in that case).

The meat of this circuit is actually the JK flip-flop, which you can read about on this Wikipedia page. You could also use a D-type flip-flop, or any number of alternative purely-digital solutions.

\$\endgroup\$
6
  • \$\begingroup\$ Unfortunately, you have misinterpreted the original design, which completely invalidates the points in your answer. See the answer by James for the correct interpretation. \$\endgroup\$
    – Dave Tweed
    Aug 26, 2021 at 10:25
  • \$\begingroup\$ Oh well, I read "bistable" and answered in that context. Oh well. \$\endgroup\$ Aug 26, 2021 at 13:41
  • \$\begingroup\$ Actually, I don't think I have misinterpreted anything. I still think my answer is valid and correct. I can't see why anything I've said isn't aposite and true. \$\endgroup\$ Aug 26, 2021 at 13:45
  • \$\begingroup\$ I think this answer covered all my misunderstandings very well! So thanks for putting in the time time, I gave James' answer the tick as it was exactly what he described with the LED current resistors, and then remarkably it worked fine. I'm just doing this for the learning, I'd certainly use a dedicated flip flop or similar if needing this behaviour 'for real', but I'll be re reading this to make sure I've got everything. I think part of why I wasn't seeing how this circuit could work was being dimly aware of the issues you point out, but not enough to 'think through' them, anyway, thanks! \$\endgroup\$
    – OwenM
    Aug 26, 2021 at 19:20
  • \$\begingroup\$ James' point about the switch briefly applying the capacitor's charge voltage is correct, invalidating much of what I have written here regarding Rτ and the astable nature. I think that @DaveTweed and James have a point, after all. Should I delete the post? \$\endgroup\$ Aug 27, 2021 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.