Note: The setup includes three 12V peristaltic pumps, one 12V water pump, and two 12V solenoid valves. The power supply is an MS150-12 with 12V and 12.5A output.
As a beginner with Arduino, I'm unsure if the wiring I've done for this setup will work correctly. The setup incorporates the following components: SEN0161 V2 pH sensor, DHT11 module for air temperature and humidity sensing, JSN-SR04T waterproof ultrasonic sensor, SEN0244 total dissolved solids (TDS) sensor, and either a DS18B20 water temperature probe or a DS18B20 module.
My idea for the wiring is as follows:
If the pH level rises, an INTLLAB 12V 5W peristaltic liquid pump will add a pH down solution to lower the pH until it falls within a certain range.
If the pH drops, a peristaltic pump with a pH up solution will turn on until the pH rises to the desired range.
For the TDS sensor, if the nutrient level is low, a peristaltic pump with a nutrient solution will add nutrients. If the nutrient concentration is too high, a 12V solenoid valve will open to dilute the solution.
The ultrasonic sensor will control a solenoid valve to maintain the desired water level.
If the air temperature drops, a water pump will turn on to spray water through a sprinkler system.
I'm uncertain about the connections I've made to the relay module and would appreciate assistance in verifying the wiring and setup.
thankyou very much if you can check my circuit huhuhuhu
Someone might. It would be better for you to check it yourself.
Not by building it and powering it on, rather break the project into as many parts as feasible, wire and test each part from schematics you didn't invent, with code that maybe you didn't write but came from examples from libraries you'll use or the work of others with the same components.
If you familiarize yourself with the basic wiring and code for every separate area of functionality, putting those pieces together with the process you want to end up with will be very much easier.
For the logic and testing most of the wiring without the possibility of damaging anything, use the wokwi simulator
when i've done stuff like this, i usually start with one thing. if you're uncertain about the relay module, i'd just connect one relay input to the arduino and write some test code to turn on/off the relay using commands entered thru the serial monitor. LEDs can be used both on the input to the relay , as well as on the output
when satisfied that it works as expected, connect a pump and see if it controls the pump as expected. And once you've gotten one pump working, it shouldn't be difficult to get other relay/pump connections
it make sense to include test code in your final program, the same code used above and additional code that can sequence each relay/pump on/off for later when there's some question if things aren't working.
the next step will be to wire up your pH, TDS and ultrasonic sensors. add test cmds to read and print their values and come up with a way to affect what they measure: pH and nutrient baths with different levels that probes can be moved between.
once everything is together, testable and tests successfully, develop your application code. test code should allow you to report sensor levels and well as determine which relay/pumps have been turned on/off by your application code.
yes, that test code can be larger than the application code. you can either start with it or end up writing it later when there are problems after wasting time trying to figure out of the application code is written correctly
If you build and test one component of a circuit at the time, then you already know whether that works.
After all components are individually tested and determined to be fully functional, start putting them together, one piece at a time, testing as you go.
Hint: breadboards are for temporary experiments with low power logic circuits, and the tracks cannot handle motor currents or power supplies.