Ground Tracking LED Longboard Mod

Introduction: Ground Tracking LED Longboard Mod

This mod uses a custom designed encoder on one of the wheels to track where the longboard is on the ground and light up the LEDs so that the light pattern remains stationary on the ground as the board moves over it.

To make doing this instructable as easy to understand as possible, you will need to know how it works up front. There are rare earth magnets on one of the wheels. As the wheel turns, there is a sensor that reads those magnets and tracks how fast the ground is moving under the board. That sensor reports to a microcontroller that turns LED's on/off in sequence so that the light appears to be stationary as the board moves over it. The faster you go, the faster the LED's shift and likewise, the slower you go, the slower they shift.

Step 2: Drill Your Holes

You should read about how this project works on the first page. If you don't, you may get confused as to why you are doing some of these steps.

Unfortunately I don't have pictures of me doing the prep work and the first set of holes. I did it at work and I signed a contract that prohibits me from filming there (its a robotics company).

Prep work: 1) You will first want to find the circumference of your wheel. The rest of this project heavily depends on this number. My wheel happened to be almost exactly 8 inches around. If you have very worn down wheels, you should invest in new ones before starting this.

2) Divide the circumference by 8 or another even number so that your answer comes out to around 1". It must be an even number for the magnetic sensor to read the magnets properly. Remember the number you divided by as this will be the number of magnets you will use in a later portion of this project.

3) Cover the edges of your board with wide, green masking tape.

Drilling: 4) Mark out your holes with the spacing you found in step 2 and about an inch away from the side of the board. For my longboard, that happened to be a hole every inch down the length of the board and an inch from the side. I had 29 holes on each side. You can see the finished product below.

5) Drill your holes carefully with a 13/64" bit and a drill press. Using a drill press is important because it allows you make near perfect holes so your light shines straight and your LED doesn't need to be glued in.

Countersink: 6) Countersink the tops of your holes with a 1/4" drill bit and a stop. My stop was a fancy one, but you can wrap tape around your drill bit so that only the tip sticks about 1/4" out (see pic). The idea is to drill out just enough so that the LED's tip will sit flush with the bottom of the board. If it sticks out, you can break the LED's easily if you run over something (ie a curb). If it is too far it, some of your light won't make it out of the hole.

Step 3: Insert LED's and Wiring Prep

Wire tie prep 1) Mount your cable tie anchors on the underside of your board in even intervals as you see in the picture.

LEDS: 2) Insert the LEDs into the holes. I inserted the LED's with the anode (long) pointing towards the outside of the board and the cathode (short) pointing inwards toward the middle of the board. There is a picture of this below. This is important in the next step. You might want to use a pencil or a screw driver to push these all the way in so that you don't damage the leads accidentally.

3) Bend your leads so that the cathodes (long) stick out of the board's side and the anodes (short) all point towards the nose of your board. Later, we will be soldering all of the anodes together and then wires to the cathodes. Be careful not to let these rotate while you are bending them down so that they don't rotate and short the LED. Again, a picture below.

Step 4: Make Your Magnetic Encoder

The heart of this lies in the custom magnetic encoder that we are about to make. Even if you breeze through the rest of this project, take a little time to do this right.

You will need your epoxy, sandpaper (80g), magnets, a sharpie, and a protractor (optional). I originally used super glue to do this, but I found that it doesn't hold very well to the vibrations that come with riding the longboard.

Prep work: 1) Mark either north or south pole of ALL the magnets with the sharpie. It doesn't matter which, but you do this by stacking the magnets together and marking the same side of all of them. This helps you keep track of what side is what, which is ESSENTIAL TO MAKING THIS WORK RIGHT.

2) Mark out where the magnets are going to go. You want them to be about half way between the center and the outside of the wheel. You will need to mark out the same number of spots as you have magnets, using the protractor to get them even if needed.

3) Lightly sand the magnets and the inside of your wheel. This gives your epoxy a little something extra to cling on to when the wheel is spinning super fast and vibrating violently, you should take what you can get.

Putting the magnets on: 4) Choose to start with one pole or the other and epoxy a magnet in every other spot. When that sets, reverse the polarity so that the other pole is facing upwards for the remaining magnets. Going around the wheel, they should go N, S, N, S, N, S....ect. You can test this by holding a magnet to each one so that the pattern is attract, repel, attract, repel...ect.

Note: Due to how this project is coded, t isn't completely necessary for the magnets to be perfectly in the right place, but you should get them as close as possible.

Step 5: Wire Em Up!

This is the tedious part....you will be putting in around 60 wires, soldering about 200 splices, using around 100 pieces of heat shrink, strip off 250 wire ends, and will get burned by the soldering iron at least twice :)

2) Put zip ties through all of the anchors and tighten them slightly so that you have big, open loops.

2) Solder the stripped end to each LED. Use a third hand if you are unsteady or tweezers if you aren't fast enough to not get burned by the hot wire.

3) Bend the wires over the side of the board and run them through a zip tie loop so that they all point towards the front of the board.

4) Cut wires to an appropriate length after soldering them and strip off the other end.

5) Solder a 100 Ω resistor to each wire.

6) Cut a length of wire that goes from the end of each resistor to about 8 inches past the nose of your longboard. Strip both ends, run it through the zip ties, and solder one of them to the resistor. Be certain to put a piece of heat shrink over the solder joint and LED to make sure you don't light up any LED except the one you want. When in doubt, cut your wires extra long...it is much easier to clip them down then try to make them longer with splices.

7) Bridge all of the anodes. You can do this by soldering them together or with short wires. I did both for redundancy and reliability.

Step 6: Getting the Wires Ready

Mount your arduino: 1) This is pretty simple. Pick a spot that you'd like your microcontroller, put double sided mounting tape on the underside of your box, and stick it on. If you are sure that you know where everything is going, you can go ahead and epoxy it on. The reason you need to put your arduino on you board is to make sure your LED wires are long enough and that you like where it's at.

Mark your I/O 2) Put tape down the top of your board and mark one side with even numbers starting with 0 and the other side with odd numbers starting with 1, both of which start at the nose end of your longboard. These will be your pin numbers.

Step 7: Git'r Plugged!

1) Start with the highest numbers on each side and work your way down. You'll notice that your arduino mega doesn't have more than 53 digital pins marked out. The analog pins, luckily, can be used as digital pins as well! Analog pin 0 = digital pin 54, analog pin 1 = digital pin 55, and so on.

2) Cut your wires slightly longer than you think they should be. When your board flexes as you step on it, you'll want that extra give ;)

Step 8: Hall Effect Sensor

To make this work, we need to measure the speed of the magnets. We do that with a hall effect sensor. The one I used is a latching hall effect sensor, meaning that when the north pole of a magnet moves past the front of the sensor, it goes to a "high" state until a south pole moves past and makes it go low.

The one I bought was from Sparkfun.com.

To wire up the sensor: 1) With the "little square" facing you, the pinout (for this particular sensor) from right to left is 5V, GND, Vo.

2) Solder 3" wires on each lead. Be careful to not get the sensor too hot as you may break it.

3) Connect the 5V and Vo together with a 10K Ohm resistor in between. Use plenty of heat shrink to keep all contacts exposed. (see picture)

4) Solder a foot or so of extra wire on the ends, clip them down, and connect them to the microcontroller as shown.

To connect the sensor to your board: 5) Bend a 3 inch strap of stainless steel strap into an "L" shape. It is wise to use stainless steel as it isn't magnetic (your fridge has mild steel behind the stainless). You could also use copper or aluminum.

6) Epoxy or zip tie the sensor to the bracket you made on the short end.

7) Mount the L-shaped bracket with the sensor so that the sensor is about a half inch away from the magnets. Leave space to add extra magnets if you need them.

Step 9: Program the Beauty!

The program to this is extremely simple, however it can be as complex as you'd like to make it.

The program looks for a change in the sensor's state (the sensor goes from 0 to 1 or 1 to 0), shifts all of the LED's down, and then lights up or turns off the first set of LEDs to make a pattern. Here is an example sketch:

Step 10: Details, Details, Details.....

The last few things I'm going to breeze over, not because they aren't important, but because they are all one-step instructions.

Battery source: Hook up the red-wire of the 9V battery clip to "Vin" and the black to "GND". You can fix the 9V to the board via velcro or a battery holder.

Protecting the LED leads: As you will be standing on the board and moving around, you need to protect the leads. I chose to use broken plexiglass "squares" to achieve this.

On/Off switch: If you'd like to have a switch to turn your board on/off, simply wire the red wire off of the 9V battery terminal clip to one lead of a switch and wire the other switch lead to the Vin on your arduino.

Step 11: RIDE!

You've put together a masterpiece! Go and have fun!

I don't have any video of this because the refresh rate of my camera in the dark isn't fast enough to capture the full effect (my camera makes it look like a green blob, lol). If any of you folks decide to make this and take some good video, please send it to me and I'll feature it!

You mentioned that if you plug in the Arduino Mega drawing too much power you could kill your computer. After blowing one of my USBs because I accidentally shorted something on a breadboard (thankfully, I have a higher-end motherboard that had a resetting thermal fuse!), I got a powered USB hub with one port rated to charge an iPad. Even a Raspberry Pi doesn't kill it now.

I thought about it, but there are two issues with using those strips:1) They aren't nearly bright enough. You are bouncing light off of a black surface most of the time, so you need very bright LEDS. Those wont cut it.

2) It takes a great deal of time to do the data exchange in order to get the lights to change. The result is that you wouldn't be able to go faster than 5 or 6 miles per hour before you started to loose the tracking capabilities.

If you wanted to just put lights on the side and have them do speed-independent animations, the strips would be fantastic, but they wouldn't be good for much else in this application.

Thats a really rad effect! If youre looking to skip a trip to the hardware store or just dont have the time to set it up yourself Check out thirdkindbeyond.com to see an affordable way to get your board lit! Rechargeable batteries so you do not have to worry about swapping them out.

That would only work if you used a router to carve channels for the LEDs and wiring. Otherwise, you'll end up stepping on your solder joints and breaking them. Had the plywood been thick enough, I would have done just this.

On a side note, while the plexiglass chips look not so great in daylight, the way they pick up the light from the LEDs at night is gorgeous.