I am currently working on a project that focuses on monitoring the soil parameters (moisture, pH, NPK, temp, EC, etc.) using industrial grade sensors and ESP32 as mcu.
The prototype system that I've built so far is shown in the schematics here. The ESP32 runs on 5V through a DC-DC buck step down voltage regulator. The sensor uses RS485 protocol hence the MAX485 converter is needed.
I'm planning on implementing a low power consumption design by putting the ESP32 in deep sleep when idle. There's a lot of tutorials online that can guide me how to do it, but my question is since the soil sensor is running on direct supply (the min voltage needed is 12V), does the sensor drain battery if the ESP32 does not request data from it? (Anyone has experience using such sensor?).
I don't have much electronics knowledge in general, any idea how I can measure the power consumption by the components? Also let me know if you guys have any other idea(s) to improve the soil monitoring system, I'd definitely appreciate it.
curious, the esp32 is 3.3 what driver board are you using, might want a volt divider on the rx line so you don't clobber the esp with 5v if your module is a 5v unit..
Sorry my english isn't really good. Are the connections bad?
I've run the system so far the sensor is giving consistent readings. No idea how it's going to sustain in the long run though.
I do have a multimeter, however i didn't know how to use it and i broke a sensor as I might've short circuited it for connecting the ammeter in parallel with the sensor and voltage buck converter
Its a nodemcu esp32wroom
I've read online the Vin needs 5v for the Vin port
I was asking about the max485??
I know your esp32 is 3.3v..
But that max485 may be a 5v unit, which means the RX pin on the esp32 could be sent 5v which is not good, should be max 3.3v..
Apparently, the sensors would run even when the esp32 isn't requesting data from them. So I decided to implement a n-mosfet that acts as a switch, together with a pull-down resistor. If the input from an esp32 I/O is low, it would turn off the switch and disconnect the circuit, effectively reducing the power consumption by both sensors and max485 module.
I don't think you are ever getting good battery life with this setup. That step down converter is probably drawing a lot even without load. You could use 6V battery for esp and boost converter for your sensor. Then put a relay to cut voltage to boost/sensor when not needed.
Hmm
My initial idea was to add more components that operate at 5v in parallel with the max485 module in future, so 6V might be too much for them, but if i use 5V battery, its voltage discharge over time might not be enough to power those components. (From what I understand) Unless I use another voltage regulator but that might consume more current no?
Also, doesn't relay consume more current when ON? that's why i plan to use transistor.
Either way, I'll have to check current draw by the buck converter to see if it's significant enough to turn off loads when not in use. Gotta find time to test this system in the lab again.
I would power max485 from esp 3v3 pin. I don't know your module, but mine are working reliably.
Advantage of relay is that it only draws current when "on", so if your setup is sleeping 99.99% of time, consumption would not be relevant.
https://my.shp.ee/gXGtxAx
Not sure if you're able to access that link but it says the module needs 5v as i tested powering it using 3v esp32 pin and it wasn't enough.
So i'd still need to use a transistor then, because there's thousands of them but a relay module in the lab which comes back to my initial question: was the mosfet connection correct? :S
No , link doesn't open. But you can have a look at your module to identify voltage regulator.
I don't see any sense to look at your mosfet circuit, before you have verified current draw of your buck converter. I would estimate that it's going to suck your battery quickly even if you don't power up your sensor. That's why I proposed boost converter circuit option.
I also wrote "Actually , if you have boost converter with enable-pin, you don't necessarily need relay at all."