/mbus-circuit

M-Bus master circuit with 5V to 36V DC-DC converter

M-Bus Circuit

Minimalistic M-Bus master circuit made of BJT transistors. Features TTL level shifter with simple DC-DC boost converter from 5V to 36V.

M-Bus schematics Schrack "EPH"

Tested with one Schrack "EMH" kWh-meter connected to M-Bus pins 23 and 24 (any polarity works). Software used was python M-Bus implementation running on linux with USB-serial module FT232R. Besides linux, also ESP8266 wifi-mbus can read this kWh meter. 8kHz PWM is generated with:

#define PWM_PIN 5 // GPIO5 is labeled "~D1" on PCB
pinMode(PWM_PIN, OUTPUT);
analogWriteFreq(8000);
analogWrite(PWM_PIN, 600);

Electrical considerations

The 36V power supply is weak and it might not be sufficient for M-Bus loaded with many devices. Lower R5 value should be used for more devices on the bus so that Q4 doesn't conduct on quiet M-Bus, experimental range is 82-390 ohm.

ESP8266 needs a reasonable 3.3V regulater, I used LM1117-3.3 in TO-220 package.

Most general-purpose silicon BJT transistors in cheap plastic TO-92 package should work. For Q1 and Q3 choose some with Ic >= 0.7A and Vceo >= 40V. Other parts values are not too critical. If 8kHz input accidentaly receives constant DC signal instead of square wave, Q1 and L1 can overheat and get damaged.

Mains voltage 230V AC can be shocking if touched.