Article [13] ST1300 - Gear Position Indicator (Do It Yourself)

OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
Re: My home-built DIY gear position indicator - includes plans

I'm showing my age describing code written in 8 bits in this 64 and 128 bit world of today. :bow1:
The PIC16F88, used for this project, is a modern "8 bit" processor. Well, ok the instructions are 14 bits wide.... but the data and address operations are 8 bits. Nothing wrong with 8 bits. Still lots of good applications for it out there :D


PS: I first started programming in the early 1980's. Back then we had teletypes, paper tape and core memory on 8 bit computers. IE: 6800, 6802, 6809 etc series. A video monitor wasn't even around yet.
Me too. And I still have some of that old paper tape, a few punch cards, and even an old core memory array (now called a paper weight).
 
Last edited:
Joined
Feb 25, 2008
Messages
16
Location
San Diego
Re: My home-built DIY gear position indicator - includes plans

Hey,
Thanks for the great info and program. I successfully got one built and installed. Works great. I thought I would share what I had learned along the way. This was my first project with a PIC and it was very informative.

1. You can get the PIC for free. Go to http://sample.microchip.com/Default.aspx?testCookies=true to request samples. You can get up to three 16f88s. Microchip will ship them to you for free.
2. I didn't have a programmer, so I built on for less than $5 with parts from Radio Shack. I built the simple JDM version found here. The page has info for helping you testing the programmer to make sure it works right before plugging in your chip. It took me about 30 minutes to build the programmer on a breadboard. (There are lots of schematics for PIC programmers on the internet. Not all of them will work with the 16f88.)
3. I used IC-PROG which can be found here to control the programmer. The site with JDM programmer gives instructions for setting up the software.
4. You have to compile the source code which jdfruth provided. Download all parts of the source code and combine into one file. Give the new file a *.asm extension. Download MPLAB IDE from microchip which can be found here. Install the software and find the file MPAsmWin.exe (do a search in your install directory.) This program will compile your *.asm file into a *.hex file.
5. Use IC-PROG to burn hex file into PIC
6. Follow directions supplied by jdfruth to build you circuit and enjoy.

Note: the VSS signal is much easy to access behind the front display than at the connector for the sensor. The signal is on the Pink/Green wire in the black 16 pin connector to the front display.

I'm also building one of these for my VFR. Will post results when I'm done.
 

Hashimoto

I Hate Snow
Joined
Jul 25, 2006
Messages
81
Location
Maine
Bike
2006 ST-1300
STOC #
6569
Re: My home-built DIY gear position indicator - includes plans

Thanks for the links ScoutDriver. I've got a GPI almost completed. Still have to attach the photo resistor, display and learn mode switch. I intend to mount the display and light sensor in the idiot light cluster, but I still need to decide where to mount the learn switch so it can be accessed.
Where did you install yours?
 

John Anthony

Moderator
Joined
Dec 3, 2004
Messages
2,137
Location
Seattle
Bike
'03 ST1300A
STOC #
5107
Re: My home-built DIY gear position indicator - includes plans

Thanks for the progress reports, guys. Pls. be sure to post pix. of your completed projects.

John
 
Joined
Feb 25, 2008
Messages
16
Location
San Diego
Re: My home-built DIY gear position indicator - includes plans

I still need to decide where to mount the learn switch so it can be accessed.
Where did you install yours?
I mounted the LED in the light cluster, so I put the learn switch on the board with the PIC. I completed the learning process while everything was still apart. Didn't figure I needed the switch after I completed the learning process.

I'll post pictures when I get everything back together (still working on other stuff)

Joe
 

Marshal_Mercer

Bumbleberry + Crumble = Yum!
Joined
Dec 8, 2004
Messages
599
Location
Alameda, CA
Bike
Has new home
STOC #
6214
Re: My home-built DIY gear position indicator - includes plans

<snip>
Edit: 2/8/2008 -
I've stocked up on all the components required to build the GPI. I can source individual parts and/or a complete kit. PM, or email, me with your needs.
I just read your updated text, finding that you have made the kind offer above. With help, I hope to build one or two of your GPIs in the next few weeks. How can I get from you two complete kits --or two ready-to-go GPIs?

Thanks,

Marshal Mercer
 
OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
Re: My home-built DIY gear position indicator - includes plans

I just read your updated text, finding that you have made the kind offer above. With help, I hope to build one or two of your GPIs in the next few weeks. How can I get from you two complete kits --or two ready-to-go GPIs?

Thanks,

Marshal Mercer
Replied to your PM.
 
OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
Re: My home-built DIY gear position indicator - includes plans

Note: the VSS signal is much easy to access behind the front display than at the connector for the sensor. The signal is on the Pink/Green wire in the black 16 pin connector to the front display.
For me, it was easier to do all the connections back by the fuse box, since that's where my SpeedoHealer is mounted anyway. But, your right, there's nothing short of a dozen other options.

I'm also building one of these for my VFR. Will post results when I'm done.
OUTSTANDING... I can't wait to see how it turns out. Provided the VFR has IPG and VSS sensors that emit similar signals, it should work just fine. I'm anxious to see how it turns out.
 
OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
Re: My home-built DIY gear position indicator - includes plans

2. I didn't have a programmer, so I built on for less than $5 with parts from Radio Shack. I built the simple JDM version found here. The page has info for helping you testing the programmer to make sure it works right before plugging in your chip. It took me about 30 minutes to build the programmer on a breadboard. (There are lots of schematics for PIC programmers on the internet. Not all of them will work with the 16f88.)

That's exactly what I did to get started too. It was a great way to learn, on the cheap.

However, just a word for the un-initiated... if you use a JDM-style serial programmer, make sure your PC has an honest-to-goodness/legacy serial port. Most modern PC's and laptops DO NOT have serial ports these days. And those that do, often don't have the drive (i.e. high enough differential voltages) to be used with a JDM-style programmer. And those USB-to-serial converters... forget about it... they don't work either. Just my 2 cents.

Thus, I quickly graduated to the $35 PICKit 2 from MicroChip. So I can use my modern laptop (which only has USB).

3. I used IC-PROG which can be found here to control the programmer. The site with JDM programmer gives instructions for setting up the software.
I helped debug IC-PROG V 1.06a, to get it to work with the 16F88 ;)
 
Last edited:
Joined
Feb 25, 2008
Messages
16
Location
San Diego
Re: My home-built DIY gear position indicator - includes plans

I finally got my bike back together. Here are the pictures as promised.

The LED display is a still a kingbright, but is .56" instead of .8". The part number is SA56-11SRWA.

I mounted the photo resistor to the right of the display which works great (the LED is actually dimmed in the picture). The LED was easy to read even in direct sunlight.

The "learn switch" is mounted in the project box. I ran two more wires for an external button which are coiled in the fairing so I can add a button later on if I want to.

One note: the LED could have been moved down a little farther without obstructing the ST1300 logo. If I did it again, I would move it down as far as possible. The top edge of the LED is distorted by the top of the instrument cluster cover (which is curved). I can still clearly see indicated number, but the distortion will be worse (farther down, more of the display distorted/obstructed for taller riders (I'm 5'7"). I didn't realize this would be potential problem until I looked at the display from the bike.

The VFR is next. I'll keep you posted on my progress.
 

Attachments

OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
Re: My home-built DIY gear position indicator - includes plans

I finally got my bike back together. Here are the pictures as promised.

The LED display is a still a kingbright, but is .56" instead of .8". The part number is SA56-11SRWA.

I mounted the photo resistor to the right of the display which works great (the LED is actually dimmed in the picture). The LED was easy to read even in direct sunlight.

The "learn switch" is mounted in the project box. I ran two more wires for an external button which are coiled in the fairing so I can add a button later on if I want to.

One note: the LED could have been moved down a little farther without obstructing the ST1300 logo. If I did it again, I would move it down as far as possible. The top edge of the LED is distorted by the top of the instrument cluster cover (which is curved). I can still clearly see indicated number, but the distortion will be worse (farther down, more of the display distorted/obstructed for taller riders (I'm 5'7"). I didn't realize this would be potential problem until I looked at the display from the bike.

The VFR is next. I'll keep you posted on my progress.
That looks soooooo nice. Looks factory. :cool:

I thought about doing this when I was in the initial design stages. But, one of my primary design points was that it had to be portable. Not that I plan to sell the ST anytime soon (I can't even imagine it right now)... but I want to take it with me when I move to the next bike, if it ever does happen. And I want to be able to return the bike to it's unmolested factory condition, so as to not impact the potential sale to a new owner.

I don't know, tho... I just might have to look into doing this. It sure looks nice :D
And who knows, by the time I do find something else, it may already have a factory GPI.

Thanks for the pics scout. :yr1:
 
Joined
Feb 25, 2008
Messages
16
Location
San Diego
Re: My home-built DIY gear position indicator - includes plans

I want to be able to return the bike to it's unmolested factory condition, so as to not impact the potential sale to a new owner.
I ordered an extra lens (actually two, in case I messed-up while installing) so that I could remove the GPI and return to factory if wanted/needed. The white plastic mount that LEd is in would still have a hole it it, but the lens would cover everything. The lenses were $4 ea shipped.
 

John Anthony

Moderator
Joined
Dec 3, 2004
Messages
2,137
Location
Seattle
Bike
'03 ST1300A
STOC #
5107
Re: My home-built DIY gear position indicator - includes plans

Looks pretty sweet! Phil D. (Curmudgeon) is considering the same mounting option. How much time did it take you to mount the display? Any particularly tricky issues to deal with??

Thanks.

John
 

Hashimoto

I Hate Snow
Joined
Jul 25, 2006
Messages
81
Location
Maine
Bike
2006 ST-1300
STOC #
6569
Re: My home-built DIY gear position indicator - includes plans

Looks great Scoutdriver.
I snowshoed out to the back shed where I store the bike and retrieved my dash a couple of days ago. On my next day off I'll commence the surgery to install the LED. I'm afraid it'll be a few weeks before there is enough snow melt to do the rest of the install/teaching.
Where did you mount the box?
 

JZH

International Bodger
Joined
Feb 26, 2006
Messages
426
Location
London, UK/So.Cal.,USA
Re: My home-built DIY gear position indicator - includes plans

I ordered an extra lens (actually two, in case I messed-up while installing) so that I could remove the GPI and return to factory if wanted/needed. The white plastic mount that LEd is in would still have a hole it it, but the lens would cover everything. The lenses were $4 ea shipped.
Not sure which part you're actually referring to, but in case anyone is interested in doing the same when installing the GPI, I replaced the "ST1300" logo on my US-spec Pan with the "Pan European" logo from the ROW-spec bikes (Source: David Silver Spares), and ISTR it wasn't an expensive part. Just have to make sure you get the one w/ or w/o the "ABS" indicator, depending on your bike's spec.

Ciao,
 
Joined
Mar 16, 2008
Messages
308
Location
Brakpan, South Africa
Bike
2004 ST1300ABS
STOC #
7481
Re: My home-built DIY gear position indicator - includes plans

And the mighty H couldn't put one on the ST1300???
Well done there pdf. Maybe when I get my bike going again, and I have some free time, I might just try and build one myself. Thanks
 
Joined
Feb 25, 2008
Messages
16
Location
San Diego
Re: My home-built DIY gear position indicator - includes plans

Looks pretty sweet! Phil D. (Curmudgeon) is considering the same mounting option. How much time did it take you to mount the display? Any particularly tricky issues to deal with??

Thanks.

John
It took maybe a little over an hour to take it all apart and put back together. Nothing hard, just a little tedious to make all the visible cuts precise. I didn't take any pictures while it was apart, so I used one that was posted previously to illustrate what I did.
  1. Cut the hole for the LED in the white plastic piece first. It could have been moved down a little from where I mounted it, which would give better visibility while riding.
  2. Put the lens cover on the white plastic piece to mark the lens.
  3. Cut the lens slightly smaller than your mark to hide the edge of the LED.
  4. Mount the LED in the white plastic. I used epoxy to hold it in place.
  5. Drill a hole slightly smaller than your photo-resistor through the lens and plastic piece. Then re-drill the white plastic piece to fit the photo-resistor. Use epoxy to hold everything together.
  6. Drill a hole in the vent directly behind the circuit board to route wires outside of the display box.
Where did you mount the box?
The project box is in the fairing on the right hand side. doesn't really matter, where ever is convenient and has room.
 

Attachments

John Anthony

Moderator
Joined
Dec 3, 2004
Messages
2,137
Location
Seattle
Bike
'03 ST1300A
STOC #
5107
Re: My home-built DIY gear position indicator - includes plans

Hot damn! Very, very nice. Thanks for sharing.

John
 
Joined
Feb 25, 2008
Messages
16
Location
San Diego
Re: My home-built DIY gear position indicator - includes plans

I got a GPI installed (sorta, more like working) on my VFR. I haven't mounted anything permanently because I'm still trying to decide where to put the LED.

The hardware is the same as for the ST. The clutch and neutral signals can be found at the clutch diode, just like the ST (the wire colors are even the same). The diode is in the fuse panel just in front of the battery. The IPG and VSS signals can be found on the Grey plug for the ICM, which is on the back of the bike. All you need to take off to access these points is the seat. :)
The IPG is the yellow wire and the VSS is "one" of the two pink wires. See pictures for more info.

The program for the PIC had to be modified slightly to get it to work with the VFR. The VSS signal is a much lower frequency than on the ST. Below is the single change to the code. Find the code block in the original and replace with below.

[fieldset="code:"]; This routine tallies up counter shaft rotation cycles emitted by the VSS.
; Each time this ISR is driven, the counter shaft will have rotated a fraction of a full revolution.
; Note: On the Honda RC51, there are 27 pulses per counter shaft revolution.
; Here we effectively divide the VSS frequency by 128.
; We use a RAM variable (VSSINT) as a boolean indicator of these rotations.
; Every 64 cycles from the VSS will result in the VSSINT variable switching from 0x00 to 0xFF
; or vise versa. The state of the VSSINT variable is monitored in the main loop routine below.
incf VSSINTS,F ; Increment the VSSINTS ram variable

;*********************************************************************************************
; Changed freq divider from 128 (6) to 16 (3) due to the decreased number
; of pulses on the VFR - Edited 03/22/08 by Joe Wagnell
btfss VSSINTS,3 ; Have we tallied up 8 (0x08, B'00001000') of em yet?
;**********************************************************************************************
goto IntSvcExit ; No
clrf VSSINTS ; Yes, so restart the counter
comf VSSINT,F ; And toggle the VSSINT flag[/fieldset]
 

Attachments

Top Bottom