Hello all. I just started building a balancing robot based on hoverboard and odrive. I’m interested in the starfish module which holds the magnet ring. Where can I find the cad drawing for that. I want to make it less high because I only need to hold the magnetic ring.
Nice post!. I’m new using Odrive, and I was wondering if you could give some recommendations about it.
I’m trying to use the hoverboard wheels on an omnidirectional platform, so I need to know how difficult is to use Odrive to control the angular velocity, or maybe it would be better to use ESC?
It would be great if you could help me with a brief explanation of how to use it.
You can find the starfish and magnet ring CAD in this link.
You can simply use the
set_velocity() function that is provided in either the Python communication library that uses the USB port, or the Arduino library that uses the UART. I think ODrive is going to be better than an ESC for precise velocity control than an ESC.
I’m getting a bit closer using odrive with hoverboard motors. But I have been stuck with it for almost a day.
I have the following problem.
Start the odrive, I use velocity mode. It does it calibration stuff (turn left, turn right). When it finished it start vibrating very hard. So I decreased the vel_gain from 5.0 to 0.0004. It still vibrates, amplitude very low but you can hear it some sound. The vibration can be becuase it tries to keep the speed -> 0.
After a while it stops with status:
motor0.error = 20
motor0.gate_drive.drv_fault = 0.
motor0.gate_driver.status_reg_1 = 0
motor0.gate_driver.status_reg_2 = 1
motor0.gate_driver.ctrl_reg_1 = 1360
motor0.gate_driver.ctrl_reg_2 = 0
If I decrease the gain till 0 same problem occurs, low vibration and boem driver fault.
Reading the code it seems that the driver is setting the FAULT I/O line.
So I try the DRIVE_FAULT hardware mod DRV_FAULT on ODrive v3.4.
Still the same problem.
I’m a bit lost. Anyone have an idea. I hope I do not need to buy a new odrive v3.5 to solve this.
3 12Volt 7Ah lead acid batteries in series.
motor_type = MOTOR_TYPE_HIGH_CURRENT
morot_mode = CTRL_MODE_VELOCITY_CONTROL
vel_inter = 0
encoder cpr = 12000 -> encoder 600ppr and gear ratio 1:5
for safeyty val_limits = 12000
The vibration/sound even when the vel_gain is zero is probably because of the current sense noise. You can improve this by setting
local_regs->Ctrl_Reg_2.GAIN = DRV8301_ShuntAmpGain_80VpV; in low_level.c. This limits the current range to 35A, but for the hoverboard motors this should be plenty.
As for the DRV_FAULT issue, thanks for trying the mod, and I’m sorry it didn’t work for you. I can send you a free replacement v3.5 when they are ready, is your shipping address the same as before? If not, feel free to DM me your new address.
By the way, I’m really interested in the metal mounting clamp/block you used to mount the motor shaft to the robot base. Where did you get it?
Thanks for the service. Will try the shunt gain when I’m back home.
I also was wondering why the mod did not work. The GND on the via had the same noise as the GND where c35 is connected too. I’m going to play arround with some electrical GND fixes to see if I still can get it to work. Also notice some signal frequenceis in the noise. Will investigate where that comes from.
When you send me odrive 3.5v can you please send it by DHL same address as before. I wil pay the DHL costs, just send a link. At least I know I will receive it fast.
I have had bad experience with USPS too the Netherlands. My odrive took 6 weeks to reach me and an vision camera I bought never arrived after 2 months. Have better results from buying stuff from China.
I will keep you guys posted If I find some solution for the DRIVE_FAULT
I don’t mean the encoder bracket, I mean the metal mounting clamp/block you used to mount the motor shaft to the robot base.
I don’t have a DHL account but I can look at getting one.
This looks like the clamp holddown that is in the actual hoverboard?
Indeed it is that clamp you can find in the hoverboard. All the one that I saw had them in it. They are aluminium cast. Perfect to hold the motor. You can source them online from people that sell every part of the hover board. Google for hoverboard wheel calmp
If a DHL account is a problem than send it by USPS. Maybe a higher rate, I do not not mind paying that.
Good to know because this is my plan for mounting my wheels as well. Nice that you can buy the part individually.
The below change made the motor vibrate less. I can increase vel_gain = 0.001 and no vibration yet.
But it needs to go much higher but than vibration gets out of hand. But working on getting the noise out of the system.
One thing I find strange is that when odrive is in velocity mode
my_odrive.motor0.config.control_mode = 2
When I move the wheel by hand it try to fight back to keep the velocity zero. Perfect.
But when I turn the wheel and I almost turn it 360 it suddenly move violently to a new position.movie link.
Anyone any idea what kind behaivour this is.