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!