I have a step-up converter which produces 130V DC and 12mA max current
I generate 130V pulses using an optoisolator PWM duty vary between 10 to 50 (255 max) at 150Hz frequency,
but my load (resistive load – assume it is a potentiometer) resistance changes – some times it draws 1mA, sometimes it is 3mA,5mA,9mA,12mA as well
so I need to measure this current once it is connected to the load, from an Arduino
I could not find a proper solution (circuit) to measure current, how to measure this current from the PWM pulses?
edited
the booster is not isolated, a simple step-up booster converter based on booster controller external MOSFET switch, inductor etc…
I need to measure current referenced to the gnd
Best Answer
If the Arduino and load share a common ground then you may be able to put a current sense resistor in the load's ground wire and measure voltage across it directly, or if that is not possible measure current at the ground side of the voltage converter output.
However in the general case where grounds are not shared a fully isolated measurement will be required. The current sensing circuit then 'floats' at the high voltage, and the signal has to be transferred through an isolation barrier. At high current a Hall effect current sensor could be used, but measuring 1mA with 0.2mA precision is beyond the capabilities of typical Hall sensors.
A conventional circuit that measures voltage across a shunt resistor needs a power supply referenced to the high voltage, and a way of accurately transferring the signal to the ground-referenced Arduino input.
To power the circuit you can simply use an isolated DC/DC converter module. To transfer the signal you could use an optocoupler, a transformer, a small capacitor or even an rf link. The signal could be encoded as an analog voltage or current, pulse width, frequency or digital code word. Which method to chose depends on various factors such as cost, design and building skills, EMI issues, component availability etc.
Here's one possibility:-
simulate this circuit – Schematic created using CircuitLab
The IL300 is a linear optocoupler with two matched photodiodes, one for feedback and the other for output. The op amp 'servos' the LED current until the feedback photodoide passes a current that drops the same voltage across R3 as the voltage across the shunt (which drops 10 mV per mA of load current). The other photodiode passes the same current on the Arduino side, but this current goes through 10 times higher resistance so it produces 10 times higher voltage, ie. 100 mV per mA of load current.
The high voltage part of the circuit is powered by a RECOM REME3.5 isolated DC/DC converter. Its positive output is tied to the 130V power supply positive, which is 'ground' for the shunt resistor and the positive power supply for the op amp.