The peristaltic pumps we are using are based on DC motors, which we'll be controlling using L293D ICs. This is a perfect match for us, as this IC supports controlling two DC motors, their speed and direction. If you want to know more about these ICs checkout the adafruit guide on how to use them with Raspberry Pi. Raspberry Pi comes with two hardware timers (PWMs) that we'll be using as the PWM sources for the L293D IC (each for one pump). These pumps work on 12V, so we'll power the entire build with a 12V 1A adapter and use an LM2596 breakout board to generate 5V power required for Pi. Since this is a standalone build with only two dosing pump control, we can safely run this build with Pi Zero, but a Pi 3 (or 2) will work just fine.

Here is the Fritzing breadboard diagram for the entire circuit. In short, we are using two hardware timers (GPIO18 & GPIO19) from the Raspberry Pi as PWM sources and 4 GPIO pins to control the direction of individual pumps. 

Strip and trim one end of two female jumper wires. Solder them to the barrel jack. We'll use this to connect the power adapter with the rest of the circuit.

Solder male header pins on LM2596 module. We'll connect this to the 12V rails on the Perma Proto board using female-female jumper pins.

I am using an Adafruit Perma Proto HAT to mount an 18 pin IC socket header, where L293D IC will be inserted. All jumper wires are made using 22 AWG solid core wire. The blue wires represent GPIO (polarity or direction control) outputs, while green wires represent PWM/hardware timer outputs from the Pi and yellow wires represent 12V PWM output from L293D that finally power the peristaltic pumps.

That's all, insert the L293D IC and we are good to go for mounting the circuit inside the enclosure and test it out.

This guide was first published on Nov 28, 2018. It was last updated on Nov 28, 2018.

This page (Circuit Construction) was last updated on May 12, 2021.

Text editor powered by tinymce.