Saturday 6 January 2018

LunchBox ESkateboard Part 2: Electronics

The electronics of the E-skateboard is quite straightforward. The overall structure was summarized nicely by vlad pomogaev in his video


while random88ish uploaded an awesome video to explain everything extensively


And here is a picture of my system in the lunchbox. The only difference is that instead of radio receiver, I used Arduino101 for Bluetooth control.



In summary, the key to choosing the right motor is that choose a motor with the proper kv value so that it could deliver your desired top speed and starting torque. 
The formula for top speed is

wheel rpm = kv * voltage of battery * gear ratio * efficiency
speed(km/h) = wheel rpm * wheel circumference(cm) * 60 min/h / 1000000 

http://calc.esk8.it/ is a online calculator that can be used to calculate speed easily.

For starting torque, The torque per armature current is inversly proportional to kv of the motor


meaning that for constant current, a lower kv motor would generate larger torque. Normally, from experience, suitable kv value for electric skateboard ranges from 170kv to 350kv.

The key to choose battery is to choose a battery that can provide enough current to motor as well has enough enough capacity to reach desired travelling distance. If the motor's maximum current is 80A, the battery must be able to provide 80A. 

The maximum current the battery can provide can be calculated by this formula.

Maximum Current = Capacity(mah) * Discharge rate(C) / 1000

as discharge rate is defined as the rate a battery could be discharged relative to its capacity. For example, A 1C rate means that the discharge current will discharge the entire battery in 1 hour. For a battery with a capacity of 100 Amp-hrs, this equates to a discharge current of 100 Amps. 

Battery capacity determines the travelling distance of the skateboard. The larger the capacity, the longer the travelling distance. I have not found a formula to relate travelling distance to battery capacity as the working current of motor depends on uncontrollable factors like people's weight, road conditions etc. From experience, battery with capacity ranging from 5000mah to 10000mah are all acceptable choice. electric-skateboard builders forums keeps an informative thread about this topic.

For my case, the motor I purchased was of type N5065. It has a KV value of 270kv. Using the formula mentioned above, assuming 80% efficiency would give approximately 40 km/h top speed which is sufficient for my use case.

The motor has a maximum current of 80A, so I chose a battery with 5000mah and 15C discharge rate so that it could provide up to 5x15 = 125A current at maximum. A capacity of 5000mah is very small relatively but it is suitable for my case as I am not travelling long distances

I know there are a lot of more aggressive and powerful build out there. But since I was just planning to use it for my 500m painful walk every day and frankly Singapore is one of the most crowded country, I think this build serves my purpose well. 

The ESC I bought is FVT 120A brushless sensorless ESC. It was a common choice for electric skateboard until it was overshadowed by VESC by banjamin robotics. However, since it was almost half the price of VESC, I still chose to use the FVT ESC. I also bought an USB debugger to allow connection to PC for customization.


picture ESC + USB debugger

The ESC had a battery elimination circuit built in which ouputs a DC voltage of 5V which is used to power up the arduino. Moreover, it has a switch built in which serves as the main power switch for the electric skateboard.

In order to program the ESC on your PC, one will need to download the PC setup software from szfvt.com, the favorite official website. After connecting the ESC to PC using the USB debugger, one can simply select and change the parameters according to different requirements.

My setting of parameters are as follows:



I mainly tuned the following three parameters to suit my liking
1. Motor timing is explained well in Oscar Liang's blog. I did not change the setting and leave it as Normal.                                                                                                                             
2. Start Power decides how much throttle you need to apply to arm ESC. Only after the ESC is armed that throttle will be able to control the skateboard.
3. Percentage braking determines how hard the ESC will brake the skateboard. I did not want my skateboard  to brake too hard so I set it to 50%.
4. Percentage drag brake determines how much brake ESC will apply when throttle is at neutral. I introduced a little bit of drag brake so that I can use neutral throttle to descend small ramp.

Since I was using Bluetooth control instead of conventional radio control, there was one additional component incurred, namely the Arduino 101 which replaces the radio receiver in picture above.

Arduino 101 is an microcontroller with Bluetooth Low Energy built in. For conventional radio control, a radio receiver is used to receive radio communication from controller and output PWM to ESC. Using Arduino 101, I could receive control signals from Android smartphone via Bluetooth communication and output corresponding PWM signal to ESC. The software will be discussed more in detail in other posts.

Frankly, Arduino 101 is kind of overkill for this simple purpose. An Arduino mini + Bluetooth module would suffice and it would cost about 10 SGD less. However, since I had this Arduino 101 which I purchased almost a year ago sitting in my closet doing nothing, I reckoned that the skateboard is where it should spend the rest of its life.

One thing to notice is that despite Arduino website says that input dc voltage to Vin pin has to be from 7-17V and that would imply I could not use the ESC built-in BAC which is only 5V as my Arduino power. However, after looking at the schematics of Arduino 101 as well as the data sheet of the power module Arduino 101 uses, I was convinced me that 5V can successfully power up the Arduino without any problem and indeed it does.


Note that the pin name is DC_IN_5V_17V in Arduino 101 schematics and the data sheet of the power module Arduino 101 used TPS62153RGT proves that it is completely OK to use 5V to power up Arduino 101





1 comment:

  1. Before we could consider our seven shimmering new Segway Bluetooth, we have predicted that would ask for that ourselves how to ride them. We tied on some succeeding outfit, understanding the best way to deal with oversee regulate mount and keep away from through a limit in vivacious slips. When we found our sensibility, we started encountering the workplace.

    ReplyDelete