ESP32 Bee Data Logger for Simple Long-Term Data Recording

By Jeremy S. Cook

Freelance Tech Journalist / Technical Writer, Engineering Consultant

Jeremy Cook Consulting

December 12, 2024

Blog

Caption: Bee Data Logger Measuring CR2032 battery with LiPo and optional screw terminal board / Image Credit: Jeremy Cook

Data logging and analysis is a fundamental tool in the field of engineering (and beyond). If you need a simple logging solution that can theoretically last for years on a single LiPo battery, the ESP32-S3-based Bee Data Logger from Smart Bee Designs has a lot to offer. I got to try one out for this article and so far it looks great.

Bee Data Logger On Paper (and Video)

As seen in the video below, the Bee Data Logger does not (necessarily) track the activity of bees, though there’s really no reason it couldn’t do so with the correct sensor setup. It’s listed for sale as of this writing at $32.99 and features:

  • DS3231 High-precision RTC
  • CR1220 RTC backup battery holder
  • Micro SD card reader
  • Dual LDOs and Dual STEMMA/QWIIC connectors
  • 1S LiPo connector/charging circuitry
  • USB-C programming/power connection
  • Arduino & CircuitPython compatible

In other words, this device has everything you need to monitor some remote thing over time (e.g. your attic temperature, a remote rain gauge... bees(?)). What’s especially interesting components-wise is the dual LDO/connector setup. One LDO stays on constantly, while the other shuts down in deep sleep mode. External I2C sensors can therefore be constantly powered, or turned off when asleep as the situation dictates.

Per this functionality, along with an overall emphasis on power savings, the device can run for roughly a year on a single 400mAh battery if you take readings once every 2 hours. Throw on a larger LiPo and it can theoretically log data for much longer.

Hands-On With the Bee Data Logger (CircuitPython)

Caption: Bee Data Logger package contents / Image Credit: Jeremy Cook

The Bee Loggers specs look good–great even–on paper, but how well does it actually work? Out of the box the device is programmed with CircuitPython firmware, and after I copy/pasted ADC-to-SD card code* onto my board, powered it on via USB C, and installed a Micro-SD card, it generated a nice CSV file on the card with analog values from ADC3 and ADC4, recorded every 5 seconds.

Initially, data is logged starting at the date 1/1/2000, but after adding a CR1220 battery and setting the RTC via this code the dates (correctly) jumped roughly a quarter century to today. Note that the coded day numbers start on Monday as 0, Tuesday as 1, Wednesday as 2, and so on. Also note that you’ll need to change line 15 to true to set the time, as explained in the code’s notes.

I then set the device up to measure voltage from a CR2032 battery with an LED draining it over time. A 300-second interval produced a manageable amount of data, but I had to do some spreadsheet work in LibreOffice to get it into a chart.

Caption: Graph derived from Bee logger and generated CSV file. My x-axis labels could actually use some work! / Image Credit: Jeremy Cook

Helpful data-management commands include VALUE to ensure you’re working with a number, not a character, and LEFT or RIGHT to pull data from one side of a cell or the other. E.g. =VALUE(RIGHT(E9, 7)) produces a number out of the rightmost 7 characters in cell E9. Those who are true spreadsheet masters will have no problem with this, but as something like a green belt in such arts, this required a bit of help from Mr. Chat GPT.

A Few Suggestions for an Already Very Good Board

This device is very impressive, but one thing that would make it even better would be an easy method to log onto the board to remotely pull data. After all, it is an ESP32-S3, so that functionality is available hardware-wise. On the other hand, one could argue that such functionality would impair its power efficiency, and/or that this would make it a different class of device altogether (i.e. scope creep).

Some sort of indication that logging is taking place via the onboard LED would also be appreciated, even if that would mean a tiny bit more power drain. On the other hand, the device/code is open source, so you/I can make the necessary changes if needed. I should probably take this advice myself, as a few of my products on Tindie could be greatly enhanced by a bit of software work. Perhaps you can relate to this struggle.

Other Options and Future Logging Plans

While I tried this board using CircuitPython, it can also be programmed via the Arduino IDE. Examples and setup info are available. I also didn’t try out the board’s I2C functionality, which would be especially useful in many situations.

Earlier this year I reviewed the extremely capable mioDAQ from NI, which would be fantastic for many tasks, including some that the Bee Data Logger can perform. However, it is a premium product with a 4-figure price tag (that I had to return), and it seems to be geared more towards lab use than sticking in location X for months at a time.

For my next post I'll be delving into the real capacity of CR2032 batteries, using use the Bee Data Logger to track their performance over time. Check back to see the results of my experimentation, and an example of the Bee Logger in action!

*Note that I had to copy bdl.py onto the board even though it was already there; presumably what was present in memory was an old version. You may or may not have to perform this operation.

Jeremy Cook is a freelance tech journalist and engineering consultant with over 10 years of factory automation experience. An avid maker and experimenter, you can follow him on Twitter, or see his electromechanical exploits on the Jeremy S. Cook YouTube Channel!

More from Jeremy