Like it is given in the circuit diagram I excpect a ADC value about 2048 with no load (1,65V Offset).
Now I've connected a resistor between Phase A and C Pins.
The PWM_Three_Phase_Output Signals are configured like this:
If I switch on the PWM I obtain a negative current in Phase C (ADC value < 2048), but I think it has to be positive.
Is there an error in the documentaion, so it has to be inverted ?
1,65V (ADC value:4095) @ -8A
-1,65V (ADC value:0) @ 8A
First of all, let's derivate the AMP output voltage. Assume that the I_SENSE_C2 voltage is VC2, the I_SENSE_C1 voltage is VC1, the pin2 and pin3 voltage of AMP is V23, the AMP output voltage(pin1 of AMP) is V1. Because the pin3 of AMP is connected to a 1.65V voltage reference, based on ZERO theory, we can get the following equation:
From the above two equations, we can get
After we replacing the R value
Because the ADC can only sample positive voltage, so the V1 must be greater than zero. In other words, the (VC2-VC1) must be greater than -0.4V and less than +0.4V.
Each ADC channel has OFFESET register, you can set the ADC OFFSET register as 0x4000, which represents 1.65V, so the ADC will get the actual voltage.
Hope it can help you
I still need to know the answer for my question.
Could you please help me again ?
What you read from the ADC is normal. In SW you need to do the inversion of the current if you wish to keep the generic motor control conventions. A current flowing into the motor winding has a positive polarity while the current flowing out of the motor winding is negative.
On the shunt - a positive voltage drop means the current flows out of the motor winding (since the shunt is mounted on the lower inverter legs).
Therefore, you need to invert the value of the ADC readings in SW.
Hope it helps!
Okay, so the hint in the circuit diagram should be like this ?
1.65V +/- @ -/+ Imax