Remote IoT on Battery

Hi @bestes,

Let’s start with this one.

A few of us are working on getting an ESP8266 to work with only periodic check ins through Cayenne. The objective is to sleep most of the time, conserving power thus allowing running on batteries.

Having the new data history feature will be pretty rad for this.

The MKT1000 makes this even easier as it includes a Lithium Ion battery charger for easy portable operation.

Can anyone think of an application where remote, battery power operation would be beneficial?



Like… Just about everything I do :slight_smile:

E.g. Penguin nesting box monitoring etc
School kids educational / tech / IT projects.

To get around long life data logging over remote (~200m) distance I use a slow serial ‘backhaul’ mesh protocol I knocked together that runs over 433 MHz. This draws single digit uAmp power while updating every few seconds. I have been using ~1uAmp sleeping PIC(axe) chips and budget ASK RF modules.

I have been hanging out for a python interface so I can use PySerial and read this direct into some proposed function blocks or Lib to bring in the data as virtual variables.

Several manual home grown IoT projects are up and streaming on line now so would really like this. I would Love to bring it into Cayenne and share it around.

~ Andrew

1 Like

Hey @picaxe,

Good to see you :slight_smile: You’ve been asking for python interface from the beginning! Good news is, we are nearing completion of our MQTT API. Once it’s out, Custom Code ability on the Raspberry Pi is up next. Hang in there!


Asset tracking and sensors ‘out in the field’ (ag IoT) come to mind initially. Many environments don’t have access to power readily available. Which would also mean these same environments would need a different communication protocol other than Wi-Fi probably. We could start a whole 'nother topic just on various communication protocols :slight_smile:

Hmmm, I’m not sure if sleep function is possible with the way Cayenne, I’ll need to test this out. We’d have to somehow know to reconnect to the device that fell asleep when it wakes up. I’ll look into this!


I think we can just redo the Cayenne setup on wake, Benny. Then let the
loop do it’s thing for X number of seconds until data is sent before going
to sleep again.

Of course more sw hooks would be best as it will save time and thus energy.

For instance, why not have a login that sends data, then sleeps immediately
on confirmation. If there is a command waiting, reply with wait, and
process the command.

That would be super good.



The cicadacom type protocol has ability to constantly blip uData packets in towards Pi > Cayenne etc. As you suggest the device can stay on line to see if there is an echo / response with or without a ‘You Have Mail’ sort of signal. Some devices like LoRa and the transparent serial RF like HC12 can handle these sorts of features manually or have various duty RF Rx cycles so ‘sniff’ for data’ and or any local mesh packets.
~ A

I can report that my ESP-12e has been running on 4 AA batteries for 3 days now! I just have a very basic setup for initial tests. I wake up the ESP, connect to wifi, connect to an MQTT server, send a message that contains values from a DHT11 sensor, then go back to sleep. This runs once every 10 minutes. Since I used 4 AA batteries in series I have over 6 volts from the batteries which requires a voltage regulator that eats up some of the batteries. During the 5 seconds or so the ESP is awake it uses ~80mA and ~3.59mA during sleep. The ASM1117 regulator has a 1v drop so should be interesting to see how low the batteries can get before it won’t wake up any more. When these batteries die I’ll get a Cayenne sketch working and post back.

1 Like

Good stuff!!

I’m going to try something this week with the MKT1000 and a lithium ion 16850 cell. Can see how that works with the ESP too.



I just power the ESP down completely.
I also use a 3xNiMH AA cell + local picaxe micro controller as a simple interface and find the guts that the NiMH can punch out serious Wifi ‘almost legal’ RF power and range. The micro + switching transistor seriously deep sleeps the ESP to uAmp levels as well as doing some smart interfacing and can talk the ESP into doing some clever things as well.

~ Andrew

1 Like

I think NRF24L01 is good idea with ultra low power. Only 900nA on deep sleep.
Can use with ATTiny or similar to compact size and surely ultra low power with CR2032. :grin:

Those Nordic Semi chips are great, but you still need a microcontroller which uses power and something to get the data to WiFi or Ethernet too as they are not WiFi transceivers.

I can confirm they run great on a CR2032 and you can run raw data, an encrypted stream, or load a buffer using SPI and burst it out at up to a 2MBit rate. Micro will take more.

We can certainly look at them as sensors off an Arduino or RPi host, but I’d say it’s really out of scope of Cayenne proper.

There is so much else on the roadmap I think most of us want first.

ESPs take more power, but it is a full solution and you can sleep them too. With a lithium batt, you can get the surge current you need in a similar form factor.



Sorry sir, I’m not expert with microcontroller and programming. I think if we can’t do more to minimize the power, we can adding value of the battery to our Cayenne alert. So if the battery is near low we know this and give us more time to replace/recharge.

The problem is that the NRF devices are not a system, they are RF transceivers only. You will need a processor at both the remote and base ends.

Although not officially supported by Cayenne, we have been able to get the ESP8266 modules to work as a system, and to sleep to conserve power, you just need a battery that can handle 80mA bursts. The CR2032 can’t.

The MKT1000 is also a full system and includes the circuitry to run off and charge a lithium ion or polymer cell.

There are howtos in the forum to get both of those working, so you’ll be just fine without much microcontroller or programming knowledge. To monitor the supply voltage, you can use the Ain pin on the ESPs or any analog on the MKTs connected to the supply (3.3V or less).

I currently see no advantage of using the NRF units now the ESP and MKT devices are available.



Actually I went down this path when I did my battery powered DHT11. The ADC on the ESP is very odd. From what I read it won’t blow up if you hook up 3.3v to it, but it will only read 0-1v. You could easily add a voltage divider (POT would be best option - fine tune to the max voltage of the battery) to drop the battery voltage down to 1v.

That’s only for the ESP-01s. The 07s and 12s read full scale.

Documentation is crappy.

Also the digital inputs at least on the 07 and 12 parts are 5V tolerant so
you don’t need a level converter, etc even though the ESP supply is only

Still not a bad idea to use pot though :wink: … as you can monitor the cell vs. the regulator voltage.


Yeah, documentation is very bad for sure. Where did you find that info? I actually never tried it because I didn’t want to put the effort in to digging for a pot, but if it will read 3.3v then I should definitely give it a try.

I tested the ADC. The 5V tolerance I learned somewhere else. There are what is called snap back circuits on the I/O for over voltage as well as reverse voltage protection.

If you can find an English datasheet it says so :stuck_out_tongue:


Well then…tomorrow I shall have a built in battery monitor with a trigger to tell me when I need to replace batteries!

I’m getting 1024 when I hook my ADC pin to 3v just like it said in the instructable. How were you able to get it to work?

Just tried 1.4v too, still getting 1024.

What version are you using?

I can confirm at home, but I put a pot on it and monitored it with a voltmeter while looking at the ADC count.