Motorcycle Control Panel with Arduino + Bluetooth

This sounds like a good idea. Thanks, Ron. :slight_smile:

Ran Talbott
rural Arizona
Re: Motorcycle Control Panel with Arduino + Bluetooth
Reply #4 - Today at 05:34:26 Be sure you add a diode in series with a + supply (a 1N4000-whatever). And it would be a good idea to put a Zener to ground (anything in the 20-30V range will do) after the 100 Ohm resistor. That'll help get rid of any noise spikes (which can be both positive and negative) from the bike's supply. Bikes are probably not as bad as cars, because they don't have lots of motors and solenoids for things like wipers and power windows/locks, but it's still not a "clean" electrical environment like your benchtop supply is.

Posted by: bill2009
]Next Steps
I'm going to redo the hardware based on an RBBB circuit board from Modern Device Company with a section of vero-board or other prototype PCB beside it rather than above it to hold the dividers and debounce circuits. It should be easy to get this into a package that can go inside the tank console instead of being glued to the top.

Another bare bones ckt. to check out
http://store.fundamentallogic.com/ecom/index.php?main_page=index&cPath=2&zenid=1e5fa2768ad20847d6d308d30584a605
The Iduino. You will need to provide a seperate 5v (7805) regulator for this, though.(fora couple of bucks) However, it connects to your pc via USB for programmoing, as do other arduino devices. I use one of these to store data on a seperate EEPROM chip.

the*(Wulfden, Modern Device)* RBBB requires an off-board USB to TTL serial adapter ($15-20) or an RS232 to TTL adapter ($5) for programming. For my RBBB, I ended up buying both, since I couldn't get the RBBB to operate with the RS232 to TTL adapter. (it works ok with a USB adapter that I bought at: http://store.fundamentallogic.com/ecom/index.php?main_page=index&cPath=6 )

There aren't many bikers on this board, your project looks very interesting. :sunglasses:

Be sure you add a diode in series with a + supply (a 1N4000-whatever). And it would be a good idea to put a Zener to ground (anything in the 20-30V range will do) after the 100 Ohm resistor. That'll help get rid of any noise spikes (which can be both positive and negative) from the bike's supply. Bikes are probably not as bad as cars, because they don't have lots of motors and solenoids for things like wipers and power windows/locks, but it's still not a "clean" electrical environment like your benchtop supply is.

Thanks for the explanation. I have read that the supply can be spiky but no sign of problems so far and i wasn't sure where to put the zener or what voltage it should be. There is certainly the starter and its solenoid that could cause spikes. In theory I think I should have zeners on the tach and neutral light lines as well as the power supply. I'll look at the diode and zener for the ps in the next layout. I've also thought about cannibalizing a cheap cigarette lighter ipod charger and just getting that away from my circuit altogether. The RBBB power supply has a diode in it by the way, where would that come in?

I'm working on two versions now codenames Brawny and Pikachu. - Brawny will be the rbbb version with a multi-function display and robust power supply. - Pikachu will be a mini version with basically just the atmega and a minimum of other bits. Pikachu's display will be something like a single LED or a bicycle speedo or a panel voltmeter which I think would be kind of fun - 1 to 5 volts for the different gears, 0 for neutral. I thought if I kept the current draw down to something really low I could get away with some really simple power arrangement - maybe even a coin cell.

I'm not really sure what the RBBB diode is for (a safety feature, low dropout?).
For more information on it look at the following site:

http://www.wulfden.org/downloads/manuals/RBBBv1.6.revB.fh10.pdf

:sunglasses:

The diode in the RBBB is on the +5 supply. It provides the reverse-polarity protection if you don't use the on-board regulator, and plug in an external 5V, instead.

No damage "so far" doesn't mean "so good": I once connected a 12V LED array (one of those 1-inch "super jumbos" with 6 LEDs in series) into the lighter socket of my pickup, just to see how long it would last. It worked fine for about 3 weeks, then just quietly died, with no release of magic smoke or similar dramatic symptoms.

The AVR chip should already have protection diodes on all its digital inputs. If you're worried about spikes, you can probably get away with just putting a resistor in series with the input, so most of the energy will be dissipated there, instead of in the diodes (where there might be enough to blow one up, since they're tiny little things). You need the more elaborate protection on the power supply because it's supposed to let lots of energy through to run the system, so you can't just throw most of it away.

Ran

No damage "so far" doesn't mean "so good": I once connected a 12V LED array (one of those 1-inch "super jumbos" with 6 LEDs in series) into the lighter socket of my pickup, just to see how long it would last. It worked fine for about 3 weeks, then just quietly died, with no release of magic smoke or similar dramatic symptoms.

Ok, good example of what i don't want to have happen! Thanks again for the explanation.

Color me confused, but why not do a 2 stage regulation? The mobile vehicle power system is horrible, to put it mildly. I can't speak for bikes, but voltage swings from just under 12V (before start) to 15+ are common in cars. As well as all manner of hash, noise,etc. If you still want to use the arduino regulator, stick a L7809ABV (SMTMicro) between the car's supply, and the arduino. That will take 10.5-26V, and convert to regulated 9V - which you can then feed the arduino. Yes, it's a little lossy, but it provides a secondary level of protection. (This assumes you don't need 12V) the LM7812ACT would give you 12V, but it needs 14V in - a bit iffy when the engine is not running.

Actually, a drop down to about 8V during cranking is not only common, it's not even considered "a problem".

Well, except by the people who don't know about it, and assume they'll always get at least 12V or so coming into their projects :slight_smile:

If it's really important to keep your system running during crank, you need to either spring the extra money for a switching regulator, or use a linear and give it a good heat sink to handle the normal 14-15V of the alternator. For the products and projects I've done in the past, it usually hasn't mattered, so I've just let them reset themselves when the voltage droops, and start running when the engine does.

Ran

Great work.

Great work! I would be glad to help with anything you need. I was in a similar state a few years ago. Although I didn't use arduino, I do use an Atmel. For me the electronics was the easy part. The hard part is getting the form/mechanical stuff right. Cause no matter how great it works, it won't stay long on the bike if it doesn't look good.

Check out my speedo and tachometer.
www.speedwayinstruments.com

Keep up the work.

Justin

Don't overthink the power supply or re-invent. There are many LDO devices that are very small and contain all the protection you need. check out www.maxim-ic.com or www.ti.com. Many of these companies will send you free samples.

Look for something that will handle 40V-60V input and regulate the 5V output. Also make sure it has reverse voltage protection and overtemperature protection.

On your second picture with the bluetooth module attached, what module are you using? and how have you coded that? I am looking to use a bluetooth module I have lying around for one of my projects so I would be interested in any info you have.

Btw, great project.

Mowcius

Could you share the details on the reed switch? Curious what part you used and how you mounted.

Working on a similar project for my bike, and it could save me time, or give me inspiration.

Thanks!

that is so cool, I've just started designing on to fit my XT660X. Any circuit diagram or code would be really appreciated!

Made it into the Make Magazine blog again! Ok, I'm easily amused.
http://blog.makezine.com/archive/2009/06/motorcycle_control_panel_with_ardui.html?CMP=OTC-0D6B48984890

By the way, I was just about to cannibalize another RBBB and a radio shack protoboard to make my next frankenstein when I realized that the whole thing would fit on the RS board - power and all. I'm just doing a wholesale copy of the RBBB circuit (which I like very much) and I have room for my extra power and signal conditioning circuits. With the corners trimmed the board will fit nicely in the space meant for the MC's tachometer.

Don't overthink the power supply or re-invent. There are many LDO devices that are very small and contain all the protection you need. check out www.maxim-ic.com or www.ti.com. Many of these companies will send you free samples.

Look for something that will handle 40V-60V input and regulate the 5V output. Also make sure it has reverse voltage protection and overtemperature protection.

Good pointers, I'll go look at that. I got a 20v regulator but I was still going to put in the diodes and resistor just to spread the heat around. I'm not too nervous about shedding 1/2 watt in a resistor and another watt in the regulator but all this stuff IS right near my gas tank!

Great work! I would be glad to help with anything you need. I was in a similar state a few years ago. Although I didn't use arduino, I do use an Atmel. For me the electronics was the easy part. The hard part is getting the form/mechanical stuff right. Cause no matter how great it works, it won't stay long on the bike if it doesn't look good.

Check out my speedo and tachometer.
www.speedwayinstruments.com

Those are SO sweet. Are the cases all custom made? I hope you're selling a ton of them!

On your second picture with the bluetooth module attached, what module are you using? and how have you coded that? I am looking to use a bluetooth module I have lying around for one of my projects so I would be interested in any info you have.

Btw, great project.

Mowcius

The module is the bluesmirf silver from sparkfun. You don't need to code for it, you just hook it up to +V, ground, TX, RX and the arduino just does serial as normal. You need bluetooth in your PC of course but I have a cheap dongle for mine. It was a bit of a pain to set up the first time but now it just works.

Could you share the details on the reed switch? Curious what part you used and how you mounted.

Working on a similar project for my bike, and it could save me time, or give me inspiration.

Thanks!

The reed switch is just the sensor from a bicycle speedometer and it's mounted on the swing arm of the motorcycle with super glue. I've collected a bunch of these speedos over the years and this one just fit where I wanted it to go. There's a magnet superglued to a bolt that holds the drive sprocket on the rear wheel. The reed switches are not tricky at all. when there's a magnet near them they open. They have no trouble with the speed.

I have tried a hall effect sensor which is more sophisticated but it needs 3 leads instead of 2 (power, gnd, signal) and one of the leads is "hot". If the switch malfunctions it's just either on or off - the hall effect sensor could short something.

The other advantage of the bike speedo is that you can just hook up the speedo head to check your work and you get a free handlebar mount as a bonus.

that is so cool, I've just started designing on to fit my XT660X. Any circuit diagram or code would be really appreciated!

Thank you. I posted the basic code and circuit a while ago for the bicycle prototype. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236701872/0#0 I will post the circuit and code for this one in the next couple of days.