Hi everyone!
I am designing my first project in IoT, however I have some experience in electronics.
My design is a typical scenario, a board reading a sensors and publishing data in a MQTT broker by WiFi, but with some special restrictions:
- The project is powered by batteries
- The sensors are two CWT TH-S (Soil moisture and Temperature) which has a power range of 4.5v-30v
My thoughts:
-
Choose an appropriate board.
I have investigated about what SoC will be appropriate for this project, Arduino, ESP32, ESP8266, ESP8285, RP2040 (Raspberry Pi Pico)... and as far as I know the best for low consumption is ESP8266. Correct me if I am wrong. Now I need to choose a board with that SoC. The most recommended are NodeMCU, Wemos D1 and Espressif ESP8266-DevKit. One of the key differences is if 3.3v input is connected or not to the voltage regulator, to avoid an unnecessary draw. Also ESP12E board is a good option, as it is said to have very low power consumption in deep sleep mode compared with the rest (it is a bare chip, with no FTDI). Obviously the board will read the sensor and then deep sleep. Selecting a board will depend on the next factors. -
The batteries
Here my initial objective is to get the project powered only with batteries, it could be AAA batteries, Lithium CR123, Lithium rechargeable batteries... I don't really mind. I want it to last for about 3/6 months. I know it will be difficult. One sensor read every 30 minutes will be ok, and then deep sleep. As I know this could be difficult to achieve I am thinking of adding a small solar panel as a second option. -
Power the sensors
I think this will condition the full design, as SoC needs 3.3v and the sensor needs at least 4.5v, so I think I can not power by a GPIO pin. My first thought is using something around a 5v battery to power the board and the sensor, taking the power from Vin or VU, but... will the sensor consume power when the SoC is on deep sleep? Perhaps I need a more advanced circuit to cut off the power to the sensors too (a MOSFET acting as a switch controlled by GPIO?). -
RS485 adapter
To communicate with the sensor I also need a RS485 board. I think the MAX485 RS485 is a good option (it uses 5v) but I don't know if someone will advise me of a different option.
I have read some tips about reducing the consumption of the board, like removing leds or replacing the LDO by one with minor quiescent current, or selecting a board with minimum components, with no FTDI, etc.
So at the moment I need your experience about similar projects powered by batteries:
a. Do you think solar panel is mandatory or I could get 3-6 months only with batteries?
b. How could I power the sensors and the RS485 and cut that power when the SoC is in deep sleep? or is this unnecessary because that consumption is not appreciable?
c. Should I use a SoC different from ES8266?
PD: Now that I write it... I think it should be easier going solar...