USB Powered or AC Adapter powered EmonTH?

Getting pretty tired of replacing the batteries in all my EmonTH nodes. Especially since many of them are right next to USB or AC power. Is there any possibility that these will be sold powered by USB or AC adapter?
Any guides on how to convert them to be?
My attic is ruining my rechargable batteries because it gets so hot up there. Maybe I can try lithium AA, but I think USB or AC power would be better.

There is no need to convert them, there is already a screw terminal block with terminals for 5 V and GND. Connect your 5 V from a USB connector, or any clean 5 V d.c. supply, there.

Look at the picture here:

I repurposed a couple of old mobile phone chargers; cut off the plug at the phone end, check which wire is +/- (very important!) and wire it in.

I would be wary of using a “charger” - there’s no guarantee that the output is noise-free, which is why I specified “any clean 5 V d.c. supply”.

See: Not all USB power supplies are created the same - Blog | OpenEnergyMonitor

Oops :neutral_face:

Can you use a cheap usb charger with a suitable capacitor?

Edit: ok, I just googled it, and it’s a whole huge topic…

What sort of battery life are you experiencing? 2 x AA batteries should be good for 4+ years.

It’s no problem to wire direct 5V into the terminal block if you wish to hardwire. The terminal block connections are labelled on the PCB.

I can recommend eneloop rechargables. They are much better lasting than other rechargables Ive used. I monitor battery levels and never let a pair drop below 1.9volts because they will go soon after that.
To be honest when the signal is strong a pair of eneloops lasts a long time 6months++. I once had a pair that drained auickly (couple of months) in an emonTH that was outside the house but a slight adjustment so the emonTH had a more direct line-of-sight signal back to the emonPi mostly solved that.

Are you sure it was that, or something else - maybe the emonTH was in a better location regarding ambient temperature? Why I question it is because the transmitted signal strength is constant, and each data transmission occurs once only with JeeLib, so unlike the LowPowerLabs library, there is no attempt to control the transmitted power level according to the received signal strength, or to re-transmit failed messages.

Agree, eneloops are awesome. I wrote a blog post evaluating different batteries for emonTH, eneloops were the best. Normal NiMh rechargeables are almost useless for emonTH since their self discharge rate is 30% per month!

@Sidicas how long are the AA’s lasting for?
I use a set of old 18650 lithium Ion cells, that are only charged up to 3.9V (as fully charged to 4.2V will destroy the radios. I’ve had EmonTH’s last for 18 months on a single cell.

Hi @Robert.Wall, I wondered - do you have a view on the cleanliness of the 5V supply from say a BG branded double wall socket with twin USB?

No - I’ve never used/tested one. I saw my neighbour has an 8-way extension lead with several USB sockets, so I might borrow it to test. There’s absolutely no guarantee it will be representative, but it will be a useful test nonetheless.

That would be helpful, thanks, as it’s nice to power 5V stuff from these rather than take up the 240V sockets.

I can’t do as good a job as you at testing these but I can contribute a little basic info.

I bought this USB Tester a while ago, it’s only cheap but gives a reading of the voltage coming from the USB socket, power draw and power consumed if you plug something in and run it for a while.

I’ve checked all my USB sockets and got the following:

  1. The one in the image I believe is an MK socket and shows a steady 5.05V.
  2. I have 2 Schneider Electric, both switch between 4.88/4.89V.
  3. I have 2 either LAP or British General (Screwfix), one is 4.87V the other is 3.25V!

I can’t tell if the supply is “clean” but I can already see there’s a lot of variation.

Here are pictures. The Yellow trace is d.c. coupled, the blue a.c. coupled, both measured off the 5 V pin of the FTDI connector, so showing the supply to the emonTx’s 5 V to 3.3 V regulator.

USB A, loaded with an emonTx:

No discernible 50 Hz ripple, but a lot at about 1.3 kHz:

with some occasional big spikes, which can be close to 100 mV.

and the occasional much longer spike, but this is probably mains-borne and not due to the 5 V supply itself:

This particular extension lead also had a separate USB C outlet, which looked broadly similar.


I guess the main difference between this kind of USB and a phone charger is that it has no additional circuitry to prevent overcharging etc…

Although that may well be the case, the point Robert is making has to do with the noise
that gets impressed on the charger’s output vice that of a USB power supply.

USB chargers are typically not built with a low-noise output in mind. They are after all, intended for battery charging, and batteries aren’t affected by the noise the same way digital electronics are.

On the other hand, USB power supplies typically are built with a clean, regulated output.

1 Like

What I suspect I should have done is measure the 3.3 V rail to see how much got through. But that is dependent on the emonTx that I was using, so totally relevant to performance of the emonTx, totally irrelevant to the performance of anything else; whereas knowing there are 80 - 100 mV spikes on the output from the extension lead makes me think it is intended only for battery charging and additional filtering is required for a device that’s powered directly by this unit.