My e-longboard design

Mantas

10 mW
Joined
May 16, 2013
Messages
24
Hello everyone,
I was inspired by this forum to build my own electric longboard. So now I decided to share my project, which is still not finished but first concept already tested :) and hope to get some feedback from all of you...
 

Attachments

  • 943127_10200516983660069_1526194244_n.jpg
    943127_10200516983660069_1526194244_n.jpg
    48.1 KB · Views: 14,794
  • 578753_10200516984540091_725660313_n.jpg
    578753_10200516984540091_725660313_n.jpg
    61 KB · Views: 14,794
  • 374678_10200516985100105_860041512_n.jpg
    374678_10200516985100105_860041512_n.jpg
    50.5 KB · Views: 14,794
  • 936297_10200516987180157_1588360006_n.jpg
    936297_10200516987180157_1588360006_n.jpg
    70.2 KB · Views: 2,729
  • 945262_10200516987380162_50370882_n.jpg
    945262_10200516987380162_50370882_n.jpg
    62 KB · Views: 2,729
  • 480661_10200516983100055_622493193_n.jpg
    480661_10200516983100055_622493193_n.jpg
    39.3 KB · Views: 14,794
  • 68505_10200516985700120_612591342_n.jpg
    68505_10200516985700120_612591342_n.jpg
    66.3 KB · Views: 14,794
  • 936990_10200570046546608_1386779098_n.jpg
    936990_10200570046546608_1386779098_n.jpg
    60.9 KB · Views: 14,794
  • 936833_10200570046866616_632302873_n.jpg
    936833_10200570046866616_632302873_n.jpg
    55.4 KB · Views: 2,729
  • 264540_10200546326713627_1119351884_n.jpg
    264540_10200546326713627_1119351884_n.jpg
    57.2 KB · Views: 14,794
  • 942010_10200516986780147_842873206_n.jpg
    942010_10200516986780147_842873206_n.jpg
    61.3 KB · Views: 2,729
sk8norcal said:
cool,
can u provide a parts list?

Yes sure, here is my order list from hobbyking, but if I would be ordering everything now, I would change almost everything ... ESC - no brakes , Motor - too big and heavy (never tried even half power of it) , battery - I do not need 10S in total 6S is enough, Servo Tester was used just for first test drive, now I use Wii controller + arduino... so this list is more like list of stuff you do not need :)

1x #TR_S100A-HV/4691 TURNIGY Sentilon100A HV 5-12S BESC (Ver4) = $84.01
1x #TR-UBEC7.5/6320 TURNIGY 5-7.5A (8~42v) HV UBEC for Lipoly = $16.45
2x #T5000.5S.20/9174 Turnigy 5000mAh 5S 20C Lipo Pack = $72.80
1x #SK3-6364-245/18128 Turnigy Aerodrive SK3 - 6364-245kv Brushless Outrunner Motor = $70.47
1x #HKSST/17143 Simple Servo Tester = $4.49
 
Was that 1:08h riding on one charge? :shock:

What kind of Wh/mi are you getting?
 
$5 fan, looks like the one you're using:

http://www.hobbyking.com/hobbyking/..._Fan_for_36_series_motors_USA_Warehouse_.html

FAN5010-3665.jpg
 
Hi !
Can you give us more detail about your arduino setup ?
Is it wireless ?
 
cal3thousand said:
Was that 1:08h riding on one charge? :shock:

What kind of Wh/mi are you getting?

Yes it was one charge, riding non-stop on my 10S batery. And about Wh/mi I actually dont know how to measure it :)
 
Ttw said:
Hi !
Can you give us more detail about your arduino setup ?
Is it wireless ?

Yes it it wireless - Bluetooth.

Here is short video how it works http://www.youtube.com/watch?v=5ywEanxQgSc

I was surprised that connection is very stable. And joy-stick is quite responsive and costs just 10-12 EUR.

If someone wants I can post more info, source code, libraries, how to connect wires, etc.

P.S. Now I uploaded video to youtube, how can I embed it ? :)
[youtube]<iframe width="420" height="315" src="http://www.youtube.com/embed/5ywEanxQgSc" frameborder="0" allowfullscreen></iframe>[/youtube]
 
I could use more info too :)
Also do you plan to add braking capability to your board ?
 
Mantas said:
Ttw said:
Hi !
Can you give us more detail about your arduino setup ?
Is it wireless ?

Yes it it wireless - Bluetooth.

Here is short video how it works http://www.youtube.com/watch?v=5ywEanxQgSc

I was surprised that connection is very stable. And joy-stick is quite responsive and costs just 10-12 EUR.

If someone wants I can post more info, source code, libraries, how to connect wires, etc.

P.S. Now I uploaded video to youtube, how can I embed it ? :)

Yes, please!!

Also, can you give us more details about the belt?
 
dirkdiggler said:
I"m curious how you got the motor mount on to the trucks. You didn't show a pic. Welded?

Ohh, this is the worst part of my project, I didn't want to weld it so I drilled a hole in a truck and used a screw. But it broke after a test drive. Now I am using this Alien Drive Kit.
 
Update on a project
 

Attachments

  • Photo 2013-05-08 21 30 09.jpg
    Photo 2013-05-08 21 30 09.jpg
    41.6 KB · Views: 14,578
  • Photo 2013-05-09 22 11 12.jpg
    Photo 2013-05-09 22 11 12.jpg
    73.5 KB · Views: 14,578
  • Photo 2013-05-12 22 56 49.jpg
    Photo 2013-05-12 22 56 49.jpg
    81.9 KB · Views: 2,719
  • Photo 2013-05-13 21 12 23.jpg
    Photo 2013-05-13 21 12 23.jpg
    61.8 KB · Views: 14,578
  • Photo 2013-05-14 00 45 01.jpg
    Photo 2013-05-14 00 45 01.jpg
    37.9 KB · Views: 14,578
  • Photo 2013-05-14 01 00 49.jpg
    Photo 2013-05-14 01 00 49.jpg
    97.9 KB · Views: 2,719
  • Photo 2013-05-13 22 33 39.jpg
    Photo 2013-05-13 22 33 39.jpg
    74.4 KB · Views: 2,719
  • Photo 2013-05-15 17 33 54.jpg
    Photo 2013-05-15 17 33 54.jpg
    52.3 KB · Views: 14,578
  • Photo 2013-05-15 18 37 29.jpg
    Photo 2013-05-15 18 37 29.jpg
    37.4 KB · Views: 14,578
  • Photo 2013-05-15 23 17 57.jpg
    Photo 2013-05-15 23 17 57.jpg
    45.3 KB · Views: 14,578
And here are some pictures from Wii + Arduino controller

Source code

#include "Wire.h"
#include "Wii.h" // Library for Wii Nunchuck
#include <Servo.h> // Library for controlin Servo or ESC


WiiChuck chuck = WiiChuck();
Servo myservo;
int speed_val; // Speed value
int speed_val_cur = 60; // Current speed value
int y = 0; // Jaystick value
int time = 200; // Delay timer

void setup() {

Serial.begin(115200);
chuck.begin();
chuck.update();
myservo.attach(9); // ESC attached to 9 pin of Arduino

}

void loop() {

// If you hold down Z button of Nunchuck you accelerate faster
if ((chuck.buttonZ)||(chuck.buttonC)) {
if (chuck.buttonZ) {
Serial.print(" Z ");
time = 100;
}
// If you hold down C button of Nunchuck you accelerate slower
if (chuck.buttonC) {
Serial.print(" C ");
time = 300;
}
} else time = 200;

delay(time);

chuck.update();
y = chuck.readJoyY();

// Maps the joystick value to the speed value (max speed 130) max posible 179
Serial.println();
speed_val = map(y, 0, 119, 60, 130);

// This is what hapens in case we loose a Blue tooth conecction
if (y > 122) {
speed_val = 60; // 60 means - no speed , motor stoped
speed_val_cur = 60; // 60 means - no speed , motor stoped
}
// This is whats hapens then we again have BT signal, it just restarts everything
if (y == 124) setup();

if (y <= 0) {
speed_val_cur = 60;
speed_val = 60;
}


if (speed_val_cur < speed_val) speed_val_cur = speed_val_cur + 1;
else speed_val_cur = speed_val;

myservo.write(speed_val_cur); // Here we control ESC


//----- Printing to screen to see results ---------
Serial.print("Joy = ");
Serial.print(y);
Serial.print(" ");
Serial.print("Speed = ");
Serial.print(speed_val_cur);


}

Here is a useful link and a source code for Wii Nunchuck Library http://playground.arduino.cc/Main/WiiChuckClass
 

Attachments

  • Photo 2013-05-14 19 21 43.jpg
    Photo 2013-05-14 19 21 43.jpg
    129.5 KB · Views: 2,719
  • Photo 2013-05-14 19 22 41.jpg
    Photo 2013-05-14 19 22 41.jpg
    160.4 KB · Views: 14,577
  • Photo 2013-05-08 17 18 53.jpg
    Photo 2013-05-08 17 18 53.jpg
    54.5 KB · Views: 14,577
  • Photo 2013-05-08 17 19 09.jpg
    Photo 2013-05-08 17 19 09.jpg
    52.2 KB · Views: 14,577
  • Photo 2013-05-08 17 24 14.jpg
    Photo 2013-05-08 17 24 14.jpg
    100.5 KB · Views: 2,719
Here is a source code for Wii Nunchuck Library that works with Arduino mirco ( Ardunio UNO is a different one)

/*
* Nunchuck -- Use a Wii Nunchuck
* Tim Hirzel http://www.growdown.com
*
notes on Wii Nunchuck Behavior.
This library provides an improved derivation of rotation angles from the nunchuck accelerometer data.
The biggest different over existing libraries (that I know of ) is the full 360 degrees of Roll data
from teh combination of the x and z axis accelerometer data using the math library atan2.

It is accurate with 360 degrees of roll (rotation around axis coming out of the c button, the front of the wii),
and about 180 degrees of pitch (rotation about the axis coming out of the side of the wii). (read more below)

In terms of mapping the wii position to angles, its important to note that while the Nunchuck
sense Pitch, and Roll, it does not sense Yaw, or the compass direction. This creates an important
disparity where the nunchuck only works within one hemisphere. At a result, when the pitch values are
less than about 10, and greater than about 170, the Roll data gets very unstable. essentially, the roll
data flips over 180 degrees very quickly. To understand this property better, rotate the wii around the
axis of the joystick. You see the sensor data stays constant (with noise). Because of this, it cant know
the difference between arriving upside via 180 degree Roll, or 180 degree pitch. It just assumes its always
180 roll.


*
* This file is an adaptation of the code by these authors:
* Tod E. Kurt, http://todbot.com/blog/
*
* The Wii Nunchuck reading code is taken from Windmeadow Labs
* http://www.windmeadow.com/node/42
*
* Conversion to Arduino 1.0 by Danjovic
* http://hotbit.blogspot.com
*
*/

#ifndef WiiChuck_h
#define WiiChuck_h


#include "Arduino.h"
#include <Wire.h>
#include <math.h>


// these may need to be adjusted for each nunchuck for calibration
#define ZEROX 510
#define ZEROY 490
#define ZEROZ 460
#define RADIUS 210 // probably pretty universal

#define DEFAULT_ZERO_JOY_X 124
#define DEFAULT_ZERO_JOY_Y 131



class WiiChuck {
private:
uint8_t cnt;
uint8_t status[6]; // array to store wiichuck output
uint8_t averageCounter;
//int accelArray[3][AVERAGE_N]; // X,Y,Z
int i;
int total;
uint8_t zeroJoyX; // these are about where mine are
uint8_t zeroJoyY; // use calibrateJoy when the stick is at zero to correct
int lastJoyX;
int lastJoyY;
int angles[3];

bool lastZ, lastC;


public:

uint8_t joyX;
uint8_t joyY;
bool buttonZ;
bool buttonC;
void begin()
{
Wire.begin();
cnt = 0;
averageCounter = 0;
// instead of the common 0x40 -> 0x00 initialization, we
// use 0xF0 -> 0x55 followed by 0xFB -> 0x00.
// this lets us use 3rd party nunchucks (like cheap $4 ebay ones)
// while still letting us use official oness.
// only side effect is that we no longer need to decode bytes in _nunchuk_decode_byte
// see http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1264805255
//
Wire.beginTransmission(0x52); // device address
Wire.write(0xF0);
Wire.write(0x55);
Wire.endTransmission();
delay(1);
Wire.beginTransmission(0x52);
Wire.write(0xFB);
Wire.write((uint8_t)0x00);

Wire.endTransmission();
update();
for (i = 0; i<3;i++) {
angles = 0;
}
zeroJoyX = DEFAULT_ZERO_JOY_X;
zeroJoyY = DEFAULT_ZERO_JOY_Y;
}


void calibrateJoy() {
zeroJoyX = joyX;
zeroJoyY = joyY;
}

void update() {

Wire.requestFrom (0x52, 6); // request data from nunchuck
while (Wire.available ()) {
// receive byte as an integer
status[cnt] = _nunchuk_decode_byte (Wire.read()); //
cnt++;
}
if (cnt > 5) {
lastZ = buttonZ;
lastC = buttonC;
lastJoyX = readJoyX();
lastJoyY = readJoyY();
//averageCounter ++;
//if (averageCounter >= AVERAGE_N)
// averageCounter = 0;

cnt = 0;
joyX = (status[0]);
joyY = (status[1]);
for (i = 0; i < 3; i++)
//accelArray[averageCounter] = ((int)status[i+2] << 2) + ((status[5] & (B00000011 << ((i+1)*2) ) >> ((i+1)*2)));
angles = (status[i+2] << 2) + ((status[5] & (B00000011 << ((i+1)*2) ) >> ((i+1)*2)));

//accelYArray[averageCounter] = ((int)status[3] << 2) + ((status[5] & B00110000) >> 4);
//accelZArray[averageCounter] = ((int)status[4] << 2) + ((status[5] & B11000000) >> 6);

buttonZ = !( status[5] & B00000001);
buttonC = !((status[5] & B00000010) >> 1);
_send_zero(); // send the request for next bytes

}
}


// UNCOMMENT FOR DEBUGGING
//byte * getStatus() {
// return status;
//}

float readAccelX() {
// total = 0; // accelArray[xyz][averageCounter] * FAST_WEIGHT;
return (float)angles[0] - ZEROX;
}
float readAccelY() {
// total = 0; // accelArray[xyz][averageCounter] * FAST_WEIGHT;
return (float)angles[1] - ZEROY;
}
float readAccelZ() {
// total = 0; // accelArray[xyz][averageCounter] * FAST_WEIGHT;
return (float)angles[2] - ZEROZ;
}

bool zPressed() {
return (buttonZ && ! lastZ);
}
bool cPressed() {
return (buttonC && ! lastC);
}

// for using the joystick like a directional button
bool rightJoy(int thresh=60) {
return (readJoyX() > thresh and lastJoyX <= thresh);
}

// for using the joystick like a directional button
bool leftJoy(int thresh=60) {
return (readJoyX() < -thresh and lastJoyX >= -thresh);
}


int readJoyX() {
return (int) joyX - zeroJoyX;
}

int readJoyY() {
return (int)joyY - zeroJoyY;
}


// R, the radius, generally hovers around 210 (at least it does with mine)
// int R() {
// return sqrt(readAccelX() * readAccelX() +readAccelY() * readAccelY() + readAccelZ() * readAccelZ());
// }


// returns roll degrees
int readRoll() {
return (int)(atan2(readAccelX(),readAccelZ())/ M_PI * 180.0);
}

// returns pitch in degrees
int readPitch() {
return (int) (acos(readAccelY()/RADIUS)/ M_PI * 180.0); // optionally swap 'RADIUS' for 'R()'
}

private:
uint8_t _nunchuk_decode_byte (uint8_t x)
{
//decode is only necessary with certain initializations
//x = (x ^ 0x17) + 0x17;
return x;
}

void _send_zero()
{
Wire.beginTransmission (0x52); // transmit to device 0x52
Wire.write ((uint8_t)0x00); // sends one byte
Wire.endTransmission (); // stop transmitting
}

};


#endif
 
And here is an image how to connect wires , just in my case colors are mixed : white to A5, Red - GRND , Black - 3,3V , Blue - A4

If you use Arduino micro (like in my project) not UNO you have to change A5 and A4 to D2 and D3.

And instead of a SERVO you connect to ESC.
 
Thanks Mantas !
your board looks very sharp !
I like the fact that you separeted the cells to gain ground clearance. (looks better too)
How do you intend to recharge the batteries ? you have recharg plug in paralell going out the box or do you have to unscrew it ?
Also does your board keep its flex ?


Thanks !
 
Ttw said:
Thanks Mantas !
your board looks very sharp !
I like the fact that you separeted the cells to gain ground clearance. (looks better too)
How do you intend to recharge the batteries ? you have recharg plug in paralell going out the box or do you have to unscrew it ?
Also does your board keep its flex ?


Thanks !

Thanks,
I left a battery cable out of the back side, so I can reach it with out unscrewing battery case. My board is not very soft, but I have some flexibility with the mounted battery case as well.
 
That's an awesome battery pack enclosure. What material did you use and where did you buy it? What did you use to cut it? What are you using to fasten/connect it to the board? How is it holding up.

The design is sleek and thin, I like the style a lot.

How much batteries do you have connected there?
 
Back
Top