logo-mobile

ROHM

ROHM
Menu
  • Arduino –
  • Raspberry Pi –
  • Trending –
  • Others –
  • About –
  • Contact –

Arduino

Arduino-Based DIY Electric Skateboard

Rahul Iyer
Published by Rahul Iyer at September 23, 2016
Categories
  • Arduino
Tags
  • Arduino
  • diy
  • electric skateboard
  • electric vehicle
  • skateboard
  • vehicle
DIY electric skateboard
  • Intro & Step 1 – Layout
  • Step 2 – Fabricate Parts
  • Step 3 – Connecting the Electrical Systems
  • Step 4 – Writing and Uploading the Code to the Arduino
  • Conclusion

Step 3 – Connecting the Electrical and Electronic Systems

The power and control hardware on this DIY electric skateboard is divided into an electrical system and the control electronics.  The electrical system consists of the batteries that supply current to both the control electronics and the motor and the wires that link the battery and the motor to the control electronics.  The control electronics consists of the Electronic Speed Controller (ESC), the Arduino microcontroller (the “brain” of the skateboard), and the receiver for the wireless nunchuck remote.

Wiring the electrical system of the skateboard is fairly simple.  Before you start however, it is best to lay out the different physical parts on the longboard to visualize where fastener attachments and wiring connections will be made.  This step also helps determine what length the wires connecting the battery to the electronics will have to be.

Use the following diagram to place your components on the skateboard and make the electrical connections between them:

DIY electric skateboard

Figure 11: A diagram of the skateboard’s electrical layout. The two LiPo batteries wired in series connected to the ESC, which had connections to power both the brushless motor and the Arduino.

First, use the 12 AWG wire and some connectors that match the connectors on your battery to make a connection from your batteries’ terminals.  We’ll wire the two batteries in series to create a 22-volt power supply for the skateboard.

DIY electric skateboard

Figure 12: Since the batteries I purchased came with bullet connectors, I created a complementary connector that connected them in series.

The “thin” side of one bullet connector housing connects to the “thick” side of the other.  By connecting the positive lead of one battery to the negative lead of another, we can create a “6S” or 6-cell series battery out of two 3S batteries.   

Connect the other end of the power and ground wires coming from the batteries to the power and ground wires of the ESC.  The ESC will in turn supply power to both the motor and the Arduino.  If the wires from your motor are not long enough to plug into the 3-phase wires from your ESC, create jumpers to connect the ESC and the motor using this same 12-gauge wire.

Putting together the control electronics is slightly more complicated.  The Arduino receives its power directly from the ESC’s inbuilt Battery Eliminator Circuit (BEC)—an inbuilt circuit in the ESC that converts the input battery voltage to a lower voltage to run controllers and receivers connected to the ESC. 

Use the following diagram to connect all the electronics!

DIY electric skateboard

Figure 13: Full wiring schematic for the Arduino. Note the two 4.7kΩ pull-up resistors connected to the nunchuk I2C pins

The servo cable coming out of the ESC’s case has three wires of distinct colors: red, the power line from the BEC of approximately 5 volts; white, the signal line from the speed controller via which the Arduino will send a Pulse Width Modulation (PWM) signal to the speed controller to modulate the motor speed; and black, the ground line from the BEC.

  •   First, connect the red power line to the Arduino’s Vin pin.  You can make this connection either with a jumper wire inserted into the female header on the Arduino or by soldering a jumper wire to the Vin pin hole directly.  As you may have guessed, a similar connection will have to be made for the Ground line.
  •   Connect the ground line from the BEC to any Ground pin on the Arduino.  These two connections form a closed circuit that will power the Arduino.
  •  The final connection between the Arduino and the ESC is the signal line between the Arduino and the ESC.  The signal line is the channel for PWM control between the Arduino and the ESC.  The Arduino modulates a pulsed signal that is interpreted by the ESC to quickly switch power supplied to the motor.  Only specific digital outputs on the Arduino marked with a “~” can be used for PWM control.  I chose to use Digital Pin 9, connecting the white signal line from the ESC’s servo cable to this pin.

Now that you’ve make all the connections between ESC and the Arduino, we can focus on interfacing the Arduino with the Wii Nunchuck—the handheld remote that the rider will use to control the skateboard.  The nunchuck is designed to connect to and communicate with the Wii remote, so we’ll have to hack it to serve as a controller for the skateboard.  If you look closely at the receiver that comes with the wireless nunchuck, you will notice that its male connector has six pins inside.  This is a pinout for the connector:

DIY electric skateboard

We’ll use the nunchuk extension cable to access and connect to each of these pins individually.

  •   First, cut the extension cable so that there is enough length of cable still connected to the female end to work with.  Cutting the cable about halfway works just fine.
  •   Strip away about a 2-inch length of the outside white insulation, and you’ll find that there are 5 different colored wires inside surrounded by some shielding.  Carefully cut away the shielding till you are just left with the five wires:
DIY electric skateboard

Figure 14: A stripped nunchuk extension cable with jumper wires soldered to its five internal wires. The smaller wires inside the extension cable are color-coded based on their purpose, but all extension cables do not come with the same coloring scheme!

  •   Since all nunchuk extension cables do not use the same color pattern on their internal wiring, you will have to determine which wire inside the cable corresponds to which pin on the female connector using a multimeter.  It is very important to note that the pinout of the female connector is a mirror of the pinout of the male connector.  This means that the outer pins on the top row will be swapped and the outer pins on the bottom row will also be swapped, while the middle two pins in both rows will remain the same.

Once you have determined which pins correspond to which wires, you’ll need to single out the Power, Ground, Data, and Clock wires and connect them to the Arduino.  The fifth pin will not be used in this project.

  •   The Power and Ground connections can be made to the 5V and ground pins on the Arduino respectively.

Since the Arduino communicates with the nunchuck receiver via I2C, we will have to make the data and clock connections from the extension cable to the Arduino’s I2C pins, Analog Pin 0 and Analog Pin 1.  To learn more about I2C communication, check out this tutorial.

  •   Connect the Data (SDA) wire to the Arduino’s Analog Pin 4 and the Clock (SCL) wire to the Arduino’s Analog Pin 5.
  •   The final step in the electronics assembly is adding some 4.7kΩ pull-up resistors on the Data and Clock lines.  These pull-up resistors will ensure that the data and clock lines are always at valid logic levels and will prevent “floating pins” from creating problems with communication between the Arduino and the receiver.

We’ve finished putting together the electronics for our DIY electric skateboard!  To make the electronics more compact and neater, I used a small piece of perfboard to hold all the connections between the peripheral electronics (the ESC’s and the nunchuck receiver) and the Arduino:

DIY electric skateboard

Figure 15: A small perfboard used to make the Arduino’s pin connections more compact. Jumpers soldered directly to the Arduino’s pins instead of connecting jumpers to its female headers.

 

DIY electric skateboard

Figure 16: The electronics box of the skateboard houses the ESC, the Arduino, and the nunchuk’s wireless receiver.

It’s time to take a look at the software that will be running on the Arduino to translate inputs from the nunchuck joystick into a motor speed to actually drive the skateboard.

1 2 3 4 5
Rahul Iyer
Rahul Iyer
Studying Electrical Engineering at UCLA, Rahul loves to work on electronics and robotics projects as a hobby. He is especially enthusiastic about electric vehicle technology and assistive robotics.

Check us out on Social Media

  • Facebook
  • Twitter

Recommended Posts

  • UCLA “AirMouse” using ROHM Sensor Evaluation Kit – Part 2UCLA “AirMouse” using ROHM Sensor Evaluation Kit – Part 2
  • Step By Step Guide To Your First Project With ArduinoStep By Step Guide To Your First Project With Arduino
  • UCLA “AirMouse” using ROHM Sensor Evaluation Kit – Part 1UCLA “AirMouse” using ROHM Sensor Evaluation Kit – Part 1
  • DIY RepRap 3D Printer for Beginners – Part 1: BuildDIY RepRap 3D Printer for Beginners – Part 1: Build
  • How to integrate an RFID module with Raspberry PiHow to integrate an RFID module with Raspberry Pi
  • DIY Tip: How to Set Up Your Raspberry PiDIY Tip: How to Set Up Your Raspberry Pi
Receive update on new postsPrivacy Policy

Recommended Tutorials

  • How to integrate an RFID module with Raspberry Pi How to integrate an RFID module with Raspberry Pi
  • How to Use the NRF24l01+ Module with Arduino How to Use the NRF24l01+ Module with Arduino
  • How to Run Arduino Sketches on Raspberry Pi How to Run Arduino Sketches on Raspberry Pi
  • Setting Up Raspberry Pi as a Home Media Server Setting Up Raspberry Pi as a Home Media Server

Recommended Trends

  • SewBot Is Revolutionizing the Clothing Manufacturing Industry SewBot Is Revolutionizing the Clothing Manufacturing Industry
  • All About The Sumo Robot Competition And Technology All About The Sumo Robot Competition And Technology
  • 5 Interesting Tips to Calculating the Forward Kinematics of a Robot 5 Interesting Tips to Calculating the Forward Kinematics of a Robot
  • Go Inside the Drones That Are Changing Food Delivery Go Inside the Drones That Are Changing Food Delivery
Menu
  • Arduino –
    Arduino Beginner’s Guide
  • Raspberry Pi –
    Raspberry Pi Beginner's Guide
  • Trending –
    Updates on New Technologies
  • Others –
    Interviews / Events / Others

Check us out on Social Media

  • Facebook
  • Twitter
  • About
  • Company
  • Privacy Policy
  • Terms of Service
  • Contact
  • Japanese
  • 简体中文
  • 繁體中文
Don’t Forget to Follow Us!
© Copyright 2016-2022. Device Plus - Powered by ROHM
© 2022 Device Plus. All Rights Reserved. Muffin group

istanbul escort istanbul escort istanbul escort