Shop OBEX P1 Docs P2 Docs Learn Events
Prop relay output board design help — Parallax Forums

Prop relay output board design help

JonathanJonathan Posts: 1,023
edited 2015-02-02 06:04 in Propeller 1
HI All,

Well, the Prop boards I had made work, are using an xbee to talk to an Rpi and I can look at and change values with a web browser on my LAN! Big progress and I am stoked. The project is a controller for both a solar heated hot tub and a solar hydronic heating system. Fun stuff indeed.

Now it is time to make an output board PCB. For both projects I need a mix of DC and AC switching, zone valves, pumps, etc.. I'm going to make space for 6 of each on the board, but only 6 total can be controlled. This makes it flexible enough for both projects. I think I have settled on these two SSR relays:

http://www.clare.com/home/pdfs.nsf/www/CPC1709.pdf/$file/CPC1709.pdf
http://www.clare.com/home/pdfs.nsf/0/8471676520A90EC185256F5600507F99/$file/CPC1976.pdf

Looking at the specs, I see that the input current is too much for a prop pin, especially with several on at once. And the surge control current is waaay too much. So, can I just use a darlington IC like the ULN2003A? Or is there a better solution? If I can use the 2003A, is a 1k resistor in series correct enough?

I just want to make sure I can drive at least 4 of either type of relay at the same time. I'm hoping to send out for the boards this weekend so I can get parts and the boards by the end of next week. I love that excitment when a project starts to come together!

Many thanks for all the help, both on this question and the many others over the last few weeks. I never would have gotten it all going like it is without plenty of help from folks on this forum.

Jonathan

Comments

  • kwinnkwinn Posts: 8,697
    edited 2015-01-30 15:40
    A uln2803A will work fine, and no series resistor is needed. There is a 2.7K resistor on each input. If all the zone valves are 24V AC or DC then you can use the same relays for both with the addition of a bridge rectifier. I can post a block diagram if you want to do that.



    PS You're posting questions in this and the general forums on the same topic and it's causing a bit of confusion.
  • JonathanJonathan Posts: 1,023
    edited 2015-01-31 07:58
    Sorry for any confusion. The other thread is about the relays specifically and I meant this one to include any possible PCB design suggestions. Last time I made a board I got comments on it afterwards and there were many suggestions I wish I had know before I made the board. This time I am hoping to "get it right" the first time, although the other boards work fine anyway.

    I am familiar with bridge rectifiers. In one of the projects my friend wants to run a 12V pump from his 12V battery bank, so I do need to include the DC relays. If I wind up with DC zone valves though, I will do just that.

    So, in between the 2003A and the relays I need a resistor, or the LEDs in the relays will go poof, correct? For 100mA I'd use about a 30 ohm and for 50mA I'd use about 60 ohms. My question is, that provides much less current than the stated surge current control draw of 1A. One of the relays is going to be controlling an AC pump that may have a decent start up draw. Will the pump start with the resistor values mentioned?

    Sorry for any confusion and I guess I'm not asking as many PCB specific questions as I though I would. Any PCB suggestions very much welcome.

    And Kwinn, you are a very, very helpful person. Thanks!

    JOnathan
  • kwinnkwinn Posts: 8,697
    edited 2015-01-31 10:07
    The input for both of those SSR's are IR leds with a forward voltage around 1.2V. A current in the 10 to 20mA range is all you need to turn them on. The uln2803A darlington transistors will drop another 1.2V so you need to subtract a total of 2.4V from the power supply voltage to calculate the resistor value for current limiting.

    For a 3.3V supply R = (3.3 – 2.4) / 0.01 = 90 ohms

    For a 5V supply R = (5 – 2.4) / 0.01 = 260 ohms

    Suggested standard value for 3.3V is 81 ohms, and for 5V is 240 ohms.

    Best to use a 5V or greater supply for the uln2803A.
  • tonyp12tonyp12 Posts: 1,951
    edited 2015-01-31 10:10
    If you just need to drive one (or two) relays

    Provides Robust Interface between D.C. Relay Coils and Sensitive Logic
    • Capable of Driving Relay Coils Rated up to 150 mA at 5V, 12V, 24V or 48V
    • Replaces 3 or 4 Discrete Components for Lower Cost
    • Internal Zener Eliminates Need for Free−Wheeling Diode
    ON Semiconductor NUD31xx (xx = voltage)
    http://www.mouser.com/Search/Refine.aspx?Keyword=NUD31
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2015-01-31 23:23
    Not sure how much can be applied to your needs, but have you looked at the Parallax Digital I/O board kit? http://parallax.com/product/27113 It uses a ULN2803 to drive the relays and it's inputs have inline 1k ohm resistors.
  • AribaAriba Posts: 2,690
    edited 2015-02-01 02:30
    I've only looked at the second SSR datasheet. The minimal current through the LED to switch the Relays on is about 2.5...3 mA according the diagrams. So why do you think a Prop-Pin can not be used directly? All you need is a series-resistor to limit the current:
    attachment.php?attachmentid=113035&d=1422786574

    Andy
    462 x 191 - 5K
  • JonathanJonathan Posts: 1,023
    edited 2015-02-01 07:19
    @Ariba,

    It looked to me that the amount of current for the input depended on the amount of load on the output. So if you wanted to run a heavier load you needed to drive the relay input with more current. One data sheet says:

    Input Control Current 50 mA
    Peak (10ms) 1 A

    And the other is the same except 100mA instead of 50. Doesn't this mean I can't run it directly form a Prop pin?

    @Andrew - Cool looking board and I didn't know Parallax made them. My board is more specific to my needs and a lot cheaper.

    @Tony- I need to run between 4-6 relays for this project.

    @ Kwinn, I was planning on using the ULN2003. It says it's ok for CMOS. Should it still be run on 5V?

    Thanks all!

    Jonathan
  • kwinnkwinn Posts: 8,697
    edited 2015-02-01 08:14
    Ariba has a good point. The relevant specs for the CPC1709 and 1796 are below. Worst case would be 6 CPC1709's and high temperature operation. From the spec sheets that would be 6 outputs at 20mA each, and a total current draw of 120mA. That's well below the maximum ratings of the propeller. As long as you are not drawing high currents from the other pins that would be fine. I generally design for worst case conditions so the current limiting resistors would be 100 ohms for the CPC1709 and 200 ohms for the 1796.

    The CPC1709 spec is a maximum 10mA input current to activate the output, and recommends 20mA for high temperature (>60C) operation. Peak output current rating is 40 Amps.

    The CPC1796 spec is 5mA to activate, and recommends 10mA for high noise or frequency operation. Output surge current rating is 20 Amps.
  • kwinnkwinn Posts: 8,697
    edited 2015-02-01 08:45
    Jonathan wrote: »
    @Ariba,

    It looked to me that the amount of current for the input depended on the amount of load on the output. So if you wanted to run a heavier load you needed to drive the relay input with more current. One data sheet says:

    Input Control Current 50 mA
    Peak (10ms) 1 A

    And the other is the same except 100mA instead of 50. Doesn't this mean I can't run it directly form a Prop pin?

    @Andrew - Cool looking board and I didn't know Parallax made them. My board is more specific to my needs and a lot cheaper.

    @Tony- I need to run between 4-6 relays for this project.

    @ Kwinn, I was planning on using the ULN2003. It says it's ok for CMOS. Should it still be run on 5V?

    Thanks all!

    Jonathan

    There is no reason you cannot use the ULN2003 or ULN2803, but they are not required unless you are going to be drawing a lot of current from several of the other pins. The absolute maximum current into the prop is 300mA, and part of that is required by the propeller chip.

    You can use 3.3V for the ULN if you want to. The reason I suggested using 5V is that the forward voltage drops of the uln transistors and the leds vary a bit. That variation can result in the voltage across the current limiting resistor varying between 1.9V and 2.4V. Add that to small variations in the power supply voltage and the input current controlling the SSR can vary by as much as 50%. That can be a problem that results in intermittent operation. Having a 5V supply reduces that variation to less than 20%.
  • tonyp12tonyp12 Posts: 1,951
    edited 2015-02-01 10:46
    >Tony- I need to run between 4-6 relays for this project.

    NUD31xx comes in dual version so get 2 or 3 of them.
    What stands out with them is that they use Zener diodes so the voltage spike you get when open/close the relay is channeled directly to ground
    and not back up to Vbat to be dissipated through recirculation that creates noise on Vbat supply traces that free-wheeling diode solution does.


    But you do NOT need relay drivers as SSR are not mechanical relays, but you are looking to off-load the current needed to drive CPC1709 10mA IR LED's.
    But for 4 of them you could do direct Prop drive with 330 Ohm resistor
    A HEX buffer/driver IC can off-load currents away from the Prop (OpenDrain is even OK as you don't need push-pull).
    http://www.mouser.com/Semiconductors/Logic-ICs/Buffers-Line-Drivers/_/N-50nahZscv7?P=1z0slkuZ1z0sqwm


    The CPC1976 only needs 3mA, so direct drive with 1K resistor is OK even for 6 units.


    You did not specify what voltages your are switching and if the controller board will be isolated from user, as direct mosfet drive instead of ssr could be done.
    I guess 48V DC?

    I have used 8 of the CPC1966B (for low current 115 VAC) on a single board direct driven by the Prop as 1K series resistor for it's IR_Led is not to high.
  • AribaAriba Posts: 2,690
    edited 2015-02-02 06:04
    Jonathan wrote: »
    @Ariba,

    It looked to me that the amount of current for the input depended on the amount of load on the output. So if you wanted to run a heavier load you needed to drive the relay input with more current. One data sheet says:

    Input Control Current 50 mA
    Peak (10ms) 1 A

    And the other is the same except 100mA instead of 50. Doesn't this mean I can't run it directly form a Prop pin?

    @Andrew - Cool looking board and I didn't know Parallax made them. My board is more specific to my needs and a lot cheaper.

    @Tony- I need to run between 4-6 relays for this project.

    @ Kwinn, I was planning on using the ULN2003. It says it's ok for CMOS. Should it still be run on 5V?

    Thanks all!

    Jonathan

    Jonathan

    These 50 and 100mA numbers are the absolute maximum ratings. That is: if you go higher the LED can get damaged.
    But what you need is the minimal current that switches the relays on. The table says 5mA but if you look at the diagrams it's more like 2.8 .. 3mA depending on temperature, frequency and load.
    The circuit I posted with a 470 Ohm resistor gives about 4mA current through the LED: (3.3V - 1.4V) / 470 = 4mA

    Andy
Sign In or Register to comment.