555 timer to trigger relays

Thread Starter

instasquid

Joined Jul 24, 2017
5
Hi,

I'm an electronics noob for the most part, so please be patient with me, but here's what I'm trying to do.

I've been using an Arduino to switch a bunch of 5v Relays, only I find that no matter how simple I make my code the Arduino is unreliable and sometimes fails to trigger my relays. As I am switching the relays as two groups, one after the other, I was hoping to achieve the same effect with a 555 timer in astable mode to replicate the same effect. I was hoping it would be possible to set up one set to trigger when the 555 output goes high and the other to trigger when the 555 output goes low.

So, in trying to achieve that here's where I'm at: I have the attached circuit set up and it can switch LEDs on and off, but it's not outputting enough voltage for me to switch those LEDs for relays and have them trigger. Also attached is a picture of the 5v relay units I'm hoping to trigger.

Any idea how I can solve this? Or is there a better way I can solve this problem I just don't know about?

Thanks!555Timer.png s-l1600.png
 

dl324

Joined Mar 30, 2015
16,841
Welcome to AAC!
I've been using an Arduino to switch a bunch of 5v Relays, only I find that no matter how simple I make my code the Arduino is unreliable and sometimes fails to trigger my relays.
How many is a bunch? How are you driving them (multiple relays from one output or one relay per output)? What are you driving on the relay board? I assume it's a BJT or MOSFET as opposed to the relay coil. What is the drive capability of the Arduino outputs? I assume it's operating at 5V...
As I am switching the relays as two groups, one after the other, I was hoping to achieve the same effect with a 555 timer in astable mode to replicate the same effect. I was hoping it would be possible to set up one set to trigger when the 555 output goes high and the other to trigger when the 555 output goes low.
Seems like it would be more straightforward to just have the Arduino control the relays.

BTW, your astable doesn't have a timing cap and most of us prefer schematics when discussing circuits.
 

Thread Starter

instasquid

Joined Jul 24, 2017
5
Thanks for replying.

Okay, I've rebuilt the circuit. Here is the schematic for how it's set up:
555-take2.png
Does that look better?

I have 5 relays total. Each activated by 5v. When pin 3 is high I want to active 3 of them [sw1 on my diagram], when it's low I want to activate the other two [sw2 on my diagram].

Obviously I planned to use an Arduino for this, but on occasional loops it doesn't activate the relays for some reason. I'm using the relays to drive an air compressor and solenoid valves, so when it fails I get air pressure build up and things break. I figure replacing the Arduino with a simple circuit would be a little more fool proof if I can learn how to trigger the relays from it.
 

EM Fields

Joined Jun 8, 2016
583
Thanks for replying.

Okay, I've rebuilt the circuit. Here is the schematic for how it's set up:
View attachment 131600
Does that look better?

I have 5 relays total. Each activated by 5v. When pin 3 is high I want to active 3 of them [sw1 on my diagram], when it's low I want to activate the other two [sw2 on my diagram].

Obviously I planned to use an Arduino for this, but on occasional loops it doesn't activate the relays for some reason. I'm using the relays to drive an air compressor and solenoid valves, so when it fails I get air pressure build up and things break. I figure replacing the Arduino with a simple circuit would be a little more fool proof if I can learn how to trigger the relays from it.
Try this:
[EDIT]
Where K1 and K2 are the relay coils corresponding to your S1 and S2.
 

Attachments

Last edited:

Alec_t

Joined Sep 17, 2013
14,280
It looks to me as though the relay module in your pic has a jumper for selecting whether a logic high or a logic low signal activates it. Can you confirm?
If so, and the logic signal is not required to source or sink more than ~ 30mA per relay, then you should be able to drive all 5 relay modules directly with the pin 3 output of a 555.
 

dl324

Joined Mar 30, 2015
16,841
Obviously I planned to use an Arduino for this, but on occasional loops it doesn't activate the relays for some reason.
I'd try to determine why it wasn't reliable...
I'm using the relays to drive an air compressor and solenoid valves, so when it fails I get air pressure build up and things break. I figure replacing the Arduino with a simple circuit would be a little more fool proof if I can learn how to trigger the relays from it.
What are the switching requirements for the relays? Are you planning to just switch the banks of relays at fixed intervals? Do you want each bank on/off for the same amount of time? You have to jump through hoops to get a 50% duty cycle from a 555 timer.
 

Thread Starter

instasquid

Joined Jul 24, 2017
5
Try this:
[EDIT]
Where K1 and K2 are the relay coils corresponding to your S1 and S2.
I got my hands of the components for this today and my preliminary test suggests that it works perfectly. I'll hook it up to the full set up and see how it runs, but thank you so much! That's a really easy to understand diagram. I've definitely learned something from following it.
 

Thread Starter

instasquid

Joined Jul 24, 2017
5
I'd try to determine why it wasn't reliable...
I've done my best in this regard, still no clue. Everything is receiving correct voltage and current as far as I can determine. The code is as simple as possible, just digital writes and delays.

What are the switching requirements for the relays? Are you planning to just switch the banks of relays at fixed intervals? Do you want each bank on/off for the same amount of time? You have to jump through hoops to get a 50% duty cycle from a 555 timer.
Relays require 5v 5mA trigger current.
I need them to switch at approximate 75% / 25%. Just assuming that with the 555 circuit I can add some trimpots at R1 / R2 and adjust the timing until it feels right. Is that a naive assumption?
 

Thread Starter

instasquid

Joined Jul 24, 2017
5
It looks to me as though the relay module in your pic has a jumper for selecting whether a logic high or a logic low signal activates it. Can you confirm?
If so, and the logic signal is not required to source or sink more than ~ 30mA per relay, then you should be able to drive all 5 relay modules directly with the pin 3 output of a 555.
Oh, wow. Yes, it does have that jumper there. I've used this type of relay a lot an never noticed it. Amazing. I have a working version of this now thanks to EM Fields, but I might see if an even simpler version is possible using that jumper. Thanks for pointing it out!
 

AnalogKid

Joined Aug 1, 2013
10,986
Can't do schematics right now, so I'll try this in all text.

For physical relays, Start with EM's schematic.
Delete R4, R5, Q1, and Q2.
Connect *both* the bottom end of K1 and the top end of K2 to U1 pin 3.

If you are using modules with onboard drivers instead of relay coils directly, then:
The GND input to both relay boards go to U1 pin 1 (system GND).
Both control inputs go to U1 pin 3.
Adjust the jumpers so one module comes on when the control is high, and the other comes on when the control is low.

ak
 
Top