openenergymonitor / emonpi2

RaspberryPi Energy Monitor v2
GNU General Public License v3.0
13 stars 2 forks source link

emonPi2 RJ45 pin assignment shorts out emonVs #3

Open pevsonic opened 2 weeks ago

pevsonic commented 2 weeks ago

I've had an issue where I've got an emonVs (v1.1) and having picked up and emonPi (v2.0.1) the AC voltage sense wasn't working.

I've traced through the schematics and it looks like the RJ45 pinnings on the emonPi2 aren't ideal. RJ11 and RJ45 are by design backwards compatible physically but it seems this hasn't been taken into account with the emonPi2 pinnings. When I connect the emonVs and emonPi2 together, the following occurs :

                        n/c -> emonPi2 v2.0.1 Pin 1 (VS1)
emonVs 1.1 RJ11 pin 1 (GND) -> emonPi2 v2.0.1 Pin 2 (VS2)
emonVs 1.1 RJ11 pin 2 (5v)  -> emonPi2 v2.0.1 Pin 3 (VS3)
emonVs 1.1 RJ11 pin 3 (n/c) -> emonPi2 v2.0.1 Pin 4 (+5v)
emonVs 1.1 RJ11 pin 4 (VS3) -> emonPi2 v2.0.1 Pin 5 (+5v)
emonVs 1.1 RJ11 pin 5 (VS2) -> emonPi2 v2.0.1 Pin 6 (GND - LINK)
emonVs 1.1 RJ11 pin 6 (VS1) -> emonPi2 v2.0.1 Pin 7 (GND)
                        n/c -> emonPi2 v2.0.1 Pin 8 (GND)

i.e. my VS1 is getting pulled to deck... If metered disconnected I was seeing 0.3v as expected - when linked, this gets pulled down to 0.18v... Not to mention being on the wrong pin... I’m glad nothing went pop!

Unless Im missing something really obvious, the emonPi2 RJ45 pinning would ideally be the following to allow backwards compatibility :

                        n/c -> emonPi2 v2.0.1 Pin 1 (GND)
emonVs 1.1 RJ11 pin 1 (GND) -> emonPi2 v2.0.1 Pin 2 (GND)
emonVs 1.1 RJ11 pin 2 (5v)  -> emonPi2 v2.0.1 Pin 3 (+5v)
emonVs 1.1 RJ11 pin 3 (n/c) -> emonPi2 v2.0.1 Pin 4 (GND - LINK)
emonVs 1.1 RJ11 pin 4 (VS3) -> emonPi2 v2.0.1 Pin 5 (VS3)
emonVs 1.1 RJ11 pin 5 (VS2) -> emonPi2 v2.0.1 Pin 6 (VS2)
emonVs 1.1 RJ11 pin 6 (VS1) -> emonPi2 v2.0.1 Pin 7 (VS1)
                        n/c -> emonPi2 v2.0.1 Pin 8 (+5v)
TrystanLea commented 2 weeks ago

Hello @pevsonic, thanks for your thoughts on this, interesting thought, an RJ11 to RJ45 adapter in the way you describe was not something that I had thought about to be honest. The main focus in my mind at the time was trying to avoid issues if the emonVs RJ45 was plugged into an internet router, or the ethernet port on the RaspberryPi, whilst also selecting a pin our that provided for cleaner board routing I think..