HM10 iBeacon: Disappointing battery life

Conducting some accelerated batter life test on a HM10 BLE module as an iBeacon, revealed some disappointment battery life results.

The HM10 and HM11 are popular Bluetooth Low Energy modules based on the Ti CC2540 and CC2540 BLE SoC device.

Most HM10 and HM11 devices seem to come pre-installed with with “HMSoft” from a Chinese company called “Huamao Technology CO,. LTD.”

I was interested to determine the battery life of these devices operating as an iBeacon, so I decided to do an accelerated long term test, using two AAA Energizer cells to power the module.

To accelerate the test, I changed the Advertising period using the AT+ADVI command to the minimum time between transmissions, which is quoted as 100ms using the command¬† “AT+ADVI0”

Power use was minimized by using AT+ADTY3 to make the device non-connectable and AT+DELO2 and enabling auto sleep mode AT+PWRM0

0.44mA Digital current meter

0.5mA Analogue current meter

As far as I can tell the batteries I tested with were standard Energizer E92 / AAA http://data.energizer.com/PDFs/E92.pdf

Looking at the spec, the batteries should have over 1000 mAH on the very low current load that the BLE beacon consumes, however the quoted capacity is at a final voltage of 0.9V, which would give 1.8V for 2 batteries, and is lower than the minimum working voltage for the CC2540 as shown in the spec on the device from TI http://www.ti.com/lit/ds/symlink/cc2540.pdf

The time versus consumption graphs from the battery spec PDF show that at 10mA constant discharge that the battery should last 100 hours, which equates to 1000mAH. However for lower currents there is no data on the graph, as 10mA is the lowest value shown.  However if at lower currents, the capacity followed the same trend line, the capacity would be well in excess of 1000mAH.

At 0.5mA on a 1000mAH battery, I had hoped that the beacon would run for around 2000 hours,  which is nearly 12 weeks. This would extrapolate to around 10 times as long, using normal broadcast rates, of 1 per second, i.e 120 weeks or over 2 years.

However to my surprise, after just over a week, when I measured the voltage on the batteries, I noticed that they had dropped to a combined voltage of 1.9V and the beacon had stopped functioning.

So why has the battery life been magnitudes of order less than anticipated. Well, at the moment I don’t know. There are a number of possible causes for this problem.

  1. The batteries were not full when I started.
    Although I took them out of a packet of 20 AAA cells, there is a chance that I’d accidentally put a used battery back in the packet, however this seems unlikely
  2. The batteries are elaborate fakes. I bought from a reputable local store, but its possible that somehow fake batteries have got into the supply chain, and perhaps normally no one double checks their capacity.
  3. The current measured by my digital and analogue meters was incorrect because of the way that current is taken in pulses rather than being constant.
    This seems the most likely cause at the moment, and needs more research. The “Active Mode Tx” current in the CC2540 spec is 24mA, which would mean for a average current of 0.5mA that the duty cycle would need to be around 1/50 of the total.
    The only way to accurately determine the real power requirement is to monitor the current using an oscilloscope to measure the voltage drop across a low value resistor e.g. a few ohms, connected in series with the HM10 module, then integrate the area of the voltage pulse and calculate the average current.
    I will follow up on this.
  4. Operating the beacon at fast update rates (10 per second), may substantially change the way in which the module operates. It may not be fully hibernating. However this seems unlikely.

 

Where to from here

Well.

  1. I’m starting the test again, with a brand new pack of unopened Energizer AAA batteries.
  2. I will need to build a small test rig with 10 ohm resistor in series with the battery, and use my oscilloscope to look at the pulse nature of the current consumption
  3. Keep thinking of other possible reasons why the results differ so much from the predictions

Watch this space.

11 Responses

  1. Guy
    |

    Hello Roger – I found this post after Googling HM-10 ibeacon… I too have found the battery life seems pretty poor. I’m going to do some more experimentation (try and measure the peak current via a shunt on a ‘scope), but I was wondering whether you made any more discoveries? I’m coming to the conclusion these modules are something of a false economy and probably need binning in place of something better engineered e.g. Laird / Bluegiga

  2. Roger Clark
    |

    Sorry for not responding sooner, but I’ve only just noticed your comment.

    Anyway…

    I agree about the HM10.

    I’ve been using the HM10 recently to update an old project (which had a HM10 in it), and I dislike them more every day. The AT based command set is difficult to work with, because the response from the HM10 is not terminated with a newline or any other termination character.

    Which means its hard to know when the HM10 has finished responding, unless you know what you expect to get back.

    Well, you can write code to work around this, by having a set of possible responses to each command you send it, but its far from ideal.

    I also find that the scan function DISC is not that reliable, unless other devices are close by.
    Also if you want to connect to another HM10, to send serial data or control its PIO, the connection is also not that reliable and you have to write code to handle multiple retries until it finally connects. And then it sometimes disconnects shortly after it has said that it is connected (arrggghh)

    I’m not sure if you have seen my post about the Nordic nRF51822, and how these can be programmed using the Arduino IDE.
    You can also program using Eclipse, etc as they are a ARM Cortex M0 class device and the GNU C (GCC) compiler works fine with them.

    I’ve been working with the WaveShare development board, but their modules are more expensive and also too large (not designed) to fit inside normal projects.

    So I’m now looking at using the Wireless-tag WT51822-S2, which I got from AliExpress for just about a dollar more each than I paid for a HM10.
    http://www.wireless-tag.com/index.php/Product/dis/25.html

    http://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20160115222603&SearchText=wt51822-s2

    There is also an S4 variant which is smaller and cheaper,

    http://www.aliexpress.com/wholesale?catId=0&initiative_id=AS_20160115222722&SearchText=wt51822-s4at

    But it depends on how many GPIO lines you need (if any !)

    The only drawback with these modules and my existing Arduino setup, is that they don’t have a 32khz real time clock crystal. This means that the core code for these boards, which works on the WaveShare (and other modules) does not run on these module, as it expects the RTC clock crystal to be present.

    I’ve no idea why “Wireless-tag” omitted this, as it makes a big difference to the power consumption when in standby (i.e when the device is operating as an iBeacon).

    But you can buy 32khz crystals very cheaply e.g. 10 cents each. So the simple solution is to solder the crystal onto the side of the module on pins 37 and 38, and then it seems to work fine.

  3. Roger Clark
    |

    BTW. If you have no option but to use the HM10, one way to increase the battery life is to reflash the device with BlueBasic (google it on github), as this Basic interpreter for the HM10 can be configured to go into deeper sleep than the HM10 AT command set firmware seems to go into.

    However to flash the BlueBasic firmware binary onto the HM10 module you’d need to buy a CC-Debugger (programmer). Luckily these are available on eBay fairly cheaply (around $15 from what I recall)

  4. Taras
    |

    Hello Roger,

    Need your need help.
    I am new to this topic and want to build low power button sensor using HM-10.
    This device should advertise data whenever button is pressed or released.
    Is it possible to build such device with using HM-10 that will lasts for 1 year on 9V battery?

    I am looking forward to hearing from you soon.

  5. Roger Clark
    |

    I’m not sure what you mean about advertising only when a button is pressed. What would it be doing if the button is not pressed

    The main problem is that the HM10 module is only designed for a limited number of functions. The HM10 is just a TI CC2541 chip with custom software that is sold as a “HM10”.

    If you need the module to do something other than what the HM10 software does, you have a couple of options
    1. Flash BlueBasic onto it, and try to program using BASIC on the chip – This is a free download on GitHub, however from what I’ve heard it has a lot of bugs.
    2. Compile your own special / custom firmware and load that onto the HM10 module. The problem here is that the only way to develop for the CC2541 processor (on the HM10) is using the IAR compiler, which costs thousands of dollars (you can get a 30 day evaluation license, but could not technically use any firmware you created in that 30 days)

    With either of the options above, you’d also need to buy the CC-Debugger hardware to upload your firmware to the module

    IMHO both options are non-starters, so I suspect you can’t use this device for your project

    2) The HM10 (and most other Bluetooth Low Energy devices, need 3.3V not 9V. Using a 9V battery would require a step down converter or regulator, and the problem is that these devices take a lot of power and would flatten your 9V batter in a few days

    If you want long battery life, you’d need to use more 3V batteries. Possibly a 3.7V LiPo cell or possibly multiple 3V large button cells in parallel

    I’m afraid that if you have a device that is powered by 9V there is no way I know of, where you can reduce this to 3.3v without it taking power all the time

    I’m personally no longer using HM10’s for custom software. I’m using Nordic nRF51822 based modules, they cost a few dollars more than the HM10, but are worth it.
    I recommend the modules and development test board by waveshare

    See my other postings about the Nordic nRF51822 and how to develop for it using the Arduino IDE and using a cheap STM32 board to upload the firmware onto the module

  6. Taras
    |

    Thank you. Really appreciate your answer.
    When button is not pressed it will just advertise about its ability to provide button service.
    And I’d like to implement advertising as effectively as possible, because most of the time device will just advertise.
    I found nice tutorial how to do it with mbed https://docs.mbed.com/docs/ble-intros/en/latest/Advanced/InputButton
    I want to do the same with arduino and then port software to barebone Atmega micro-controller.

    As far as I understand HM-10 already implemented this logic in their module and it is done poorly.
    Have I understood you correctly?

  7. Taras
    |

    Sorry, missing slash in the end of the link:
    https://docs.mbed.com/docs/ble-intros/en/latest/Advanced/InputButton/

  8. Roger Clark
    |

    Hi

    Sorry, but I don’t have time to answer project related questions.

    As you are asking about using an ATMega and Arduino, the best place to ask is the forum on the main Arduino website.

  9. Taras
    |

    I see. Thanks anyway.

  10. Darshan Vyas
    |

    Hi Roger,

    I want to use WT51822-S4AT module of wireless tag as i beacon for one my project but i want to run it on button cell battery CR2477 Panasonic make which required to run for at least 6 months time period. Would you suggest the select chip can be used for such project.

    Can i convert the chip into ibeacon with setting as 100ms to 1000ms broadcast time.

    Thanks
    Darshan

  11. Roger Clark
    |

    The WT51822-S4AT uses the nRF51822, so you need to ask Nordic Semi , who make the MCU, whether it is suitable for your purpose.

    Post to https://devzone.nordicsemi.com/questions/

Leave a Reply