I am doing a basic project relating to home automation in which i want to glow an LED/Bulb using a PLC wirelessly.

A BLE module DBM01-S is used which takes signals from an Android phone and transfers it to Arduino UNO R2 using UART.

After that i want to interface the Arduino with the PLC so that it gives just a digital HIGH to the PLC which on receiving it can give a digital HIGH to the bulb connected.

Can someone please elaborate on how to easily connect an Arduino and a PLC for such simple application.

  • \$\begingroup\$ You have a digital input module on your S7-1200? (SM 1221) Or what kind of input do you have available there? \$\endgroup\$ – Arsenal Feb 8 '15 at 12:49

I suggest you use a relay for this connection. The PLC is most probably supplied by the main and you will need good isolation for safety reasons.

Any digital output of your Arduino can drive a small transistor to activate a relay.


simulate this circuit – Schematic created using CircuitLab

[Edit: add single ground solution - no galvanic isolation]

Rem: signal is inverted !


simulate this circuit

|improve this answer|||||
  • 1
    \$\begingroup\$ At that point you might as well skip the PLC and just switch the light with the relay, making this not a useful response to the specific question of communicating with a PLC. \$\endgroup\$ – Chris Stratton Feb 8 '15 at 17:44
  • \$\begingroup\$ You may if this is what is needed. But in many case the PLC is installed by people that have an agreement and you may have to interface to the existing installation. Nevertheless, if you don't need galvanic isolation and grounds are one, you can replace the relay by a resistor to the PLC supply and directly connect the collector of Q1 to the PLC. \$\endgroup\$ – MAC Feb 8 '15 at 18:01

Most PLC inputs are either 24 VDC or 120 VAC. Either way, you won't be able to wire a pin directly from the Arduino (5 VDC output) to the PLC input. You'll need to add a relay. This could be either an electromechanical relay or a solid-state relay. The Arduino output pins will provide 40 mA at 5 VDC, so you'll need to find a relay that will switch at this voltage and draw no more than 40 mA.

Here is an example of a solid-state relay that might work from Opto 22.

If you choose an electromechanical relay, you'll need to add a surge suppression diode across the coil of the relay.

Without knowing more details on the input card you are trying to connect to (AC or DC, sourcing or sinking, card-supplied voltage or external voltage required, etc.), I can't really help you with a schematic.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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