Suzuki SV650 Riders Forum banner

Homemade Wireless Turn Signal Backpack

1 reading
12K views 91 replies 27 participants last post by  LSCYCLING  
#1 · (Edited)
################ Update ################
I finished this this project, here's the end results:

Here's a flickr set with various photos from this project. I'll add photos from the bike installment later.
http://www.flickr.com/photos/kodde/sets/72157628634527535/

################ Update ################



############ Original first post #############
So... I'm finally getting somewhere with my wireless turn signal backpack project.

After watching some homemade Arduino project on YouTube I came across Leah Buechley's video which showcased her biking turn signal jacket I got the idea of creating my own, but triggered automatically by my existing turn signals on my bike, thus I came up with the idea of my wireless turn signal backpack.

I just completed sewing on the LEDs on the backpack and I've prior to this constructed and tested the functionality of the reciever part. The wireless communication works. What's left to do is wrap up the packaging of the reciever part and construct the transmitter part which will be installed under the seat of my bike.

Here's a video showing some pre-programmed blinking, not transmitted wirelessly in this video.


Here's an older video showcasing the wireless functionality.

 
#39 ·
:thumbsup: You are fast.

If 5v through 10k to the 3.3v input is working, 12v through 20k will work as well.

12v from the barrel jack is a good source, just make sure you have ground connected between the Uno and the Mini! That is missing in the photo (sorry, just noticed it).
 
#40 ·
In case I forget to mention. Thanks for all your help and patience TeeRiver, really really helpful for a beginner like me.

So, my last few test have got me a bit further I think. With 12V I am able to get a steady current (1) when I connect input12 to one of the three solder spots of the barrel jack connector. When touching the solder spot two and three of the barrel jack connector I get a steady ground (0). When not touching any solder spots I get noise, switching between 0 and 1 constantly over and over.

Is this what is expected? Will I be getting noise when applying this to my bike later?

Now I need to adapt this to the Gladius and figure out how to connect it there as well. But... it's 01:50AM where I live, and I have laundry in the morning T_T

I'll keep you posted during tomorrow, see how it goes.

Thanks and goodnight.
 
#41 ·
...With 12V I am able to get a steady current (1) when I connect input12 to one of the three solder spots of the barrel jack connector. When touching the solder spot two and three of the barrel jack connector I get a steady ground (0). When not touching any solder spots I get noise, switching between 0 and 1 constantly over and over.

Is this what is expected?
Yes that is expected. 12v through resistor will register HIGH, 0v through resistor will register LOW, open circuit will pickup whatever noise happens to be floating around.


...Will I be getting noise when applying this to my bike later?
It depends on the turn signals. If the elements are incandescent bulbs, then the filaments will provide a strong path to ground and keep the input low even if the flasher is inactive. No noise from a floating input in that case. However, you will still have EMI noise from the ignition system. 0.1uF capacitor to ground will reduce that to acceptable level.

If the flasher elements are LEDs, you will need to add pull-down resistors, say, 10k ohms to keep the chip inputs low when the flashers are off.

It is clumsy to describe in words so this schematic may help. The part shown is not your exact chip or I/O, just illustrates the concept. hth.
Image
 
#42 ·
Wow. Thanks a lot.

I worked from your sketch and added the nRF24L01+ and the power source. Am I right to add the 6V voltage regulator after the power source? I figured I could use it to take the stress of the Arduino's regulator. Or is this the same as with the flashers, just a simple resistor? I am unsure when I need to use an voltage regulator and when just to use a resistor.

Also, do I just connect GND to the minus pole of the battery? I only need to tap into the flashers positive wire for probing right? Is there anything missing on my sketch?

Thanks!

Image
 
#45 ·
Looking good kodde!


Am I right to add the 6V voltage regulator after the power source?
The 7806 regulator is not necessary; the Uno's built in regulator is sufficient. You may want to add an in-line inductor between bike power and Arduino power to knock down ignition noise but probably not necessary for your application. Edit: where does the nRF24L01+ get power from?


...I am unsure when I need to use an voltage regulator and when just to use a resistor.
A voltage regulator provides a fixed voltage independent of load (current).

A resistor is not a regulator, it only drops voltage when current passes through it. The reason the resistor works for you flasher input is because the internal clamping diode is referenced to the chip 3.3v making it act like a zener diode. That probably sounds like gobbledygook but if you look up 'Zener Diode' you'll see a simple (two components) circuit that can be quickly built on your protoboard; playing around with that circuit might be fun and help clarify. If interested, checkout 'Voltage Divider' too.


...Also, do I just connect GND to the minus pole of the battery?
Yes, or tap into Black/White anywhere on the bike.


Is there anything missing on my sketch?
An inline fuse is advisable. Also, be sure to tap power from a switched source so the unit doesn't kill the battery. A copy of the Gladius schematic would be a big help. I don't have one and if you locate a copy please send one to me!
 
#43 ·
Well, great success!
I did some initial testing with the bike today, brought my laptop and powered the Arduino through the USB of the computer, hooked it up to the bike. Initially I couldn't get it right, think I was probing the wrong wire of the two leading to the light. Then when I switched and probed from the other wire it worked like a charm.

Here's a crummy video showing the results.

Next is actually powering the Arduino from the bike's power and see if everything still works. I usually take one step at at time. Shouldn't be any biggie I suppose. Should I use a voltage regulator between the bike and the Arduino as in my sketch above?

Now I have to go help a friend of mine with TurboCAD, a program I've never used T_T. I'll keep you guys posted.
 
#46 ·
Thanks :)

Looking good kodde!
Thanks!

The 7806 regulator is not necessary; the Uno's built in regulator is sufficient. You may want to add an in-line inductor between bike power and Arduino power to knock down ignition noise but probably not necessary for your application. Edit: where does the nRF24L01+ get power from?
Are you sure? The Arduino Mini Pro 3.3V is rated for a maximum of 12V input, doesn't the battery at times have a higher voltage than 12V?
Hardware reference on the Arduino Mini Pro 3.3V

If I should add an in-line inductor, what kind? what rate? Any of these?

The nRF24L01+ draws power on pin2 and ground is pin1.
Reference on the nRF24L01+ in conjunction with Arduino.
...and another useful link on the subject.


A voltage regulator provides a fixed voltage independent of load (current).

A resistor is not a regulator, it only drops voltage when current passes through it. The reason the resistor works for you flasher input is because the internal clamping diode is referenced to the chip 3.3v making it act like a zener diode. That probably sounds like gobbledygook but if you look up 'Zener Diode' you'll see a simple (two components) circuit that can be quickly built on your protoboard; playing around with that circuit might be fun and help clarify. If interested, checkout 'Voltage Divider' too.
Oh I see. I'll read up on the difference. Thanks.


Yes, or tap into Black/White anywhere on the bike.
Thanks.


An inline fuse is advisable. Also, be sure to tap power from a switched source so the unit doesn't kill the battery. A copy of the Gladius schematic would be a big help. I don't have one and if you locate a copy please send one to me!
I actually already have a distribution block hooked up, relay + fuse. So that should cover both the fuse part and the switch right? The relay taps in on the license plate light.
The distribution block guide I followed
The Gladius service manual in PDF format. - Alternative link
 
#47 ·
Regarding the input Voltage,

In the Hardware section for the Arduinos when looking at the Uno board it lists both a recommended input voltage and the limits for input voltage. Apparently recommended range is 7-12V and limits are 6-20V. Could this be similar with the Mini board, but they didn't list it in a similar fashion?
Reference on the Uno

Either way I have both a 6V and a 8V voltage regulator lying around, I could use the 8V. That way I would stay within the recommended range for the Uno. If the Mini is similar to the Uno when it comes to input Voltage that would put me within the recommended range right?
 
#48 ·
Regarding the input Voltage,

In the Hardware section for the Arduinos when looking at the Uno board it lists both a recommended input voltage and the limits for input voltage. Apparently recommended range is 7-12V and limits are 6-20V. Could this be similar with the Mini board, but they didn't list it in a similar fashion?
Reference on the Uno
The 12v max spec on the Mini-Pro Summary page is generic, not necessarily what your board can handle. Here is the reference schematic from the same page:
Image


Note the exact part number for the 78xx (U2) is not called out, nor is the max voltage for the input filter capacitor C19 (more likely the limiting factor).

Can you read the part number of the regulator on your board? That will tell the true limit for that part (probably 35vdc). The max voltage for the input filter cap C19 will not be marked on the part. To be sure, it would need to be replaced with a known 50v (or more) cap, or add the regulator up front as you plan.

If you do add the regulator, be sure the filter cap is rated 50v or more. The bike voltage is only 14.5v max, but there are narrow voltage spikes (up to 20v) due to ignition noise coupling. The cap should be rated 2x that (at least), 50v is a common cap value.

kodde, for being new to this you are quite thorough and pick things up fast. Excellent work!
 
#52 ·
Alright. I'll go with the external regulator. No way am I going to re solder some part on the arduino Mini... I have one of them low price fairly big tip solder irons.

Regarding the inductor, I measure between the Raw-input-pin of the Arduino and the power source to see what current it draws right?

My avatar is Walter White from Breaking Bad, one of my all time favorite shows and a cool guy to look up to ^^
You are right though. I've never in my life slept this little during Christmas holidays, all thanks to this project. I'm loving it though, totally worth it.
 
#54 ·
...The inductor would be between the bike's battery and the voltage regulator? Or between the regulator and the Raw-pin on the Arduino? This is the same place I measure at?
Measure between bike voltage and your add-on regulator. Install the inductor at the same place, directly at the front end.

Honestly, adding the regulator and inductor is conservative design considering this is a hobby project.

You could test the system without either and if it functions without glitch, it will likely work for a long time. Worst case, C19 would fail after a time, but could be replaced. It's not bad though to play it safe. Most important is you're having fun! :)
 
#55 ·
Alright, will do.

To me, predicting possible errors down the line is part of the challenge. Since I already own the regulator and the inductor costs next to nothing, I find it more satisfying to implement this safety measure.

I've been tinkering and welding for a couple of hours now and I have the finished installment minus the regulator and inductor. I've tested the functionality here at home so far and it works as it should, both the RF unit and the current sensing on two different pins (left/right flasher). I'm quite happy that I managed to get it down to around 50x50x25 millimeters, including some margin for drilling installment holes.

It's late here in Sweden and I have to catch some shut eye. Tomorrow I will get the last parts and a nice plastic housing to hold the unit and test it on the bike. If that turns out well the only step left is to write the final code that will run on the sender(bike) and the code for the receiver(backpack).

Goodnight and thanks a bunch for the help.
 
#58 ·
Thanks guys.

I'm heading out to get the extra few parts(inductor and plastic housing) soon. I'll keep you posted during the day. I'll get you some pics or videos of the installation of the motorcycle part as it should be finished later today.
 
#60 ·
Here's a quick update. The casing is 60x65x25mm. Just need to a drill a hole for the wires now. Then I'll head off to the garage to do some more testing.

Image
That is beautiful kodde!

A couple quick observations:
- Where are the 0.1uF noise caps for the flasher inputs, behind the edge connectors?

- Vibration is a big factor for motorcycle mounted electronics. The regulator, wireless card, even the interconnect wires may break if not securely mounted. Tightly mounted to the board helps with a dab of epoxy on big components if there is any possibility of movement. The wireless card will probably need a support.

Overall, great concept, design, layout, package! :rock:
 
#61 ·
Thanks TeeRiver!

The 0.1uF is right next to the 2x10kOhm resistors, between where the Arduino sits. I know it's messy to just look at from a picture, but they should be wired correctly. I really tried to optimize space-wise.

Just realized that I missed the 2 x 10uF caps and 0.1uF cap that should go with the regulator to filter noise. Think those will be necessary? T_T
I should probably fix this as I will be annoyed about it even if I could do without them. Crap!

Hmm... good point regarding the vibration. Epoxy? As in the 2 component glue? Now to figure out a supporting feature for the RF-module.

I decide not to go to the garage yet and instead tackle writing the software. It's my one of my first real Arduino coding projects, mostly been running the examples so far. Also, first time writing with the nRF24L01+ libraries. It was surprisingly easy. Think I got the core functionality working. Time will tell if I need to fix any bugs or optimize. It works as it should here at home. Soon I'm off to the garage!

 
#62 ·
Nice video!

...The 0.1uF is right next to the 2x10kOhm resistors, between where the Arduino sits.
OK, I thought those were the regulator caps (though far away). :) The high frequency noise filter caps (the 0.1uF) should be ceramic, not electrolytic as in the photo. Electrolytics are too slow. What value are they? Electorlytics usually aren't small. If high capacitance is on the flasher input, they will take time to discharge and can affect the flasher ON/OFF time. Looks OK in the video though...


... Just realized that I missed the 2 x 10uF caps and 0.1uF cap that should go with the regulator to filter noise. Think those will be necessary? T_T
I should probably fix this as I will be annoyed about it even if I could do without them. Crap!
Only the 10uF at the add-on regulator input is necessary, the 10uF and 0.1uF on the output can be eliminated since the input cap on the Mini's regulator will serve, and 0.1uF cap on the Mini's output will filter high frequency noise before it reaches the controller.


...Hmm... good point regarding the vibration. Epoxy? As in the 2 component glue? Now to figure out a supporting feature for the RF-module
Yes, 5 minute 2 part epoxy or any good gap filling glue will work. It's amazing how fast connections can break when subject to just the right vibration.

I've had resistor leads break in a matter of weeks when not mounted firmly to the PC board. Engine vibration spans a wide range of frequencies and can induce resonant flexing in any part not held securely. Repetitive stress can snap leads just like multiple bends on a spoon.

It's good practice the check all components (like the resistors and inductor) to be sure they are as tight to the board as possible too. If they stick up at all they can act like little weights wiggling on a pole. If any components are sticking up, just reheat the joint and press the component down with your finger, you'll feel it 'click' down when the solder liquifies.

When building circuits for tame environments none of this is necessary, but on the bike it's a must.
 
#63 ·
Nice video!


OK, I thought those were the regulator caps (though far away). :) The high frequency noise filter caps (the 0.1uF) should be ceramic, not electrolytic as in the photo. Electrolytics are too slow. What value are they? Electorlytics usually aren't small. If high capacitance is on the flasher input, they will take time to discharge and can affect the flasher ON/OFF time. Looks OK in the video though...
Thanks

They are 0.1uF as you suggested in your earlier sketch. Didn't know they had to be ceramic. If a small delay is the only issue then I will not change it.


Only the 10uF at the add-on regulator input is necessary, the 10uF and 0.1uF on the output can be eliminated since the input cap on the Mini's regulator will serve, and 0.1uF cap on the Mini's output will filter high frequency noise before it reaches the controller.
I already re-soldered and added both 10uF on input and 10uF + 0.1uF on output. Oh well. :)


Yes, 5 minute 2 part epoxy or any good gap filling glue will work. It's amazing how fast connections can break when subject to just the right vibration.

I've had resistor leads break in a matter of weeks when not mounted firmly to the PC board. Engine vibration spans a wide range of frequencies and can induce resonant flexing in any part not held securely. Repetitive stress can snap leads just like multiple bends on a spoon.

It's good practice the check all components (like the resistors and inductor) to be sure they are as tight to the board as possible too. If they stick up at all they can act like little weights wiggling on a pole. If any components are sticking up, just reheat the joint and press the component down with your finger, you'll feel it 'click' down when the solder liquifies.

When building circuits for tame environments none of this is necessary, but on the bike it's a must.
Ok. I'll try to cover this. Won't glue until everything is working as it should though. Most components are already firmly pressed or at least very close to the protoboard.

Right now I'm just trying to work out a kink in the programming.
 
#64 ·
Solved the mentioned kink.

I wanted a "buffer" time for how long communication contact could be lost before the LEDs would go low. I.e. if for whatever reason (failure on the transmitter) the receiver would stop getting transmissions. If this buffer value is too small the lights tend to blink. If it's too big I could possibly get sluggish/sticky LEDs if I for some reason have poor communication signal. It's at 500ms now, seems to work fine.
 
#65 ·
I'm winning like Charlie Sheen!

Now to test ride it for a week or so to see that it still functions as it should without hiccups. After that I'll be going over the bike installment to fixate the parts better with glue and what not.

It will be fun to see other peoples reactions in traffic :)


 
#72 ·
Thanks guys,

Here's a video from earlier today.

I was out riding for around 3 hours or so today. Kind of hard to know if it's working or not since I cannot tell by myself when riding. Although the few times I stopped to park the bike I checked the functionality and not a single hiccup yet, so I am assuming it is working traffic as well.