Which microcontroller for a battery-powered field sensor? It needs to last a year
Translated from Türkçe by AI ·
Hello, for my graduation project I’m building a box that measures soil moisture + temperature in a field. My advisor wants the data collected in Hermetry, and the department opened an organization account for me. Once the box is installed I don’t want to touch it again, I’m aiming for it to run at least a year on 2 AA batteries.
I have an ESP32 DevKit, an Arduino Nano, and an old XBee (Zigbee) module my advisor gave me. I tried deep sleep on the ESP32 and saw 9-10 mA in sleep on the multimeter, which I guess won’t get anywhere near a year. Honestly I don’t fully know how to do the calculation either.
Which microcontroller should be chosen for a job like this? I wrote zigbee in the tag, but I’m not sure I’ll be using it.
Merhaba, bitirme projem için tarlaya toprak nemi + sıcaklık ölçen bir kutu yapıyorum. Hocamız verilerin Hermetry’de toplanmasını istiyor, bölümün hesabında bir organizasyon açtılar bana. Kutuyu kurduktan sonra bir daha dokunmak istemiyorum, 2 adet AA pil ile en az bir yıl gitsin diyorum.
Elimde ESP32 DevKit var, Arduino Nano var, bir de hocanın verdiği eski bir XBee (Zigbee) modülü. ESP32 ile deep sleep denedim, multimetrede uykuda 9-10 mA gördüm ki bu bir yıl etmez herhalde. Hesabı da tam bilmiyorum açıkçası.
Hangi mikrodenetleyici seçilir böyle bir işte? Tag’e zigbee yazdım ama emin değilim kullanacağımdan.
Translated from Türkçe by AI ·
The ESP32 should actually be at microamp level in deep sleep, the 10 mA may be coming from the USB chip and LED on the DevKit board. Measure again with the bare module.
ESP32 deep sleep’te mikroamper seviyesinde olmalı aslında, 10 mA DevKit’in üstündeki USB çipi ve LED’den geliyor olabilir. Çıplak modülle tekrar ölç.
Translated from Türkçe by AI ·
That may be right, I was measuring the DevKit itself. But there is another problem: the field is about 2 km from the faculty building, and there is no Wi-Fi there. I should have said that at the start, sorry about that.
Doğru olabilir, DevKit’in kendisini ölçüyordum. Ama başka bir sorun var: tarla fakülte binasından 2 km kadar uzakta, orada Wi-Fi yok. Bunu baştan yazmam lazımdı, kusura bakmayın.
Translated from Türkçe by AI ·
At 2 km Zigbee won’t work then, it struggles to cover even a few hundred meters in open areas. You’d need a repeater in between, and the battery will be a headache too.
2 km’de Zigbee de olmaz o zaman, açık alanda bile birkaç yüz metreyi zor geçer. Arada röle koymak lazım, pille de uğraştırır.
Translated from Türkçe by AI ·
How often do you need to send a measurement? The calculation depends entirely on that.
Kaç dakikada bir ölçüm göndermeniz gerekiyor? Hesap tamamen ona bağlı.
Translated from Türkçe by AI ·
Every 15 minutes is enough. My supervisor said even hourly measurement would be fine.
15 dakikada bir yeterli. Hocam saatlik ölçüm bile olur dedi.
Translated from Türkçe by AI ·
Last year I built almost the same thing in a vineyard. 2 km, no Wi-Fi, one measurement every 15 minutes; if it were me I would do it with LoRaWAN. You also have to choose the microcontroller together with the radio.The one I used was the RAK3172 module (it contains an STM32WL, the LoRa radio is on the same chip). In sleep it draws around 2-3 µA, and transmitting takes a few hundred milliseconds. With a small packet every 15 minutes, 2xAA comfortably lasts a year, especially if you power the sensor through a MOSFET only at the moment of measurement. I would not recommend the ESP32 for this job, because connecting to Wi-Fi alone drains the battery.On the Hermetry side: they have their own LoRaWAN network server, the frequency plan comes from the gateway (in Turkey you get an EU868 gateway and sensor), you add the device with OTAA, and Class A is enough. The only requirement is a LoRaWAN gateway that sees the area (a gateway that supports Basics Station, or a licensed router). If one is mounted on the faculty roof, 2 km is no problem. For a start, this page is good: İlk LoRaWAN sensörünüzü bağlayın.
Geçen yıl bir bağda neredeyse aynısını kurdum. 2 km, Wi-Fi yok, 15 dakikada bir ölçüm; ben olsam LoRaWAN ile yapardım. Mikrodenetleyiciyi de radyoyla beraber seçmek lazım.
Benim kullandığım RAK3172 modülüydü (içinde STM32WL var, LoRa radyosu aynı çipte). Uykuda 2-3 µA civarı, gönderim birkaç yüz milisaniye. 15 dakikada bir küçük bir paketle 2xAA bir yılı rahat çıkarır, sensörü de bir MOSFET ile ölçüm anında beslersen. ESP32’yi bu iş için önermem, Wi-Fi bağlanması tek başına pili yiyor.
Hermetry tarafı: kendi LoRaWAN ağ sunucusu var, frekans planı gateway’den geliyor (Türkiye’de EU868 gateway ve sensör alırsın), OTAA ile cihazı ekliyorsun, Class A yeterli. Tek şart, alanı gören bir LoRaWAN gateway olması (Basics Station destekleyen bir gateway ya da lisanslı bir router). Fakülte çatısına bir tane konursa 2 km sorun olmaz. Başlangıç için şu sayfa iyi: İlk LoRaWAN sensörünüzü bağlayın.
Translated from Türkçe by AI ·
Thank you so much, teacher. I asked the teacher, and there is already a LoRaWAN gateway on the department’s roof, nobody told me 🙂 I ordered a RAK3172, and when it arrives I’ll add it with OTAA and write back. I’ll keep the ESP32 on the bench for testing.
Çok teşekkürler hocam. Hocama sordum, bölümün çatısında zaten bir LoRaWAN gateway varmış, kimse bana söylememiş 🙂 RAK3172 sipariş ettim, gelince OTAA ile ekleyip yazarım. ESP32’yi masada test için tutacağım.
Translated from Türkçe by AI ·
A note: make the soil moisture sensor capacitive; resistive ones corrode out in the field within a few months. That’s what happened in our field.
Bir not: toprak nemi sensörü kapasitif olsun, rezistif olanlar tarlada birkaç ayda korozyondan bitiyor. Bizim sahada öyle oldu.
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

