I have just received 3 odrives and can not wait to get everything up and running.
The encoders are still in transit so, for now, I want to test out sensor-less mode.
My goal is to run 4 motors, position controlled simultaneously.
I have been in contact with Oskar before my purchase and he suggested that I changed the current sensing resistors due to the low current draw of my motors
Can someone tell me which resistor I would need to change and what would be an appropriate value for these motors?
Start by taking the max current range that you require. Something like 2x the peak rated current of your motor (to give some headroom) is a good choice. Let’s call this I_range.
Look at how motor->current_control.max_allowed_current is calculated in low_level.c. You want this to be to equal I_range, or the nearest possible larger value (possible values depend on available shunt resistor values).
For low currents, like your case, use local_regs->Ctrl_Reg_2.GAIN = DRV8301_ShuntAmpGain_10VpV;
You can trace the code backwards from motor->current_control.max_allowed_current to check what value of SHUNT_RESISTANCE you will need.
Select a suitable resistor. I recommend this series.
Feel free to let me know what value you came up with, and I can check that it makes sense.
Yes, with 50 mOhms I calculate it to 3.2A, perfect.
I would not recommend running the motor until you have replaced the resistors. Also, note that you should only replace these resistors (not the middle one):
You also need to change a bunch of parameters due to low current and high resistance of your motor. The following are a good place to start, but you will need to tune it:
With some effort, I have been able to replace all 4 resistors.
I can read all settings I have flashed through USB (python) and also communicate with the ODrive with UART (Arduino). So it is flashed and it also powers on and communicates.
If I turn the motor manually the observer state (pll_pos) does not change and also trying to move the motor with motor0.set_pos = 1000 does not work on both channels.
Did I fry the ODrive trying to desolder the shunt resistors? Or have I missed enabling some setting in the low_level.c?
I’m using a Voltcraft powersupply. In my last attempt this night I have quickly connected an Arduino to see if the raspberry pi didn’t play nice with the ODdrive, however, obtained the same results. If I open the serial monitor, with the Arduino test file uploaded to the board, I also read 0 bus voltage.
I think I’ve got it figured out. The motor error nummer is 3 —> phase resistance out of range.
Phase to phase is 11.6 Ohms. I’ll continue tomorrow to see what values need to be changed.
If someone has a suggestion let me know!
mvg,
Bastiaan
EDIT:
if (fabs(test_voltage) == fabs(max_voltage) || R < 0.01f || R > 1.0f) {
motor->error = ERROR_PHASE_RESISTANCE_OUT_OF_RANGE;
return false;
I think a maximum hardcoded maximum resistance value of 1 Ohm is bugging me
EDIT 2:
phase resistance was also out of range. IT WORKS!!!
next up --> after calibration it is vibrating so need to tune pid values
Motor0 is working, Motor 1 not so much. I think I have damaged the solder pad of R46. The copper pad lifted when i pulled the resistor. See the attached picture for which side I mean.
Is this side connected to ground? If so I might solder a small wire to a ground connection somewhere else.
You may be able to solder a fix-wire between the resistor and the transistors and R48, that you can send through one of the mounting holes to the other side.
Both motors are recognized and i’m able to control them.
However the motor connected to motor1 has twice the measured phase resistance and inductance compared to motor0.
Motor0 has the correct measured phase resistance and inductance. What could be the issue?
Thanks in advance
I’ve tested the connections and also measured the resistance from ground to the positive side of R48 and R43. Everything seems to be connected properly. Is there a software setting that i could have missed that is not shared between m0 and m1?
Are you available for a google hangouts and you can show me the board and how you fixed it in more detail. Let me know what your availability is like, feel free to DM me.