Author Topic: Feedback asked: capcitor charger/current limiting circuit for DSMR-4 meters  (Read 280 times)

0 Members and 1 Guest are viewing this topic.

Offline Lux_Topic starter

  • Contributor
  • Posts: 11
  • Country: nl
In a attempt to better my skills in analog electronics I tried to make a capacitor charger circuit for a DSMR smart meter reader project and I want your feedback on my capacitor charger circuit.

But first some background information to give a scope/idea of the project. In my country house electricity meters have a port (often called P1-port) available to read meter statistics such as electricity used an returned. This port follows the DSMR standard: http://files.domoticaforum.eu/uploads/Smartmetering/DSMR%20v4.0%20final%20P1.pdf . This port is open to be freely used by the costumer. There are many off the shelf dongles available that can read these statistics and make them available in a App. On Github there are many DIY projects that use ESP8266's and ESP32's, most of them use a external wall adapter to feed the boards, but the DSMR standard supports powering devices directly of the P1 port. The P1 port uses a RJ12 connector (RJ11 but with 6 wires instead of 4). The DSMR 4 standard supports up to 100mA and has short circuit protection. The DSMR 5 supports up to 250mA.

My design is based around this Github project: https://github.com/mmakaay/dsmr-reader-for-esphome/blob/main/PCB/schematic.png
In my project I left the screen out and used a ESP32-C3 board instead of a D1 mini.

The problem I now face is that I have a DSMR version 4 meter and the meter goes in short circuit protection when I connect my device, with or without input capacitor. It seems that my ESP32 has some large current spikes when it wants to connect to WiFi. Adding capacitors to the input does not help because this also triggers the short circuit protection. The devices works perfectly when powered from a external powersupply, but this was not the goal.

Now my solution to this problem, design a circuit to limit the current to under 100mA so that it does not trigger the short circuit protection and charge a large capacitor (maybe a 5F super capacitor that I have laying around). When the voltage of the capacitors is above a certain level toggle the output and let the ESP32 boot. The ESP32 can pull large short current spikes out of the capacitors without increasing the load of the powersupply of the P1 port. Hopefully the ESP32 can now successfully boot and connect to the network. I tried to design a circuit in LTspice that follows the goal described as above, see the 2 PDF's I attached to this post. The first part is the actual current limiting circuit, The second part is the capacitor with 2 low value resistor that are only there for measuring current in the simulation. The third part is a comparator for toggling the output when a certain value is reached. The last part is a load simulation of the ESP32-C3.

I hope I can get some feedback of the forum members before testing the circuit in the coming weekend!



Edit: apparently my attachments did not get added to this post, I hope this edit fixes this.
« Last Edit: May 06, 2023, 10:38:04 am by Lux_ »
 

Offline Lux_Topic starter

  • Contributor
  • Posts: 11
  • Country: nl
In the weekend I build the circuit on a breadboard. The individual circuits worked! The current limiting circuit limited the current, after some adjustment with the low value resistors to around 100mA and the capacitor got charged. The comparator switched the output on after the set point. The capacitor voltage and the reference voltage for the comparator needed the be halved, this was achieved by a simple voltage divider, it seems that the comparator does not really work when the set point is close to the rail voltage.

The problems that I am facing now is when the ESP32 is booting it connects to WiFi, just as WiFi is switched on the voltage on the capacitor drops and the ESP32 browns-out. It seems that de supercap is not able to hold and deliver enough energy for a WiFi connecting ESP32. When bypassing the current limit temporary the ESP32 can boot and get past its WiFi connecting phase, when removing the bypass the voltage on the cap still sags but not too far that the ESP32 browns-out.

Another test seems that it is possible to run a active ESP32 on a buffered 100mA powersupply. I modified a TP4056 lithium charger board to limit the charging to 90mA (measured at the 5V charger input). When connecting the 5Vin of the ESP32 board directly to the 3.6V (at that time) lion cell the board booted up and connected to WiFi. A half hour later the cell was still charging and had a higher voltage then before and the board was still connected to WiFi and sending messages. So it seems to be possible to run a ESP32 WiFi connected board of a 100mA buffered powersupply when it gets past its WiFi connecting/searching state.

Continuing forward I could just use the modified TP4056 and a lion cell but it seems not really safe to have a always charging/charged lion battery in the electrical cabinet where the energy meter is located.
Could somebody give me some tips how to progress forward. Is it a lost cause to get this working with a supercap, or is it possible with a larger cap than 4F?
« Last Edit: May 10, 2023, 09:21:12 am by Lux_ »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf