Smart eBike Kit


Motor System

The motor system has two main components, the motor itself and the motor controller.

Motor
This was one of the first things we brainstormed on as a team, but down the line I focused on this part. The final design of the motor was to be a motor integrated into the front wheel of the bike, rated at 36V and at max load draws 8A. It outputted 350W of mechanical power. The reason this was the final design was of it's simplicity of installation and removing, its power requirements, effiency, and least mechanical parts. The other designs were very mechanically inclined we realized, and it would not be best to pursue these options since we didn't have a mechanical engineer on our team. Below is an image of the final intended design. Note: I say intended because due to the coronavirus, the shipments for front motors would of taken months, so the design was change to a rear wheel motor which we were able to locate in California. The rear cogs would have to be removed, and then attached onto the threads of the motor, seen in the second slide.
Motor Controller
The motor controller was worked on by my teammate Shamim. He chose to use PWM to control the speed of the motor in his design. The motor will receive a DC voltage based on the duty cycle. The three main reasons for using PWM is as follows:
  1. Inrush Current
  2. Efficiency
  3. Interfacing with the Pi
The issue of inrush current arrises when the motor turns on. The motor draws a huge amount of current which can exceed the motor's design specification, before reaching normal. This could utltimately damage the motor over time. PWM prevents inrush current by continousely turning on and off the supply to the motor, preventing the motor from drawing a huge amount of current. Below shows a graph of the current when there is no PWM vs when there is.
Inrush Graph
As for effiency, PWM requires only transistors to act as switches. These have low impedance and draw less power compraed to variable resistors. Achieving 20% speed means 80% of the voltage has to dissipate through resistors, which would have huge power loss.
For interfacing with the Pi, we use the PWM pins of the Pi to send any duty cycle between 0 and 100 depending on the throttle's positioning. By using the Pi like this, we can then add modes such as Wet/Dry mode on our smart phone application, which will reduce the duty cycle by a certain percentage in wet road conditions.
Below is a picture of the final PCB design at the time PCB Design by Shamim
Throttle

For the throttle, the throttle voltage would change depending on the position of the throttle. We used an ADC chip using SPI communication between the Pi to get the current value. Then depending on the position of the throttle, it will be a variable in the motor PWM output.

Back to Projects