Having an extra set of blinkers and an extra brake light.
When the motorcycle blinks, it sends a signal to the attached arduino, that on his turn sends the signal to the arduino in the backpack through the wireless Nrf24L01 modules. That arduino is programmed to turn on the LEDs that are sewed onto the backpack.
- This is not legal in every country. In mine it is not "allowed", but I haven't had any problems yet.
- Placing the arduino on the circuit of the bike may cause warranty problems. Go to your dealer for more information.
Step 1: Gathering the Materials
- 2 x Arduino nano
- 2 x Nrf24L01
- 3 x BD139 transistor
- 9 x 10k Ohm resistor
- 3 x12 Ohm resistor (Minimum 1W, I used 5W)
- 3 x 1200 Ohm resistor
- 20 Yellow LilyPad Micro LED's
- 10 Red LilyPad Micro LED's
- 1 x Conductive Thread Bobbin
- 1 x Backpack
- 1 or more USB battery packs
- 1 x Switch
- Glue gun
- Soldering Iron
- Dupont cable (F - F)
- 2 x small cases
- Tec 7 crystal clear glue
Last but not least:
- 1 x motorcycle
Step 2: Designing and Testing the Circuit
First we have to decide how many LEDs we want to use. I went with 10 LEDs for each circuit.
Max. current of a LED is 20mA, meaning: 10 x 20mA = 200mA
We can now decide which transistor we can use and what the values are going to be for the resistors.
BD139 transistor, you are the chosen one. It has a VCEO of 80. With this information we can start calculating the base resistor values.
See the first picture for the calculations. The 2000 Ohm is a max. value, which means you can use a lower resistor value.
Now that we have our values we can test it on MultiSim. Instead of a 2k resistor, we used a 1.2k one. We also switched the 13 Ohm into a 12 Ohm (E12 values). When it's looking good on MultiSim we can go further to the next step.
Step 3: Making the Circuit Overviews
At this moment we have an idea and some values. Time to make an overview.
Picture 1: Overview of the motorcycle circuit.
The voltage of the brakes and blinkers is between 12-14 Volt. An analog input of the arduino must be under 5V so with a simple voltage divider we can get these values under 5V.
Picture 2: Overview of the backpack circuit.
Time to implement the calculations from previous step into the full circuit.
Step 4: Testing!
Now that we have an overview, we can easily test the backpack circuit without the arduino's (as we haven't written the code yet). Follow the overviews en make sure everything is well connected and that the metal parts don't touch anything else. If not, make sure everything is connected correct, especially the BD139, as it's easy to mistake the pins with each other.
Check! Everything works. Onto the next step.
Step 5: Writing the Arduino Sketch
A guide on how to attach the Nrf24L01: https://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
The sketches used are a mix between:
- Blink without delay
- Example sketch from the guide for Nrf24L01.
With some adjuments to the sketches we got it to work for this project.
The sketches for receiver and transmittor are in the attachments. The RF24 library is also in the attachments.
Step 6: Sewing the LEDs
First of all find/make a design you like for your LEDs then take some chalk and draw the pattern you like on your backpack.
We can now start sewing with the conductive thread. The conductive thread has a high resistance so we want to use it as little as possible. Therefore we only use it to attach the LEDs to the backpack. On the inside we are going to use a stripped copper wire for less resistance (Don't strip the entire wire. Leave the end isolated as they will touch each other going to the arduino). Start sewing from the inside of your bag!!! See the pictures if you are not sure how to tighten the wire to the inside of the bag.
!!!When sewing on the LEDs make sure you attach all the + sides of the LED with the + copper wire on the inside of the bag. The signs and the color are on the downside of the LEDs!!!
After sewing all the LEDs on the backpack, test to see if they all work correctly. If they do, we can use the hot glue gun to attach and isolate it . Before gluing make sure the + and - wire are not touching each other.
Use your Tec7 crystal clear glue on your LEDs and the backpack to waterproof it a bit and to protect the LEDs. Don't glue the led itself but only the holes at both ends. If you put glue on the LED itself, it will lose brightness.
Step 7: Putting It All Together
Follow the scheme and solder everything together. Put the heat shrink in place before soldering the wire or components together. After soldering you can shrink the heat shrink and isolate it. Cut a USB cable in 2 and solder the red wire with the Vin and the black wire with the ground of the arduino. Connect all the cables with the right pins of the arduino and place it into a box or a dry place in your backpack.
If your battery pack turns itself off when no current is being drawn, you can place a 100 Ohm resistor with the Vin and ground of the arduino.
Step 8: The Motorcycle
The backpack is finished. Well done!
Now comes the last part. Attaching the second arduino to the signal and brake light.
There are several ways to do this. We cut a small part of the isolation away, soldered the wires coming from the arduino on the part were the wires of the motorcycle are naked and isolated it with tape.
Drill a hole in your case for the switch and attach 1 part to the Vin of the arduino and the other part to the + side of the battery of your motorcycle. Connect the ground of the arduino directly to the - of the battery.