MKR 1010 Invert logic on Serial1

I'm new on arduino programming and want to make an arduino iot dashboard showing our electricity consumption and production togheter with my kid.

In Belgium we have a digital meter with a P1 port that is sending the raw data using the DSMR protocol (the belgium version has som edifferent numbers but thta is not the problem).

the internal shema off the meter can be found here
(https://www.netbeheernederland.nl/_upload/Files/Slimme_meter_15_a727fce1f1.pdf)
so we are using a RJ11 connector linking this to an Arduino MKR 1010 board
like this
image

the problem is that I can't find how yhr included Serial libraries need to use inverted logic like the SoftwareSerial library.
so any help on how to do this in code on a MKR 1010 or how to to this in hardware is very welcome.

We are using Serial1 because we also want to print the data on the serial monitor while working on the program.

If I remember well, the MKR 1010 board has the Serial1 UART on pin pin 13 (Rx) and 14 (Tx). Whilst the hardwareserial code does not offer this capability, you could solve it by adding an inverting circuit with a transistor or just use SoftwareSerial.

SoftwareSerial is not working on MKR and I tried using Serial1 even with a bc547 in between for inverting the signal.
Any idea on solving this while using the mkr board is welcome.

Right, I forgot about that.

What was your inverter circuit?

I used this one but changed the port 8 with 13
P1 poort slimme meter uitlezen (hardware) (domoticx.com)

the MKR 1010 is a 3.3V device. I assume you used 3.3V and not 5V
image

yes

have you checked the inverter works as expected ?

I replaced it with a new, and after some search I found this
https://create.arduino.cc/projecthub/voske65/p1-energy-hub-f88865
used this schema and code, but I don't get any data.
I bought a p1 usb kabel and will first test the p1 out with my pc before going any further.
Thank anyway for the support.

Good luck.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.