Are Basic Arduinos feasible for power budgeted WiFi sensors?

I tried some things around for a week or so and still not convinced that Arduino is a good choice for my simple tasks. Maybe, my question is too broad or provocative. However, I'm just trying to avoid stacking with 'suboptimal' technologies in the main stack of my smart home system.

My intent was to use arduinos as cheap WiFi sensors and actuators. With the first, I had a lot of issues even at the start. The main not fixed issues are.

  1. Power consumption. It seems even a bare Uno drains 2-3K mAh bank in a day. It isn't an exact measure, but the magnitude of its hunger was surprising for me. I'd tried a LowPower lib, no luck - the board seemingly just ignoring it; LEDs are on; power is flowing while the sleep/idle should completely off all of this stuff as stated in the lib's docs. Is there a way to use it for low power IoT?

  2. Memory. LiquidCrystal_I2C.h,SoftwareSerial.h, Adafruit_BME280.h, WiFiEsp.h... Oops - 85% out of 32 Kb. It was just a display and WiFi client from the very basic examples. Don't want to rewrite all the libs, barely started I'm out of the space.

  3. WiFi. I guess, it's my fault, but Esp01s via WiFiEsp.h proved as an unstable result with a hard time to goggle something useful about the issues. Are there reliable options to get WiFi on Uno/Nano/Micro (as a newbie I want to go where all the examples are around)?

I'll provide wiring, sketches, etc. if needed. I'm not sure that it's a problem with them.

When you say "WiFi", I automatically say "ESP8266" and the Arduino is no longer involved. In any case, the UNO is rarely appropriate for a "real world" application. "Sleeping" only ever applies to the '320, not to any other part of the board.

I have no idea what "WiFiEsp.h" is or does, but if it does not do the job, then you just need to find proper code for the ESP. :roll_eyes:

I am not following the OP's question.

It sounds like he is trying to kludge an ESP to an Arduino where an ESP alone would do the job. If you need WiFi, use a board that already has WiFi like the Wemos D1 Mini or the NodeMCU that use ESP processors. You program these boards on the Arduino IDE. For example I have a few ESP8266-01's with a DHT-11 sensor that sends temperature and humidity data by MQTT over WiFi to my Home Assistant controller. Most of them have been installed for more than two years. They all have a 5V USB supply, but since they only draw about 80mA, they could work on batteries for a while. In my garden I have a Wemos D1 mini that goes to sleep between readings of temperature and soil moisture. It was designed to be solar powered, but I haven't gotten around to that part of the project yet, so it also has a separate 5V supply.

I do use a few genuine Arduino boards in some projects where the shield I need only works on Arduino footprints, but the Arduino is basically a great learning tool. I always have an Uno on my desk for testing code ideas.

Paul__B:
When you say “WiFi”, I automatically say “ESP8266” and the Arduino is no longer involved.

Yep, I see, there’s cheap NodeMco’s, WeMos’s, and ESP32 boards with WiFi and decent flash storages onboard.

Can you bring some light to

  1. Are working basic (DHT*, BM280, IR or RC, LCD for me) libraries available for NodeMco’s, WeMos’s, and ESP32?
  2. How hard to reduce their power consumption? I need a meager up to 200-300 mAh per day sending tiny data once per minute. Most of the sensors aren’t power hogs and measuring quickly, a device ability to get some real sleep should be enough without moving to low energy protocols. They are all somewhat power-hungry in docs, average expectance is never stated, but the peak is 200-500 mA.
  3. I need an analog input for a few sensors, but all the boards seem to have no(or very few) analog pins. Is it an issue?
    Googled each point but got too much unstructured data or still unclear what to expect in praxis.

Thanks for the insight, yes, the deep sleep inside that library code wasn’t close to its usual (for me) meaning of power conserving states of the whole system, including periphery, etc. Should read that carefully.

Excuse me for saying but this looks like running before you can walk.

The Arduino is a great learning tool and you need to play with and under stand it . Then you can play with wi-fi try other devices such as 8266 , think about low power applications , stand alone 328 applications and so on .
The Arduino itself has an on board linear regulator , a few leds, USB interface all of which make it very usable , but consume power , so on its own not much use for low power - but once you’ve mastered it , you’ll know how to build your project .

I started with a uno , flashed a few leds , added a wifi shield , made a few projects , drive some motors , built some standalone 328 projects that sleep and can run off battery’s ..

hammy:
I started with a uno ... built some standalone 328 projects that sleep and can run off battery’s ..

It's quite interesting to me. As far as I had (mis)read stuff - it is impossible without messing with Uno's constantly powered hardware parts. And the messing isn't only killing the LEDs. Seems the goal calls to do your own power regulator, programmer, etc., as Uno's don't care much about energy conservation. So, I had to say - the result there isn't an Uno board, just based on it.

Could you, please, high-levelly describe power consumption and power management of that your project(s)?

SteveMann:
It sounds like he is trying to kludge an ESP to an Arduino where an ESP alone would do the job.

You are right. I'm were playing around Arduino boards, seems they aren't suited for my goal. Not impossible or even hard, just there're seems better options.

Will you add your input to the stated questions about ESP8266 and ESP32 boards?

  1. In your experience - where are the better libs and examples base? The indoor garden is exactly where I want to use half of the sensors.
  2. How hard to reduce their power consumption to run on batteries?

The first critical approach to running on batteries is - no regulator. An ESP8266 runs on 3 V, so two alkaline "AA" cells are a good source.

The ESP-01(s) and various other modules bring out the "CH_PD" pin which can reduce the current consumption to virtually nil. This can be switched on by an external source - perhaps a sensor - and held on by an IO pin with a diode until the code decides to shut it down. The ESP-01 has four I/O pins available, other modules of course, have more.

Thanks to you all for the hints.

I ordered a few popular ESP8266 boards and bare chips to tinker around.
It seems possible to achieve the goals with them via WiFi not involving modern but less popular LE protocols.

One of the things you need to study is power for WiFi
I do not know of any low power option. 70mA for the duration of the link.
yes, you can make them sleep, but when awake and using WiFi, you need the power.

one option is to use powered deviced
Another is to use RF devices. We all have things that last a year like my Rain Gauge

There is no problem having a always powered WiFi device that also has an RF link to your battery power devices.
Those also sleep for long periods and send signals only briefly. So, in the instant gratification of pressing a button, waking up a device, then have it do something, I think we are not there yet with power and technology.

the good thing is that if you want to turn things off and on, those things would have power so those would be always on.

dave-in-nj:
I do not know of any low power option.

Me neither, I suppose that isn’t possible. WiFi needs the power for reliable connection and a lot of calculations, especially in minimally secure setups. Even expensive specialized low-power WiFi chips have those tradeoffs or better sleep algorithms. However, for environment/plant/light/rain/level/etc. sensors, I’m ok with a constant hibernating. I don’t need that data fast or often. I even don’t need the N sampling modes of the sensors, my server will do all the logic and math out of the raw data.

dave-in-nj:
Another is to use RF devices.

Are you using completely custom RF devices? Or based on mySensor gateways? Or? I’m currently using cheap manufactured ZigBees with a gateway with API in that niche (a fast enough mesh running on CR2032s for years). It will be good to compare the approaches.