Uncategorized

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?h-bridgecurrent-sensingShareCiteEditFollowFlagasked 18 hours agoBerker Işık40722 silver badges1111 bronze badges

• 2Why do you need a H-bridge for that? And what is the purpose of measuring the exact voltage? – Marko Buršič 18 hours ago
• 1To 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. – Berker Işık 18 hours ago
• 11st) 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. – Marko Buršič 18 hours ago
• Well, just use a 4 digit DVM to do the job. Of course you can use a differential channel of a say, 24 bit ADC. Let me post a couple of pictures for reference in our discussion. Stay tuned. – tlfong01 18 hours ago
• 1I 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. – Berker Işık 18 hours ago
• 1@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? – Andy aka 18 hours ago
• 1@Andyaka I can do it using single MOSFET as you said. I use full bridge to change the current direction possible use cases in future . – Berker Işık 17 hours ago
• 1To detect this resistance, you would need a DC constant current driver (very flat) a shunt and two very accurate ADCs, for example 24bit sigma delta. All of the components have to be very precise and low TCR. – Marko Buršič 17 hours ago
• 1@BerkerIşık why should current direction be of any significance when restoring the shape of an SMA? – Andy aka 17 hours ago
• 1This circuit will be part of a academic paper. It will also cover the effect constanly direction changing of current like AC manner to mechanical parameters. Do you think there’s no effect on mechanical parameters of wire, right? But that’s not the point. – Berker Işık 17 hours ago
• 1@BerkerIşık OK fair enough. If it’s an academic study that’s different!! – Andy aka 17 hours ago

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 ωt≈tan ωt≈ωtsin ωt≈tan ωt≈ωt

ThereforeVSMAsin ωt≈VSMAωtVSMAsin ωt≈VSMAωtRSMA=ΔVSMAΔISMA=VSMAωT1ISMAωT2RSMA=ΔVSMAΔISMA=VSMAωT1ISMAωT2

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 ΔR/RΔR/R.

• 1How can i handle 24V drop on wire with an Instrumentation amplifier? How to down this level to 5V levels? – Berker Işık 17 hours ago
• 1@BerkerIşık – You adjust the R1/R2 ratios. The two pairs act as voltage dividers to reduce the levels at the instrumentation amp. – WhatRoughBeast 13 hours ago

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: –

• 1I 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? – Berker Işık 16 hours ago
• 1@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. – Andy aka 16 hours ago
• 1Rds of mosfets very dependent to current flow and temperature, not to easy imagine that are constant. – Berker Işık 16 hours ago
• 1@BerkerIşık that depends entirely on what accuracy you need. My answer gave option (a) and option (b). Option (b) now has a diagram. – Andy aka 16 hours ago
• 1So, how to downscale high voltage to low like 5V scale? – Berker Işık 16 hours ago
• 1Voltage levels at the two ends of the wire will be very different(like 11.5V and 0.5V). Would be okey for Ins. Amp. inputs? – Berker Işık 16 hours ago
• 1You can power the InAmp from the same rails as your H-bridge but, you’ll need to find an InAmp that works with inputs rail-to-rail. Or you can add two more resistors that move both voltages towards a mid-rail point. The reference input on the InAmp should also be connected to this mid-rail point so that voltages on the InAmp output above that mid-point represent current in one direction whilst voltages below mid-point are currents in the other direction. – Andy aka 16 hours ago
• 1If you need to lower the output of the InAmp to a suitable voltage range (such as 0 to 5 volts) then use a potential divider on the output. – Andy aka 16 hours ago

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.

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