Monovelo Monowheel LED Modification




Introduction: Monovelo Monowheel LED Modification

About: I am an effects artist for mobile games. I moved up to San Jose in 2008 with my wife for work. Work is great, but time outside of work is better. I live life like a kid. Always looking for something to do, som…
I purchased a Monovelo Monowheel a few years back. I believe they were first seen in the 2008 Beijing Olympics. The company that made them sold them to the public afterward. They come with or without leds in them already. If you get one with, you have 3 choices. Red, White, or Blue.

I didn't like that I couldn't control the lights inside. I wanted it to do some patterns and different colors and whatnot. So I stripped out what was inside, and rebuilt the LEDs from scratch, and this is what came of it.

This instructable will be in flux, as I am learning as I go, and will update the instructable as I feel things should be. I also have a few additions I want to add to the LEDs which haven't happened yet, and as I add them, they will show up here.

Some of those ideas are...
Adding a hall effect sensor to determine the speed of the rotating wheel to be able to time the light patterns to look still.
Put some sort of bluetooth with audio processing so the patterns will light up to music i am playing on my ipod/iphone.
Add a removable LCD faceplate that would ultimately allow me to pick from several preprogrammed patterns on the go! I could switch back and forth from the audio processing pattern to the programmed in pattern and vise versa without having the laptop around.

Here is the wheel in motion...

And here you can see a few vids of the lights in progress...

Step 1: Materials and Tools

materials include:

Monovelo Monowheel - Hopefully you already have this, but if not you can purchase one from Monovelo's site. The most expensive part of this project if you dont have one already.

Addressable RGB LED strips - 3 meters are needed. I used the LPD8806 which I purchased from adafruit.

Teensy 3.0 - This is the arduino, or controller for the LEDs. The teensy I felt was best over other arduinos because of its size. Even though it is so small, I was still barely able to fit it inside the monowheel. There are various places to get this. Kickstarter and adafruit are a few.

Screwdriver - for removing plastic covers on monowheel.

Soldering gun and solder - My wife and I have a Weller soldering gun and use solder wire that is a mixture of tin and lead with the rosin core. Handle the soldering gun with care. The end can get hot enough to burn you pretty well. Keep the tip away from your body parts. Also, if you use solder that has lead in it, wash your hands after handling. Lead is bad for your body.

Header pins - I bought these from the local electronics store but adafruit sells these. I'm sure there are other websites that sell them cheaper though. You need two 14 pin long ones (for the teensy) and a few extra pins. These are the long black bars with silver colored pins running perpendicular through them in the second pic. They have already been soldered onto the teensy in this pic.

Jumper pins - I bought these from the local electronics store also. I'm sure you can find them online, but you are on your own here. These are the rectangular block things in the second picture.

Clamp - Helped hold the LEDs in place while soldering. I used just a regular clamp, but usually soldering alligator clamps are used. And prolly better too.

Battery holder - 3 packs are needed that hold 4 AA batteries each. I purchased mine from the local electronics store but adafruit sells these.

Batteries (and charger) - 12 batteries are being used. I opted for rechargeables for two reasons. 1, this wheel will suck up batteries left and right using non-rechargeables. 2, the LEDs run off a certain voltage, and 4 rechargeables are in that voltage range whereas regular batteries go over and will blow the LEDs unless resistors are put in place. I did not put resistors in my setup, so please go with rechargeable batteries, or learn how to put resistors in the power sources. I bought this charger that came with 8 batteries and 4 more batteries on top of that from newegg. I get about 8 to 9 hours of full brightness life in my monowheel with these batteries.

LED on/off switches (optional) - But really cool, makes it look neater, and helps mount the battery packs better. If you choose to do the switches, three are needed. I bought these from adafruit. They have them in four different colors for your choosing. If you want a better switch than what the battery pack has to provide, but don't want the LED in the switch, a regular toggle switch will do, and will be easier to wire, but make sure it's at least a 3 amp switch.

multimeter (optional) - A good thing to have though. Use it to test the volts coming out of each power source (or battery pack of 4). The LEDs and arduino run off 5 Volts. Anywhere from 4.5V to 5.5V should be ok. 6V and you are going to blow the LEDs, under voltage and the colors will appear muddy. NiMH cells (the rechargeables I bought above) are rated 1.2 V each. 4 together is 4.8V, which is in our range. I tested 5.1 or 5.2 V out of my battery packs with the multimeter, so they are actually slightly higher than what they are rated. Alkaline cells (regular throw away batteries) are rated 1.5V each. 4 of those would be 6V which is too hot for our LEDs and ardiuno.

Micro 'B' usb cable and computer - The cable is used to upload code (to control the LEDs) to the teensy from the computer. The computer can be a laptop or a desktop, but much preferably a laptop because the teensy will be mounted inside the monowheel. Unless you can easily get a desktop close to your monowheel, a laptop is ideal.

Wire cutters/strippers - Self explanatory. But like any cutting tool be careful. It is potentially hazardous if you handle it incorrectly. Keep fingers out of the way when cutting things.

Tin Foil (optional) - Will be talked about in a later step. I felt it helped, but is not necessary, and also was a little bit of extra work.

Hot Glue Gun and Sticks - You are going to need a lot of extra glue sticks. I think I went through three packs of glue sticks for this. Like the soldering gun, the tip of the glue gun gets hot enough to burn you. Be careful with it and keep all body parts away from the tip so you do not get burned.

Small pieces of plastic - Or actually, anything that can be easily cut into little squares, is sturdy, can hold its shape, does not allow light to pass through it, and can be glued into the wheel. Preferably something non-metal. Cardboard would be a good one. I used plastic blinds that the cat messed up. This will be explained later but it NEEDS to prevent light from passing through. Thats where the black electrical tape came into play for me, but if you are using cardboard, you wont need the electrical tape.

Black Electrical Tape - See Above.

Pin Punch - Helped with removal of old LEDs.

Electrical Wire - 4 different colors are ideal. I used red, black, green and yellow. I didn't measure how much, but I'm guessing roughly 20 - 22 feet of each color. Two wires will be used for power, for these I suggest 20 gauge (18 gauge might be better for the current itself, but i found working with 18 gauge was difficult inside the monowheel.) I used red and black for power. The other two wires are to control the LEDs themselves, and 22 to 24 gauge will work fine for these. I used 22 gauge.

Insulated Quick Disconnects (optional) - I actually didn't use these, but I am planning to put them in in the future. I wanted to wire it so the 6 sections of the monowheel could be pulled apart. I started with male and female jumpers, but the gauge I got them in was 24 gauge and they were flimsy so I scrapped those and ended up wiring everything direct. So currently I cannot pull apart the sections. I will eventually put the disconnects in to make so it can be taken apart.

Price of Everything -

This project isn't too pricy, assuming you already have all the tools and the monowheel. With all that in hand already, the LEDS were $105. The arduino roughly around $22. I spent $73 for batteries and charger, electrical wire I spent roughly $15 for 96 feet of wire. The jumper pins, header pins, and battery packs were all only a few dollars each. I needed more glue sticks and solder and stuff... I'd guess I spent roughly $230 on this project.

If you don't have the monowheel, well your project price just skyrocketed another 18 hundred, and the tools? I don't know there, we had all our tools from before for previous things.

Step 2: Strip Out Old LEDS

Strip out all the old LEDs in the monowheel if you have one that came with LEDs.

Obviously you will have to unscrew all the plastic covers for all the 'Z' sections.

You will have to pull apart each of the sections because the current conducting screws that connect the sections originally need to come out also. Put the wheel back together after you pull everything out.

The LEDs that were in the center of each section were harder to get out. I had to cut the metal thingy (holding the metal L bracket on both sides) with my cutters, then hammer it out with a pin punch. BE CAREFUL with the cutters and hammer. You should always take special care with tools like these not to cut yourself or smash your hands or fingers with the hammer. Keep hands out of the way of the tools.

The 3.7V cell phone battery and recharge board and the switch and stuff can all be taken out also. None of that is needed.

The third pic shows the battery, recharge board, switch and some of the old LEDs in the monowheel.

The fourth pic is a little closer on those LEDs, which were the ones that I had to cut the top off of the metal pin with the cutters, then punch it out with the pin punch. Definitely the hardest ones to get out. (Remnants of the pins still left on these ones...)

Step 3: Cut and Solder LEDs

The three meters of led strips may come in one single strip, or smaller sections of strip. It doesn't matter. The strips are cutable every two LEDs. (The LEDs are the white squares on either side of the black rectangle.) This is exactly what we are going to do. Cut the strip(s) every two LEDs. Again, BE CAREFUL with the scissors. Keep your hands out of the way of the blades as not to cut yourself. You also need to put a good amount of solder on all 8 leads (4 in and 4 out) of each cut LED section. Here's an adafruit tutorial on soldering (and wiring, which is next) the pads. The soldering gun can get really hot, hot enough to burn yourself. Be careful not to touch the end of the soldering gun so you do not burn yourself.

The second picture shows a closeup. On top we have LEDs cut, and soldered. On bottom we have the original uncut, unsoldered, LED strip.

Every sixteen LEDs or so, are soldered together already. Instead of cutting these ones, just un-solder them. If you cut them you have less lead space to work with because they are overlapped before soldered. Here is an adafuit tutorial on separating strips.

Step 4: Wiring

Probably the most time consuming. Hopefully I am understandable in this....

There should be a PDF that you can download in this step. it's basically a bigger version of the wiring diagram if need be.

In the wiring diagram if you were to imagine folding the diagram down that black line down the middle, that would be how the two sides line up with each other of the monowheel. Each LED section pictured in the diagram is in reality two LED sections wired together, but for the sake of saving me time making the diagram I omitted half the LED sections. You should still get the point.

There are three power sources, each consisting of 4 batteries. The first power source powers the arduino and 32 LEDs (one meter, or 16 cut segments). The second and third power sources power one meter of LEDs each. The first power source powers 2/3rds of one side of the monowheel, as does the third power source but on the other side, whereas the second power source powers 1/3rd of each side, criss crossing inbetween.  In my diagram, the red wire is the 5V, the black is the ground, the yellow and green are data and clock (data and clock are not illustrated correctly in reference to the arduino. In reference to the arduino, they are switched.)

Note, when a new power source is introduced, the ground, data, and clock wires connect between the previous and current LED segment, but the 5V wire does not. No 5V wire comes out of the previous LED segment, and the red power wire from the battery pack connects to the 5V IN of the current LED segment. The ground IN of the current LED segment has BOTH the ground of the battery pack AND the ground from the previous LED section coming into it.

Also, I have programmed my arduino to control only 48 LEDs, even though there are 96 total in the monowheel. I am splitting the data and clock wires from the arduino so that each side of the monowheel is getting the same program at the same time.  You will notice in the diagram that the data and clock wires do not cross over from side to side like the two power wires do.  If you would like to run different patterns on each side independently of each other you can, but requires a bit different wiring, and different coding depending on how you wire it.

You could either: Put the clock and data wires (starting the second side) attached to different pins on the teensy (than the data and clock wires from the first side are attached to.) Use these pins in your code to do different patterns on the second side. (You would still be coding 48 LEDs, just having each side run different codes.)
OR, when the power crisscrosses from one side to the other, have the clock and data ALSO crisscross here. Do not split the data and clock wires at the start from the teensy. For this way, you will have to program 96 LEDs at once, and have the second half of that program do a different pattern.

So I started with wiring section by section of LEDs, introducing the power sources as I got there, and adding the arduino last. The very first LED I left with long wires coming off the IN side, so i could connect them to a breadboard where the arduino was so I could test it as I went along. The breadboard isn't necessary.

I put the ardiuno in last, you can put that in first, I don't see why not, but it's in a later step. Each of the LED sections I hot glued in after soldering all the wires to it.... I'd advise not to glue the very first one in until after you have the ardiuno in, as the teensy is going behind the first LED and I found it very difficult to get the teensy in there after having already glued in the very first LED section. Also, be careful with the hot glue gun. Like the soldering iron, the end can get hot enough to burn you. Keep your hands away from the tip so you don't get burned.

So to start, take a look at the third picture above. This is how each of the six sections will be wired. Measure out 4 wires of each color, two being the long legs between the end of the monowheel section and the center of its section, one smaller wire to go through the hole in the middle of the monowheel section, and one smallish wire to go between sections where your old current conducting screws used to be. Cut the wires to the lengths you feel necessary, and strip the ends. After you strip the ends, tin them also (put a little bit of solder on them, it helps with soldering them to the LEDs.)

Then to solder, most of the soldering can be done away from the wheel, but some of it will have to be done in the wheel itself. Refer to the second picture, I soldered the long wire sections together to two led sections, then added the short section of the middle of the monowheel section you are wiring to OUT side of one of the wired LEDs, and added the wires for going inbetween monowheel sections to the OUT of the other pair of wired LEDs.

I then placed them inside the section, sticking the wires through the holes, and soldering the two "Z" sections of the monowheel section together inside the wheel.

the LEDs go a certain direction. Near the solder pads you will see DO and CO on one side, and DI and CI on the other. These stand for data OUT, clock OUT, data IN, and clock IN. Make sure the OUT side of the first LED section is soldered to the IN side of the next LED section and so on.

The LEDs are bendable. Bend them into shape so the LEDs themselves will point down the channels. Then hot glue them in. To do this I held the LED in place, traced a line with a sharpie where the LED was, moved the led, laid down a bunch of hot glue, then matched the LED to the line. Do whatever works for you.

You can see this sharpie line in one of the images, and the images show how I bent the LEDs.

Note the fourth picture is the start of the second side. That battery pack is powering the arduino on the side facing the floor in that picture. You see the power wires actually come from the section on its left, but from the backside, where the data and clock wires come from the arduino directly behind that section. In most cases all four wires will come from the monowheel section directly to the left of this section.

The battery packs are just hot glued to the outside of the rim as seen in the pic, a hole is drilled into the frame where the wires need to feed through, and after they are fed through the hole and soldered in place, the hole is filled with hot glue. Also the wires themselves are hot glued down to the frame to stay out of the way of the light from the LEDs, and to keep them from moving around while riding.

Currently I have the battery packs hot glued in place temporarily. The On/Off switch on the packs are on the main side of the pack. So to have access to the switch we have to mount the cover side of the pack to the wheel. I do not like this.
Ultimately I am going to remove the switch in the battery pack altogether and solder the current direct to be on all the time. I will mount the main side of the battery pack permanently by screwing it in (which will now be ok because there is no switch). I will then tap into the power line and add some On/Off switches with LEDs in them which will be mounted into the frame of the wheel.

It helps to keep the same color wires for each of the 5V, data, clock and ground, and follow the wiring diagram! These pics do not start from the beginning.

I went section of wheel by section of wheel from start to finish. You may want to do it this way, and get the arduino setup (in step 7) so that you can check it to make sure its working properly after you finish each section. But you can wire the whole thing if you like before moving onto the next steps also. Up to you.

Step 5: Battery Packs and Switches

I wasn't too fond of the battery packs for a few reasons. First, the on/off switch is on the back of the main part of the battery pack whereas the screw and screw hole to hold the cover in place is on the other side. This made it hard to be able to mount the pack so that I had access to both the switch and the screw hole. Second, the springs in the battery pack are not very strong, and do not hold the batteries in place very securely. This isn't an issue when not riding the wheel, but when taking it out for a ride I quickly learned that when going over bumps, it shifts the batteries around inside the pack just enough to make a quick disconnect in power. It was fast enough that you never saw the lights turn off, but enough to cut power to the teensy, so when power came back the light pattern started over again from the beginning, causing the pattern to never get very far in its sequences.

The first picture shows a temporary mount of the pack until I received my on/off switches in the mail. I hot glued the cover of the pack to the wheel so the on/off switch on the pack was available. The pack wasn't very secure this way though, and I had to tape it to the wheel temporarily while riding it to keep it in place. This first picture also shows the 5V and ground wire going from the pack, to the LEDs. (As well as the clock, data, and ground from the previous LEDs in the previous wheel section. This picture is the start of the second power source.) If you want to mount it this way and not use the extra LED on/off switches I used you can, but you will need to find a better way to mount the packs more securely.

Anyhow, I removed the switch from my battery packs and tapped a separate LED lit on/off switch in the line. This is how I did it... I removed the cover over the switch in the main part of the battery pack. The second pic shows the switch exposed. Pull out the screw and pop off the three melted plastic parts on the pins to remove this cover. (When finished and putting the cover back on, I remelted those pins with the soldering gun to hold that cover in place again.)
This second picture also shows how I made the springs better, although hard to see... I shoved extra header pins into the springs so that when the batteries are put in place they cannot move. Anything will do, as long as you can still get the battery in there, and it holds it snugly. Or if you have a better idea, do it.

Pull out the part with the switch, remove the switch, and solder the connection from the black ground wire to the back part of the spring. The third pic shows this. I just removed the switch from the board, but I guess you could cut the wire and spring off the board then solder the wire to the spring. Both will do. Then put it all back together.

I then drilled a large hole for my new LED on/off switch to fit snugly into. I didn't realize the switches were as large as they were when I bought them (my bad for not checking the specs.) They wouldn't fit in the wheel by the battery packs with the LEDs already in there (they might have if I put the LED in after I did the switch, but I didn't do it that way so it was too late for me.) So I put them in the other end of the 'Z' section, shown in the fourth pic, where the hole is drilled. Fifth pic shows the switch in place, but not wired up yet.

So I cut the 5V and the ground of the battery holder wires inside the wheel and stripped the ends, shown in the sixth pic. Then I wired up the switch, shown in the seventh pic. I used green and yellow wire because I ran out of red and black. I soldered the wires to each of the ends of the switch. Notice the wires are soldered so they go back up towards the top of the switch, this was so they worked better in the wheel.

The cool thing about these switches is they can be wired however you like. I wired mine so the switch LED is on when the wheel LEDs are off, and the switch is off when the wheel is on. When the switch is on, it is pressed, when the wheel is on, it is depressed. Below are the possible ways to wire it...

The switch has 5 inputs. LED positive (labeled by '+'), LED negative (labeled by '-'), common (labeled by 'C1'), normally open (labeled by 'NO1'), and normally closed (labeled by 'NC1').

To wire it:
Switch on when pressed / Wheel on when depressed...
Ground of battery pack to common (C1) of switch.
5V of battery, 5V of wheel LEDs, and '+' of switch, all wired together in same place.
'-' of switch to 'NO1' of switch.
'NC1' to ground of wheel LEDs.

Switch on when depressed / Wheel on when pressed...
Swap 'NO1' and 'NC1' of the previous example.

Both Switch and wheel on when depressed / Both off when pressed...
Battery ground to 'C1' of switch.
5V of battery, 5V of wheel LEDs, and '+' of switch, all wired together in same place.
'NO1' is not wired to anything.
'NC1' and '-' both wired to ground of wheel LEDs.

Both Switch and wheel on when pressed / Both off when depressed...
Swap 'NO1' and 'NC1' of the previous example.

Switch always on...
Do any of the previous versions, but wire '-' of switch to ground of battery.

Switch always off...
If you are going to do this you might as well get cheaper switches that only have two inputs and don't light up.

After soldering the wires to the switch, I put it in place, worked the metal hex nut thing around the wires and screwed it in. I then hot glued it on the inside to keep it from unscrewing. (Eighth pic.) Next i soldered all the ends of the wires from the switch to their appropriate places (to battery pack and wheel LEDs, as shown in the ninth pic.) I hot glued the soldered ends so that they couldn't come in contact with each other and short out. You can see hot glue on the connection of the two red wires and one green wire,  from the 5V of the wheel LEDs, the 5V of the battery pack, and the '+' of the switch. Then hot glue all the wires in the wheel so they are out of the way of the LEDs. Mount your battery pack (now without it's own switch) however you like so the cover can now be screwed back on, and put the cover of the wheel's 'Z' section back on.

That's it! The last two pics show the switch on while the wheel off, and vise versa.
I realize the switches drain battery when not using, but I liked the LED switches and wanted to use them, but did not want the light from them to conflict with the wheel's LEDs. That's why I wired it the way I did. I pull the batteries out when really not in use.

Step 6: Some Added Touches

The LEDs themselves have a really wide viewing angle, guessing around 160 - 180 degrees. The previous ones that we stripped out had a really narrow angle, prolly around 20 to 30 degrees, which unfortunately works better for this project. Since our LED viewing angle is so wide, the colors bleed into each other when lit. If we are lighting all the LEDs all the same color at the same time, this isn't much of an issue, but when we start turning off LEDs and having ones next to each other be different colors, this becomes an issue because lit ones bleed into unlit ones and colors mix.

Also since the viewing angle is much wider, the LEDs aren't as bright towards the ends of the legs of the "Z" section.

I did two things here, first, taping aluminum foil in the legs of the "Z" sections. This helps brighten the end of the leg keeping the light bouncing around in there a little. Originally I tried it on both top (or outside) and bottom (or inside) legs (the middle leg doesn't need it because it has two LEDs in it, one lighting each end of the leg). Aluminum foil in the top leg didn't seem to make much of a difference, and it was a lot of work, so I omitted it in the top leg. (One of my "Z" sections still has it in there though...)  The bottom leg really did make a difference so I put it in all of them.

This is totally optional, but if you are up for it, do it! Be careful to keep the aluminum foil from touching the LED sections though, as it may short them out if it touches. I taped my foil inside with scotch tape.

To keep my LEDs from bleeding into each other, I cut little pieces of plastic, that I wrapped in black electrical tape, and hot glued those in place near the LEDs. See pictures. Cardboard I'm sure would work great for this, I just used plastic blinds because it just so happened the cat tore one off as I was trying to figure this part out. The cat helped out a lot actually. These light blocker thingys are totally necessary if you want your light patterns to look clean.

Again, the very first LED, hold off on all this until you get the ardiuno in! Which is the next step.

After you are done with this step, you can screw back in the plastic covers, as there is nothing else to do inside.

Step 7: Installing the Teensy

I wanted to make the teensy ultimately removable, for whatever reason that may be in the future. I had it on a breadboard the whole time while building this thing for testing, and figured a tiny little breadboard would be perfect. Mount the breadboard permanently and pop the teensy in and out of it. Problem was, I couldn't find a breadboard small enough. So I made my own with jumper pins.

First, some teensys come with header pins already soldered into them. Mine did not, so I had to solder the header pins in. Then I used a couple of 4 pin long jumper pins. I guess whole length jumper pins will work, or even shorter ones, but I would suggest at least having one in each corner, one for the 5V and ground of the teensy (which are actually corners anyways) and one for pins 2 and 3 (which are the data and clock pins on the teensy.)

The first two pictures show the teensy with header pins soldered in (it's upside down) and the extra header pins and the jumper pins.

The next two pictures show what I rigged up with the jumpers and headers (I use a double header to hold two jumpers together on the ground side.) One thing I didn't realize when I took the pictures is I counted pins 2 and 3 wrong, and I forgot jumpers and headers for pin 3. So you will need an extra jumper and header to the right of the front left most rig in picture 4.

One thing I did a little differently (which you will see in the pictures where it is actually mounted in the wheel) is I added a jumper pin on top of the double header pin, and soldered the wires into this jumper. I don't think the solder holds very well to the jumper pin, and am going to pull out that extra jumper pin, and solder the wires directly to the header pins sticking up. I feel this will be more secure.

Same goes for the 5V pin, I just soldered the wire into the jumper pin, but I am going to redo it by putting a header pin in that jumper, and soldering the 5V wire to the header.

Anyhow, after this was rigged up, I hot glued the jumper pins into the wheel (while they were attached to the teensy so they went in the right place.)

As you can see in my pics, I glued it in on the side of the inside of the frame. I feel it might be better flat on the bottom, but I had already glued in that LED segment already, and it didn't leave for much room for the teensy. Hopefully you haven't glued in this first LED segment yet, and can get the teensy glued into place first, how you like, THEN glue in the LED segment. Note the teensy should be mounted though so that the USB connection is pointing to a wall of the frame that you can drill a hole in so you can easily just plug the USB cable into it without having to remove the cover in the future after you have screwed it back on.

After I glued in the teensy mount, I removed the teensy, and soldered in all the wires that are coming off the IN side of the first LED segment. Your teensy should come with a little card that labels which holes are what pin numbers...
ground goes to ground, 5V goes to 5V, data goes to pin 2 and clock goes to pin 3. Now there should be two data and two clock wires. One from the first LED segment on each side. (the other side's wires should be wired through some holes in the wheel. If there are no holes to wire it through, drill your own.)

The red hot wire from the battery pack should also be soldered to the pin that the 5V wire from the LED segment is soldered to, and same goes for the ground wire from the battery pack but to the pin that the ground wire from the LED segment is soldered to.  A hole will need to be drilled in the frame wall for the wires to be fed through first, as the battery pack is mounted on the outside of the wheel.

A hole will need to be drilled for the USB cable also. Check to make sure it fits through the hole into the teensy before assuming the hole is just good to go and before putting the cover back on.

That is about it for building the setup! Put all the covers back on if you haven't already. (unless you want to test it first, by coding the arduino which is the next step. Then put the covers on when you know its good to go.)

Step 8: Coding the LEDs

This was my first arduino project, and I am still currently running into a few issues and trying to wrap my head around all this, so it may or may not be the proper way to do it, but what I describe here will get you finished results.

The teensy 3.0 and the LED strips should both come with instructions on where to go online to get the proper things to download to your computer to get this all working but it is listed here as well.

Here you can download the software for the teensy 3.0, which you will need. Click on the software update link. I am linking the first link as opposed to the link on that page because the first link should be updated as the software gets updated.

Download the zip file and unzip it into the 'My Documents' folder of your computer. Rename the folder to be just 'arduino'. (I'm not sure if this is totally necessary but I read, as you will also, on the LED strip page that this is how it's supposed to be done and I had issues before when the folder was not renamed to be just 'ardiuno'.) For windows this would be (home folder)/My Documents/arduino and for linux and mac this would be (home folder)/Documents/arduino.

Next download the arduino library for the LED strips. Follow the instructions in the first two paragraphs on this page.

When you open the Arduino.exe under Tools -> Board: change it to "Teensy 3.0" if it is not already. Under Tools -> USB Type: change it to "Keyboard + Mouse + Joystick" if it is not already. Under Tools -> Programmer i believe it should be set to "AVR ISP".

You can then go to File -> Sketchbook -> Libraries -> LPD8806 -> LED Belt to open the example code for the LEDs.
In this file change int clockPin to equal '3' instead of '1'.  Then where it says LPD8806 strip = LPD8806(....   change that number 32 to be 48. This is how many LEDs are in the strip. We want to change it to 48 since that is how many LEDs we have.

Save this file.

(For some reason, for me, the whole arduino file system is read only. Because of that I could not save any changes to a file within this system. If I change permissions and change it not to be read only when I try to save a file it still converts it back to read only again. Hence I am not able to save changes to any file within the arduino folder system. I had to 'save as' my sketch somewhere outside of the arduino folder system to be able to write to it.)

If you haven't done so already, plug the USB cable into the teensy and computer.
NOTE: It is probably best to make sure all 3 of the battery packs are turned OFF when you have the USB plugged into the teensy. As I ran into some problems on occasion with uploads to the teensy that would only happen if I had some of the battery packs powering the other strips turned on. I don't know exactly if it's related, but it seemed so. Maybe the ground being shared between the computer and the battery packs of the other strips conflicts somehow. (I know the 5V did not conflict, because they are not connected.) I NEVER turned on the battery pack powering the teensy while the USB was plugged into the computer. I felt two conflicting power sources to the same place would probably be a bad thing.

Now push the 'upload' arrow to upload your sketch to the teensy. If this is the first time you are doing so, you will have to push the black pushbutton on the teensy after upload to get the code to take into effect. Any time after that, it should upload automatically.

With the battery packs turned off, you will only be lighting 32 LEDs while the USB is powering it. The program is written for 48 LEDs and it doesn't like the conflicting number, so you will see weird flickering of random stuff happening. This is normal. Pull out the USB from the teensy, and turn on all your battery pack switches. It should light up properly the way you expect.

Once you have all this in there, you can start coding!
The LEDbeltKit sketch is example code that came with the LEDs and is a good place to start, so you can just add to it or start from scratch. Up to you to do whatever you like.
If you are new to coding, there are plenty of resources online to find help. Just search a little.

If you are a little more advanced I hear the fastSPI library is a good one to use. I'll get there eventually. Maybe it's not so advanced, I'm not sure because I haven't looked at it yet.

Hope you enjoy your new custom lit Monovelo!

Special Thanks To:
My wife Pamela for being so cool, supportive, and helpful.
Monovelo for making such a wonderful contraption.
TonalityStar (Tony) for the inspiration on actually doing this thing.
Paul Stoffregen for creating the teensy.
Adafruit for the open source arduino libraries, LEDs, and cool stuff.
My brother Bobby for help with the code in some of the more advanced light patterns.

Make It Glow

Participated in the
Make It Glow

Be the First to Share


    • Make It Bridge

      Make It Bridge
    • Big and Small Contest

      Big and Small Contest
    • For the Home Contest

      For the Home Contest



    10 years ago on Introduction

    Thanks man! It's been a lot of fun, and a great learning experience.