Using ODrive as generator

Hey there,
I recently had the idea in mind to build my own bike indoor trainer. Therefore I need an resistance to work against. I currently have an ODrive laying around and thought if I can use an Motor connected to an ODrive as the resistance. So I would spin the motor with my bike and the generated energy would go into the brake resistor of the ODrive or maybe I could charge a battery with the power. I know that there are other ways to do such a thing, but as I mentioned, I currently got an ODrive left…
So would it be possible that I use the ODrive to generate Electricity? That would mean, that approximately 200 Watts average would run through the ODrive for around 2-3 hours straight. I dont know which motor is the best for this job, but I also got an hoverboard motor laying around, so maybe I can use this…

I know that the ODrive isnt designed for this purpose, so I wanted to ask if this could maybe fry the ODrive PCB or lead to other problems?
With the ODrive features I could implement training intervalls to make a more varying training session or something like this.
Maybe someone tried something similar and has experience with this?
Thanks in advance!

Marc

Yes, should be entirely possible. I was doing a similar thing with an exercise bike. :slight_smile:
A hoverboard motor should be fine for the job. (although potentially less efficient than motors with high-resolution encoders, especially at low speeds)
You won’t get quite the full 200W though. Some will be spent in the motor’s winding resistance, and a tiny amount (~1W) will also be spent powering the ODrive electronics - so don’t leave it switched on or it will slowly drain the battery. The motor also has ‘magnetic hysteresis drag’ which will consume some more energy, by polarising and re-polarising the iron cores of the motor.
Overall, you should get more than 100W into the battery for 200W into the bike though, even with a hoverboard motor.

You can put the ODrive into torque control mode, so that you can simulate whatever incline you like.
If you generate torque in the opposite direction of motion, then that will push charge back into the battery.
I would advise to use the latest firmware, because it has better (more efficient) control of the brake resistor. The resistor is now only used as a backup measure if the battery cannot accept the charge for some reason.
You need to set the ODrive config for your maximum safe battery voltage, etc. to avoid overcharging the battery.

1 Like

Thanks for the quick reply! Thats good to hear, that someone already built something similar and that this works! What about noises on your exercise bike? Traditional bike trainers are very loud and vibrating. I hope that the motor sound wont bee too loud, so other people in the house dont get annoyed. Did you manage to get your exercise bike silent?
Thanks!

Marc

This is a mechanical problem. I am not a mechanical engineer, by any stretch of the imagination. The friction-drive between the bike’s flywheel and an out-running motor wrapped in self-amalgamating rubber tape is very noisy. :joy:

In answer to your actual question though - the noise will depend mostly on the motor’s cogging. ODrive has some cogging-compensation. It’s not perfect but it should be good enough for this application. I’ve not tried it though.
Oh, but you CANNOT do cogging compensation with a Hall-sensored motor like a hoverboard motor. You will need a high-resolution encoder (preferably an absolute encoder such as AS5047p) for that.

1 Like

Mmh okay, thanks! That helped a lot! Lets see if I can make something that works for me :joy: