# voltage divider -- for detecting higher voltage in ADC

I am working on a BLDC sensorless motor. I need to detect BEMF Zero-cross event. My Motor is working on 24 Volt power.

Now I need to detect the back E.M.F. As refered in this application note.

My MCU is working on 5V. And ADC range is 0 to 5V. I need to convert the BEMF feedback signal to ADC channed in this.

As we know voltage divider rule says: Vo = (R2/R1+R2)Vin

In Figure I :-- Now signal (U) which I need to feed is applied at the middle of the two resistors R1 & R7. So what is the value of voltage VU ?

In Figure II :-- Sum of U,V,W is applied at the middle of the two resistors R11 & R15. So what is the value of voltage VN ?

Also, what are the roles of capacitors C1 & C4?

Please can someone explain the MATH behind this ? • There is no "R2" in your Figure 1. There is no "VU" in your Figure 2. Please try to make your text consistent with your figures. Feb 22, 2016 at 5:06
• To actually solve this problem, you need to remember that the connection to VCC (through R1 or R11) will also contribute to the output voltage (VU or VN). The general way to solve such circuits is to use superposition. Feb 22, 2016 at 5:08
• @The Photon for R2 i just gave the reference from wikipedia for voltage divider rule. Feb 22, 2016 at 5:10
• but that formula only makes sense when referring to a specific schematic. You should adjust your formula to refer to the schematic you want to talk about. Feb 22, 2016 at 5:11
• You should also be aware that, for a complete answer, you must specify your signals frequencies. The capacitors in your circuit will make your output amplitude different for different frequencies. Feb 22, 2016 at 5:13

Forget about the caps for a moment. In fig. 1 you have three resistors with unknown current and a unknown output voltage, which makes four unknowns. You can apply ohms law to each resistor and Kirchhoff's current law to the common node to obtain four linear equations. Solving them is straightforward math. Applying the superposition law is equivalent.

For the specific case you mention, the solution of the equation is equivalent to replacing the two resistors to fixed voltages (ground and Vcc) by a single virtual resistor having the value of those two resistors in parallel connected to a virtual voltage source supplying a voltage as you would get from a two-resistor divider between the fixed voltage sources.

The cap acts as low-pass filter. You can calculate the cut-off frequency as if the R in the RC filter is all three resistors in parallel.

• So as per superposition theorem, for figure I :-- VU = (R7/R7+R4)*U + (R7/R7+R1)*VCC .... is it right ? Feb 22, 2016 at 8:59
• No, that's not how the superposition principle works. When you consider the effect of U, you have to replace all other voltage sources by short circuits, in this case you need to calculate as is VCC and GND are connected. So R7 and R1 need to be considered in parallel on the low side of the divider, while R4 is on the high side. So the first term is ((R1 || R7)/(R4+(R1||R7))), where R1||R7 means 1/(1/R1+1/R7) Feb 22, 2016 at 17:37
• Note that the previous comment does not imply your second term is correct. It needs to be fixed in a similar way. Feb 22, 2016 at 17:40
• Vu = ((R1 || R7)/(R4+(R1||R7)))*U + ((R4 || R7)/(R1+(R4||R7)))*Vcc ... this is voltage calculation for figure 1 .. right ?? Feb 23, 2016 at 5:30
• Your Vu formula seems correct. With input resistor I meant R4 of fig. 1. But that was wrong. The correct answer is all of the resistors in parallel, so R4||R1||R7. Feb 23, 2016 at 8:05

Assuming that your BLDC inverter ground is the same as your A/D ground - a pretty safe assumption - then you can greatly simplify your circuit (see below).

I have used this successfully in BLDC and PMSM sensorless drives for years. The cap is to provide a low-impedance 'instantaneous' voltage while still allowing the PWM frequency through. I always simultaneously sample all three A/Ds at a particular time in the PWM cycle to reduce A/D noise. increasing the cap value will increase your filter into your A/D, if you so desire.

You will need three of the shown circuits, one for each phase. You don't need an extra 'neutral' circuit if you are working with software. If you add the phase voltages up and divide by 3, you will have your 'virtual neutral' value. Or you can take the bus voltage and divide by two and you will often be close enough, depending on the application, motor, PWM method, etc. • what exactly you mean by these two points .... how you come to this conclusion ...1> If you add the phase voltages up and divide by 3, you will have your 'virtual neutral' value. ..... 2> Or you can take the bus voltage and divide by two and you will often be close enough, Feb 23, 2016 at 12:01
• The first circuit that you posted for the Vneutral network is simply adding the three voltages together and dividing by 3. It is doing the same thing with resistors. It then adds pull-up resistors to center the voltage into a range that the A/D can read. You can do this addition and division in software. It is cheaper and simpler. If you are looking for a more documented example than some guy on stackexchange, i understand. Take a look at Microchip's AN1160. Look at Figure 5 and Equation 2 in particular. Feb 23, 2016 at 13:53
• @user6363 Take all three and add them up and divide by 3 - you are emulating the comparator function. This is exactly what the comparator in older analog implementations are doing. And BEMF is generated on all three phases all the time. Just rotate a motor without a drive and you will see BEMF. No, all three simultaneous do not have the same value. The 'dormant' phase voltage is either rising or falling. When the dormant phase voltage is equal to the calculated neutral, then an event occurs. Feb 24, 2016 at 18:35
• Correct. Normally, I would suggest that you drop the lower resistor value to 1.2k, but in this instance, the power losses on the upper resistor are about 122mW, which is getting a bit high. I would bring the upper resistor to 20k and the lower resistor to 2.7k. There are a hundred other combinations that will get you what you need, but as you increase voltage, take into account two things: (1) heat and (2) A/D input impedance. Your cap should make up for a lot, but I would suggest you stay under 50kohm for the upper resistor. Feb 25, 2016 at 20:38
• No, impedance matching is for transmisison lines. You want a low impedance source and a high impedance sink. Your A/D input impedance could be as low as 10k in some cases, but is generally higher. If you make your external resistances high, you could artificially bring your A/D low since the A/D input impedance could load the resistor network. Generally, you don't have to worry about it, but stay under the 50k and you should be fine. Feb 26, 2016 at 16:13