Hi, I have no experience in electrical circuits. Over the past week, I have done a lot of research and put together the following plan. Would really be happy if someone can help me with this.
Objective :
To develop a system that can do aquarium water changes.
TheSetup
Place the submersible 5v dc water pump at the lower level of aquarium (the level until which we want to remove).
Connect a host to the solenoid valve which is then connected to a mechanical valve which will stop flow once aquarium is filled.
A water flow sensor is attached to the pump and the solenoid valve each to detect flow.
The Plan :
A button (switch) is pressed, start the water pump. Turn off water pump after 1 minute. The water should continue to flow out even with no power until water level reaches pump level.
NodeMCU will wait till the flow in the pump stops (as detected by the water flow sensor).
After water drained to the desired level, Solenoid valve should switch on allowing water from the host to flow in. Once water reaches the mechanical valve, it will stop. (once flow is stopped as indicated by the flow sensor), the Solenoid valve should close.
End of process.
Problems faced
I am not sure where to connect the sensors wire from the relay to the NODEMCU (IN1 and IN4).
I am also not sure where to connect the sensor wire from the water flow to NodeMCU (the yellow line in the Image.
I would also be grateful if someone can look at my drawing and advice me if this will work or if I’m doing something wrong.
The pumps and water flow sensors are 5v. The solenoid valve is 12v.
Any other advice will be much appreiated. Thank you.
What software are yiu using to program the nodemcu? Esphome? Arduino IDE? Those connections should be defined there.
Also this us for community guides that people post to help others do other things. It’s not supposed to be used for asking for help on this kind if thing.
You should change the category.
But once you get it finished and working THEN post your guide back here.
I concede it seems that some do have 5v step downs like d1 mini’s. Still I have a few that are 3.3v only goes back to accurately listing the parts you are using.
Absolutely not. ESP 8266 is 3.3v only. The newer model ESP32’s are 5v both are referred to as nodemcu’s. OP has a 8266 in his diagram.
No, the OP has a NODEMCU board in his diagram that contains an ESP8266 chip.
As far as I know all ESP8266 NodeMCU’s are 5vdc in. I’ve used them for several years now and they have all been 5vdc input voltage. And now that I think about it I believe they even have a higher range than that even. I haven’t looked it up but I seem to recall the VIN range being as high as 12v. I’ve never used anything like that to test it out tho. I just stick to 5vdc USB power supplies.
The ESP8266 chip is supplied by the onboard regulator.
Now, if they were using a standalone ESP8266 board apart from a dev board then I completely agree with you. 3.3vdc it is.
EDIT:
I just looked it up and the VIN spec is 4.5 - 12vdc depending on your source. I saw either 7-12vdc or 4.5-10vdc (mostly 4.5-10)
It says it can take up to 24v. Does it mean if i use this i can make do with just 1 power supply? So i power all the devices with a single 12v power source. Will that work?
I plan to use esphome. I havent used it before but it dont look too complicated.
We were not on the same page. I was referring to the bare ESP board. That base board does appear to have a built in regulator that would enable you to use from 6 to 12V.
Thanks for confirming. Do you also happen to know which pin would supply 12v? It appears to me that there is no 12v output. Does it mean i have to tap the power from the source directly?
Im sorry if my questions sound stupid, this is my first time doing this.
I am not sure about that. If you look at the base board, that vi (circled in red) seems to correspond with the 3.3v out in the nodemcu also circled in red.
Some good advice on which pins to use here (scroll down to the table):
EDIT: also as your fishes lives depend on this working correctly I would not use it unsupervised until you are very confident that it is working correctly.