Linear actuators convert the fast rotation of a DC motor into slow linear movement, and they can provide quite a strong pushing or pulling force. The most basic definition of a linear actuator is that it's a mechanical device that converts energy to create motion in a straight line; contrasted with circular motion of a conventional electric motor. It can also be used to apply a force.
You can easily control linear actuators using a simple H-bridge circuit — put it together with an Arduino and a bit of woodwork, and you can make yourself an automatic crusher for beverage cans — no soldering required!
CAUTION: Linear actuators are strong. This project is about crushing beverage cans, but the actuator will quite happily crush a hand or anything else that you put into the crushing area. So be careful, especially while you’re getting it to work, when there is a temptation to adjust and intervene.1. Wire the Circuit
Figure A illustrates the wiring diagram for the project, and Figure B shows a close-up of the Arduino and H-bridge module.
The L293 module has jumper pins that by default keep its H-bridge circuits enabled, and so only the two Arduino outputs connected to IN1 and IN2 are needed. Conveniently, the H-bridge module includes a voltage regulator that provides a 5V output that you can connect directly to the 5V pin of the Arduino to supply it with power.2. Build the Crusher
The basic structure of the crusher is a length of 2×4 wood. At one end, the actuator is anchored using the fixtures supplied with it. The actuator’s shaft is then fixed to a block of wood that crushes cans against an end stop. Two plywood sides help prevent the can escaping while it’s being crushed.
I haven’t used exact dimensions, because your actuator is likely to be a little different in size than mine. The best way to get it right is to place the actuator on the 2×4 and then calculate the spacings. Remember to leave a bit of a gap between the fully extended crushing surface and the end stop; otherwise, the machine might push itself apart.3. Program the Arduino
const int in1Pin = 10;
Although the actuator will automatically stop when it gets to the end of its travel, this
crushTime period (30 seconds for my motor) sets how long the motor should be on, before reversing.
The setup function controls the whole operation of the project. After setting both control pins to be outputs, it immediately starts the crushing action using the crush function.4. Smash Cans!
Push the Reset button on the Arduino to trigger the crushing action (Figure C). Whenever the Arduino resets, it automatically starts to move the linear actuator. Smoosh!