0
Offline
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #15 on: June 11, 2009, 09:39:42 am » |
Great work.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #16 on: June 11, 2009, 09:40:28 am » |
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.comKeep up the work. Justin
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #17 on: June 11, 2009, 09:47:05 am » |
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
Faraday Member
Karma: 104
Posts: 5531
|
 |
« Reply #18 on: June 11, 2009, 01:22:17 pm » |
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
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #19 on: June 11, 2009, 06:55:40 pm » |
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
Newbie
Karma: 0
Posts: 1
Arduino rocks
|
 |
« Reply #20 on: June 11, 2009, 11:51:47 pm » |
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
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #22 on: June 12, 2009, 05:59:58 pm » |
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
|
|
|
|
|
ottawa, canada
Offline
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #23 on: June 12, 2009, 06:07:13 pm » |
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.comThose are SO sweet. Are the cases all custom made? I hope you're selling a ton of them!
|
|
|
|
|
Logged
|
|
|
|
|
ottawa, canada
Offline
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #24 on: June 12, 2009, 06:10:45 pm » |
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
|
|
|
|
|
ottawa, canada
Offline
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #25 on: June 12, 2009, 06:20:00 pm » |
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
|
|
|
|
|
ottawa, canada
Offline
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #26 on: June 12, 2009, 06:26:39 pm » |
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
|
|
|
|
|
ottawa, canada
Offline
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #27 on: June 13, 2009, 11:02:34 am » |
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
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 103
Arduino rocks
|
 |
« Reply #28 on: June 14, 2009, 03:57:45 pm » |
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
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #29 on: June 14, 2009, 04:14:25 pm » |
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. 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; }
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; }
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
|
|
|
|
|
|