Peristaltic liquid pump arduino programming


Perhaps this may a little premature peristaltic liquid pump arduino programming I just got the code to a working state as of this morning, but this project is just a part of my larger project and will be grafted peristaltic liquid pump arduino programming as soon as I can. However, this can be a peristaltic liquid pump arduino programming alone project to be used in a variety of ways.

The way I've configured my app is to select which pump, how much in milliliters it will dose out and a button to set everything into motion. My usage of this project is for dosing precise amounts of nutrient solutions into water for hydroponics gardening. However, this project can easily be used to mix cocktails or even mix paint in an auto body shop.

Before I move on, I must thank the fellow Blynker Fettkeewl for pretty much holding my hand and walking me through the construction of the code, as well as his enuring patience as we debugged my VERY many mistakes along the way.

I see his presence on many other threads doing the same, helping helping helping. He is without question a very commendable man! That said, I will peristaltic liquid pump arduino programming this project in as much details as I have. When constructing the circuitry, I took a few pictures, plus the videos on YouTube and sketches, I think it should be a decent collection of information for someone else to use and improve upon. The pump housing consists of 2 Jebao DP-4 dosing pump modules, a master and slave.

Ironically, the master shipped from China and the slave from the USA, but this may be due to there being more complex circuits in the master, plus the 2A power supply. When shopping for some pumps, I knew immediately that it needed to be controlled by Arduino as that is what I use for my larger project. So more research for motor drivers returned a few different methods, but I eventually settled on a simple TIP circuit. It's pretty well isolated, plus allows for PWM if I choose to peristaltic liquid pump arduino programming on.

The only differences in my circuit and what is shared over there is that I use a 1k resistor between the Arduinos digital pins and the gate of each transistor.

And instead of a dumb button on a breadboard I have Blynk! Here is a YouTube video peristaltic liquid pump arduino programming Link ] I shot this morning to demonstrate that the code that Fettkeewl shared with me worked exactly how I wanted it to.

The perspective is a screensharing app that also shoots video of the project in real time. Here are some pics of the circuits that drive each motor. There are 8 total circuits comfortably situated on a solderable breadboard.

I ruined two other breadboards previously, but I guess the third time is a charm. Here is the calibration sketch that was gifted to me by a kind forum member on arduino. The sketch does involve using a dumb button on a breadboard. I suppose the appropriate thing for me to do is nix the button and make it either a work with Blynk as is, or b readjust the project sketch to count millis while an app button is held HIGH and display it to the terminal widget.

I predict this thread will be adjusted in about 2 weeks to a month! Once ml is produced and the button is released, the output to the Serial Monitor is the peristaltic liquid pump arduino programming of milliseconds that have elapsed while the button pin was held LOW.

Perform this test at least 3 times per pump and record each millis output to find the average. Then divide the average by the amount of times the test was performed 3 and the quotient then becomes the Calibration Value that will be later used in the project sketch.

In the following sketch, the Calibration Value for each pump is grouped into an array called "multiplier" as it is to be multiplied by an additional value supplied peristaltic liquid pump arduino programming the Blynk app. This other value is the amount of milliliters I want a specific pump to produce. The way I wanted it was for this value to be a float so precise dosages could be achieved. The level of precision is setup in the app when you determine the value of each step of the Step Widget.

For my larger project, 0. Just be mindful that when dialing up larger doses, it will take a considerable amount of time to increment or decrement through all of the steps. I suppose it's a minor trade off! This is an int BTW. As it goes, I increment to the pump I want the values to apply to in the first Step Widget, I then in the second Step Widget increment to the amount of ml I want pumped, and once I'm happy with both, I tick the Button Widget and at the next iterance of the function in the Simple Timer, the motor spins and pump produces.