This page describes the linear actuator that the MOST group made from 3-D printed parts. In particular, it explains how to use it as a syringe pump and a microscope stage.
Printing the parts[edit | edit source]
- Install the MOST SCAD libraries by downloading them as a zip file and adding them to the OpenSCAD path using
export OPENSCADPATH=<*your local path*> (in
~/.profileon Ubuntu), or using
File->Show Library Folderto add them to your OpenSCAD library.
render_part()to the 3D part you want to render. You need
syringe_plunger_retainer(7) at a minimum.
- Before printing the syringe holder (part 5,
clamp_syringe_pump), set the variable
d_syringeto the be the same as the diameter of the syringe body you're using.
- Before printing the motor end (part 1,
end_motor) set the
motorvariable to the size of stepper motor you're using, e.g.
- It's recommended to print the idler end (part 2,
end_idler) with support material.
Hardware[edit | edit source]
The length of the actuator is defined by two smooth rods, diameter 6 mm, and one threaded rod, M5, which is used as a lead screw. A carriage moves over those rods, with linear bearings (LM6UU) on the smooth rods and one or two trapped nut on the lead screw.
The idler end clamps on the smooth rods, and holds the lead screw with two 625ZZ bearings. The motor end also clamps on the smooth rods, and attaches a NEMA11 motor to the lead screw with a flexible coupling.
For the syringe pump, a printed clamping mechanism is used to clamp the syringe body to the idler end, and the piston to the carriage.
The motor is driven by a Pololu stepper motor driver, which is controlled by the GPIO pins of a Raspberry Pi.
The NEMA11 motor we used has a maximum current of 0.67 A. The pololu voltage has to be set to the current * 0.4 V/A = .268 V. Make sure to set it; the default is higher and will burn out the motor.
Bill of Materials[edit | edit source]
To build the linear actuator, the following tools are required:
- Allen key, 2.5mm
- Drill bits (3), 3mm, 5mm and 6mm
- Utility knife
You will also need the following parts in addition to the 3D-printed parts:
|6 mm diameter
|M5, cut to same length as smooth rods
|625ZZ (5x16x5 mm)
|NEMA 11 or NEMA 17
|Allen bolt cap screws and nuts
|M3 8mm x 4, 10mm x 2, 16mm x 4, 40mm x 4
|A4988 or DRV8834
|Capable of delivering between 7-35V
A step-by-step guide (with videos and photos) on building the actuator is available.
Software[edit | edit source]
On the Raspberry Pi, a server is running which accepts connections from programs written in Python. This client program can make remote procedure calls to control the actuator. This is the most low-level and most powerful method of controlling the actuator; it allows easy integration with other actuators and sensors, resulting in a fully automated measurement.
For manual control, there is a program named pump-server; it connects to the Raspberry Pi using its Python interface, and hosts a web site to monitor and control the state of the actuator. The terminology it uses is set up for a syringe pump.
Setup[edit | edit source]
Get the source code from GitHub and add the following files to the same directory as pump-server:
- network.py from https://github.com/wijnen/python-network
- websockets.py from https://github.com/wijnen/python-websockets
- xdgbasedir.py from https://github.com/wijnen/python-xdgbasedir
Web Interface[edit | edit source]
In the web interface, there are three lines: calibration, position, and speed, which are all set up the same way. First, they show the current value of the variable; position is red while it's moving. Then there's an input field to enter a new value. Pressing the Set button will send this value to the server; the current value (left of the input field) shows that the server has updated. Note that setting the position in this way does not move the actuator; it only shifts the server's scale, such that the current position is what it was requested to be.
The bottom line is used for moving the actuator. Putting a number in the field and clicking the Pull or Push button will make the motor move.
Calibration[edit | edit source]
- The actuator driver has hard-coded values for the number of steps per revolution and the pitch of the lead screw. Dividing those gives the number of steps per mm; with 3200 steps per revolution and .8 mm pitch, there's 4000 steps per mm. For calibration, we want to compute the number of steps, so we set the ml/mm to this number. That way, instructing to move a number of ml will actually move that number of steps. In fact any number will work here (it's corrected out later anyway), but having an integral number of steps makes sure there are no rounding errors.
- Move the motor so the syringe is pushed in as far as it can go, then pull it back to a division. Get it as precise as possible, but don't push; if you go over the division, push back a mm and then pull again until you hit it.
- Set the position to 0.
- Move the motor so the syringe is pushed in to the farthest division. Use only pulling to get there. If you've pulled too far, push at least a mm too far back and push it again.
- Read the position. This is the number of steps the motor has moved. Divide the actual distance in ml (end position minus start position, as read on the syringe's scale) by this number; that is the number of ml per step. Multiply this by the number of steps per mm (4000) gives the number of ml/mm that you should use as calibration for this syringe type.