Dreaming of Electric Skateboards

Well what do you think Androids dream of?

Saturday, April 28, 2012

Drivetrain

After a slight hiatus, I’m back to building.

So, boxing up the electronics was stage 1:

 

 

 

 

 

 

 

Note the linear potentiometer as a control box – it’s a bit naff, should be a wireless zigbee or something, but it’ll work for now.

Round 2 was getting some bloody imperial bolts from the internet which fit the US motor:

 

 

 

 

 

 

 

Then starting on the drive train. I took some skate wheels, drilled holes for bolts through:

 

 

 

 

 

 

 

Then mounted the sprocket on the back…

 

 

 

 

 

 

 

So I now had a working drivetrain. I mounted it on my test board on the mountain-board trucks I’d bought and ended up with my first prototype run! Unfortunately, my prototype board was too flexible for my weight, resulting in the chain slipping. Luckily, I had a crash test dummy…

Download Video: Ogg

posted by Silospen at 6:55 am  

Tuesday, March 29, 2011

Teh codez

If you know me, you know it’s all about teh codez. Here’s what drives my motor, there’s an emergency foot button which will kill the wheels when you hit it and a potentiometer which controls the packets sent to the controller:

#include <SoftwareSerial.h>

#define SABER_TX_PIN 13
#define SABER_RX_PIN 12

#define EMERGENCY_STOP_PIN 11
#define SABER_BAUDRATE 9600

#define SABER_MOTOR1_FULL_FORWARD 1

#define SABER_MOTOR1_FULL_STOP 64
#define SABER_MOTOR2_FULL_FORWARD 255
#define SABER_MOTOR2_FULL_STOP 192

#define SABER_MOTOR_DIFF 256


#define POT_MAX 1023
#define EMERGENCY_DEC_VAL 2
#define SABER_ALL_STOP 0

SoftwareSerial SaberSerial = SoftwareSerial( SABER_RX_PIN, SABER_TX_PIN );

int stopActive = 0;

void initSabertooth( void ) {


pinMode( SABER_TX_PIN, OUTPUT );
SaberSerial.begin( SABER_BAUDRATE );

delay( 2000 );
setEngineSpeed( SABER_ALL_STOP );

}


void setEngineSpeed( int cNewMotorSpeed ) {


unsigned char cSpeedVal_Motor1 = 0;
unsigned char cSpeedVal_Motor2 = 0;


if( cNewMotorSpeed == 0 ) {

SaberSerial.print( 0, BYTE );
return;

}

if( cNewMotorSpeed >= POT_MAX ) {

cSpeedVal_Motor1 = SABER_MOTOR1_FULL_FORWARD;
cSpeedVal_Motor2 = SABER_MOTOR2_FULL_FORWARD;
} else if( cNewMotorSpeed <= 0 ) {

cSpeedVal_Motor1 = SABER_MOTOR1_FULL_STOP;
cSpeedVal_Motor2 = SABER_MOTOR2_FULL_STOP;
} else {

cSpeedVal_Motor1 = map( cNewMotorSpeed, 0, POT_MAX, SABER_MOTOR1_FULL_STOP, SABER_MOTOR1_FULL_FORWARD );

cSpeedVal_Motor2 = SABER_MOTOR_DIFF - (int)cSpeedVal_Motor1;

SaberSerial.print( cSpeedVal_Motor1, BYTE );

SaberSerial.print( cSpeedVal_Motor2, BYTE );
// Serial.print( ( int )cSpeedVal_Motor1 );

// Serial.print( ” ” );
// Serial.println( ( int )cSpeedVal_Motor2 );
}

}

void checkEmergencyStop( int sensorValue ) {

int val = digitalRead(EMERGENCY_STOP_PIN);

//Serial.println( val );
if (val == LOW) {

stopActive = sensorValue;
}
}

void gentlyStop( ){

while( true ) {

if ( stopActive > 0 ) setEngineSpeed( stopActive -= EMERGENCY_DEC_VAL );

}
}

void setup( ) {


initSabertooth( );
pinMode(EMERGENCY_STOP_PIN, INPUT);

//Serial.begin( 9600 );
}

void loop( ) {


int sensorValue = analogRead( A0 );
if( stopActive == 0 ) {

setEngineSpeed( sensorValue );
checkEmergencyStop( sensorValue );

} else {
gentlyStop( );
}

}

posted by Silospen at 1:41 pm  

Tuesday, March 29, 2011

Trucks

So yesterday I got my new trucks, here’s a comparison of skate trucks, followed by longboard trucks, followed by my trucks!

As you can see, they’re pretty big! They’re also totally wrong, so I had to send them back. Back to the drawing board! They don’t turn unless they’re mounted at an angle which they won’t be on my board. Lame!

I started on the board too, here’s 2 bits of 5mm plywood glued together in my board mould.

posted by Silospen at 1:31 pm  

Monday, March 21, 2011

Cutting Wheels Part Deux

So, a friend managed to supply me with a suitable piece of wire and the setup worked! Unfortunately, the batteries got very hot and ran out very quickly. A more suitable power supply was needed! But first, a more accurate wire holder was necessary.

I started with a wine box I had lying around, cut hole in a line in the bottom, put half a coathanger through and then hooked the whole thing together with a 240v plug which happened to have the correct size hole for the coathanger.

Sweet. I hooked the whole thing up and it worked nicely, till the batteries ran out. Found an AC -> DC adapter which got very hot, then smoked and went bang. Luckily, I had an old Dell PSU which I modified to be a bench power supply. Add a big old resistor (10Watts, 10ohms), an LED to show when it’s on, a switch to turn it on, a bunch of connectors, duck tape the whole thing together and boom, it’s a power supply!

And here’s the whole thing in its glory you can see it glowing red a little. I hooked it up to the 6 Amp, 5v rail and it works great.

Now I just need to work out if cutting the wheel is the right thing to do. Maybe there’s another way, hmmmm

posted by Silospen at 2:40 pm  

Thursday, March 17, 2011

Cutting Wheels

So I need to shave about half an inch off the wheels, so the drive sprocket will fit on. First of all, tried to use a jigsaw clamped upside down – in effect a kind of fixed table saw. Didn’t work and was stupidly dangerous.

Next, I took some advice and tried to make a hot wire cutter using some copper wire. Didn’t work well, looks like copper is the wrong type of wire. So, I’m just waiting for the wire and hopefully it’ll all get put together!

That’s the final thing with a ducktaped battery bank screwed to a bit of wood and a clothes hanger acting as the spring joint to tension the wire once I get my hands on it.

posted by Silospen at 3:43 pm  

Monday, March 14, 2011

Motor

Today the motor arrived! It’s a 5280RPM FIRST CIM Motor. I also bought a 3:1 planetary gearbox to slow down those speeds and get the torque up. Still not sure how I’m going to attach it, but I’ll get to that later. Here’s the motor assembly:

Pretty badass right? Also fixed together the battery bank together so I could power it up.

And it all worked fine with the existing setup. Sweet.

posted by Silospen at 1:09 pm  

Sunday, March 13, 2011

The Board.

So I started working on the board, since that is one of the more important bits. I started by making a board mold, which will define the shape of the board. I needed wood and tools!

So, some wood, some more wood. some of those long screw things, a jigsaw and not enough nuts and washers. The plan is to cut the wood in curves, then make a kind of vice which will bend the wood of the board until the glue sets. I did this in my kitchen, making as much mess as possible.

Anyhow, it all seemed to work out fine in the end, but everything and I mean everything, is covered in sawdust. But it’s finished!

posted by Silospen at 3:49 pm  

Saturday, February 12, 2011

Cooling Off

So, the 25A motor driver won’t be able to handle the 30A that the motor claims it can pull. As with computers I’m assuming these things can be overclocked, as long as the cooling is in place. Solution? Bolt on a big fan. Sorted, this thing can probably handle 100A now.

At the top you can probably see the emergency switch I installed. That will be sitting on the top of the board under my feet, giving the option to kill power if the worst comes to the worst. I crimped all the connections and so they’re nice and attached. Got 2 more batteries in the post so I can handle the ampage, still waiting for the real motor and gearbox.

posted by Silospen at 11:35 am  

Wednesday, February 2, 2011

Day One.

So, I decided to build an electric skateboard. A friend suggested I should blog this process and so I am!

According to my calcuations, the skateboard will require a possible stall current of 110A. A constant value of 30A + is also requires which is not great, as my motor controller dies at 25A. In fact, finding parts that can handle over 50A is really quite hard. Here’s the 425A fork lift truck fuse holder with an 80A fork lift truck fuse, with a 2p coin for scale. Scary stuff!

And with a little tweaking, here’s the full setup as I’m looking at it today. Doesn’t resemble a skateboard in the slightest, but we’re getting there. The potentiometer controls the flow of packets to the motor controller, there’s a 100A on off switch with handy key and 2 test motors suspiciously wired in. Also visible is the ammeter which I’ve used to short out both the battery and the motor driver so far. Luckily there’s plenty more time to make horrendous mistakes like that!

Next: Secure up those dodgy looking connections and install an emergency foot switch.

posted by Silospen at 1:31 pm  

Powered by WordPress