I got this on hand http://www.sainsmart.com/arduino-pro-mini.html, how can i connect my Arduino Uno to control it?

Can someone help with an example connection provided to the Arduino side to control the two relays?

If I want the two relays to work simultaneously, I think the 40mA available on the Arduino I/Os is enough to just connect both relay signals to one Arduino I/O pin?

Thanks in advance for your help.

  • 5
    \$\begingroup\$ Two things. One: you're not cooperating. We asked you here to confirm information, which you ignore, to ask yet another question about those same (?) relays. Two: I'm not going to answer any more of your questions until you've accepted some answers. \$\endgroup\$
    – stevenvh
    Jul 17, 2012 at 4:15

2 Answers 2


option A) a standard 20mA opto isolator may be run in parallel off one 40mA drive port. (but not recommended to run at Absolute Max rating of 40mA) There should be enough margin to run at 30mA by changing 501 (500Ω) to 750Ω for each, which may not be convenient.

option B)The board can be modified to run two ports in series for parallel relay operation that save 20mA power consumption by sharing the drive current with the opto isolator.

Remove R1 (501) 500Ω resistor from one channel to put in parallel with other channel. Place on top, hold with tweezer or toothpick and solder in 3 sec max. Add jumper as shown and use only the bottom input to series arranged input. Only one is needed LED for indicator and other is not connected (n.c) enter image description here

  • \$\begingroup\$ @user10768 - please read the edit to my answer before you start tampering with the board (I expect you don't have much experience with this). I explain why it may not work. If you need more explanation on it, just ask. Meanwhile, can you read the type number on the optocouplers (the two ICs next to each other)? \$\endgroup\$
    – stevenvh
    Jul 22, 2012 at 17:39

The Arduino Uno uses the ATmega328 microcontroller. If you check the DC characteristics (page 313) you'll see that output voltages are specified at 20 mA:

enter image description here

That's the rated current to which you should adhere. So no 40 mA, that's Absolute Maximum Ratings (AMR), and there's a notice about AMR in the datasheet (same page):

Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

(emphasis by me)

You should never operate a device continuously at AMR, stick to Normal Operating Conditions. You'll need an external transistor to sink the 40 mA of the two relays, or use one I/O pin per relay, and switch both outputs simultaneously in software. That way you'll keep the possibility to still operate them individually as well.

Placing the two input circuits in series, like Tony suggests, is a way to reduce required current to that of a single circuit. Two objections:

  • Design objection. No details of the parts used are given, but the LED in an optocoupler often has a voltage drop of 1.15 V typical, 1.5 V maximum. The LED will be around 2 V. So we're at 5 V already, and haven't even accounted for the 0.9 V output or tolerance in the 5 V power supply. So this may not work.
  • Practical objection. You'll have to remove a LED, replace a resistor, solder a wire and, depending on how you place the resistor, cut a trace. That's not for you yet.

There's a much simpler patch though, which requires just soldering 1 short wire, the red line in following schematic.

enter image description here

If you drive the top input low the optocoupler's transistor will drive both R12 and Q1's, thus activating both relays. The current will normally be sufficient: even at a 20 % CTR the transistor will drive 4 mA for 20 mA LED current, that's 2 mA per Q1. The relay needs 90 mA, so an HFE of only 45 is needed, what almost any general purpose transistor can do. The patch should look like this:

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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