I am trying to read dc voltage that varies from 0-50Vdc and many suggest using a voltage divider to simply read it, but I fear that could be dangerous since I am reading a varying voltage with up to 30 amps flowing through it. My project involves converting 3 phase ac voltage generated from an engine to dc voltage using a rectifier. Initially I was using a power analyzer (TI chip INA239) with a shunt resistor. This worked but was not reliable since the SPI communication from this to my controller wasn't always working and the power analyzer burned, which burned my controller board as well. The power analyzer is also not isolated from the in+ and in- of the shunt resistor, which is probably the reason why it burned. I have attached a generic diagram of the system and a diagram of the system with the power analyzer and controller board. Also I am using a Teensy 4.1 mcu board. Is there a better and more importantly safer way to read the dc voltage from the rectifier? The rectifier only has + and - and no ground, and there is an electronic load as well.
You have a fundamental misunderstanding of current and voltage. Loads draw current from a voltage source, according to properties specific to the load. For a resistive load, Ohm's Law gives the current draw.
A voltage divider is safe to use with Arduino, but only if the voltage source and the Arduino share a ground connection.
an update to my diagram. These are really the only grounds I have. There is no ground at the engine or rectifier. A teammate of mine connected the ground of the teensy controller to the v- of the rectifier and I believe that was when they burned the INA239 and controller.
Think of a pipe with a high flow rate material inside of it. A pressure gauge just gives you a measurement at that point, the flow inside the piple makes no real difference as it's not flowing through the gauge. A voltage divider is similar. It will give you a voltage (pressure) reading, but the current (flow) isn't of consequence.
Make sure you get some pro help working with high voltage though.
The shunt must stay within the common-mode range of the INA, which is -0.3volt to +85volt.
That can only happen reliably when INA ground is connected to rectifier(-).
You didn't tell us anything about the Teensy supply or smoothing caps on the rectifier.
A dirty 50volt supply could have spikes > 85volt.
There could be different voltages between Teensy ground and rectifier(-).
Both will blow the INA239.
If you want to measure current without a ground connection, then use an ACSxxx or DC clamp.
Both have less accuracy.
Leo..
The Teensy board gets 5 volts supply from a dc-dc converter that converts 12 to 5. My team mate initially had a smoothing capacitor on the output of the rectifier but it melted after a couple tests. The INA239 shares the same ground as the Teensy.
I am just finding it very difficult to read voltage on the high side of the power leg supplied by the rectifier without damaging my board or any sensors.
I found this current sensor on Amazon to read current but now I need to sense the bus voltage to my Teensy board, which is limited to 0-3.3v analog inputs.
In your diagram the ina239 is connected to rectiifer +.
You need to do low side sensing, ina239 to rectifier-
then you can connect to rectifier- as a common ground. (and connect the same point to an external ground point)
However, if the "50V" is an average, you could still be exceeding the 85V limit of the INA.
Smoothing 30A will be interesting.
That's for measuring current. You don't need it for voltage.
Three possibilities...
The capacitor's voltage rating was too low.
It was connected backwards.
It was defective
Note that a capacitor will charge to the peak which is 1.7 times RMS. (And you get a 1.4V drop across a bridge rectifier).
The current flowing through a voltage divider depends on the total resistance (Ohm's Law). If the resistors add-up to 10K you get 5 milliamps.
The input resistance of an input pin on the Arduino is about 100Megohms, so virtually no current flows into the input pin. Unless you go over Vcc. There are (low current) "protection diodes" on the inputs and if the input voltage is too high the diodes conduct (low resisance) and you'll get excess current and fry the Arduino.
You can also add and an external Protection Diode. If you use a Schottky diode it will turn-on and conduct before the internal diodes, protecting them, and the resistance in your voltage divider limits the current. (You don't need the 100 Ohm resistor shown in the circuit when you have a voltage divider.) A 2nd diode can protect against reverse voltage.
Tell us a lot more about that.
If your mate used the right voltage/polarity that wouldn't have happened.
Or maybe your generator is not outputting what you are expecting.
If you don't know what it's generating, you can't hang electronics off it.
Leo..
I tried testing the low-side sensing circuit by simply moving the shunt resistor to the V- of the rectifier and rewiring my in+ and in- wires accordingly to the change, and I do not get anything. Using a multimeter I do not measure voltage on the V- side, thus I get no readings. Is this supposed to happen?
In your image you show you are reading a voltage across a shunt resistor. That is how you measure the current through your electronic load. I dont see anywhere that you are measuring the voltage out from your rectifier.
I meant I used a voltmeter to double check any readings I was getting for voltage from the INA239. The INA239 has voltage reading capability. It looks like it uses a voltage divider for the Vbus input. This Vbus is collected at IN+ on my image.
I notice this is true. As I do not get the right data if I do not share the ground of the rectifier with the ground of the INA239. But now I am wondering if that is even safe to do. My Teensy board and INA239 are being supplied power from a different power source and I am sharing that ground with the ground of the rectifier which is another dc power source. So I'm essentially sharing ground between two DC power supplies.
I don't think I would be that worried if the dc power from the rectifier stays constant but because it will vary in power based on changing the load I don't know if sharing ground would be safe.
Okay so I retraced my low-side sensing application and it works. It reads current. But of course because the voltage on the low-side is near zero, I get a voltage reading out of the INA239 as zero with a couple numbers after the decimal place. Is low-side sensing safer? Most references online say its just more cost sensitive since there is more readily available devices with a smaller common-mode range.
But does that mean that if I find an IC that has a smaller common-mode range and place that on the low-side of the load for low-side sensing, I would get the linear voltage reading I want to see...?