My e-longboard design

Lightweight / Folding / Portable EVs - seats optional
User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

My e-longboard design

Post by Mantas » Thu May 16, 2013 2:16 pm

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
396892_10200516983220058_1199029025_n.jpg
396892_10200516983220058_1199029025_n.jpg (55.62 KiB) Viewed 12103 times
943127_10200516983660069_1526194244_n.jpg
943127_10200516983660069_1526194244_n.jpg (48.13 KiB) Viewed 12103 times
942573_10200516984780097_229853843_n.jpg
942573_10200516984780097_229853843_n.jpg (65.3 KiB) Viewed 12103 times
578753_10200516984540091_725660313_n.jpg
578753_10200516984540091_725660313_n.jpg (60.96 KiB) Viewed 12103 times
374678_10200516985100105_860041512_n.jpg
374678_10200516985100105_860041512_n.jpg (50.51 KiB) Viewed 12103 times
166198_10200516985580117_2022900773_n.jpg
166198_10200516985580117_2022900773_n.jpg (82.98 KiB) Viewed 12103 times
936297_10200516987180157_1588360006_n.jpg
936297_10200516987180157_1588360006_n.jpg (70.23 KiB) Viewed 38 times
945704_10200516986980152_1205999515_n.jpg
945704_10200516986980152_1205999515_n.jpg (67.88 KiB) Viewed 12103 times
945262_10200516987380162_50370882_n.jpg
945262_10200516987380162_50370882_n.jpg (61.98 KiB) Viewed 38 times
480661_10200516983100055_622493193_n.jpg
480661_10200516983100055_622493193_n.jpg (39.3 KiB) Viewed 12103 times
68505_10200516985700120_612591342_n.jpg
68505_10200516985700120_612591342_n.jpg (66.29 KiB) Viewed 12103 times
168803_10200516986020128_899999496_n.jpg
168803_10200516986020128_899999496_n.jpg (73.66 KiB) Viewed 12103 times
936990_10200570046546608_1386779098_n.jpg
936990_10200570046546608_1386779098_n.jpg (60.91 KiB) Viewed 12103 times
936833_10200570046866616_632302873_n.jpg
936833_10200570046866616_632302873_n.jpg (55.44 KiB) Viewed 38 times
264540_10200546326713627_1119351884_n.jpg
264540_10200546326713627_1119351884_n.jpg (57.2 KiB) Viewed 12103 times
942010_10200516986780147_842873206_n.jpg
942010_10200516986780147_842873206_n.jpg (61.34 KiB) Viewed 38 times

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Thu May 16, 2013 3:36 pm

And here is a video from first test drive.

http://player.vimeo.com/video/66348563

P.S. is it possible to embed vimeo videos ?

User avatar
sk8norcal
10 GW
10 GW
Posts: 4297
Joined: Sun May 16, 2010 5:29 am

Re: My e-longboard design

Post by sk8norcal » Thu May 16, 2013 4:55 pm

cool,
can u provide a parts list?

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Thu May 16, 2013 5:35 pm

sk8norcal wrote: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

User avatar
cal3thousand
10 GW
10 GW
Posts: 4044
Joined: Mon Mar 26, 2012 4:47 pm

Re: My e-longboard design

Post by cal3thousand » Thu May 16, 2013 5:53 pm

Was that 1:08h riding on one charge? :shock:

What kind of Wh/mi are you getting?
Get a Cycle Analyst and a Multimeter, you're still a noob if you don't have at least one of each.

Planning on posting questions or buying anything on this site? Put up your country (at minimum) on your profile. This is a worldwide forum and we haven't reached clairvoyance.

User avatar
spinningmagnets
100 GW
100 GW
Posts: 10709
Joined: Fri Dec 21, 2007 10:27 pm

Re: My e-longboard design

Post by spinningmagnets » Thu May 16, 2013 6:12 pm

$5 fan, looks like the one you're using:

http://www.hobbyking.com/hobbyking/stor ... ouse_.html

Image

Ttw
10 mW
10 mW
Posts: 27
Joined: Sat Oct 13, 2012 3:36 pm

Re: My e-longboard design

Post by Ttw » Thu May 16, 2013 8:01 pm

Hi !
Can you give us more detail about your arduino setup ?
Is it wireless ?

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Fri May 17, 2013 4:04 am

cal3thousand wrote: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 :)

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Fri May 17, 2013 4:08 am

spinningmagnets wrote:$5 fan, looks like the one you're using:

http://www.hobbyking.com/hobbyking/stor ... ouse_.html

Image
Yes this is the one that I use, I just attached it on top of the ESC. I did just a few test rides so I am not sure if that fan is necessary, maybe ESC will not even get warm with 6S battery (which I am going to use instead of 10S).

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Fri May 17, 2013 4:40 am

Ttw wrote: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]

Texonite
10 W
10 W
Posts: 67
Joined: Mon Jun 11, 2012 5:04 pm

Re: My e-longboard design

Post by Texonite » Fri May 17, 2013 7:30 am

Source code could be nice!

Overall, great device!!!

Ttw
10 mW
10 mW
Posts: 27
Joined: Sat Oct 13, 2012 3:36 pm

Re: My e-longboard design

Post by Ttw » Fri May 17, 2013 9:39 am

I could use more info too :)
Also do you plan to add braking capability to your board ?

User avatar
sk8norcal
10 GW
10 GW
Posts: 4297
Joined: Sun May 16, 2010 5:29 am

Re: My e-longboard design

Post by sk8norcal » Fri May 17, 2013 3:55 pm

youtube tag this
5ywEanxQgSc


dirkdiggler
10 kW
10 kW
Posts: 720
Joined: Thu Oct 18, 2012 1:31 am

Re: My e-longboard design

Post by dirkdiggler » Fri May 17, 2013 8:13 pm

I"m curious how you got the motor mount on to the trucks. You didn't show a pic. Welded?

n0ne
1 µW
1 µW
Posts: 2
Joined: Mon Apr 08, 2013 8:54 pm

Re: My e-longboard design

Post by n0ne » Fri May 17, 2013 10:18 pm

Mantas wrote:
Ttw wrote: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?

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Sun May 19, 2013 10:28 am

dirkdiggler wrote: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.

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Sun May 19, 2013 10:46 am

Update on a project
Attachments
Photo 2013-05-08 21 30 09.jpg
Finished prototype
Photo 2013-05-08 21 30 09.jpg (85.43 KiB) Viewed 11887 times
Photo 2013-05-09 22 11 12.jpg
New battery pack
Photo 2013-05-09 22 11 12.jpg (135.22 KiB) Viewed 11887 times
Photo 2013-05-12 22 56 49.jpg
Photo 2013-05-12 22 56 49.jpg (159.94 KiB) Viewed 28 times
Photo 2013-05-13 21 12 23.jpg
Photo 2013-05-13 21 12 23.jpg (112.21 KiB) Viewed 11887 times
Photo 2013-05-13 21 36 09.jpg
Photo 2013-05-13 21 36 09.jpg (112.31 KiB) Viewed 11887 times
Photo 2013-05-14 00 45 01.jpg
Photo 2013-05-14 00 45 01.jpg (81.96 KiB) Viewed 11887 times
Photo 2013-05-14 01 00 49.jpg
Photo 2013-05-14 01 00 49.jpg (186.85 KiB) Viewed 28 times
Photo 2013-05-13 22 33 39.jpg
Photo 2013-05-13 22 33 39.jpg (148.51 KiB) Viewed 28 times
Photo 2013-05-15 15 12 12.jpg
Photo 2013-05-15 15 12 12.jpg (212.29 KiB) Viewed 28 times
Photo 2013-05-15 17 33 54.jpg
Photo 2013-05-15 17 33 54.jpg (103.03 KiB) Viewed 11887 times
Photo 2013-05-15 18 37 29.jpg
Photo 2013-05-15 18 37 29.jpg (79.89 KiB) Viewed 11887 times
Photo 2013-05-15 18 40 15.jpg
Photo 2013-05-15 18 40 15.jpg (118.49 KiB) Viewed 11887 times
Photo 2013-05-15 23 17 57.jpg
Photo 2013-05-15 23 17 57.jpg (90.05 KiB) Viewed 11887 times
Photo 2013-05-15 23 17 16.jpg
Photo 2013-05-15 23 17 16.jpg (162.21 KiB) Viewed 28 times

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Sun May 19, 2013 11:01 am

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 12 32 30.jpg
Arduino micro
Photo 2013-05-14 12 32 30.jpg (105.6 KiB) Viewed 11886 times
Photo 2013-05-14 19 21 21.jpg
Photo 2013-05-14 19 21 21.jpg (161.27 KiB) Viewed 11886 times
Photo 2013-05-14 19 21 43.jpg
Photo 2013-05-14 19 21 43.jpg (224.34 KiB) Viewed 28 times
Photo 2013-05-14 19 22 41.jpg
Photo 2013-05-08 17 18 53.jpg
Photo 2013-05-08 17 18 53.jpg (103.8 KiB) Viewed 11886 times
Photo 2013-05-08 17 19 09.jpg
Photo 2013-05-08 17 19 09.jpg (95.79 KiB) Viewed 11886 times
Photo 2013-05-08 17 24 14.jpg
Photo 2013-05-08 17 24 14.jpg (180.42 KiB) Viewed 28 times

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Sun May 19, 2013 11:05 am

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/YaB ... 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

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Sun May 19, 2013 11:13 am

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.
Attachments
boarduino-nunchuck-servo-450.png
boarduino-nunchuck-servo-450.png (141.21 KiB) Viewed 11886 times

bluemc
1 mW
1 mW
Posts: 17
Joined: Sat May 11, 2013 9:26 am

Re: My e-longboard design

Post by bluemc » Sun May 19, 2013 3:51 pm

@mantas - Thanks! great info. Very much appreciated!

Ttw
10 mW
10 mW
Posts: 27
Joined: Sat Oct 13, 2012 3:36 pm

Re: My e-longboard design

Post by Ttw » Sun May 19, 2013 6:14 pm

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 !

User avatar
Mantas
10 mW
10 mW
Posts: 24
Joined: Thu May 16, 2013 1:24 pm

Re: My e-longboard design

Post by Mantas » Sun May 19, 2013 6:49 pm

Ttw wrote: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.

Ttw
10 mW
10 mW
Posts: 27
Joined: Sat Oct 13, 2012 3:36 pm

Re: My e-longboard design

Post by Ttw » Sun May 19, 2013 8:08 pm

Does the batteries stay connected to ESC while charging ?

bluemc
1 mW
1 mW
Posts: 17
Joined: Sat May 11, 2013 9:26 am

Re: My e-longboard design

Post by bluemc » Sun May 19, 2013 10:51 pm

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?

Post Reply