555 Timer Help

Hope everyone is doing well.

I have a project where I will need to switch an output between toggle and momentary modes.

The 555 timer seems like the right ic for the job.

I have a monostable and bistable circuit working well. I have a toggle switch that is supposed to switch between the two operating modes and a momentary button that sends 5v.
(Button is used to emulate a mega328 output pin).

The monostable circuit works well with the pushbutton, an NPN gets 5v to the base and puts the 555 trigger pin on ground which sends a momentary pulse.

But the bistable circuit is triggered a little differently and I am unsure how to use the same button to trigger it. I tried using an NPN with no success.

How can I get this to work?
And also, is it possible to switch operating modes on a single 555 timer?

I have my circuit posted below. Essentially I want to remove SW3 and use SW2 to control either timer. (I forgot to add a diode between each output pin and led).

Thank you.

The 555 cannot do bistable mode: you need a flip-flop like a 4013 for that.
Herb

Please post the bistable 555 circuit that you have working. Most require two pushbuttons, a set and a reset button.
Example:

Why not use an Arduino? :slight_smile:


EDIT: Arduino cannot easily simulate SW3. Also note that the bistable 555 may be in HIGH state. In this case the monostable one cannot turn the LED off.
What are you trying to do? Using Arduino without 555s will be better. In fact in any application it is better to use a MCU instead of 555 unless you need the large voltage range of the 555.

You have shorted the output pins of the two 555's together, this will not end well...

If you have a microcontroller generating the trigger signal, it can generate any behaviour you
want, the 555's are superfluous.

Note that if you are going to use a 555, that the CMOS versions such as the 7555 are much better
than the original chip, as they don't crow-bar the supply heavily. The original 555 has this behaviour
and generally requires 220uF or more of decoupling as a result.

herbschwarz:
The 555 cannot do bistable mode: you need a flip-flop like a 4013 for that.
Herb

But I have it working, a momentary button which toggles signal high and low. Thats bistable right?

jremington:
Please post the bistable 555 circuit that you have working. Most require two pushbuttons, a set and a reset button.
Example:

I have it as an attachment in the original post, someone also posted it below. I found a circuit online which uses one pushbutton. Works really well.

aarg:
Why not use an Arduino? :slight_smile:

Toggle worked great with arduino, but I had a few bugs with momentary signal. Essentially I have 3 relays all set to momentary mode, lets say 5 secs. If I toggle one, it waits 5 secs and turns off. But If I toggle two relays before the first has a chance to turn off, the first relay stays on and only the second turns off.

If I toggle all three within 5 seconds, the first two stay on and only the third turns off. Each relay has its own momentary function and I guess if I call one function while the other one is still running the first function gets terminated.

Either way I thought having a 555 timer would be simpler and more reliable. I'm probably wrong.

Smajdalf:


EDIT: Arduino cannot easily simulate SW3. Also note that the bistable 555 may be in HIGH state. In this case the monostable one cannot turn the LED off.
What are you trying to do? Using Arduino without 555s will be better. In fact in any application it is better to use a MCU instead of 555 unless you need the large voltage range of the 555.

I didn't even think about that, maybe I can trigger the reset on the bistable whenever I switch modes? Arduino had some problems calling multiple momentary toggle functions, I thought 555 timer would be a simple solution, see above.

But essentially the problem looks like this:

Relay 1 ON
5s Delay
Relay 1 OFF

Relay 2 ON
Relay 1 ON
5s Delay
Relay 1 OFF

Relay 1 ON
Relay 2 ON
Relay 3 ON
5s Delay
Relay 3 OFF

Each relay has its own delay function and if I call multiple at the same time, only the last function gets completed.

MarkT:
You have shorted the output pins of the two 555's together, this will not end well...

If you have a microcontroller generating the trigger signal, it can generate any behaviour you
want, the 555's are superfluous.

Note that if you are going to use a 555, that the CMOS versions such as the 7555 are much better
than the original chip, as they don't crow-bar the supply heavily. The original 555 has this behaviour
and generally requires 220uF or more of decoupling as a result.

Yeah, I have a diode on each output pin, sorry I forgot to draw them in.
Toggle works great on Arduino.
Momentary works great too when I only use one signal.
But when I use 3 separate momentary signals, things get buggy. (see above).

Thank you.

Your code is bad, not Arduino.

I'd first recommend figuring out the state transition diagram for your system, so that you are clear how it
should work. Transliterating that to code is usually straightforward series of tests for transistions.

If you do do it using physical 555's, don't short the outputs together, that will overload the chips and may
damage/destroy them. If you need to combine the outputs you are probably needing an AND or OR gate or
similar.

dennisdgi:
Arduino had some problems calling multiple momentary toggle functions,

An Arduino has no trouble whatsoever performing any such functions - in fact it will do it far better than simple hardware as it can handle "de-bouncing" in software far more reliably than most of the simple approaches.

Of course, you need to be able to write code to do this. :roll_eyes:

dennisdgi:
I thought 555 timer would be a simple solution, see above.

And your solution has been demonstrated to be wrong.

Methinks there is a lesson here somewhere. :grinning:

Appreciate the input guys.

Back to the drawing board for me.