I need to hook these up in the simplest possible way so that I can get programming.
The first two (moisture and water level sensors) are quite simple I will take the 5v from the Arduino to a breadboard tail, and power the water level and the sensor with that. That's the easy part
The solenoid... help.I assume I will need a relay module. Something like this. I would hook it up to the 5v from the breadboard, and then switch it on or off as I need to.
The solinoid only needs less than 400ma. The sensors even less (around 30ma) each. So I should be totally within the 800ma for the board. But... am I missing anything here? Am I doing something really stupid?
Bonus question: what's the simplest way to run this using batteries, and small solar panels to recharge them? They will be in sunshine every day. So my idea is to prevent a million cables, and use a battery recharged by the sun for perpetual use.
400mA will certainly burn out the Uno. You will need a separate power supply for the solenoid.
The relay module should also be connected to the separate supply
Bugger... OK, good to know.
Can I take the 6V from the same cable that provides power to the Uno? That is, can I piggyback myself "in parallel" to power the switch?
So the power would look like this:
The standard 5V/1A (maybe I need more than 1A?) power supplier to the Arduino Uno, going straight to the power rails on the breadboard (is it crazy to do?)
Then power the Arduino with the 5V from breadboard
Power the relay module with the 5V from the breadboard
Power the sensors also from the 5V from the breadboard
Simplest way is to power every thing from 12V and drive the solenoid at about 50% PWM to keep the voltage down. Use a power driver board instead of a relay board.
when using an external power source, I MUST supply between 7V and 12V. The power supplier that came with it was 5V... go figure! That's why I was confused
At this point I will need to buy a 12V power supply to supply the Arduino, and I CANNOT use the 5V pin to supply the solenoid, since 400ma is too much, right? The specs for the solenoid say <2.5W. Not sure this helps
So... what's my best option here?
Could this work:
Buy another solenoid, something that will work with 12V
Buy another power supply, 12V
Cut the power supply wire, and have in parallel the Arduino cable and the 12V rail of the breadboard
Supply the sensors from the 5V from the Arduino (they use zero power)
Sounds like a good idea? (please say yes...!)
I could get a solenoid that needs 12V,
I would buy a 9V adapter and a 5V buck regulator. Connect the 9V to the Uno Vin or barrel jack and to the 5V buck. Use the 5V buck output to power the relay and solenoid
Do you know how long the device will take to dry out and tell you the water level is below the end of the sensor? Might be important. Or are you making the assumption the sensor will be able to tell you the exact level of the water the sensor in immersed in?
I haven't gotten that far yet. I will check the water level, and will only open up the solenoid once it's been under a certain level for X hours. To refill, I will let water in and will stop the intake once the water level reaches a certain amount. I will need to check what "certain amounts" means -- I will know once I have the sensors connected...