Introduction: How to Build an Electric Longboard With Phone Control

Electric longboards are awsome!

TEST FOOTAGE IN THE VIDEO ABOVE

HOW TO BUILD AN ELECTRIC LONGBOARD CONTROLLED FROM A PHONE WITH BLUETOOTH

Update #1: Grip tape installed, some tweaks to the speed controller have meant I have got more speed out of the board but range has stayed the same! video coming soon. Working on nunchuck controller as well.

http://www.livealittlemore.co.uk

Links:

Motor, Esc: hobbyking.co.uk

Trucks/motor mount/ drive train: diyelectricskateboard.com

So I thought I would stray a bit from multirotors for this post and write a log of how I built my electric longboard. It has been something I have wanted to get for a while now and with all the projects I have been doing on my CNC, I decided to build one myself. (Could’t really use the CNC as it doesn't have a very large work area) I am going to start by giving an outline of my project goals and how I intended to achieve them:

1. It must be of sufficient length and width to make it stable.

2. It must be capable of reasonable speed (15+ mph).

3. The range must be at least 8 miles as my nearest town is about 4 miles away.

4. I want to be able to control the longboard with my phone (android).

5. I want to have a voltage readout on my phone so I know how much battery remains.

WARNINGS: The code and app are not perfect by any means, they are very much still in beta. Please be careful with the stop button as depending on what esc you use, the brakes can be very aggressive and may throw you off the board.

Disclaimer: I am not responsible if you fall off your board and/or hurt yourself in any way because the acceleration or braking or speed is too aggressive due to my app/code/any part of this “tutorial”. If you use my code and app please test thoroughly with your particular set-up to make sure it doesn't hurt you. It may take some tweaking… If you have any queries then leave a comment :)

please visit my blog and check out the other stuff that I make! http://www.livealittlemore.co.uk

my youtube channel: https://www.youtube.com/channel/UC1qIml4_nky4rELA_...

Step 1: ​THE PLAN

There are two aspects of this project that I think will be most difficult. First, mounting a motor to the trucks of the long board and setting up a drive train. (I have a plan for this) Secondly is going to be the way to communicate between the ESC (the device that contra the motor) and my phone. For the first problem I am going to use a company called dielectric skateboards.com who make trucks with motor mounts are welded on and they come with pulleys and a belt and wheels. (I was going to build this part myself but I was under time constraint and I wanted to spend most of the time working on the electronics.) (See my PLANS page on my blog (https://skyhighrc.wordpress.com/)for some ideas on making a motor mount) With that problem sorted we move on to the electronics. I am going to use an arduino nano and a bluetooth module (HC-05) to control the board from my phone. To write the app I am going to use Mit App Inventor which is a free on-line tool for building simple apps.

Step 2: The Board

I started out with a board that I made ages ago and had been sitting in my workshop for a while collecting dust… I decided to sand it down and re-varnish it with some clear matt varnish.

Step 3: Trucks and Motor Mount

Next, I installed the trucks that I got from diyelectricskateboards.com. the kit I bought from them had all the parts you need to set up the drive train.

The motor I used was a turnigy SK3 192KV. It has a lot of power but is slightly slower in terms of RPM with a six cell. But the extra torque is great because I can pull away from stationary on the motor. This is not recommended as it can wear the motor. The ESC is the Turnigy RotorStar 150amp ESC. I don’t recommend using this particular one but I do recommend one with at least 100amp rating! use an RC Car one. I just happened to have this lying around for some reason… If you do go for one of the truck kits like I did, follow the instructions on the website to set them up. I had to drill out the slots in the wheel which the bolts go through to hold on the pulley to the wheel.

Step 4: Electronics Enclosure

I then drilled some holes in the 4 corners of a screw sorting box like this one: http://www.amazon.co.uk/Compartment-Crafts-Plastic...

I then did the same to the board itself and then used some button head bolts to go through the board and the box and secured them with nuts. I then layed a layer of foam to stop the bolts damaging the electronics that will go in the box. The foam also helped keep the batteries fixed in place as when the lid is shut it presses the batteries down into the foam keeping them from sliding about.

Step 5: Now for the Hard Part... Electronics

I hooked up my arduino nano to the bluetooth module and the ESC to the arduino. MAKE SURE YOU DO NOT USE THE BEC IN THE ESC OR ANY OTHER EXTERNAL POWER SOURCE TO POWER THE ARDUINO WHEN THE ARDUINO IS CONNECTED TO YOUR COMPUTER FOR PROGRAMMING. IT CAN KILL THE ARDUINO OR WORSE, YOUR USB PORT ON YOUR COMPUTER!

For powering the arduino and monitoring the battery voltage I used the balance plug of the lipo and not the BEC

In the picture of the circuit boards, you can see the bluetooth module, the arduino nano and a little bit of PCB that i used to connect all the wiring and jumpers to. This was to keep everything relatively tidy and allowed me to esablish a common ground to connect to the arduino's ground as it only had 2 pins for ground and I needed a few.

In the picture of the plastic enclosure on the left is the esc which has a velcro strap holding it down. In the centre is the arduino and bluetooth module with a little bit of pcb to organise the wires. On the right is the six cell battery that I modified into two 3 cells joined together but sharing a balancing plug.

To power the arduino I am drawing from 2s of the 6s lipo to give me about 7 volts input depending on charge level (the arduino can handle an input up to 20v I think…). I am also connecting an analogue pin of the arduino to 1s of the lipo to use as the battery monitor. If each cell drops below 3.5 volts it can start to damage the lipo so that’s what I set the low battery warning in my app for. Here is the code for my arduino:

#include // import the serial library

#includeSoftwareSerial Bluetooth(10, 11);

// RX, TXint BluetoothData; // the data given from ComputerServo ESC;

long previousMillis = 0;

long interval = 1000;

void setup(

) {// put your setup code here, to run once:

Bluetooth.begin(9600);

Serial.begin(9600);

Serial.println(“Bluetooth On”);

ESC.attach(9);

}

void loop()

{// put your main code here, to run repeatedly :

if (Bluetooth.available()){BluetoothData=Bluetooth.read();

ESC.write(BluetoothData);

Serial.println(BluetoothData);

}

int sensorValue = analogRead(A0);

float voltage = sensorValue * (5.0 / 1023.0);

unsigned long currentMillis = millis();

if (currentMillis – previousMillis > interval) {previousMillis = currentMillis;

if (voltage <= 3.5)Bluetooth.println(“Low Battery”);

else Bluetooth.println(voltage, DEC);

}

}

So essentially the code takes the number from the slider in the app and then sends it to the servo in a from it can recognise using its Serial Library. For the battery voltage monitoring, it reads the value of one of the cells of the lipo and converts the analogue symbol into a value. this value is then sent back to the phone to be displayed. I have yet to figure out how to round this number so it doesn't show up as a really long decimal on the screen...

And here is the app: bluetooth_controller.apk (download and change file extension to .apk) Upload it to your ANDROID phone and install. When you open it you need to connect to the arduino and press the stop button, then plug the battery into the ESC. it will beep a bit and then you are set to go, use the slider to adjust speed gently and always push off and then engage the motor!

Step 6: Finished, Be Careful!

Comments

author
jonah_1109 made it! (author)2017-07-07

How much does it cost in total?

author
JamieD87 made it! (author)2017-04-02

I have App Inventor experience and want to build my own app. Since I want to see your app and what you did is there any way you could send the app inventor blocks and layout? Thanks

author
KoenS1 made it! (author)2016-11-17

nice build tutorial! I just started to make my own. Wich will be very similar to your build! https://youtu.be/yWeLAkTYFoY (build log)
I will try to make the best quality board under 400 $

author
WillM46 made it! (author)2016-09-25

Would the app work w/ an iPhone 5s, also a huge fan of this kind of stuff, keep it up!

author
Sammy_D_64 made it! (author)2016-05-01

Hey, I was just wondering if it was possible to gdt a better look at the curcuitry, like the wires from the batteries and the wires soldered into the phero board/ copper, where are they from?

author
Nickolae made it! (author)Nickolae2016-05-12

Im planning on doing a new build so I will include better circuit diagrams in that!

author
Sammy_D_64 made it! (author)Sammy_D_642016-05-12

ok great ?

author
Nickolae made it! (author)Nickolae2016-05-13

sorry, but I don't have any for this build.... so....

author
tejasb11 made it! (author)tejasb112016-07-26

Arduino Question: would you mind explaining the 3 wires that go to the battery? One is ground, and 2 go to slots in the balance port of the battery?

author
Sammy_D_64 made it! (author)Sammy_D_642016-05-13

nah all good man didnt mean to put in the question mark

author
tejasb11 made it! (author)2016-07-11

Can you put some better pictures of the arduino setup? Front and back of the arduino?

author
tejasb11 made it! (author)tejasb112016-07-11

Or made a video a few seconds long showing it?

author
Sammy_D_64 made it! (author)2016-05-24

Hey I know I asked earlier, but I was wondering if it was possible to get some more views of how it is wired up? like pictures or something maybe?

author
Christiant55 made it! (author)2016-05-13

Hey Nickolae, Any update of this project? Is necessary Arduino UNO? What motor do you recommend in quality/price? you can show better where each cable is connected arduino, esc and bluetooth? Thanks a lot! a lot of people are following this project from Spain ;) http://www.forocoches.com/foro/showthread.php?p=228184185#post228184185

author
hitsuinakamura made it! (author)2016-01-05

Hi, I have some error with the code:

Arduino: 1.6.7 (Windows 10), Board: "Arduino Nano, ATmega328"

The sketch name had to be modified. Sketch names can only consist

of ASCII characters and numbers (but cannot start with a number).

They should also be less than 64 characters long.

How_to_build_an_electric_Longboard_with_phone_control_code:1: error: #include expects "FILENAME" or <FILENAME>

#include // import the serial library

^

How_to_build_an_electric_Longboard_with_phone_control_code:3: error: invalid preprocessing directive #includeSoftwareSerial

#includeSoftwareSerial Bluetooth(10, 11);

^

exit status 1

#include expects "FILENAME" or <FILENAME>

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.

author
quatchiguy made it! (author)quatchiguy2016-05-11

Hi! I'm experiencing the same error. Were you able to resolve it?

author
Nickolae made it! (author)Nickolae2016-05-12

Sorry, I have no idea what is going on here... It still works perfectly on my duino nano... maybe post it on the arduino forums and see if anyone can help you figure out the problem! Software is not my strong side!

author
ArabianL made it! (author)2015-08-26

I live in a very hilly place, so what would be your recommendation for a motor with enough lower to get up hills? And what ESC should I use as good that has good braking?

author
Nickolae made it! (author)Nickolae2015-08-26

Hi there, I would recommend a motor with a low kV such as the one I used but that may not be enough. If you are in a very hilly area I would recommend a dual motor setup (one driven wheel at the front and one at the back) this will ensure you have adequate power and won't loose traction so easily. As for ESC you will want one with a very high current capacity (150amps) and it should be an rc car ESC as these have good brakes that can be adjusted so it doesn't fling you off the board when you brake!

author
NathanJ1212 made it! (author)NathanJ12122016-04-29

Do I only need one ESC than for both? And do you have a schematic for the wiring of the entire board? Thanks

author
Nickolae made it! (author)Nickolae2016-04-29

it's best to have one esc per motor. I'm afraid I don't.. but I am going to have another crack at the longboard in the near future so maybe then...

author
RobV25 made it! (author)2016-04-12
author
Nickolae made it! (author)Nickolae2016-04-12

don't think they are powerful enough... even two of them!

author
HeckmannM made it! (author)2016-03-12

iam selling my Propulsion Kit here : http://www.ebay.com/itm/-/182052175878? if anyone interested. Worldwide shipping.

author
pawlo0309 made it! (author)2016-03-07

Hi, Could you please send the project of the android app?

author
MatthewHUN made it! (author)2016-03-02
Hi Nickolae, :D

I want to build an electric longboard something like your, but I'm not genious in electric. :D I dont have too much pocket money, so I wrote a cheap list with cheap materials. From that two website: e-bay, and hobby-king. Sooooo I have a request for you: can you check my list, that these stuffs will work together? Or if you have some good advices for the beginners like me, plase share it with me. :D ;) I thought, that I will use arduino uno or nano, I dont know which one is better so I will buy both of them, and I'm not sure, that the ESC which I chose is compatible with the brushless motor. :'(

So this is the list:

$4,23Arduino Uno:

http://www.ebay.com/itm/NEW-ATmega328P-CH340G-UNO-...

$2,30 Arduino Nano:

http://www.ebay.com/itm/MINI-USB-Nano-V3-0-ATmega3...

$50 Brushless motor:

http://www.hobbyking.com/hobbyking/store/__18175__...

$19 Brushless ESC:

http://www.ebay.com/itm/120A-ESC-Sensored-Brushles...

$23,20 Batteries (I will buy 2):

http://www.hobbyking.com/hobbyking/store/__8579__Z...

$9,8 Bigger gear:

http://www.ebay.com/itm/262052317344?rmvSB=true

$4,5Smaller one:

http://www.ebay.com/itm/181603550769?rmvSB=true

$3,5 Fan belt:

http://www.ebay.com/itm/181970599036?rmvSB=true

All in all the price is: $110 :D

Waiting for your answer!

Matthew

author
Ravi 1999 made it! (author)2016-01-30

Hey can you tell me weather I can use a 400kv motor ?and which esc should I use for it ? Should there be any difference in the codes

author
Nickolae made it! (author)Nickolae2016-01-30

yeh 400kv will be fine if it has enough torque and can handle a lot of current! I always recomend at least 100 amps to be on the safe side, and go for an RC car esc so you have adjustable braking. no difference in the code

author
Yonatan24 made it! (author)2016-01-13

Hi, I've added your project to the "A Collection of Homemade Electric Motorized Skateboards (That You Must Make!)" Collection

This is the link If you are interested:

https://www.instructables.com/id/A-Collection-of-Ho...

author
BoringG made it! (author)2015-12-30

I think this is a very stupid question but there is something i dont quite understand:

How come the board can drive straight if only 1 wheel has traction

are the wheels connected to each other with a spinning axle inside the truck?

(great tutorial btw)

thx in advance

author
Nickolae made it! (author)Nickolae2015-12-30

So because you have 4 wheels in contact with the ground the driven wheel can not rotate the axle about the wheel next to it because the front wheels stop any rotation due to their side to side friction. But they do allow motion forwrds and backwards so the power of the driven wheel is translated into the forward vector.

sorry that may not make sense... it made sense in my head haha!

author
vitormhenrique made it! (author)2015-12-29

Awesome tutorial!

just one thing you are actually measuring one battery level only, for the first cell of the first battery, so you are assuming that all cells are going to discharge at the same rate, that is not exactly true, but i think it might be good enough.

author
Nickolae made it! (author)Nickolae2015-12-30

Thanks! Yes you are right the lipo cells don't discharge exactly the same but it works well enough for this application. With my multirotors I always use a multi cell battery monitor!

author
vitormhenrique made it! (author)vitormhenrique2015-12-30

nevertheless it is a great build! I'm working on one myself. Trying to figure it out the best way to get data telemetry from all cells, rpm and temeratures from the sk8 to a custom controller...

author
PedroV37 made it! (author)2015-12-13

Hi,

I saw that u use just one motor, but im thinking about using 2 or more, just to get more speed.

What do u think about that in performence, and in price? if u have any recommendation, please tell me.

Thanks!

author
Nickolae made it! (author)Nickolae2015-12-13

Having a dual motor setup can boost performance a lot. The setup I would recommend is to have one driven wheel at the front and one at teback, this would give you the best performance for hills especially. This is because you wait us distributed evenly over the driven wheels so when it comes to hilks and you lean forward to maintain balance pressure is maintained on a driven wheel so you have good traction. This is what I have seen in my testing so far

author
AldenD made it! (author)2015-11-30

Hi,
Is there any noticable difference between your version 1 and 2? I ordered the hc -05 and arduino uno. Could i still make the V2 receiver with these components or should i stick with the V1 bluetooth recieiver now?
Thanks !

author
FucR made it! (author)2015-11-21

How much does it fully cost?

author
Nickolae made it! (author)Nickolae2015-11-21

So all in all it is about £400

author
Jaybuilder made it! (author)2015-11-16

What LiPo batteries did you use?

author
Nickolae made it! (author)Nickolae2015-11-16

http://www.hobbyking.com/hobbyking/store/__9184__Turnigy_5000mAh_3S_20C_Lipo_Pack.html

2 of these in series

author
ChristianH43 made it! (author)2015-11-09

Hello :)

I haven't bought a arduino nano and HC-05 yet but is it still possible to download the app on the phone?

author
Nickolae made it! (author)Nickolae2015-11-09

Of course, link is in the instructable to download it

author
ChristianH43 made it! (author)ChristianH432015-11-10

THX :)

author
josephchrzempiec made it! (author)2015-11-08

Hello where can i get the mount and wheels and pully at?

author
Nickolae made it! (author)Nickolae2015-11-09

http://diyelectricskateboard.com/

tell them I sent you!

author
josephchrzempiec made it! (author)josephchrzempiec2015-11-08

The motor and Esc i all ready have I'm just looking for the kit to put on my longboard?

author
RobotsMaking made it! (author)2015-10-24

hi again, how can I get the app and download the arduino code?

because you said on your blogg that I need to change the file of the app to .apk and the arduino to .ino

but how can I do it, maybe can you make a tutorial how to do it (I have a mac)

I think it would help everybody ;)

author
Nickolae made it! (author)Nickolae2015-11-01

have uploaded to this instructable page :)

About This Instructable

123,055views

1,386favorites

License:

Bio: Designer, Maker, CNC Enthusiast, Drone Maker
More by Nickolae:Aeropress Tray Caddy With CNCDesktop Speaker Clip on LegsCyclone Dust Separator on the Cheap!
Add instructable to: