This represents an alernative PCB for interfacing the HAN M-bus connector on AMS meters.
The biggest difference between this board and the original board is that this board supports communication over a physical wire.
So you can for instance use this board together with an arduino to make a robust watt-meter display that will never fail because of connection issues (unlike wifi).
This solution uses the industry standard chip for M-bus communication, TSS721A with full galvanic isolation to the bus, e.g. connecting a cable from this PCB to a mains connected PC for instance will not result in a ground loop.
The schematic and drawings are made with KiCad.
Reuse existing code.
Only support receiving transmitted serial data from the bus since the Kamstrup AMS meters have no physical support for receiving anything.
The primary use case is to be a shield on an Arduino board (e.g. Uno or Leonardo). A standalone ATtiny version would be nice to have as well.
Support daisy-chaining multiple units on the bus.
This is unfinished work, currently just started.
First phase is only supporting converting M-Bus data to serial I/O. Support for ethernet or USB will be implicit via Arduino/shields. Later standalone versions with ATTiny will be most useful by including ethernet/usb support directly.
Create a simple M-Bus master simulator (transmit only) that takes serial data and modulates onto the bus. Write arduino code to send a test pattern and verify on oscilloscope.
https://electronics.stackexchange.com/questions/99388/designing-a-m-bus-master-up-to-10-slaves/99390#99390 https://electronics.stackexchange.com/a/214477/568
Connect the TSS721A chip with all required components with a optocoupler between it and Arduino (e.g. M-Bus to TTL conversion). Connect with the simulator from step 1 and verify that received data equals the data sendt.
Possibly also test with off-the-shelf M-Bus to TTL conversion hardware for comparison.
Finish PCB design to be a usable Arduino shield. Integrate the AmsToMqttBridge software. Display received data on LCD.
Put code onto ATTiny on a standalone board with support for either USB or ethernet.
The MCP2221 is an inexpensive1 USB to serial chip that people seems very satisfied with. It does not achieve the maximum speeds is theoretically supports, but that is irrelevant for this project. This board should then be powered by USB, both in that that is the most natural and convinient choice and that if not then apparently MCP2221 needs some additional electronics in order to work properly as an USB device.
For ethernet the ENC28J60 chip seems to be the go to solution for inexpensive2 DYI solutions. It only supports 10Mpbs, but that is more than good engough for pushing out MQTT messages. It draws a significant amount of current (~120mA or more) and gets gets hot so it might need heatsinking, but that is an inherent problem with all ethernet controlles.
None yet.
1 Less than 20 NOK at Elfa Distrelec, cheaper elsewhere.