External power for an automatic plant watering system.

I'm developing an automatic plant watering system and have a question about powering it.

The project needs multiple 3.3V, 5V and 12V outputs for sensors, relays, pumps etc

At the moment i'm using a DC bench supply (which will ultimately be replaced with batteries) that powers 3 x LM2596 modules.

All is working fine so far apart from the soil-moisture sensor (capacitive) readings which fluctuate more than they do when tested in isolation. They values do go up or down as it gets drier or wetter but they are too jumpy and it would obviously be best to have them nice and stable.

Is it a good idea to power everything from one source via 3 of the modules? I did try a multi-output voltage regulator that provides all that i need but it was unreliable, i tested them and they had incorrect outputs, including a few that outputted negative voltages when they had positive going in! These are the modules so please avoid them!

I only have experience of simple circuits but wouldn't be averse to attempting to build my own board for this, but it would be great if someone could recommend a module.

Thanks, Gary.

For such current thursty components as motors, and relays, battories are not the best, unless You charge them 24/7 more or less.

All we can give you is hand-waving answers. For better advice we need better information from you. Specs of all the components, including batteries, Arduino, sensors, pumps... But I expect we will be able, once we have those things, to suggest a much simpler design.

Thanks both.

Specs :

1 x Arduino Uno R3 @ 5V/60mA
1 x Water pump @ 12V/400mA
1 x 8-Channel relay module @ 5V/70mA
1 x 8-Port multiplexer for the sensors @ 3.3V/40mA
1 x 8-Port multiplexer for the relays @ 3.3V/40mA
8 x Capacitive soil moisture sensors @ 3.3V/5mA
8 x Solenoid valves @ 12V/160mA
4 x 18650 batteries @ 3.7V/3400mAh (in series)

The plan is to have the Uno (or Nano or Pro Mini to save even more power) check water levels every hour then sleep until the next hour, or perhaps a longer sleep period.

I want to wire the pump in with all the relays so that whenever an individual solenoid gets switched the pump does too.

At any one time the most parts that will be turned on include the Uno, pump, a single relay, both multiplexers, all the sensors and a single solenoid valve, totaling 810mA.

Thanks, Gary.

Hi Gary,

If you are serious about battery life, then moving away from Uno is a good idea. A 3.3V 8MHz Pro Mini is a good choice. Also important is replacing those relays, they are pretty inefficient. For the pump and possibly the valves, use logic-level, n-channel MOSFETs such as stp16nf03l stp16nf06l or irl520 (not irf520!). A tpic6a595 chip might also be an option for the valves, replacing the multiplexer and relays. Then you have no 5V components, only 12V & 3.3V. Alternatively stick to 5V: pretty sure those multiplexers and sensors are 5V compatible.

No way are those multiplexers going to draw 40mA, they draw next to nothing. You may not need them anyway. The Pro Mini has 8 analog inputs, and more than enough digital outputs to drive the pump & solenoids.

Agreed, go MOSFETs instead of relays, and indeed, why those multiplexers?

IRL520 won't switch properly at 3.3V, the other part number I can't find (typo?) - most 3.3V logic level MOSFETs come only in tiny SOT23 package, making them tricky to use. You may want to solder those on breakout boards first.

Thanks both, and thanks for the typo correction Paul. That MOSFET is quite pricey, would these be a good alternative ?

Thanks, Gary.

If i use a shift register for the pump and valves the current would be 560mA, 60mA above the rating for the tpic6a595, would that be safe with extra cooling ?

Just realised i can use the EN pin on the sensor multiplexer to switch them off and save more power.

Thanks for the tip on shift registers, wvmarle you also suggeted this in a previous thread of mine so thanks to you also, i'm quite excited about not using the chunky relay strip now :slight_smile:

Thanks, Gary.

commonground:
would these be a good alternative ?

Yes, those should be ok. As pointed out, they are better with 5V rather than 3.3V on the Gate, so maybe try to stick to 12V & 5V for your design. 3.3V will switch them on, but maybe not fully, resulting in a small voltage drop and increased heat in the MOSFET. 5V should switch them on fully and keep them cool.

Non-logic-level MOSFETs need more like 10V to switch them fully on, yet they are sold to ingorant Arduino users by ignorant vendors as being suitable for 5V. Push them anywhere near their max rated current and they will get very hot!

Have you considered adding solar cells to the project?

Suggestion: control the pump with a pwm pin. You may find the pump is too fierce and want to slow it down a little. You can do that with a MOSFET (but not with a relay).

commonground:
If i use a shift register for the pump and valves the current would be 560mA, 60mA above the rating for the tpic6a595, would that be safe with extra cooling ?

No, wire just the solenoids to the tpic chip. Use a separate (perhaps PWM) Arduino pin to control the pump via a MOSFET.

Idahowalker:
Have you considered adding solar cells to the project?

Thanks Idaho, yes i have and was surprised how cheap the little panels are these days, coupled with a charge controller (TP4056) and a boost converter it seems quite a low cost to add on.

Thanks, Gary.

PaulRB:
Yes, those should be ok. As pointed out, they are better with 5V rather than 3.3V on the Gate, so maybe try to stick to 12V & 5V for your design. 3.3V will switch them on, but maybe not fully, resulting in a small voltage drop and increased heat in the MOSFET. 5V should switch them on fully and keep them cool.

Non-logic-level MOSFETs need more like 10V to switch them fully on, yet they are sold to ingorant Arduino users by ignorant vendors as being suitable for 5V. Push them anywhere near their max rated current and they will get very hot!

Thanks Paul, i forgot to mention the 1602 LCD display so 12V/5V seems the way to go and thanks for the pump/PWM tip.

Thanks, Gary.