Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Real-time clock to emonTx/emonbase setup?

Hi all, just received some emonTx/emonbase units recently for develoment on a project. Great product and good support.

I wish to add a real-time clock to the unit, particularly as we will use the units where internet connectivity may be inconsistent and also power cuts may cause times to reset causing data not to record.

I have seen the official post: https://blog.openenergymonitor.org/2015/07/adding-rtc-to-emonpi/

But wondered if anyone has added a RTC to the emonTx/ emonbase setup. I see that space on the emonbase header pins is limited due to the wireless receiver for the emonTx.

Thanks in advance and any help appreciated

There is no data storage at all in the emonTx, so adding a clock there is pointless. The data must go to the emonBase/emonPi in real time - that is the only place where the is any facility to store the data.

An emonBase is an emonPi but without the energy monitoring front end, so adding time there is exactly the same as for the emonPi.

… but there are more pins accessible than inside the emonPi.

Hi Robert, thanks for reply. I realise the RTC will need to go to the emonbase itself but just curious to know where to add it in the case that the header pins are used up where you would normally connect a RTC in a rpi. Sorry as my raspberry pi experience is limited.

R

Don’t worry about that - I have the advantage of having taken one apart a good few times. The emonPi Shield (from the shop) is the piggy-back PCB used inside the emonPi, so you can look at the pictures of that to give you an idea. The emonBase doesn’t come with any sort of enclosure, so you have more space to add things. The RM69Pi header covers the first 5 pairs of pins, the rest are available electrically but physically covered on the “right” side of the board. So it might need a bit of ingenuity.

The picture you linked to is of the emonPi Shield, the Pi is on the side you can’t see.

And welcome to OEM, by the way.

Thanks again for quick reply Robert. I will have to dive in feet first with the soldering iron I think!

Will use the unused header pins and solder directly to pins to a RTC.

:crossed_fingers:

Functionally, there’s only one difference between the RFM69Pi and the emonPi Shield as far as the interconnections go. Both use the same serial data pins, but the Shield powers the Pi whereas the Pi powers the RFM69Pi.

Looks like that’s going to be the case.
An RTC uses the I2C bus (SDA and SDC pins on a Pi GPIO connector) which are
adjacent to the pins used by the RFM69 module.

Which GPIO pins are needed varies a bit depending on which RTC module is used.

More info on adding an RTC to a RPi:


Thanks Bill, may it be the case that I could use the following pins to directly solder wires for the real-time clock? i.e., the unused pins on the GPIO header:

Pin 17 (3V3) for 3v power
Pin 27 (SDA0) for SDA
Pin 31 (SCL0) for DCL
Pin 29 (GPCLK1) for GPCLK0
and…
Pin 25 for ground

Unfortunately, no. SDA0 and SCL0 are reserved for hat configuration.

More info here:

@bez, can I check, you sat emonbase, is this with just the RFM card, or the emonPi shield?

From https://wiki.openenergymonitor.org/index.php/RFM69Pi_V3

image

@Bill.Thomson, @Robert.Wall I don’t see any issue with using the required Pins for the RTC? Need to modify the header, sure, but the pins themselves are free.

Desolder the header and replace it with a stacking header and manually connect the RTC.

Didn’t say there was an issue with using the pins.
I was agreeing with RW about

1 Like

OK, that’s fine, it came across as being more difficult than it probably is (i.e. there was a pin conflict).

[edit]
If the boards (RFM/emonPi) ever get relaid might be something to make easier to do.

Provided one knows how to desolder/solder, (or knows somebody that does)
it shouldn’t be too difficult to accomplish.

1 Like

thumbsup

Just the RFM card - no emonPi shield.

1 Like

Thanks guys, some good information here. I will try stacking header and see how i get on.

1 Like

Let us know how it goes :smile: