i try to use the current sensing with the esc G431B-esc1.
i read a lot here in the community and i see often:
LowsideCurrentSense currentSense = LowsideCurrentSense(0.003, -64.0/7.0, A_OP1_OUT, A_OP2_OUT, A_OP3_OUT);
i understand 0.003 the shunt value 3 mOhm!
64.0 can be the gain of the opamp!
but 7.0 where does this value come from??? this I need!!
i look at the init of the opamp in the source… and compare with data sheet.
i expected a gain of 16 from how you init the opamp:
hopamp->Init.PowerMode = OPAMP_POWERMODE_HIGHSPEED;
hopamp->Init.Mode = OPAMP_PGA_MODE;
hopamp->Init.NonInvertingInput = OPAMP_NONINVERTINGINPUT_IO0;
hopamp->Init.InternalOutput = DISABLE;
hopamp->Init.TimerControlledMuxmode = OPAMP_TIMERCONTROLLEDMUXMODE_DISABLE;
hopamp->Init.PgaConnect = OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0_BIAS;
hopamp->Init.PgaGain = OPAMP_PGA_GAIN_16_OR_MINUS_15; THIS !!!
hopamp->Init.UserTrimming = OPAMP_TRIMMING_FACTORY;
can somebody explain a little?
i am very new to this, but i got the motor spinning in open loop and i can move the motor to a fixed angle. can read the bemf voltages.
but the current readings are wrong. i not use a hardware encoder. i know this is not easy. but i want dig deep into this.
if I use gain of 16 the current vals are very much wrong.
if i use 64/7 = 9.14 the currents is still a little off: i should get 1.1A in my test scene, but adc value gives 0.97A not much diff … but !!!
adc delta is 32 digits. 32digit x gain 9.14 / 0.003 → 97 → 0.97A ?
thanks for helping
Frankers