Hi everyone, brand new to Arduino but have messed about with a Micro:bit with my daughter in the past and understand basic electrical systems. I've had a look at the suggested posts on this topic but not found the answer.
I am building an automated plant watering system which will have an Arduino board, 4 capacitive moisture sensors, 1 board with 4 relays and 4 motors. Came from AliExpress.
The sensors are 3.3v and I wondered what is the best way to power these? Can the 3.3v output on the Arduino only power one of these? It is unclear what voltage the motors require although it looks to be either 3 or 4.5v.
I have a 9v battery pack (6 x AA batteries) which will power the motors via the relays, but unsure if I can also power the sensors.
Ultimately it'll only read the sensors once every few hours, run the motor(s) for a few seconds if needed and then go back to waiting. But it could be that 4 motors could run at the same time and all 4 sensors would be powered as well. If the sensors could be turned off when not being read that'd be handy.
Use an external 3v3 power supply; you could look at a buck converter.
Always show us a good schematic of your proposed circuit.
Show us good images of your ‘actual’ wiring.
Give links to components.
Consider an RTC in your design.
The software can be written so only one motor runs at a time.
In the Arduino IDE, use CtrlT or CMDT to format your code then copy the complete sketch. Use the < CODE / > icon from the ‘posting menu’ to attach the copied sketch.
There are dozens if not hundreds of these garden watering projects in this forum, in the project hub and on the internet.
The motors have to have their own power supply.
The sensors are probably ok, check datasheet for the board to see what max pin current is and compare to sensor.
Motors will probably need a wall wart PSU.
I am powering this from a 5V USB mains charger and have monitored the output using a multimeter and it sits at a constant 3.33v, so I assume this is working as expected.
For the time being I'm not looking at the motors, I'm simply getting the code and sensor working.
I connected the VCC and Gnd of the capacitive moisture sensor to the 3.3v and gnd pins of the Leonardo respectively. I then connected the AOUT of the sensor to an analogue pin of the Leo. I should add the specs of the sensor state it can accept 3.3v or 5v input and has a voltage regulator onboard.
At this point everything works wonderfully. I get consistent readings from the sensor.
But, when I go to power the sensor from the Buck board, using the Buck's VOUT and Gnd for the sensor, I get hugely sporadic values delivered. Sometimes correct, sometimes nothing at all.
So I assume the issue has to be the power supply as it works perfectly on the controller supply. I have tried different USB chargers, all 5V, to see if it helps, but it hasn't. I have tried a direct 5V input to the sensor as well, but the same issue.