Introduction: Longboard With Functional Lights

For a school project I made a light system for my style of longboarding. The lights are meant to behave the way car lights do; there is a headlight, a rear light, side lights to indicate you are taking a turn, and breaklights.

Step 1: Creating Cases:Rear Lights!

To make any casing for this project, I used a standard case meant for keeping cables together in domestic environments. I used different sizes depending on the thickness of the cables. To cut these in the right sizes, we used a saw.

So I started with making the case for the rear LEDs. Once you have the right width you can make 5mm holes on both the lid and the bottom part for the LEDs and cables to go through.

Step 2: Prepare the Veins

Here I use a cable with 4 veins:

1 for each LED to send signals through and (red, blue, yellow)
1 to combine all grounds (black)

Tip: Make sure you keep in mind which side of the LED is + and -.

It also help to draw a solder plan and to put that underneath your work. This way you can check if you are doing things according to plan at all times.

I coat the tip of the copper with a bit of tin to make sure the individual "hairs" wont stick out, making soldering easier later.

Step 3: Solder and Cut

Now its time to solder the resistors with the LEDs. I added insulating tape to the exposed parts to make sure things wont conflict with each other in case they touch.

Tip: To make sure the resistors dont shift around, you can make a hook at both tips that need to be soldered together.

Step 4: Connect Veins With LEDs

When you are done doing what the title says it is wise to check if everything works and to see if your cable is long enough. Connect it to your arduino!

Step 5: Single LEDs: Solder and Insert

Once again, I saw the casing to the right size for the single LED cases. Here I dont really need to mind the width, because I am using an even smaller casing inside of the casing we used for the previous case. The LED fits perfectly in this smaller case, and because the bottom is sticky, we can stick that case onto the other one too!

Tip: I put all my wires underneath the deck to make sure you don't see it. However I did not do this with the LEDs in case one might loosen and end up between the wheels!

The single LEDs we are making here are:

- 1 headlight
- 4 sidelights

Note that the cases of the sidelights need to be cut at a specific angle depending on the position where you want them/shape of your deck.

To save space in the bigger case where I bring all the wires together, I combined the ground wire (entirely black) of the sidelights from the same level (second picture). If you are a beginner with soldering it might be wise to ask for help so that you can hold all the wires still as you solder them.

Make sure the wires are long enough to reach the arduino!

Tip: If your wires have similar colors like mine do, try think of a system to tell them apart. I used two different types of tape to tell the signal and ground wires apart!

Step 6: FSR: Solder and Insert

Since its strongly advised NOT to solder directly onto the FSR itself, I used SHORT header pins to stick the FSR in, and then solder with the legs of those.

Prepare the wires for the FSR like we did with the LEDs, only this time I soldered them onto a wired with a pin so that I can directly plug them into the arduino.

Again, the casing for the FSR has a specific angle depending on the shape of your deck. I broke my casing into two to make sure the bottom will stick to the deck despite the deck being curved.

Unlike the LEDs, I did not use a smaller casing inside of a casing for the FSR because the FSR is too big for that. Instead, I attached it with "power strips" (a double-sided super sticky buddy-like gluey tape) to keep it in it's place (later shown when I attach the arduino).

Step 7: FSR: Attaching

Before you stick it onto the long board, you need to know where you place your feet when turning left and right. To check where I put my feet I simply stood in the two positions and marked the position of my feet with white chalk.

I bought some grit tape to cover and attach the FSR to the deck. To make sure the FSR will stay somewhat protected underneath the tape, I kept the plastic sachet it came with and stuck the head in there. Note that you do have to cut the edges of the sachet if your grit tape sticker wont be very big. If you dont, you will simply stick the tape onto the the sachet and things will be very loose.

Lastly cover the FSR in it's sachet with the tape!

Step 8: Connect Arduino, Connect to Deck

At this stage it would be wise to make a final check to see if everything works. Use male and female pins or alligator clips to connect things to the arduinio. Once it does, solder male pins at the end of the wires.

Tip: To make things look a little more neat you can tape the parts where you soldered the wires together!

- Attach the arduino to the deck using power strips.
- Stuff all the wires in their cases and close it!

Step 9: Coding And: Tadaaaa!

Stick a powerbank or another source of power onto the deck, again using power strips and insert the following code:

-----------------------------------------------------------------------------

// This code turns on the front- and rearlight at all times, and enables two orange
// lights to flicker when their respective FSR has been pressed. The breaklights will // also turn on for a few seconds after the FSRs have been pressed.

int fsrRight = analogRead(A4); int fsrLeft = analogRead(A0);

void setup() { Serial.begin(9600);

// Set up your FSRs here pinMode(A0,INPUT); pinMode(A4,INPUT); // Here is where you set up the code for the LEDs // I recommend making a note of which pin is for which LED! pinMode(12, OUTPUT); pinMode(9, OUTPUT); pinMode(8, OUTPUT); pinMode(7, OUTPUT); pinMode(6, OUTPUT); pinMode(5, OUTPUT); pinMode(4, OUTPUT); pinMode(3, OUTPUT); pinMode(2, OUTPUT);

// This is where you tell your arduino to have the // front and rear light on at all times digitalWrite(12, HIGH); //voorlicht digitalWrite(3, HIGH); //achterlicht }

void loop() { fsrRight = analogRead(A4); fsrLeft = analogRead(A0);

if(fsrLeft >=600){ // If you enable this FSR: Serial.println("Turning left"); // print what the user is doing

digitalWrite(5, HIGH); digitalWrite(4, HIGH); digitalWrite(9, HIGH); digitalWrite(6,HIGH); delay(500); // this delay makes sure the // blinky lights stay on before they are // turned off again digitalWrite(9,LOW); // turn off the blinky lights digitalWrite(6, LOW); delay(500); // this delay makes sure the rearlights // still shine for half a second even when you are // not resting your foot on the FSR to give you time // to gain speed should you need it to take the turn // successfully }

if(fsrRight >=600){ // If you enable this FSR: Serial.println("Turning right"); // print what the user is doing digitalWrite(5, HIGH); digitalWrite(4, HIGH); digitalWrite(7, HIGH); digitalWrite(8,HIGH); delay(500); digitalWrite(7,LOW); digitalWrite(8, LOW); delay(500); }

else{ digitalWrite(5, LOW); digitalWrite(4, LOW); } }

-----------------------------------------------------------------------------

Make sure you change the pin numbers accordingly to the way you put your pins in the arduino board, and you are done!