By: Lasse Jespersen
When you are building anything that requires a micro linear actuator to go BOTH ways, such as raising or lowering a table, or pushing or pulling a deadbolt in order to lock a door, you can use the mechanical relay. It works well enough for simple applications. Over time, however, their internal switching mechanism – a copper element – will oxidize. It may then no longer carry a current well, which will result in heat generation inside the relay, or it will simply fail to power your circuit. When this happens, you will either need to take it apart for cleaning, or else replace it. Very annoying if you have some embedded device which must Just Work(TM).
There are other issues with a relay, the most important being the switching time. It takes a LONG time to switch compared to a transistor-based H-bridge. The H-bridge switches at the exact moment it receives the command to do so. It contains no moving parts, and provides two pathways for the flowing current to run through. These paths are mutually exclusive, which means that only one path can be ON at any given time. This is handled well by an Arduino Nano, which is plenty for driving several H-bridges in tandem. By a rough estimate, it should be possible to switch polarity on this H-bridge a couple million times per second… But don’t do that.
How to Build an H-Bridge
When you make it yourself, far below the specifications for the transistors, you will have a polarity switcher that will last you a lifetime. Literally -it will never fail when you use parts that can tolerate loads higher than are required… Morai Motion micro-linear actuators use 2.76W at full 20N load. An H-bridge for high-current applications – like this one – is NOT cheap if you buy it prebuilt.
2.76W under 20N load is very far below the limits for the H-bridge I recommend for driving them.
You will need these parts to construct it:
- 1 x Arduino Nano V3
- 2 x 4K7 resistors
- 6 x 1K resistors
- 2 x TIP120 NPN transistors
- 2 x IRF630 N-channel MOSFETs
- 2 x IRF9630 P-channel MOSTFETs
- 1 x 10uF capacitor, capable of 12V or more.
- 1 x 12V/>=1A power supply
You will need a breadboard with an assortment of jumper wires, some perfboard, a ~10W soldering iron, and solder. If your soldering iron gets too hot, it will rapidly destroy some sensitive components, like your Arduino – the rule of thumb is to heat a pin for a few seconds, apply solder, leave the iron touching the joint for a few more seconds and then remove it.
You should use a decent breadboard for this, and when you are happy with your H-bridge, it is easy to move it onto perfboard and solder it together.
To save you the time, here is an overview of the TIP120 NPN transistor, IRF9630 P MOSFET and IRF630 N MOSFET, in voltage and amperage throughput:
TIP120 => 60V, 5A
IRF9630 => 200V, 6.5A
IRF630 => 200V, 9A
The ‘absolute maximum’ watts in the datasheets are for heavily heatsinked transistors. ~75W heat dissipation is impossible without a large heatsink. At 2.76W, however, we are quite safe.
Two actuators at 5.52W, or four at 11.04W would be quite alright as well, but then we will probably have to attach copper heatsinks to the flanges of the transistors.
Wire the positive wire of your power supply to the ‘+’ part of the power rail, and the negative (it is usually black) to ‘-‘. Be sure to keep the circuit unpowered for now – never wire a live circuit. Attach a jumper wire from ‘+’ to ‘VIN’ on the Arduino, and a wire from ‘-‘ to GND. Carefully follow the wiring in the schematic, and when you are done, double-check the wiring. I did not turn a single transistor into magic smoke when I powered the circuit – not because of high intelligence (hah!) but because I always double-check. The capacitor in the upper right of the schematic is necessary only if your microcontroller resets when switching polarity. It was not necessary in the circuit on my breadboard. You can use 10 to 100uF, but the higher the value, the slower it will discharge. 10uF is adequate. Refer to the schematic above for wiring the rest.
When the Arduino Nano is powered, and you feed 12 volts into the H-bridge, you will see that the onboard LED will blink at intervals. When it is on, your actuator will protract its shaft, and when it is off it will retract it. You can read more about Arduino port registers and bitmath at the ‘Relevant Arduino Links’ at the bottom of this article.
Note: In the circuit on the breadboard I am not using a Morai micro-linear actuator. It is a generic actuator, which uses a whopping 18W – It is NOT the one you can get here at MicroMechTronic – which is much sleeker.. and so very _micro_.
If you decide to experiment, and go above the expected 2.76W on this H-bridge, pay attention to the temperature on the flanges on each transistor. If you burn your finger when touching it, you should attach a heatsink. Copper is much better than aluminium for this. Yes, you can wire several micro linear actuators in parallel if you wish.
Relevant Arduino specific links:
TIP120 NPN Transistor
IRF9630 P-channel Power MOSFET
IRF630 N-channel Power MOSFET