2024-02-25 12:32 PM
"I'm trying to rotate the motor using potentiometer libraries. Do you think there are any other missing parts that I need to determine?"
uint16_t potMeasArray[16];
potentiometerHandle.LPFilterBandwidthPOW2=4;
potentiometerHandle.PotMeasArray=potMeasArray;
potentiometerHandle.PotRegConvHandle=3;
potentiometerHandle.Valid=true;
POT_Init(&potentiometerHandle);
speedPotentiometerHandle.Pot =potentiometerHandle ;
speedPotentiometerHandle.pMCI = pMCI[M1];
speedPotentiometerHandle.RampSlope = 0.5;
speedPotentiometerHandle.ConversionFactor =88;
speedPotentiometerHandle.SpeedAdjustmentRange = 10;
speedPotentiometerHandle.MinimumSpeed =100;
speedPotentiometerHandle.LastSpeedRefSet = 650;
SPDPOT_Init(&speedPotentiometerHandle);
2024-02-26 01:02 AM
Hello TKara.2,
I think you cover all the needed seetings.
However, your ConversionFactor seems incoherent with your Motor's max speed : ConversionFactor = (65536 / (Max_Speed - Min_Speed)) = 119 (computation done given the motor's max speed in your project and the min Speed you posted)
Moreover, be aware that the RampSlope is in SPEED_UNIT / s, which means your current acceleration is 0.05 Hz/s, provided that your SPEED_UNIT is U_01HZ (default value).
Lastly, your SpeedAdjustmentRange seems a bit low too, you would need to be very confident in your potentiometer returned value for this to be reliable.
The upper remarks are not necessarily pointing mistakes, but are more interrogations considering your values.
2024-02-26 01:22 AM
2024-02-27 12:45 AM
Hello TKara.2,
I'm not sure on what I'm supposed to help here
Have you tried generating a project enabling the Potentiometer feature ? Are you facing any issue ?