Hi,
there are differnt methods for AC measurement (current, voltage) .... and they have different results.
Different results does not generally mean the one is better than the other.
You need to choose the correct method for your application:
Let´s say you have a LED and a resistor in series, driven by PWM.
You want to measure current to calculate the power for
* the LED: --> use averaging current method (LED voltage is about independent of current)
* the resistor: --> use RMS current method (R voltage is proportional to current)
(for a 50% square wave 0mA/20mA the average current is 10mA, while the RMS current is 7.07mA)
Klaus
Hi,
Thanks for your response. I am using the resistor method to measure the AC current. I face some difficulties so the result obtain is not what I expected
I will say the step that I have done and please correct me if I was wrong or any other methods for controlling AC current in BLDC motor.
I am using STM32F103C8 controller. i have used two timers TIM1 , TIM4, and ADC2
TIM1 to generate PWM for 16KHz and i generate PWM in center align mode 1.
TIM4_IRQHandller is called whenever there is a change in steps or state of bldc motor. (ie 6 commutation states)
ADC2 is to measure the voltage drop across the source to drain of MOSFET. which is amplified by op-amp and read by ADC2. I have used ADC2 in the injected method so that I can read the voltage drop across the resistor at the center of the pulse.
I tried to measure the AC current in one phase (phase B). for that need to measure the voltage drop at the two-step (commutation steps).
But the value read in ADC2 is varying so I tried to take the average of it by summing the ADC2 value in TIM1 for two states and the average of that sum is taken in TIM4. But still, I found some variations so that I can't able to control the AC current in the BLDC motor.
Is any other steps or method to control the AC current.
Thank you.