Control Peristaltic Pump With TA7291P and an Arduino
5 stars based on
Perhaps this may a little premature as 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 in as soon as I can. However, this can be a stand 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 peristaltic liquid pump arduino projects 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 peristaltic liquid pump arduino projects without question a very commendable man! That said, I will share 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 peristaltic liquid pump arduino projects project.
So more research for motor drivers returned a few different methods, peristaltic liquid pump arduino projects I eventually settled peristaltic liquid pump arduino projects a simple TIP circuit.
It's pretty well isolated, plus allows for PWM if I choose to later 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 [ 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 peristaltic liquid pump arduino projects 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 peristaltic liquid pump arduino projects 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 amount 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 peristaltic liquid pump arduino projects to find the average.
Then divide the average by the amount of times the test was performed 3 and the quotient then peristaltic liquid pump arduino projects 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 by 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 peristaltic liquid pump arduino projects 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.