fab Lab Logo

semana 12

A Precision Peristaltic Pump Stepper Motor Controller (2017)

I took this assignment in my first try to finish back in 2017. Even though I didn't document it back then, I took some notes, photos, and videos, which allowed me to recover it again. By that time, my idea for the final project was to develop a few separated modules. One of the outputs I was looking for was a new peristaltic pump.

The idea was to use a stepper and bring the most out of its precision. Even though the aim was to make it wireless, I started by developing a simpler version, avoiding to bring wireless communication at that stage. The option was again to use an Attiny45 and extend the previous HelloBoard which ended up being a very nice option:


Final Design

final schematic

Find the Eagle CAD files here

Programming and testing

After some digging I found the used sample basic code for testing:

// Include the AccelStepper library:
// Define stepper motor connections and motor interface type. Motor interface type must be set to 1 when using a driver:
#define dirPin 1
#define stepPin 2
#define motorInterfaceType 1
// Create a new instance of the AccelStepper class:
AccelStepper stepper = AccelStepper(motorInterfaceType, stepPin, dirPin);
void setup() {
  // Set the maximum speed in steps per second:
void loop() {
  // Set the speed in steps per second:
  // Step the motor with a constant speed as set by setSpeed():

After production, it programmed it using my brand new (2017) FabISP. The process was much more straightforward once I left the mac to an Ubuntu pc.