Microcontroller speedo correction - Stromtrooper Forum : Suzuki V-Strom Motorcycle Forums
Techy World! GPS, Electronics, etc Electronics forum

Reply
 
LinkBack Thread Tools Display Modes
post #1 of 13 Old 05-03-2007, 07:34 AM Thread Starter
Stromthusiast!
 
msi1259's Avatar
 
Join Date: Jan 2007
Location: Cambridge, Ontario
Posts: 376
Microcontroller speedo correction

From numerous postings and corrected speedometer face plates, it appears most DL1000 speedos read about 8% high, with a linear tracking throughout the (normal) speed range. To correct the speedo, all that is needed is to length the pulse from the speedo sender on the front sprocket by this amount. Microchip PIC 12HV619 microcontrollers are (currently) $0.92 each. It simply reads the pulse from the sender, multplies the pulse length by 108% (actually multiplies by 138, then divides by 128 ), and outputs this pulse on another pin. The only other compnents are a resistor and capacitor to reduce the 12 volts to 5 volts for the PIC - total cost is <$2US. In testing with a GPS, the corrected speed (7.8%) was right on for a partially worn TrailWing rear tire.

DL1000K5

Last edited by msi1259; 03-22-2008 at 12:26 PM.
msi1259 is offline  
Sponsored Links
Advertisement
 
post #2 of 13 Old 05-03-2007, 07:36 AM Thread Starter
Stromthusiast!
 
msi1259's Avatar
 
Join Date: Jan 2007
Location: Cambridge, Ontario
Posts: 376
The source code for the 12HV619 is attached. A good programmer is the Microchip PicKit2 starter kit, it has tutorials and a demo board for learning PIC programming.

DL1000K5

Last edited by msi1259; 03-22-2008 at 12:26 PM.
msi1259 is offline  
post #3 of 13 Old 05-03-2007, 09:17 AM
$tromtrooper
 
WeThereYet's Avatar
 
Join Date: Feb 2006
Location: B.C.
Posts: 1,981
You KNOW there would be a market for these if you want to whip a bunch of them up! I'll take the first one. (If I built it, my bike would probably burn to the ground.)
WeThereYet is offline  
 
post #4 of 13 Old 05-03-2007, 10:08 AM
$tromtrooper
 
GrayStrom's Avatar
 
Join Date: Apr 2007
Location: round on both sides and "hi" in the middle
Posts: 704
Great idea! I'll probably do this with an AVR for my wee.

K7 DL650
"It is invariably saddening to look through new eyes at things upon which you have expended your own powers of adjustment."
-a former member of the "bigger bike is better" club?
GrayStrom is offline  
post #5 of 13 Old 05-03-2007, 10:21 AM
Stromthusiast!
 
Join Date: Oct 2006
Location: Cincinnati, OH
Posts: 42
But now isn't the odometer going to be off?
mojokim is offline  
post #6 of 13 Old 05-03-2007, 10:59 AM Thread Starter
Stromthusiast!
 
msi1259's Avatar
 
Join Date: Jan 2007
Location: Cambridge, Ontario
Posts: 376
Quote:
Originally Posted by GrayStrom View Post
Great idea! I'll probably do this with an AVR for my wee.
I haven't played with the AVR chips (yet), but what makes the PIC 12HV619 attractive for this purpose is the on-board voltage regulator and on-board 8Mhz oscillator. Because the DL1000 only has 4 lobes triggering the sensor, the frequency is low (<300 Hz at top speed) - most other bikes have up to 64 lobes (final gear on output shaft). Having to make a printed circuit board would greatly complicate things, and using "dead bug" build techniques with epoxy gives a pretty robust assembly. The source code can be modified to different % corrections (+-20%?) if the gearing is different.

I doubt anyone would buy these, most people want plug-n-play, and the connectors alone would be ~$50. Feel free to try...

Yes, the odometer will now read ~8% low.

DL1000K5

Last edited by msi1259; 05-03-2007 at 11:02 AM.
msi1259 is offline  
post #7 of 13 Old 05-03-2007, 11:08 AM
$tromtrooper
 
GrayStrom's Avatar
 
Join Date: Apr 2007
Location: round on both sides and "hi" in the middle
Posts: 704
Some of the AVR's have a built-in clock too. Also, I'm an IPC certified PCB designer, and I use PCAD software at work, so it would be VERY easy to make a batch of surface mount boards that would handle the task, and would be very small. Add some conformal coating in a tiny plastic enclosure, and some small connectors, and you're in business.
Also, using the onboard comparator and a potentiometer you could allow for speed adjustability.

K7 DL650
"It is invariably saddening to look through new eyes at things upon which you have expended your own powers of adjustment."
-a former member of the "bigger bike is better" club?
GrayStrom is offline  
post #8 of 13 Old 05-03-2007, 01:26 PM
Stromthusiast!
 
Join Date: Dec 2006
Location: Phoenix, AZ
Posts: 74
Quote:
Originally Posted by msi1259 View Post
Yes, the odometer will now read ~8% low.
Excellent work! It keeps amazing me that there are people out there who can actually write assy code.... That stuff is like "Klingon" to me.

About the odo. It obviously reads 8% lower now. But is it really so that the odo IS accurate in stock trim but speedo reads 8% high. And if you fix the speedo the odo is 8% low?

That would quite suprising. I.e. if you take a stock bike, ride it for one hour at indicated 60MPH, the odo would increment by 1h x 60mi/h x 0.92 = 55.2mi?

--
Mikko
FlyingFinn is offline  
post #9 of 13 Old 05-03-2007, 01:44 PM
Stromthusiast!
 
Join Date: Oct 2006
Location: Cincinnati, OH
Posts: 42
I haven't tested the odometer myself, but every thread I have ever seen regarding fixing the speedo error says the odometer is accurate in stock form but the speedo reads high. I think that was the impetus behind the guage face correction as it leaves the odometer reading alone.
mojokim is offline  
post #10 of 13 Old 05-03-2007, 06:42 PM Thread Starter
Stromthusiast!
 
msi1259's Avatar
 
Join Date: Jan 2007
Location: Cambridge, Ontario
Posts: 376
Quote:
Originally Posted by GrayStrom View Post
Some of the AVR's have a built-in clock too. Also, I'm an IPC certified PCB designer, and I use PCAD software at work, so it would be VERY easy to make a batch of surface mount boards that would handle the task, and would be very small. Add some conformal coating in a tiny plastic enclosure, and some small connectors, and you're in business.
Also, using the onboard comparator and a potentiometer you could allow for speed adjustability.
Neat, I've only done through hole boards - have to try SMD sometime. A couple of years ago, I made an adjustable corrector for my SV1000s - I used an A/D input on a 25 turn trim pot as user input to give 1% per turn (picture attached). After conformal coating, plastic case, potting compound and connectors were added, I could have almost bought a commercial product for less.

DL1000K5

Last edited by msi1259; 03-22-2008 at 12:26 PM.
msi1259 is offline  
Sponsored Links
Advertisement
 
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the Stromtrooper Forum : Suzuki V-Strom Motorcycle Forums forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome