This is a little thing I made for artist Petra Vargova. It’s a home-made “shield” for the Arduino, i.e. this circuit fits on top of an Arduino board. (Indeed, it is sitting on top of an Arduino in the photo).
It’s not made using an Arduino shield PCB (which would be much more elegant) but just made using a piece of stripboard and some pin connectors. It contains two relays – two omron G6S-2 4.5 VDC relays.
It works like this: The lower relay is used for reversing polarity. It’s got plus and minus coming in on its input pins (the second from the right on top and bottom). When the lower relay is off (the control pin labeled reverse is low) the power is just connected straight away to the load. When the “reverse” control pin goes high, the power comes out on the two rightmost pins on the relay, which are connected to the load in reverse.
The top relay is just a switch that switches to positive input on and off.
To control it you just need two digital pins on the Arduino, one for the main on/off and one to reverse polarity.