In the first post in this series, I explained how to get startet and connect your USB-to-MBUS adapter to the Raspberry Pi. In this post, I will explain how to connect the USB-to-MBUS adapter to your AMS smart meter, so you can receive data from the meter.
As mentioned in the first post, the standard HAN port interface (in Norway!) is an RJ45 connector. To connect your USB-to-MBUS adapter to the AMS smart meter HAN port, all you need is a sacrificial ethernet cable of suitable length. It does not have to be more than a Cat 5 cable, using a Cat 5e or higher cable will not add anything but cost.
When you have your ethernet cable, cut off one of the plugs as close to the plug as possible so you don’t waste any cable and strip off 1-2 centimeters of the cable jacket, exposing the four twisted pairs inside the cable. Now check the end of the plug you cut off. The colors inside the plug should look like one of these two:
It doesn’t matter if your cable looks like the left or the right color combination – the important thing is to check which one of the two you have got. My cable has orange/white and orange in pin 1 and 2 respectively, so those are the two wires I will use in my setup.
Pin 1 and 2 (left to right on the plug) are the only ones used, so make a note of the colors of the wires in location 1 and 2 in your plug. These are the two wires you must keep, the remaining 6 can be cut off to avoid confusion.
Now you need to strip off approx. 5 millimeters of the coating on each of the two wires you will use, to expose the bare metal inside. Take care not to cut of any of the many thin strands within each wire, you need them all to make a good connection to the USB-to-MBUS adapter. When ready, insert the wires into the two connectors on the adapter, and tighten the screws to make a good, solid connection. It doesn’t matter which wire goes into which connector on the adapter – the M-Bus is non-polar so there is no traditional «plus» or «minus/ground» in the wires.
My connection looks like this in it’s demo version. I will make a more solid and professional looking connection when it goes into production:
Now you are ready to connect the ethernet cable to the HAN port on the AMS smart meter. It’s as simple as connecting any ethernet cable to any RJ45 socket. I suggest you power on your RPi and connect the adapter to the RPi first, and then connect the adapter to the HAN port on the AMS smart meter. There is no real reason for doing it in this sequence, it just seems like the right way for me to do things…
That’s it for the physical connection. If you did a good job with the ethernet cable, your AMS smart meter should be connected to the USB-to-MBUS adapter, which in turn is connected to the RPi.
In the next post we will start experimenting with code, to try to read information from the adapter.
Hey, where is part 3? 😀
Hei Thomas.
Da har jeg gjort installasjonen akkurat som du har vist oss i disse 2 bloggene. Venter spent på neste. Jeg har gjort min installasjon på RPI B+ med en Buster Light variant og håper du finner på noe glupt som ikke krever den komplette Buster. Har sett at noen har lekt seg med Node-Red og annen programvare som enten er en del av den komplette Busterpakka, eller som har lastet ned programvare.
Hei Lars og Svein Erik.
Jeg har måttet la dette prosjektet ligge pga alt for mye annet som skjer, men det er ikke glemt. Jeg vet ikke helt når jeg rekker å få ut #3, men den kommer så raskt jeg får tid.
Hei Tomas. Skjønner. Men jeg tror det kan være endel som sitter og venter. Ikke vet jeg. I mangel på kyndig veiledning fra din blogg, har jeg prøvd å bruke resepten til Lars. For meg en kanskje for bratt lærekurve. Det ligger litt for mye implisitt kunnskap som forutsetning til at det skal gå greit. Har prøvet og feilet, googlet og lært og tror jeg ligger godt an til å få det til. Men det koster. Er dessverre ikke helt stø i bruk av Terminal, Buster og python. Heldigvis finnes det veldig mye bra instruksjoner å følge. Nå håper jeg Lars kan gi meg noen nyttige tips som gjør at jeg har strake veien fram til mål.