DIY Nunchuck Controller for Electric Skateboards!

37,614

477

36

Published

Introduction: DIY Nunchuck Controller for Electric Skateboards!

About: I'm a highschooler who is interested in technology, science, and engineering. In my spare time I work on projects that allow me to learn new skills and concepts.

Here's how I built/converted a regular Wii Nunchuck into a Bluetooth Nunchuck Controller for my electric skateboard! If you are not familiar with my series of electric skateboards, I have an excellent set of instructables here, here, and here.

I've been using my DIY Smartphone Controller to control the speed of my latest prototype, but I wanted something that was more tactile, and that's what inspired me to build this mini-project! This Nunchuck is also compatible with my old smartphone receiver circuit, meaning you can switch back and forth between using the smartphone app and the nunchuck!

I also included a dead-man's switch for safety, and a settings button, which will cycle between beginner, intermediate, and expert modes by limiting the maximum speed and braking power.

The Nunchuck is powered by a 500mAh lithium-ion cell, which, at a current draw of ~50mA, gives it a run-time of about 10 hours. The cell can also be recharged using a micro-USB plug located at the back of the device.

Step 1: Watch the Video Tutorial!

Here's a short video explaining how the Nunchuck controller works, and how to build it! Give it a watch; it adds a further level of explanation to this Instructable!

Step 2: Program the AtTiny Using an Arduino

Most of my projects are based on the Atmel/Arduino platform, so I decided to use it for this project. However, I did not need the full functionality of an Arduino, nor did I need it's power consumption, so I decided to use an AtTiny85 as the "brains" behind this project. Alternatively, you can use the AtTiny45 for this project as well (which is cheaper)

In order to program the "brains" you will need an:

  • Attiny85
  • Breadboard
  • Wires
  • Arduino Uno
  • 10uF Polarized Capacitor

I have included the sketch that I used for the project with this step. In order to program it to the AtTiny, follow these steps:

  1. Program the Arduino Uno with the ArduinoISP sketch
  2. Set the Arduino IDE to program the Attiny85 (check the image above)
  3. Connect the Arduino to the AtTiny with the breadboard according to the diagram above (make sure to connect the capacitor as well!)
  4. Program the software sketch included with this step

For more information about program the AtTiny, consult the following tutorial.

Additionally, you will need to pair the HC-05 to the Bluetooth Receiver before you solder the circuit! Meaning, you will need to build the receiver first, then pair, then build this circuit. Here's a very easy tutorial on how to paid two HC-05 modules together.

Step 3: Rip the Nunchuck Apart! (Carefully!)

The next step is to open up the Nunchuck and make space for the electronics. I did so with the help of a dremel, by grinding the circuit-board off near the screw holes, and making a little hole in the back where the switch will be. I also got rid of some of the supports inside the Nunchuck, as I needed extra space for the electronics.

Now is also a good time to locate the connections to the potentiometer and buttons. Use the diagram above to identify the respective pads, and solder some thin, 5-10cm long wire to each pad. This will help with the other steps.

Step 4: Build the Circuit!

Now it's time to build the circuit! Here is the parts list:

  • AtTiny85
  • 5mm Blue LED
  • HC 05 Bluetooth Module
  • 10k ohm resistor
  • 1k ohm resistor
  • Male and female headers (optional)

I used the "dead-bug" soldering technique to solder all of the components according to the schematic above. The connections to the Nunchuck are right above the AtTiny85, and they go:

Lower Button - Upper Button - Ground - Potentiometer Output - VCC

from left to right... You can also follow the schematic fully, and put in a programming header and a UART header (for testing the output to the HC05 module. I only put in the programming header, and that allowed me to upgrade the software in the future.

Step 5: Build the Charging/Power System

In order to power the circuit that was made in the previous step, it is necessary to make a lithium-ion charging/power circuit. The materials you will need for the power circuit include a:

  • 500mAh Li-Po cell
  • TP4056 Charging Module
  • Micro USB breakout board
  • Small toggle switch
  • Lipo Protection Circuit (1S)

The circuit we built in the previous step can take anywhere from 3.6v to 6v, so a Li-Po cell is the best and easiest way to provide power to it. Build the circuit above using some thin, flexible, stranded wire. Flipping the switch will turn on the Nunchuck!

Step 6: Secure the Electronics Inside the Nunchuck

Now it's time to put everything together! The fit might be a bit tight, but the basic premise is to get everything into the Nunchuck without breaking anything. I used tape to temporarily hold everything together, and then I used hot glue when I was satisfied with the fit. The end of the nunchuck (where the USB port is) was hot glued shut, which required pouring layers of hot glue and waiting for them to dry.

Step 7: Build the Receiver

This Bluetooth Nunchuck is compatible with my Prototype Smartphone Controller for electric skateboards. If you build this project correctly, the Nunchuck will automatically pair with your electric skateboard! If you are paired with the skateboard, you will need to turn off the Nunchuck before you can connect with your smartphone.

Since then, I have updated the schematic and the software behind the controller. I have included the Eagle CAD files, the software, and everything you will need to build the my newest version in this step!

If you have any questions, please ask in the comments! My next instructable will be about my carbon-fiber electric skateboard, and then next one after that will be a full-on, cheap, Boosted Board knockoff! Stay tuned!

Also, if you would like to support me by buying one of these pre-made controllers, you can do so here. Thanks!

Share

    Recommendations

    • Make it Move Contest

      Make it Move Contest
    • Woodworking Contest

      Woodworking Contest
    • Casting Contest

      Casting Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    2 Questions

    Hi guys, does anybody know the wiring of Nunchuck PCB and attiny? I don't see the diagram anywhere. In the video are shown color wires, but in the diagram are just numbers. How to connect it together? Thanks for any advice

    What type of motor do the skate board use?

    36 Comments

    There is not described how nunchuck is connected to attiny, how is its original board modified (it could be seen in the video only, but it is not mentioned at all) and the code is not working correctly. This was huge loosing of my time and money. After weeks I put all to the shelf and go to see another working and supported project.

    nunchuck1.jpgnunchuck2.jpg

    Great project! But just a few questions about the lion charging circuit. What is the USB breakout board used for and why does it need a 1s lipo protection circuit?

    2 replies

    As i see the breakout board is for getting USB to desired position since the Lipo protection board is too big to place for easy USB acess. He uses 2 different board but you can always use MP1405 (03962A) board witch has Lipo charge and discharge protection all in one.

    i have a lot of trouble in unbderstanding reciver and transmitter can you please help?

    why isnot TX connect with ATtiny ? how is controller sending signals to the receiver ?

    can i use new pcb for controller with code from your prototype controller ?

    the same arduino code is for both recilver and the Nunchuck??

    can someone help me ? in eagle schematic are missing few values (C1, C2 and Q1) and i need them

    does it have breaks ? or my esc have to had this function ?

    can anyone help me by modifying the receiver eagle sketch to be one sided pcb only... size doesn't really matter as long is under 3.8 inch x 8 inches

    Hey, Thanks for the tutorial.

    How do I change the old Arduino code to work with the new App you posted?

    can i get more explanation on the receiver side???

    Near the power in? Or the other circuit?

    near power:)

    and for what is UART?

    thx for reply:D

    Comsa42 thanks for all Your work I`m inspired :-) I`m build this project but I have problem - where is BT master and slave. I connect master to nunchuck and slave to skateboard is this good connection? With smartphone it`s work very good, with nunchuck not. HC_05 set AT commands and paired.

    I had to do something wrong, but where? :-) When I press a button in nunchuck, the LED blink 1s on and 1s off 11 times and off completely.

    1 reply

    The master is the Nunchuck, the slave is the skateboard. If the LED blinks erratically, try burning the fuses again.

    Awesome! I wish i ahve the materials to built this. : (