I am building a solar water heating system for a university project. It is asked to control a water pump to alternate between 0% (off), 50% (half power), and 100% (fully powered) how can this be done? Please include any needed codes and components.
You want us to build it and ship it too?
Component list? How about some CAD and 3D printed parts?
Three setting, off, half, on. Use DC motor hooked to AO line (via buffer) 0V = off, +5 Run, 2.5V, half.
Start by selecting hardware for GPH, etc. Get pump drive requirements, THEN you can talk about controlling it.
Do some of your own research. You're at Uni, LEARN!
Start with the pump and whatever type of motor that runs the pump. What are the water volume requirements? What does 50% power mean? Is it 1/2 motor speed or 1/2 current or 1/2 water pressure? If you want help from the forum, you need to do your part and not just list what the university project has written.
WHAT are the pump MOTOR specs? Have you selected a pump with the required capacity, if no, do so now. If yes, give us dataplate picture or pn & specsheet.
Is this a simple science fair project or has this got to work in the real world? How high is the expected lift (more lift = more power needed)
I see a ball valve. Just turn it off, on, or 1/2.
You got a spec on it? We need to know stall current aka start current (At startup rotor is stationary and needs peak power to get off of zero). 60W @ 12 V is 5A. You need a motor controller at least 20%-25% larger for headroom derating. Real world you don't operate at the hairy edge of the spec.
What is inlet/outlet size? What are you using for piping? PVC? clear 1/2" tubing? Soldered copper?
Do you need to MEASURE flow rate & close the control loop or are you just going to open loop it and hope everything works?
How about a GUI to graphically illustrate the flow? Lights and indicators for the valves? Bells? Whistles?
We are using PVC pipes for the whole sytem, but copper pipes for the water collector. Both with a diameter of 3/8”
I also have to control the pump to turn it on or off or work using half the motor speed.
Moreover, using IoT the water flow rate and water temprature should be shown digitally on an LCD screen. This number is just for show and will not be used for anything. however all of this is set. The water pump will keep on working until manually turned off. I am only wondering on how to control the pipes motor power from 0RPM, 50% of the motor’s maximum speed, and the maximum speed. I made some research and found out it can be done using PWM, however i do not know how to set it up. I am new to using arduinos and it is a fairly new concept to me so im sorry for all the hassle.
Finally something we can work with. The outlet is 1/4" The motor runs on 12V. You need an I2C LCD (16x2 or 20x4). Flow rate implies feedback. So you need to measure flow somehow (a flowmeter with an analog output comes to mind). So now you wanna get proportional control. Measure full open flow rate as calibration. Adjust PROPORTIONAL valve until measured flow is 1/2. Soo, You want a small ball valve with a servo actuator on it in line with the flow meter. Use PWM output to drive the servo until the desired flow rate is met. Control the valve, not the pump. Let the pump run (minimum power consumption wasn't specified). or run open wide on the piping and dial the motor, both will work depending on the hardware you select. If you can't find a proportional valve, then go on to plan B, C, D ... n
Display measured flow rate as % of max. Demonstrate by opening valve and showing 100%, closing valve & showing 0, then dial to 50% flow. Maybe have three buttons or one three position toggle. LED to show pump command. Perhaps a knob (potentiometer connected to an AI) to dial the flow rate and have valve track?
thank you for the helpful feedback. if you could help me with one other thing, i am writing the code which includes a flow reader, 2 solenoid valves with 2 buttons each, and a temperature sensor. i gathered the codes of each individual component from various sources and i want to see if i fitted them together correctly.
[soapbox]
If this is a University project, why have you not been taught to draw proper engineering schematics of your circuit.
If your University is going to pass a Fritzy image as a schematic, the validity of the University's qualifications is very doubtful.
The diagram you have provided is a mass of lines.
Please to ease our doubts, provide a proper electronic engineering schematic.
If you do not know how to, then go looking at the resources of your University and find the lecturer responsible of technical drawing/CAD, NOT FRITZY.
(I hope they don't have a course in FRITZY!!!!!!, Frightening!!!)
Please include on your schematic, ALL power supplies, ALL component names, ALL pin labels and component values.
Images of a hand drawn schematic, like in the old days, will be great, spread your diagram to make it clear to read, it is quite valid to spread you schematic over more than one page.
This is an "How we did it" diagram to your lecturers, make it so it can be read.
Starting now to make readable circuit diagrams will make it easier for you to develop your project, especially as there is more than one person in your project group.
Have you considered that your motor may also get hot running at lower speed, it will need a cooling fan and in the real world a temperature sensor to measure its temperature to avoid over heating.
This thread looks like you have not used your University's resources adequately in the first place.
[/soapbox]
Sorry mate, but at this stage of your education it looks like your University is letting you down.
It is a great project, don't let me deter you from its purpose, but execution of it at this part of your education will make or brake a job opportunity.
Couple of things. You need kickback diodes across the valve solenoid coils.
You show power connections to uno via the barrel connector and the USB. Pick one. Supplying power via both can cause the barrel power to back feed to your computer is your computer is turned off while the project is on.
The solenoids and pump all need separate power from the UNO. The UNO can only handle .2A (200mA) and the solenoids will cause it to reset if you try to get power from the UNO.
Use an LCD with I2C backpack on it. This only needs two wires (A4/5) plus power and ground. It also eliminates the separate contrast pot as this is part of the backpack.