Hello, new to odrive and automation in general. I have written a bicycling videogame and would like to now implement an exercise bike like device where the pedaling resistance can be varied based on the terrain (and other factors) in the game. Is this possible with the odrive? If so can anyone offer suggestions as to what I should be looking at purchasing drive and motor and resistor wise, and how I would go about producing this effect with the drive.
Super cool application! Yes, this is absolutely possible with an ODrive - chances are the S1 is your best bet.
First things to figure out are the RPM and torque that you’ll need to oppose with a motor. That can inform your motor selection (note you’ll probably need to use a gear, belt, or chain reduction, since motors typically like going at higher speeds and lower torque). You can assume that a motor that’s able to provide some amount of torque at a certain speed can also resist that amount of torque at that speed.
From there, once you know your peak and continuous power, you can find a brake resistor that would would for your application.
If you’re able to provide the maximum torque and RPM numbers for the bike, happy to suggest a motor!
The ODrive is able to produce arbitrary motoring and braking torques, so your software would just have to compute the pedaling resistance the user should experience (given simulated bike speed, slope, gear ratio, pedal RPM, etc) and provide that as a torque command to the ODrive.
Thanks for your response! I’m glad to hear that this is possible.
Reading this: https://physicalcycling.com/pedaling-force I would say a maximum of 500 newtons and 120 rpm is a good place to start, with average being 200 newtons or less and 60-80 rpm. A 4:1 gear reduction is easily acheived using stock bicycle chainrings and sprockets, but that could be increased with not much difficulty.
Okay, so 87.5 Nm at 120 RPM? That sounds like a lot but it’s actually not too bad just around a kW. The hardest part is the fact you want as small / efficient of a reduction as possible so that the gear/linkage resistance is extremely low.
Thank you! For my education how do you come up with the 1kw number? The second motor is definitely more in my budget. Would something like this work:
BANLICALI Electric Hub Motor, Aluminium Alloy Ebike Motor Mid Drive Motor Rear Wheel Hub Motor Conversion Kit Black 1000W 48V 460RMP https://a.co/d/hC9tIFn
I didn’t even think about that, those are really good ideas! The gearless one would be best, I’d imagine. Two things to note:
Transferring torque from the pedal to the motor might be a bit tricky - you’d likely have to machine a custom sprocket to connect to where the spokes nominally tie into the motor, or something like that. Luckily, you can laser cut or waterjet a sprocket with something like Sendcutsend
That motor only has a hall sensor encoder, which are pretty low resolution - so at low speeds the torque control might feel a bit rough. If you can add an additional external encoder (like a cheap incremental), the S1 can use that in conjunction with the hall sensors to improve motor control.
If you can find a bike wheel hub motor that also has parallel sprockets, then you could just use those sprockets, and have the wheel mounted in the normal rear wheel position. Then the wheel can just be braking from its normal position.
I don’t know if something like this reacts the motor torque into the sprockets or the frame, but I assume the frame?
Gentlemen, you are awesome! Thank you so much for the input. I will order the S1 and I think I should be able to make the motor with the sprockets work. One last question I have (for now) is how to size the braking resistor? Thank you again. I will report back with progress!
If you’re going to be only ever running regen, then you just need something that can absorb a human’s max peak / continuous power output I think some people can go 1kW for a few seconds, and a few hundred watts continuous? So about 500W of resistance should probably be just fine. Note you also want to make sure you’re getting the right resistance of brake resistor - we have a guide for this for the regen clamp, but it also applies to S1 (I need to make it its own page) ODrive Regen Clamp Datasheet — ODrive Documentation 0.6.9 documentation
OK guys I finally got everything mounted and hooked up. When I try and calibrate the motor turns slowly for about a 90% rotation and I get the ILLEGAL_HALL_STATE error. Any ideas?