Electronic – Switching between +9V and -9V (using 5V logic)

actuatoratmegamicrocontrollerrelaysolenoid

I got some linear actuators today and found out that when I give them +9V they extend and -9V makes them contract. This is easy enough to test by hand, simply by wiring the actuator up to the battery backwards for the negative voltage, but when I hook it all up I'm going to be driving all of them from my Atmega1284, which uses 5V logic.

In anticipation of this, I got a bunch of relays that run on 5V logic as well so I can control whether or not there's +9V running through with my 5V microcontroller. However, I have no way to programmatically provide -9V.

My question here is how can I switch between giving +9V and -9V when all I can do from my microcontroller is either push out 5V or 0V? Will I need more than just my relays? Is there some spiffy EE trick to make this work? Thanks!

Best Answer

You can use two SPDT relays to select +9 or -9 or 0V.

Both energized = off, Both de-energized = off, and if one is energized and the other is not it will drive the actuator in one direction or the other.

schematic

simulate this circuit – Schematic created using CircuitLab

To suppress electrical noise, add a bridge rectifier (W04G, for example) across the actuator (the AC input terminals) and connect the + terminal to +9 and the - terminal to 0V

enter image description here

Related Topic