1
\$\begingroup\$

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!

\$\endgroup\$

3 Answers 3

7
\$\begingroup\$

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

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Perhaps you should mention that this is the relay version of an "H-bridge" circuit -- just about any solid-state H-bridge driver with suitable ratings will do the job just as well, although the relay version is nice for exposition's sake :) \$\endgroup\$ Commented Nov 24, 2016 at 1:04
  • \$\begingroup\$ @ThreePhaseEel Good idea, any suggestion for a suitable chip that will do level conversion and handle a reasonable current? \$\endgroup\$ Commented Nov 24, 2016 at 1:06
  • 3
    \$\begingroup\$ With the bridge rectifier (or 4 diodes) the contacts will arc more and it might upset your AtMega via EMI. \$\endgroup\$ Commented Nov 24, 2016 at 1:09
  • 3
    \$\begingroup\$ @scohe001 -- Sphero's comment should read "Without the bridge rectifier..."...but with that correction, he's right -- the diodes provide a current path for the inductive spikes the coil generates (it acts like the ignition coil in a car, generating a spike every time you cut the power to it) so they don't fry other things (like relay contacts or switching transistors). \$\endgroup\$ Commented Nov 24, 2016 at 1:12
  • 2
    \$\begingroup\$ @SpehroPefhany -- half of a L293D can be used to do the trick (possibly along with an inverter), although the L293D is rather ancient xD \$\endgroup\$ Commented Nov 24, 2016 at 1:13
2
\$\begingroup\$

You will need to provide a 9V supply to be able to power the linear actuator. You do not need to have a -9V supply as you can achieve that simply with a polarity reversing scheme controlled by two of your relays. Here is a basic schematic of how you would hook it up. If you use relays with very low power 5V coils you could control them directly from the Arduino otherwise use NPN transistor buffers as shown here.

The Arduino controls to the two relays can apply 9V in either polarity to the actuator to move it in or out. To stop the actuator motion switch both relays to apply either 9V or GND to both wires of the device.

enter image description here

\$\endgroup\$
2
  • 3
    \$\begingroup\$ I assume your actuator actually has three conditions that apply to it: 1) drive to extend ...2) drive to contract and ...3) no voltage to stay where it is. Unfortunately this schematic has only two positions 1) driving to extend and driving to contract, there is no stable state (which I assume you'd want). What you need is an H-Bridge which can be driven by your processor. \$\endgroup\$ Commented Nov 24, 2016 at 1:31
  • \$\begingroup\$ @JackCreasey - You are correct regarding the original picture I showed. I will modify the answer to correct this problem. \$\endgroup\$ Commented Nov 24, 2016 at 11:03
2
\$\begingroup\$

The L293D motor driver/ H-Bridge IC should work nicely for this purpose:

http://www.ti.com/lit/ds/symlink/l293.pdf

This chip is commonly used for controlling motors and because it's able to reverse the polarity of the motor, you can change the direction in software.

For your application this also provides you with the benefit of not having to have a -9V power rail, you just have to provide the chip with 5V and 9V.

Here is a connection diagram: a busy cat
(source: electroons.com)

VCC2 (left bottom corner) should not be hooked up to the 5V, but to the 9V supply. 3,4E should be connected to the 5V supply.

Another nice thing: the chip can drive 2 actuators, if you need them.

Just hook up RA2 and RA3 to your MCU, and common the ground of the chip and your processor.

\$\endgroup\$
7
  • \$\begingroup\$ You're saying that I would connect the 4 grounds to both the ground of the microcontroller and the ground of my 9V power source? Also what signals would drive each actuator? Would it be like @Spehro's answer where RA3 high and RA2 low would mean the actuator is extended and the opposite would be contracted? \$\endgroup\$
    – scohe001
    Commented Nov 24, 2016 at 17:48
  • 1
    \$\begingroup\$ The grounds are internally connected, for playing on a breadboard, you only have to connect one of the L293D grounds to your MCU ground and the 9V ground. The actuator would be connected instead of the motor in the upper diagram, so between 1Y and 2Y. \$\endgroup\$
    – Manawyrm
    Commented Nov 25, 2016 at 6:51
  • 1
    \$\begingroup\$ Pulling 1A high and 2A low will let current flow in one direction, 2A high and 1A low in the opposite direction. \$\endgroup\$
    – Manawyrm
    Commented Nov 25, 2016 at 6:51
  • \$\begingroup\$ I wired up the L293d like you specified and things were working at first, but the actuator was moving lest and less and things smelled weird and I'm pretty sure I've borked the chip. Am I missing a resistor somewhere? Or is this chip just not rated for 9V? \$\endgroup\$
    – scohe001
    Commented Nov 28, 2016 at 5:38
  • \$\begingroup\$ So I looked around online and it seems the chip can take up to 36V, but only 600mA. My solenoids were made for cars (for the locks), so they pull 2 or 3 Amps which is probably why things are dying. Do you know of a motor driver that can take more current? \$\endgroup\$
    – scohe001
    Commented Nov 28, 2016 at 6:00

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