Pages: 1 [2] 3 4 ... 6   Go Down
Author Topic: Motorcycle Control Panel with Arduino + Bluetooth  (Read 24002 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great work.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://www.radioshack.com/product/index.jsp?productId=2102845
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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!
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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!
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Meet BoB - Brawny on a BoardI've been concentrating on the Brawny version of the Motorcycle Control panel – one with all the features.  I had been planning to build it based on a Really Bare Bones Board Arduino clone from Modern Device.   The RBBB's are great but I found I was cutting traces and drilling holes and I was still going to have to tack on an extra piece of perf board.  I discovered that the piece of radio shack proto-board that I was hacking up would hold the whole circuit very nicely.

The board, with minor trimming will fit in the 6 cm circular area where the tach fits and there's plenty of room for all the components and connectors.  I'm sure i could crunch it further but there's no need to push my luck or my assembly skills.

The LCD fits over top of the ATMEGA chip but there's lots of clearance.  I'm very pleased so far.


Addendum - Well ICK!
I've been spoiled by the high class plated-through proto-boards I've been working with.  The RS board is one side thin copper that will barely take solder after cleaning.  Live and learn!
« Last Edit: June 13, 2009, 04:32:43 pm by bill2009 » Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

0
Offline Offline
Full Member
***
Karma: 0
Posts: 103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im interested in the code - especially the RPM / Speed parts.

Ive built a similar thing but for a car, but I cant quite get the RPM working properly.
« Last Edit: June 14, 2009, 03:58:32 pm by Orac » Logged

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My prototype code - evil and crufty as it is, is too big to post here!  The most obscure thing about it is probably the interrupt handling.  Each of the wheel and the tach interrupt routines adds an entry into a log of times.  The main loop routine polls the log every 100 ms and runs the required logic.  I've posted the tach and wheel routines below because that's where the bulk of the logic is.  The reason for the two stage interrupt process is so I can put debugging into the logic without messing up interrupts.  I've also posted the actual tach interrupt routine.  the wheel routine is simpler because it posts every event where the tach bulks them up by 10.


Code:
void processwheel(unsigned long lmillis){ //input is time of interrupt from log
  unsigned long wheeltime; //time for previous revolution
  if (lastwheelint!=0){ //don't do calculations 1st time in
    wheeltime=lmillis-lastwheelint; //track the exact rotation time
    wheelrpm=60000/(float)wheeltime;
    //Serial.print(" wheeltime="); Serial.print(wheeltime); Serial.print(" wheel rpm="); Serial.print(wheelrpm);
    roadspeed=.123*wheelrpm; //condensed version of 2.05*60*wheelrpm/1000; where 205 is wheel circ. in metres
    //Serial.print(" road speed kph="); Serial.print(roadspeed);
    setgear(); //figure out what gear we're in
  }
  lastwheelint=lmillis;
}

Code:
void processtach(unsigned long lmillis){ // input is interrupt time in millis
  unsigned long tachtime; //elapsed time for 10 tach events
  if (lasttachint!=0) { //skip calculation on first time in
    tachtime=lmillis-lasttachint;  //time for last 10 events
    if (tachtime>0){ //just avoid divide by 0
      insttachrpm=60000/(float)tachtime*10;  //rpm based on time in ms for 10 tach pulses
      avgtachrpm=(avgtachrpm*2+insttachrpm)/3; //rolling average rpm
      //Serial.print(" tachtime="); Serial.print(tachtime); Serial.print(" inst tach rpm="); Serial.print(insttachrpm); Serial.print(" avg tach rpm="); Serial.print(avgtachrpm);
    }
  }
  lasttachint=lmillis;
}


Code:
void tachmonitor(){  //this is the actual interrupt routine
  static int tachcount;
  if (tachcount <9) { //bulking up tach interrupts by a factor of 10
    tachcount++;
  }
  else {  //every 10th tach pulse we spawn a log entry
    if (ilog<=maxlog){
      lflag[ilog]='T'; //pedal pass flag
      lmillis[ilog]=millis();
      ilog++;
    }
    else {
      logoflo=true; //we've overrun the log table
    }
    tachcount=0;
  }
}
« Last Edit: June 15, 2009, 09:43:32 am by bill2009 » Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

Pages: 1 [2] 3 4 ... 6   Go Up
Jump to: