# Sensing voltage drop across the load in the H bridge

I use two BTN7970 to make a full bridge circuit. The load is a piece of shape memory alloy(SMA) wire.

I want to accurately measure the net voltage drop on the load excluding caused by mosfet's RDS. This voltage drop is going to be read by uC. Supply voltage is between 12-24V. I suppose %90-95 of this supply voltage will be dropped on the load. What kind of circuit would be ideal?

• Why do you need a H-bridge for that? And what is the purpose of measuring the exact voltage? Aug 22 at 8:16
• To adjust the current flow i use H-bridgw with PWM. I need to measure resistance of the SMA wire. I know the current flow BTN7970 gives it's value. Using just simple V=IxR to get R value I need voltage dop. Aug 22 at 8:25
• 1st) The BTN7970's current sense is not nearly accurate, 2nd) you don't need a H-Bridge, 3rd) If yo want to detect R change you have very low possibility even with most accurate ADC for voltage current. Aug 22 at 8:32
• I can also sense current flow using a Hside/Lside sensing topology like INA219. I know I can do it with single Mosfet but still need to measure voltage drop. Aug 22 at 8:40
• @BerkerIşık Why are you using a H-bridge to deliver power to your load. A half H-bridge appears to do what you want and, as a result you get one side of the load grounded making it much easier to determine the load voltage. In fact a single MOSFET appears to do what it seems that you need so why the driver complexity? Aug 22 at 8:57

I want to accurately measure the net voltage drop on the load excluding caused by mosfet's RDS.

Short answer: Use a differential (or instrumentation) amplifier but, to improve its accuracy, you can filter the input voltage levels it receives.

I would also make one half of the full H-bridge define the polarity i.e. if you want current to flow from left to right (as indicated by the red arrow in your picture) then, the bottom right MOSFET in the bridge should be permanently activated with PWM generated by the left half bridge.

For reversed current the bottom left MOSFET should be permanently activated with PWM controlled by the right half bridge.

I say this because then it allows one (of the two required) voltage measurements to be fairly stable and, that stable voltage represents the volt-drop across the permanently "on" MOSFET.

At this point you could make an assumption that all four MOSFETs have the same voltage drop when on. Then, all you have to do is accurately measure the supply voltage and factor in the duty cycle of the switching side of the bridge and you can fairly accurately determine what the voltage across the SMA is.

To gain more accuracy, you could use a reasonably fast and accurate Instrumentation Amplifier (InAmp) with appropriate RC input filters (that remove the switching artefacts) and you should be good to go: -

• I think i need a RC filter to get rid of PWM similar voltage pattern on SMA wire to filter out 20kHz switching effects and to get DC like voltage pattern for reading with an ADC, do you agree with me? Aug 22 at 10:07
• @BerkerIşık I can't say whether you need to filter the current going into the SMA but, as per my answer you ought to filter the measurement points for the InAmp. Aug 22 at 10:09
• Rds of mosfets very dependent to current flow and temperature, not to easy imagine that are constant. Aug 22 at 10:09
• @BerkerIşık that depends entirely on what accuracy you need. My answer gave option (a) and option (b). Option (b) now has a diagram. Aug 22 at 10:10
• So, how to downscale high voltage to low like 5V scale? Aug 22 at 10:11

simulate this circuit – Schematic created using CircuitLab

It might be simpler to make a high precision current source, rather than measure the current. You could be using the same voltage reference for DAC,ADC and current reference. The instrumentation amplifier shall have all resistors with ultra low TCR.

EDIT:

Version 2. More complex, but AC:

simulate this circuit

You do use a transformer and triac phase control. At very low conducting angle we cold say:

$$sin \ \omega t\approx tan\ \omega t \approx \omega t$$

Therefore

$$V_{SMA}sin \ \omega t\approx V_{SMA} \omega t$$ $$R_{SMA}=\dfrac{\Delta V_{SMA}}{\Delta I_{SMA}} = \dfrac{V_{SMA} \omega T_1}{I_{SMA} \omega T_2}$$

Instead of using ADC, you could be using a capture input to measure pulse time coming from window comparator. The window shall be adjusted so that sine wave is at very end of cycle, let say 0.5ms before zero cross. You do control the triac and you fire at each second a short pulse, to take the reference reading. Then you measure times each cycle, you increase conduction angle and you compute the $$\\Delta R/R\$$.

$$V_{comp_V}\approx V_{ref}\omega T_{Vref}$$ $$V_{comp_V}\approx V\omega T_{V}$$ $$\dfrac{V}{V_{ref}}=\dfrac{V_{comp_V}\omega T_{Vref}}{V_{comp_V}\omega T_{V}} = \dfrac{ T_{Vref}}{T_{V}}$$ $$\dfrac{I}{I_{ref}}=\dfrac{V_{comp_I}\omega T_{Iref}}{V_{comp_I}\omega T_{I}} = \dfrac{ T_{Iref}}{T_{I}}$$

$$\dfrac{R}{R_{ref}}=\dfrac{V\cdot I_{ref}}{I\cdot V_{ref}} = \dfrac{ T_{Vref}}{T_{V}}\cdot \dfrac{ T_{I}}{T_{Iref}}$$

• How can i handle 24V drop on wire with an Instrumentation amplifier? How to down this level to 5V levels? Aug 22 at 10:00
• @BerkerIşık - You adjust the R1/R2 ratios. The two pairs act as voltage dividers to reduce the levels at the instrumentation amp. Aug 22 at 13:27

If you apply a lowpass filter to the measured voltage, the result will be averaged, and it will be proportional to duty cycle. If you then use a microcontroller SAR ADC to acquire it, since there will still be a bit of ripple after filtering, the measurement will depend on when the ADC takes a sample relative to the peaks and dips of the ripple.

It is much simpler to synchronize the microcontroller's ADC to the PWM peripheral and sample the voltage when the MOSFETs are on. This way, you do not need any filtering. Your micro's manual should have instructions about how to do this, it is a commonly used feature. If your micro's ADC does not have enough bits, either use averaging, get a micro with a better ADC, or get an external ADC chip with better specs and synchronize it using another PWM output which will set it to sample where you want in the waveform.

If you need reasonable accuracy like 1%, a common microcontroller 12 bit DAC is fine. You don't mention accuracy in the question, so I'll assume 12 bit.

Note that besides stuff like INL and DNL (check datasheet), an ADC is only as accurate as its reference voltage, so make sure that has the accuracy you want. Using the micro's power supply as reference is not usually a good idea since its voltage will depend on load current drawn by everything that is supplied by that 3V3 rail, also it will have ripple and noise. A standalone reference chip works much better.

Now, how to measure the current...

I would simply use two resistive voltage dividers, from each output of the H-bridge (on each side of the load) to convert your 24V supply voltage to a voltage that suits your ADC, like 0-3.3V.

1. set both bottom MOSFETs to ON. Both sides of the load are at 0V. Acquire both voltages: this is your ADC offset.

2. turn off bottom FETs, set both top FETs to ON. Both sides of the load are at 24V or whatever your power supply voltage is. Acquire both voltages, and also measure supply voltage with a multimeter: this gives you two gain values, one for each resistor divider, that you will use to cancel the tolerance of these resistors.

3. Now, simply synchronize your ADC with your PWM peripheral, set the PWM to pulse, acquire both ADC channels while voltage is applied on the load... and substract. That's the voltage across the load.

This method is simple and cheap but it assumes that the power supply voltage will not change between the two acquisitions, so you should set the ADC in scan mode to make it acquire both samples one right after the other. If the ADC runs ar 1 Msps, that's only a microsecond. You should also check with a scope that the power supply transient response does not cause a significant change in supply voltage, and perhaps add some decoupling caps if needed.

It has the advantage of using 2 samples, so you get an extra bit. If the FETs are ON for much longer than the ADC sampling time, you can also average multiple samples.

If you want to use only one ADC channel, you can use an instrumentation amplifier to measure voltage across the load... but you will have to find one that accepts a 24V differential input voltage, which might be hard to find. Or just use a balanced attenuator. If you use an instrumentation amp, it is important to keep the impedance seen by both inputs equal to preserve CMRR, so the attenuator needs to be balanced, ie a resistive divider with 3 resistors instead of 2. You will need to center the signal on half the ADC reference voltage, so you lose one bit, but you can also use averaging.

You can use the same method to acquire current through the load when the MOSFETs are ON.

• It contains some tested comments. Very good @bobflux. People here will benefit as well. Aug 23 at 7:53

1. You can just use a 4/5-digit DVM to measure the voltage across the load, whether it is a DC motor coil, or a SMA wire.

2. Or you can use the differential channel of a 24-bit ADC to do the job.

Appendices

Appendix A - BTN7971B Schematics

• thanks, but this is not what i need. I think you gave an example of current sense, but i mean excluding voltage drop of mosfet's RDS and accurately measuring the voltage which part of only wire. Aug 22 at 9:04
• I am confused. I thought a 4-digit DVM or a 24-bit ADC's differential channel across the load (SMA wire) of course measures the voltage. The current sensing part is nevertheless BTN7971B's main trick, though not your focus or objective. Aug 22 at 9:44
• Topics we're discussing is that measuring with a uC not DVM i mentioned that in my question especially. For answering that, you need to know about voltage drops of mosfets, how to measure 24V with a 24bit ADC(uC works on low voltages). You should give more detail if you have an opinion. Aug 22 at 9:54
• Well, many DMM's talk RS232: fluke.com/en-us/product/precision-measurement/bench-instruments/… Aug 22 at 11:20