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

Joined
Oct 18, 2012
Messages
69
Age
75
Location
Lake Havasu City, AZ
Bike
2003 ST1300
STOC #
8677
I went this route after he emailed me a picture of the 5mm unit. The standard is 10mm (that has the electronics right behind the LED, making it need a hole about 30mm deep) and would be too big for me. The 5mm version has the electronics far enough away that the 8mm hole for the 5mm LED could be anywhere.

I so love tearing the dash clear apart...so I'll put it into the instrument light cluster. Same price, which is a total of $21.99 USD according to today's Paypal conversion rate. Here is the picture he sent:
 

Attachments

Joined
May 24, 2013
Messages
4
Location
Germany
I build up one unit and try to use it on my SC57 but without success. I repeat several times the learn mode with the same result: Neutral, Clutch, Gear 1 and Gear 6 is working properly but Gear 2 is recognized as 3, all other Gear 3,5,6 are shown as 6.Sometimes Gear 4 is wiping from 4 to 6. Have someone already installed the gear Position indicator on a SC57 ? Or someone have some hints ?
 
Joined
May 24, 2013
Messages
4
Location
Germany
After read out the eeprom data I found really less values. Gear 3 to 6 had the same value 0x04. I change the VSSINTS value to "btfss VSSINTS,7". Now I have better and higher values, gear 1 and 2 are recognized properly. Gear 3 is wiping to 4. Gear 4 to 6 are all recognized as 6. The eeprom Content for gear 3 is 0x19, gear 4 is 0x16 gear 5 is 0x14 gear 6 is 0x13. It seems that the values are to close. I appreciate any suggestions.
 
Last edited:
Joined
May 24, 2013
Messages
4
Location
Germany
Hi Pat,

I simply change the VSSINTS routine
btfss VSSINTS,7 ; Have we tallied up 128 (0x80, B'10000000') of em yet?

and in the learn routine
addlw 0x01 ; Add some padding

It's working on my CBR without problems.

I'm working now on a Gear Indicator that can be connected directly on the DLC connector like GIPro with some extra
features like a lap time counter.
 
Joined
Jun 23, 2013
Messages
11
Location
Netherlands
Hi there everyone,

I got very excited when I read this article. As I own a ST1100 I decided to try and get this working. The first thing that was a major obstacle is that the ST1100 does not have a digital speedo signal, so I had to figure out how to get one. I have read this article almost from beginning to end hoping that there was someone else who already had a solution to my problem. One posting got me going. Since I have ABS on my ST1100 I had to figure out how the speed information is being captured and then send to the ECU. This turned to out be quite simpel, the pulse is generated by a HAL sensor which reads the notches of the ABS disc which is mounted on the front and back wheel.
I counted the notches and came to 120 notches. So 120 pulses per wheel revolution is more the 27 pulses per couter shaft revolution.

With a HEF4018 I devide the pulse signal from the ABS sensor by 4, and in the end I am left with 30 pulses per wheel revolution (pretty close). From now things can all remain the same as the original design.

I tested things by putting all components on a breadboard, and SUCCESS..... the learning went pretty easy, and after this It showed all the correct gears. Now I'm going to try to putt it all together on a double sided pcb (which we be a challenge as i only made single sided pcb's until now)

regards,

Marco
 

Reg_Siemens

Reg S
Joined
Dec 13, 2004
Messages
109
Age
63
Location
Winnipeg MB Canada
Bike
Yamaha Tracer 900GT
STOC #
3325
I've been followed this thread for some time and since I also have an ABS ST1100 I would be very interested in seeing more details/pics about your ABS signal splitting, etc. Also where you sourced your PCB components etc. Pics of double-sided PCB, etc.
 
OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
With a HEF4018 I divide the pulse signal from the ABS sensor by 4, and in the end I am left with 30 pulses per wheel revolution (pretty close). From now things can all remain the same as the original design.
No need to add to the parts count. You can achieve the same thing in software, by making a simple change to the interrupt service routine.
Change this;
incf VSSINTS,F ; Increment the VSSINTS ram variable
btfss VSSINTS,6 ; Have we tallied up 64 (0x40) of em yet?
goto IntSvcExit ; No
clrf VSSINTS ; Yes, so restart the counter
comf VSSINT,F ; And toggle the VSSINT flag

To this;
incf VSSINTS,F ; Increment the VSSINTS ram variable
btfss STATUS,Z ; Have we tallied up 256 of em yet?
goto IntSvcExit ; No
comf VSSINT,F ; Yes, so toggle the VSSINT flag
 
Last edited:
Joined
Jun 23, 2013
Messages
11
Location
Netherlands
Well on Friday i created the pcb. It is just a test, but at first everything appeared to be just fine. On my workbench it all started up, and i was presented with the blinking 5 and 6 for learning mode. Today I fitted the board on the bike and attached the VSS, IPG, and Neutral signals (the clutch signal just doesnt seem to be there on the ST1100).

I entered learning mode by selecting 5 for 5 gears, and walked thru all the gears. after learning mode I am now presented with the following problem.... If the bike is running idle in every gear the GPI displays the gears mostly correct. But if i pull the throttle (in every gear) the GPI displays a higher gear. if the revs go realy high it always displays gear 5. If yhe bike is idle in 1st gear the display does not show anything.

So, in short..... back to the drawing board

to be continued....
 
Joined
Jun 23, 2013
Messages
11
Location
Netherlands
new development already

After putting the bike all together again I took it for a test spin. and it actually worked pretty well, as for one thing..... it showed the gears on gear to high. If I was driving in 2nd gear the GPI showed 3rd, in 3rd gear it showed 4th and so one.

I tried to learn the GPI when the bike was running at 2000 rpm (using the choke). this seamed to work a little better, now the gears are showing correct except when I am driving in low revs (i.e when I am taking a corner) then the GPI shows the gears one to low (when I take a corner in 2nd gear it shown 1st, in 3rd it shows 2nd)

So I am a little closer at having a proper GPI :D. If al works well I am going to order a proper PCB and i will try to make the PCB a little smaller.

to be continued....
 
Joined
Jun 23, 2013
Messages
11
Location
Netherlands
Hi there,

It has been a while, after some busy weeks I had some time again to post some results.

I have got almost everything working now, except for the clutch, I am examining the electrical schematic for the ST1100 now and i am hoping to find a solution soon. I am still getting some strange results when driving at slow speeds, but I hope it has something to do with my (homemade PCB). I think I have some grounding isues and some interference problems (when I drive past a cellular antenna on the highway, the GPI jumps from 5 to 3 to 4. It's everyday at the same place on the highway and i can only discover the cellular antenna's over there. after about 200m this behaviour stops and everything returns to normal).

In the mean time I did ordered some professional pcb's from a company in the USA. They did a great job for a very small price. I attached some photo's from the results. I hope i can find the time tomorrow to replace the PCB, and do some further testing.

I took the advice from pdfruth and dropped the HEF4018. The reason I added this piece was i didn't want to stress the PIC to much with a lot of interrupts. But I guess it would be ok.
GPI-PCB.jpg
 

Attachments

OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
I have got almost everything working now, except for the clutch, I am examining the electrical schematic for the ST1100 now and i am hoping to find a solution soon.
The clutch interface is completely optional. I only incorporated it in order to display a "-" (dash) on the display when the clutch is not fully engaged (in other words, the rider has the clutch handle pulled in). In such situations, any gear indication would be inaccurate anyway.
If the ST11 doesn't have a readily available clutch switch signal available, then there's no reason you can't just leave pin 18 tied high. Just keep in mind that the displayed gear number is only reliable when the clutch is fully engaged.

In the mean time I did ordered some professional pcb's from a company in the USA. They did a great job for a very small price. I attached some photo's from the results. I hope i can find the time tomorrow to replace the PCB, and do some further testing.
That is nice looking work indeed. Who did you use, if I might ask?
I've used ExpressPCB.com in the past. Recently had some 4 layer boards done for another project, with stunning results.
It's amazing how incredibly well some of the prototype board houses do.
 
OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
No need to add to the parts count. You can achieve the same thing in software, by making a simple change to the interrupt service routine.
Change this;
incf VSSINTS,F ; Increment the VSSINTS ram variable
btfss VSSINTS,6 ; Have we tallied up 64 (0x40) of em yet?
goto IntSvcExit ; No
clrf VSSINTS ; Yes, so restart the counter
comf VSSINT,F ; And toggle the VSSINT flag

To this;
incf VSSINTS,F ; Increment the VSSINTS ram variable
btfss STATUS,Z ; Have we tallied up 256 of em yet?
goto IntSvcExit ; No
comf VSSINT,F ; Yes, so toggle the VSSINT flag
I got to thinking about this some more.
After doing some math last night, I think I'll have to revise this a bit.

Keeping in mind, the software's goal is to determine the number of cycles of the crank sensor, per given number of cycles of the rear wheel sensor (or ABS sensor in your case).
Looking at the ST1100 spec sheet, we have the following gear reductions/ratios
Primary reduction = 1.829
Final reduction = 2.833
1st gear = 2.266
2nd gear = 1.500
3rd gear = 1.142
4th gear = 0.916
5th gear = 0.758

So, in;
- 1st gear, there are (1.829 x 2.833 x 2.266) = 11.74 crank shaft revolutions per rear wheel revolution
- 2nd gear, there are (1.829 x 2.833 x 1.500) = 7.77 crank shaft revolutions per rear wheel revolution
- 3rd gear, there are (1.829 x 2.833 x 1.142) = 5.92 crank shaft revolutions per rear wheel revolution
- 4th gear, there are (1.829 x 2.833 x 0.916) = 4.75 crank shaft revolutions per rear wheel revolution
- 5th gear, there are (1.829 x 2.833 x 0.758) = 3.93 crank shaft revolutions per rear wheel revolution

Each crank shaft revolution produces 12 cycles of the crank shaft position sensor (aka. Ignition Pulse Sensor, aka IPG)
So, in;
- 1st gear, there are (11.74 x 12) = 140 IPG cycles per rear wheel revolution
- 2nd gear, there are (7.77 x 12) = 93 IPG cycles per rear wheel revolution
- 3rd gear, there are (5.92 x 12) = 71 IPG cycles per rear wheel revolution
- 4th gear, there are (4.75 x 12) = 57 IPG cycles per rear wheel revolution
- 5th gear, there are (3.93 x 12) = 47 IPG cycles per rear wheel revolution

Since the register that accumulates the number of IPG cycles is an 8 bit register, we don't want to 'wrap' the counter (ie. exceed 255).
I think you mentioned earlier that there are 120 cycles of the ABS sensor, per rear wheel revolution. Conveniently close enough to 128. Also, interesting is - that's the same as the ST1300.
So, it works out rather nicely... to set the interrupt service routine to divide the ABS sensor's frequency by one rear-wheel's-worth of rotation.

Thus, I would recommend making a simple one line modification to the interrupt service routine, in the source code attached to post # 3 at the beginning of this thread:

Change this;
incf VSSINTS,F ; Increment the VSSINTS ram variable
btfss VSSINTS,6 ; Have we tallied up 64 (0x40, B'01000000') of em yet?
goto IntSvcExit ; No
clrf VSSINTS ; Yes, so restart the counter
comf VSSINT,F ; And toggle the VSSINT flag
to this;
incf VSSINTS,F ; Increment the VSSINTS ram variable
btfss VSSINTS,7 ; Have we tallied up 128 (0x80, B'10000000') of em yet?
goto IntSvcExit ; No
clrf VSSINTS ; Yes, so restart the counter
comf VSSINT,F ; And toggle the VSSINT flag

Hopefully, that made sense.
 
Last edited:
Joined
Jun 23, 2013
Messages
11
Location
Netherlands
Hopefully, that made sense.
I'm trying to make some sense of it :eek::, but I do believe you if you say so.... I fitted the board today and like you said there is no need for the HEF4018. After 'teaching' the GPI i got the same results as I had with the HEF40118 installed.

Tomorrow I think i will remove the PIC and i will flash it with the changes you mentioned in the previous post. When i tested it today it was realy close, only in the fourth gear it was jumping between 4 and 5. I hope your changes will fix this.

I found the wire for the clutch signal so that problem is solved.

The PCB's i ordered at OSHpark.com. I think the quality is great and the prices are great, they charge $5 per square inch and you receive three boards. The total price for my order was $15.50 including shipping, for this price i received 3 boards. It's not fast but i am in no hurry :D

I will get back on the results i get when i change my firmware.
 
Joined
Apr 20, 2013
Messages
5
Location
Canada
Bike
2007 ST1300
I don't have clue what you just said, however, I'm glad you have the smarts to do something like this cuz this is what I want for my St1300A.
Larry
 

T_C

Joined
Mar 8, 2012
Messages
4,336
Location
St. Louis, MO
Bike
2005 St1300
STOC #
8568
The clutch interface is completely optional. I only incorporated it in order to display a "-" (dash) on the display when the clutch is not fully engaged (in other words, the rider has the clutch handle pulled in). In such situations, any gear indication would be inaccurate anyway.
This is the one time I want the gear indicator the most.... rolling along, coasting for a moment or two... then trying to remember what gear you are in and wether you need to downshift and how far before letting the clutch back out.

Who knows... maybe I'm just forgetful more then someone, who, what, huh?
 
OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
This is the one time I want the gear indicator the most.... rolling along, coasting for a moment or two... then trying to remember what gear you are in and wether you need to downshift and how far before letting the clutch back out.
Without some sort of supporting apparatus in, or on, the ST's gearbox... it's just not possible to know "for sure" what gear the bike is in while the clutch is disengaged... sorry :-(

Buy yourself one of those new VFR1200... problem solved :)
 
Last edited:

T_C

Joined
Mar 8, 2012
Messages
4,336
Location
St. Louis, MO
Bike
2005 St1300
STOC #
8568
Buy yourself one of those new VFR1200... problem solved
And I know someone right around the corner selling one... two problems solved. Or not.

Yeah, I understand it is not a easy (or even possible without some extensive trick machining). I have thought about using a sensor on the shifter shaft but then it can be easily tricked wrong if you start a shift and don't complete.

So I continue on like the rest of the world.
T
 
Top Bottom