Video of the bike:
I wanted to limit the speed in some way, I actually have a 3-speed switch supplied with my controller but it does not work properly, the speed is limited somewhat electronically “chocking” the motor and it feels awful when riding.
So I decided to use a potentiometer to regulate the maximum speed of the bike. The limit can be set at any time, even while the bike is running.
The advantages of setting the maximum speed on the bike are several: increase the range, limit the power in case you are in very crowded areas (the throttle can be very aggressive at full power/speed), limit the power in case the bike is used by someone else, etc..This mod is accomplished limiting the maximum output voltage going to the controller.
I connected the potentiometer this way: