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.