FOC controlled breaking for indoor bike / home_trainer


Im contemplating, how to do controlled breaking using simpleFOC, on a DIY home trainer setup.

As I understand the concept of a hometrainer, it should be able to change resistance on the pedals, in sync with these online multiplayer VR bike tournaments, so having digital control is nice.

All ideas are welcome

Attach it to a generator which powers a fan that cools the rider (and simulates head wind for a more realistic indoor riding experience)… :smiley:

Mechanically, a planetary gear can be used to mix different mechanical forces… so a BLDC input coupled to the pedals via a planetary gear could either support or oppose the rider’s pedalling force, depending on the direction and speed of its rotation, if I understand these things correctly…

Why would you need FOC for controlled braking? Just use any large motor and attach a large power resistor with a powerful mosfet to chop the generated current to achieve variable resistance. Then a resistor to variably set the duty cycle. I’m sure there are plenty of simple DYI schematics for controlled braking setting the duty cycle of a mosfet with a resistor… Even simpler, use a bicycle disk brake, forget the motors and electronics. Best, get a bike and go out biking.

I quess a BLDC should generate power when being turned by force.

The challenge in making a decent DIY hometrainer, is making it as silent as possible.

Sure, you can just go for a ride and get the exorcise, but maybe its frosty and there’s snow and stuff, and you rather be watching cartoons while pumping. The idea is a indoor (winter) bike, where the rear wheel is replaced by this cassette, attached to a shaft, driving the rotor.

You mean something like this?

Its $50 on amazon. You can use it as a base for a fancy one.

Yes, I believe those a quite noisy.

Having the frame attached without wheel should create less noise. Imagine having the shaft resting/running in some quality bearings. On the shaft, the rotor with magnets attached, could make a controllable resistance. Maybe it does not need to be a perfect BLDC, unless you actually want to generate power.

Im getting curious, as to how much power you can generate for charging purposes.

100 watts at most for less than an hour. So you need 12 volt, 10 amp motor.

I believe it is a choice. Either a full on generator, where the resístanse is the rotor inertia, made for optimal charging or a VR devise capable of entering those online races. Or maybe I’m missing the points. Since we can measure the currents in the motor/generator those numbers can be transferred directly to the game, measuring wattage?

This one is pretty cool, not sure it is a generator though…

I think these one_way_bearings will be a good solution for freehub experience on a indoor trainer capable of charging.

They come in various dimensions. Some high end silent wheel hubs for MTB use these types of bearings. Of course you can get them much cheaper from the manufacturer compared to in a hub (onyx is one example of sush very cool, but also expensive, MTB hub)


There is a somewhat huge temptation for cheating or messing with the data if the concept should be a home trainer, capable of entering online races, and being open-source. I guess one can hack a closed system and make the avatar better then the driver really is. I think it is just foolish to go down that road, since anyone can fabricate their own data as they please.

The data will still be useful for the user, to track watts produced, driver progress and so on. It would obviously be weird to cheat one self, by manipulating the data.