555 timer to trigger relays

Discussion in 'Digital Circuit Design' started by instasquid, Jul 24, 2017.

  1. instasquid

    Thread Starter New Member

    Jul 24, 2017
    5
    0
    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
     
  2. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,742
    2,110
    Welcome to AAC!
    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...
    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.
     
  3. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    8,080
    2,285
    Also no decoupling cap and no pin 5 filter cap.

    ak
     
  4. instasquid

    Thread Starter New Member

    Jul 24, 2017
    5
    0
    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.
     
  5. EM Fields

    Active Member

    Jun 8, 2016
    583
    154
    Try this:
    [EDIT]
    Where K1 and K2 are the relay coils corresponding to your S1 and S2.
     
    Last edited: Jul 25, 2017
    absf likes this.
  6. Alec_t

    Expert

    Sep 17, 2013
    10,261
    2,511
    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.
     
  7. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    8,080
    2,285
    Please post a link to the relay module so we can see what its drive requirements are.

    ak
     
  8. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,742
    2,110
    I'd try to determine why it wasn't reliable...
    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.
     
  9. instasquid

    Thread Starter New Member

    Jul 24, 2017
    5
    0
    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.
     
  10. instasquid

    Thread Starter New Member

    Jul 24, 2017
    5
    0
    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.

    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?
     
  11. instasquid

    Thread Starter New Member

    Jul 24, 2017
    5
    0
    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!
     
  12. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    8,080
    2,285
    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
     
  13. #12

    Expert

    Nov 30, 2010
    18,076
    9,691
    Here's a page of parts from Wendy. They work in MSpaint.
     
Loading...