Motorized golf push cart

Hi everyone,

I want to upgrade my golf push cart with electric motors. Why? Because I am becoming older every second, but I also don’t want to replace my current cart. And making things on your own is more fun than purchasing some finished product.

One of the features I’d like to implement is what I would describe as “push assist”, so when you give it a push, the motors will support you with that speed. If you stop pushing, it will become slower and come to a standstill eventually. So comparable to pedal assist of an ebike. At some later stage I also want to include a remote control as well as a camera/lidar based “follow me” feature, but that is a seperate topic :wink:

I have purchased an ODrive 3.6 as well as a hoverboard with a defect PCB, but working motors, battery and charger, and I have connected and calibrated the motors according to the tutorial in the docs.

Where I am struggling now is to set the velocity. My idea was I could use the encoder to detect the speed of the wheel and then also set the motors to that value.

Simple code:

while True:
  v = odrive.axis0.encoder.vel_estimate
  odrive.axis0.controller.input_vel = v

Now what happend is when I spin the wheel manually, it accelerates to that speed (unfortunately a bit bumpy). When I then try to slow down the wheel, I can see that the value of v also decreases, but when I let it go again, it will accelerate to the previous speed.

Any idea why this happens and what I could do actually achieve what I am trying to achieve? Is it even possible. The alternative to that feature to just work with a potentiometer to set the desired speed, but that is kind of lame.

I’d really appreciate your help.

Cool project! This is definitely a little tricky - especially on uneven terrain, distinguishing from force applied by the user and force from terrain slopes is pretty nontrivial.

Three things you could do - first, you could implement some sort of force sensor on the cart handle, so that it’s able to sense the pushing force from you and convert that into wheel torque – this is similar to what electric bikes do for pedal assist. Second, you could have a button on the handlebars that, when pressed, disables the motor, and when released set the velocity setpoint to the current speed – so you’d hold the button while giving the cart a starting push, then release it and it’ll keep going at the current velocity. Finally, you could make a velocity-to-torque mapping, where you control the wheels in torque mode but the faster the cart goes the more torque you put out – this is how cheap electric bikes that don’t have pedal force sensors work. That being said, that last technique is pretty janky and could definitely have issues with asymmetrical force applied between the two wheels.

Hey, thanks alot for sharing your ideas.
Regarding the slopes I wanted to integrate a gyroscope anyway.

Having force sensors in the handle was actually the first idea I had, but I had hoped I could do it without them only by what ODrive can do.

Setting the speed manually and then just keeping that speed is probably the easiest way to go, but also the least challenges. And Inlike challenges.

The last option you mentioned also deosn‘t sound overwhelming attractive, so I propably give it a pass.

Which leaves me with the force sensors. So I have ordered two strips that I will integrate into the handlebar and see how it works out.

If I can find the time, I‘ll keep everyone updated on the project.
Also, other ideas are still welcomed.

1 Like