In this article we will be interfacing a 3.3V water pump using the motor driver.The pump we will be using is the JT-DC3W/3L Mini Submersible Pump.
This pump did not come with connectors so i followed the tutorial on how to add connectors to add female connectors.
To use the water pump you will need:
- The Wifi Block
- PowerStation Block
- MotorDriver Block
Configuring the Motor Driver Block
- First put the MotorDriver block into the workspace by clicking on it in the menu.
- Click on the gear icon to open up the properties panel.
- Click to expand the custom settings and select the dropdown menu for Motor-0. From the menu select Brushed.
- By clicking the question mark next to the drop down menu we can see how to connect the device.
Where
RED --> VCC
BROWN --> GND
Note: Water pump motors can burn out if there is no water running through them so don't run them dry. Before connecting the pump up to the motor driver make sure it is submerged in water. - We can now connect up our pump following the diagram above.
Logic Maker
- Within the logic maker set up the following logic.
There are three options to choose from for the motor driver ACTION Gate.
SetSpeed: By sending a value from 0 - 100 you are able to make the motor move at that percentage of it's full capacity.
Brake: Stop the movement immediately.
Coast: To allow movement to continue but cut power so that the motor will eventually come to a stop - To make the motor move forward we choose the SetSpeed option for M0 where our pump is connected. Each time the play button is pressed the pump will run for that instance.
- If we want to create a pump that will continuously run we can use the logic below. The clock will continuously trigger events so that the pump will keep running. This can be triggered by the top PLAY Gate that will start the clock's pulses. The other PLAY Gate will stop the clock which will stop the pump from running.
- By using the logic above we can now run our water pump continuously.