Drive by Wire Go Kart





Introduction: Drive by Wire Go Kart

I just got a new go kart engine, i went from 6hp to 10hp. This new kohler engine I got I think was not built to put on a go kart, so I had some trouble finding a way to attach the gas petal. Well after a few days of not really figuring anything out, I remembered that I had gotten an arduino about a week ago, and maybe I could use this to help me out.

Step 1: Power and Safety Circuit

below is a diagram of how I go power to the arduino. this way the engine will only start if the arduino is powered on. the first switch is mounted on the box that holds the arduino. the potentiometer i got has a built in switch so to turn on the arduino you have to flip the switch to the box and then turn the potentiometer. i used the led as status light to let me know that the arduino is powered on. i used the relay as a kill switch because if some how the arduino's battery died and the throttle was opened all the way up, it would be very hard to stop. I also put in a manual kill switch. Also below is what I actually did.

Step 2: Arduino

after i got the arduino i ordered the protoshield and put it together with a few modifications to allow me connect the servo and the pot a little easier. Make sure you know what wire connects to what wire especially if you use a usb port to connect the potentiometer and servo.

Step 3: Servo

Now its time to attach the servo. for this I used an "L" bracket (like the kind you would use for book shelves) and cut it in half. Next I drilled the new holes that were going to be used to mount the servo. following that i built a holder for the servo out of an erector set i had then bolted it to the cut in half "L" bracket. finnally i cut to fit the throttle linkage cable and attached it to the carb and the servo, so when the servo turns it also turns the carb. Also i put rubber spacers to absorb shock.

Step 4: Software

for the arduino there are plenty of examples but the one we are going to use is under file -sketchbook -examples -libraryservo -knob. if you need help wiring the protoshield i would recommend this video Now all you need do is limit how much the servo moves because the carb does not turn 180 degrees. this is the code i use:
#include <Servo.h>

Servo myservo; // create servo object to control a servo

int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin

void setup()
myservo.attach(9); // attaches the servo on pin 9 to the servo object

void loop()
val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there

  • The bold numbers are the numbers you change to calibrate the potentiometer and the servo, the 0, 1023 is for the potentiometer and th 0, 179 is for the servo. For me the servo is set at 123, 180. But yours will most likely be different. If you need the software you can just google it. And i think the video does a very good job of explaining what to do.

Step 5: Finnal Step

Now all you got to do is wire the potentiometer and the servo correctly (i used the video to make sure i did it right). Now test and have fun.



    • Water Contest

      Water Contest
    • Clocks Contest

      Clocks Contest
    • Creative Misuse Contest

      Creative Misuse Contest

    11 Discussions

    i making almost the same but it is hybride en fully automated if you need more power then the gas engine is going automatic going to on or if the battery is almost empty

     ill get some pictures as soon as i get back home, in 2 months. right know im working on making the go kart remote controlled using my iphone, ill post it as soon as im finished.

    they are called spacers mate :D

    Really nice project :D

    it has been a long time sence any commented lol but i love this instructable and i am working on a go kart and mini chopper and i want to do this on bolth i was just wondering if i could get some pictures of where the pedal attaches that would be grate

    i actually changed it a little, i used a 500k sliding pot with a 10k resistor (instead of the one in the instructable) , then mounted that to the floor of the go kart. and hooked up the gas petal to that. i will post pics as soon as i take them, but it works just fine.

    Great project, incomplete 'ible, tho. What about your gas pedal? Don't you still have to make the connection from your right foot (or thumb) to the Arduino? You could use an automotive throttle position sensor... I love the cruise control idea, but you need a brake switch to disable it. Got a pic of the complete kart? That's the whole point of this fun. :-) How does she drive? you turn a knob to change the speed on the thing? why not just get a longer throttle cable?

    1 reply

    Hey thanks alot for the ideas i really appreciate it.

    You could just wire in a digital pot in place of the servo controlling the throttle on the engine. Then, you could have the arduino modify the value of the digital pot precisely. You could also program the arduino and have buttons to slowly accelerate the engine, have a foot pedal connected to the arduino and have a cruise control button. This has a lot of potential.