0

i am mainly from software background with very very basic level of electronics/microcontroller knowledge.

i recently did a small iot project for moisture/temp detection following this tutorial : https://docs.aws.amazon.com/iot/latest/developerguide/iot-moisture-raspi-setup.html at a very high level this uses raspberry pi4 and a capacitive moisture sensor (which is plugged into raspberry pi) to send the data via aws iot to my email.

I would like to upgrade to where i can have multiple stemma capacitive moisture sensors (1 for each of my indoor plants) without obviously buying many raspberyy pis...i did some basic research and i believe i would need some sort of microcontroller with each moisture sensor for each plant that is battery operated and can send data either on wifi/mqtt (something like this https://diyi0t.com/microcontroller-to-raspberry-pi-wifi-mqtt-communication/) or bluetooth...then my raspberry pi can act as a server to each of these devices send data to aws.

i kindly need guidance on what piece of cheap battery operated (ideally don't want to plug in)/wifi or bluetooth enabled hardware (microcontrollers?) is best for individually having many moisture sensors connected.

also is my thinking correct?

  • your thinking is correct ... you could also use a timer to do the irrigation ... teach the system how often plants need to be watered and how much water is required for each plant – jsotola Jun 29 at 1:30
  • At what frequency do you need updates? What battery lifetime can you live with? How many sensors? How far apart! Wi-Fi is easy but may eat your battery very quickly if you do frequent updates. Bluetooth may be much better in that respect, but you’ll need some other device to act as a gateway. Zigbee would be yet another option, but it’s even more difficult. – jcaron Jul 1 at 18:17
0

You got the right idea, let's jump into your questions:

First of all, you need to think about the microcontroller itself. Since you said that you need wifi/bluetooth, I could recommend an ESP8266 (wifi only) or an ESP32 (wifi and bluetooth, also more expensive).

Now for the battery: there are some dev boards which already include all of the battery management stuff, like some LILYGO boards that can be easily found on AliExpress or the likes, with support for the commonly found 18650 cells. Another option would be to get a regular dev board with no battery slot, and add it yourself if you want something more involved.

| improve this answer | |
0

Below is what I would do if I were you.

I would completely skip the Pi (unnecessary design complications and need for additional hardware + code) and ensure the nodes send data directly to the AWS over wifi(for indoors) using MQTT.

For ensuring a longer battery life, I would to the following:

  1. Ensure the nodes are in deep-sleep most of the times and wake up only when needed to send the sensor data and then go back to sleep. Something like below.

deep sleep-->timer elapse INT-->wakeup-->turn on radio-->connect to wifi-->connect to server-->read sensor data-->transmit data-->disconnect from server--> disconnect from wifi-->turn off radio-->reset timer/clear INT-->go back to deep sleep.

  1. Your battery life will also depend on the rate at which you transmit the data. I would generally do it once in a few hours in your case.

  2. To get a good estimate of how much power you node draws and how long it can last on battery. Measure the current drawn when a node is in deep sleep + measure the current drawn when full active and then do the math based on (2) and you can get a rough idea of how long the device could last on battery.

For suggestion for the micros, I would go with an AVR (something like the atmega1280 or 1281) and use an external module for wifi in case I decide to switch to a different one at some point in time, it would be easier.

| improve this answer | |
  • thanks Vinay, which board to use for atmega1280...ardiono mega is expensive than ESP8266 (do you think ESP8266 can't do the node to aws job if we remove pi from the equation)... – Fahad Najib Jul 3 at 8:00
  • ESP8266 should do the job too. But I'd prefer using the AVR with their Atmel Studio IDE and ASF for generating drivers etc. I have had a good experience with these in terms of reliability, documentation etc unlike the esp8266. atmega1280 is cheap as controller, think in terms of MCU not the whole board when it comes to cost. – Vinay Divakar Jul 6 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.