Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

Not applicable
Hi,
I have designed a custom board based on KIT_XMC!X_C_MOTOR. One of the changes I have made in the hardware design is remove the opamp measurement of IDC_LINK_MEASUREMENT and calculate the IDC_LINK value by adding up the current value through each phase.

To implement this in the firmware do I only have to make the changes in the Motor0_BLDC_SCALAR_Current_Measurment_Init() function in the BLDC_SCALAR_CURRENT_MOTOR.c file or are there any other changes to be made elsewere?.

TIA

Update: It have added added a sense resistor between the low side MOSFET and ground in each half bridge not each phase. Sorry for the confusion
0 Likes
3 Replies
User12775
Level 5
Level 5
First like received
Could you post a picture to illustrate the hardware change. It would help us to understand your problem.
0 Likes
Eric1
Employee
Employee
Hi,

Yes you have to update the SCAN queue and add 2(3) more ADC channels.
Also you need to change the calculation of the DC link variable.

Please Note that the SW expects a on the ADC input.
So there are no special mechanism to avoid spikes and blank measurements like in the the BEMF (or in an FOC project the Current measurement) measurement.
If you see noise you should add an additional timer for blanking.

Please Note also that if you add the channels to the same ADC Group the channels will be executed after each other (SCAN Source low channel to high channel).
For a simultaneous measurement you need to configure 2 groups.

The last topic is the direction of the current. In one phase you will measure a "negative" current. If you want to measure this you will need an offset.
Also in this case the operation conditions of the ADC input should not be exceed.

Regards
Eric
0 Likes
Not applicable
@aurixuser & @Eric: i have added a sense resistor between the low side MOSFET and the ground to measure the current through each half bridge

.
0 Likes