Controlling Pumps

You'll use a motor controller "featherwing" to control your water pump.


  1. Start by soldering together the motor controller featherwing. Here are all the parts unsoldered. Your terminal block my be black instead of blue.


Follow this guide for the soldering process

2. Solder wires onto the terminals of your pump motor. It doesn't matter which wire you connect to which terminal; The motor is reversible.




3. The motor will need its own power supply. We'll use a USBC board to power the motor. You'll need to solder two wires to a USB breakout board.

  • Red wire goes to V or VBUS

  • Black wire goes to GND

4. Use a screwdriver to attach the motor and the USB power to the featherwing motor controller as shown. Do not reverse the V and GND power connection!


here's a short video of how to use the screw terminal blocks



5. Get a USB cable to power your motor and plug it in. You should see the motor controller light up even if the microcontroller is not powered.

6. Remove power from all your electronics. Then plug your motor controller into any open space on your tripler (as shown).

7. You should be ready to test your pump. Add power back to the pump and plug in the microcontroller for programming. This test code will turn on the pump for 10 seconds and then turn it off for 10 seconds.

Note: if you want to change the direction of the motor, just change this line (see comment at end of line)


Challenges:

  • The motor speed can be controlled by using numbers between 0 and 1 (or between 0 and -1). Can you use a for loop that will ramp up the speed of the motor as it turns on?

  • Can you have the motor only turn on when a light sensor reading is low?