Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Battery options for EnviroDIY Mayfly Data Logger

The EnviroDIY Mayfly Data Logger was designed to be powered by a 3.7v Lithium Ion battery pack with a 2-pin JST-PH connector. These battery packs are also referred to as lithium ion polymer or Lipo packs. There is a built-in charging circuit on the Mayfly board that will charge the battery if you connect a solar panel or USB cable to the Mayfly. A yellow LED on the Mayfly will indicate when the battery is being charged, and the light will turn off automatically when the charger senses the battery has been fully charged.

The most important thing to know when using a Lipo battery pack with a Mayfly board is that the polarity of the connector on some battery packs is backwards. If you plug a reverse-polarity battery into a Mayfly board, even for just a few seconds, you will permanently damage the Mayfly.

We recommend using high-quality Lipo battery packs from vendors who use the same connector polarization as the Mayfly has. Products from Adafruit and Sparkfun use this polarization, so any 3.7v Lipo pack you purchase from them will be compatible with the EnviroDIY Mayfly Data Logger.

The charging circuitry on the Mayfly board is designed solely for use with one 3.7v Lipo battery. If you use a battery pack from a non-recommended source that either has the wrong polarity or is made of the wrong chemistry (NiMH, Ni-Cad, alkaline, etc), or if you connect 2 Lipo batteries at the same time, it will likely damage the Mayfly board and the battery, and may cause a fire hazard.

Important things to remember:

  • Do not use Lipo batteries with a reverse-polarity JST connector
  • Do not connect 2 battery packs to the Mayfly at the same time
  • Do not use LiFePO4, NiMH, Ni-Cad, alkaline, or any other type of battery chemistry besides 3.7v Lithium ion
  • Do not allow the Lipo packs to become punctured or submerged in water

 The following photo shows the proper way to connect a 3.7v lipo pack to the Mayfly board.

Note that there are 2 white connectors on the side of the Mayfly labeled LIPO BATT. The socket polarity is printed next to it (denoted by the – and + marks).

You may plug the battery into either of these sockets, they are electrically the same. The extra LIPO BATT socket is for rare cases when a user needs to connect a small jumper cable to supply power to certain accessory boards. DO NOT connect 2 batteries to the Mayfly at the same time.

The other white connector in the corner of the Mayfly board is labeled SOLAR1 and is for attaching solar panel cables that have the JST connector on them. Newer Monitoring Station kits have the black polarized quick connector that goes into SOLAR2, in which case the white SOLAR one connector is unused. More explanation can be found in the Monitoring Station Manual.


Closeup showing the proper polarization of a JST-PH connector on battery packs for the EnviroDIY Mayfly Data Logger

The following photo shows examples of some of the common lithium ion polymer battery packs that we use with the EnviroDIY Mayfly Data Logger

A. 6600mAh from Adafruit
B. 4400mAh from Adafruit (our favorite size and configuration)
C. 3500mAh from DigiKey
D. 6000mAh from Sparkfun
E. 2500mAh from Adafruit
F. 1200mAh from Adafruit

The specific batteries in the photo above, can usually be found at more than one vendor, for example suppliers like DigiKey and Mouser often have these batteries and more, with the correct polarization, but they also have some with the wrong polarization or connector for a Mayfly board. The following list of links for different sizes

Battery sizeVendor 1Vendor 2Vendor 3
4400mAh (recommended)AdafruitDigiKeyMouser
6600mAhAdafruitDigiKeyMouser
2500mAhAdafruitDigiKeyMouser
3500mAhDigiKey
6000mAhSparkfunDigiKeyMouser
1200mAhAdafruitDigiKeyMouser
2200mAhAdafruitDigiKeyMouser

Lipo packs like the ones above are always shipped from the sellers at around 50% charged. If you’re going to be deploying a Mayfly logger in a monitoring station in the field, it’s best to fully charge the pack before deploying. You can use the Mayfly’s built-in charger to fully charge your battery for a few hours, or you can buy a dedicated charger (this can be really useful if you have a backup battery pack that you sometimes need to swap out with one in the station if it gets too low).

Similar to how battery packs can come in 2 types of connector polarity, there are dozens of lipo charging devices available from many different vendors, but many of them have the wrong polarity, which will cause damage to your battery and possibly create a fire hazard. So to avoid problems, it is best to use one of the following chargers from either Adafruit or Sparkfun:

Sparkfun Lipo Charger Plus: Sparkfun, DigiKey, or Mouser
Adafruit Micro-Lipo charger: Adafruit, DigiKey, or Mouser

Either one of these chargers will work with any of the batteries linked above. It’s okay to use an Adafruit charger on a Sparkfun pack or vice-versa.