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

Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
You guys are cracking me up.

To all non GPI believers, peace.

To the rest of you, there will be another modern alternative DIY version soon. I'm completing the schematic capture now and working on a circuit board layout to play with. It's something you can build by hand on a protoboard or use a pre made PCB as it suits you.

Once I have more collateral ready I'll post it here.

Joel
 
Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
I created the circuit board and sent that out to be fabricated tonight. I'll have it back in around 2 weeks and will test it out then.

The GPI is comprised of two circuit boards. One is a pre-built motherboard for a Parallax Propeller CPU called the QuickStart. https://www.parallax.com/product/40000

QuickStart.jpg
This board is about 2.0 x 3.0". I created a circuit board that goes on top of it, and plugs into the 2x20 pin header. Here's a 3D rendering of the board that I made:

GPI-Full-3D.jpg

There are inputs for VSS, IPG, Clutch, Neutral, +12 and GND. There are also power and ground connections for the hall effect sensor that you can add to your clutch handle to get the beginning of stroke indicator, which is used to tell the GPI when it is safe to update the gear indicator. There are outputs for a synthesized VSS and IPG. That means, these are the VSS and IPG that are generated by the GPI device when the clutch is pulled in. It does not pass the original VSS and IPG back out. It also has outputs for +12 and GND so you can wire in your external GPI indicator if that's what you choose to do. If you wish to use this device as a full GPI, then you would connect your common cathode 7-segment display to the outputs labelled "A" through "G" and "SEG_GND". The device is an all in one, pass through, and full GPI. Of course, you only wire it into your ST one way, since there's no need to use the passthrough mode to another GPI if you're using this device as the GPI.

The schematic for the board that I made is in the attachment "GPI-Schematic.pdf'.

I created the schematic and board layout in a program called "Dip Trace", and it's free to use for non-commercial applications like this one. You can download it and use it to edit the design and build a new board layout if you desire. I'll upload the Dip Trace schematic and layout files once I figure out how to upload that properly here. If anyone wants to see it before I upload it, just send me an email with your address.

In terms of cost, you need to purchase the Propeller QuickStart board which is $35 plus shipping. You order that from Parallax Semiconductor at the link above. Then you can either build your own board on a prototype board such as this one: https://www.parallax.com/product/40010 or you can order a board from me once I have them (I'll sell them at cost + shipping to you), or you can order a board from a board fabrication house of your choice on your own.

The schematic shows the parts, but basically you need a few inexpensive 2N3904 transistors, 1K resistors, a diode, a common cathode 7-segment display, wire, a 7805 voltage regulator and some header pins. It's just a few dollars in parts. The circuit boards cost a little under $4 each when I buy them in quantity 10. Shipping expenses are more expensive than all the parts you put on the board. If you want the clutch to operate the GPI as intended, which is really the whole reason for this project, then you will want to order yourself a hall effect sensor. I purchased the one that I linked earlier on, and it works great so far. I am in the process of making a mount to hold the sensor and a magnet to the ST. The sensor I bought was under $9 shipped. There's a nicer looking sensor, cosmetically, that I linked also, which is about $65. I don't know which one I will mount to the ST. I didn't buy the more expensive sensor to try it. But I do like how it looks.

The QuickStart board has the CPU on it which is programmed by you with the source code that I'll provide. You connect it to your computer via USB and program it with the free from Parallax Propeller development environment. I'll post details on how to do that later. Once I get my board, I'll build it and load it up with the software to check it out and verify that everything works as designed. Once it does, I'll post the source code here for you to use, with instructions on how to program it. Unlike some other devices, this particular board has the programming circuitry built into it, so you don't need any special programming cables. It's quite good that way.

That's all for now. Hopefully things go smoothly with the circuit board fabrication and I'll have them soon.

Joel
 

Attachments

Joined
Oct 17, 2015
Messages
1,960
Location
near Harrow, Ontario, Canada
Bike
'83 BMW R100RS
STOC #
8870
Wow Joel - you ARE the man on this stuff. :bow1: I came perilously close to understanding a bit of your last post (I'm a nuts and bolts ME guy myself) - but I will conclude by simply saying please put my down for one of your systems once you are ready to sell them.

I will continue to follow this thread and watch for further progress.

Pete
 
Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
What are you planning to use for the display? That $25 GPI display is larger than it need be.
I purchased a few different 7-segment displays to play with. Any common cathode 7-segment display would work, such as the Kingbrite displays that were popular when the PDFruth's project was announced. I have a .5" Kingbrite display that I'll use on mine for now. That has a good aesthetic compared with the much larger display on the DiGi.

Now, in terms of a case, I haven't built that yet. There are a few options I'm playing around with in my head. One option is to create an acrylic box custom fit for the display. The place that manufactures the PCB offers a laser cutting service for acrylic that's not expensive. Though they only have clear acrylic. Another option is to machine a 5 sided box from aluminum and cover the face of it with a piece of acrylic. And yet another option, is to dip the 7-segment display into liquid acrylic (the stuff that desk ornaments are made from), and then either mold it to fit the aluminum box, or machine it to fit whatever enclosure I've decided on.

Eventually, I do plan on relaying this information to my Skully helmet heads up display. I can successfully send the data over Bluetooth LE to my iPhone. So once Skully releases their software development kit for 3rd party developers, I'll get that, and will have a mechanism for displaying the gear on my HUD.

I saw that people here were quite handy mounting their 7-segment displays behind the dash, and in their own boxes, so I expect today's crowd will be similar. If I design a box that is aesthetically pleasing, I'll happily share that design with others here too. I have a CNC mill and can cut an aluminum enclosure if I want to. It's not quite turn-key, but it's better than turning the hand wheels for hours. The toughest part I can think of is getting a good acrylic face for the display. I'll figure out something, since it could be many months (many!) before Skully releases their development kit, so I'll need to mount a display for the forseable future. Maybe someone here will have a good idea for how to build a box that looks good.

One last thing about the display - I didn't make a PCB to hold the display. My assumption was that people would wire directly to the pins on the display, since it appeared that was a popular option for the previous project. I can always make a PCB if that's necessary, but given the different mounting options and different displays available, it's not clear that it was a good idea to lock down a PCB.

I guess some of these issues are a direct result of making a DIY device in the first place. There are so many options, and there isn't one way to please everyone.

If folks have ideas, please speak up and i'll do what I can.

Joel
 

ST Gui

240Robert
Site Supporter
Joined
Sep 12, 2011
Messages
9,282
Location
SF-Oakland CA
Bike
ST1300, 2010
I have a .5" Kingbrite display that I'll use on mine for now. That has a good aesthetic compared with the much larger display on the DiGi.
I don't remember the size of the display of my V65's GPI but it might have even been a little smaller than .5". It was easily read.


Eventually, I do plan on relaying this information to my Skully helmet heads up display.
You're not concerned that this might send you to fiery screaming death? :rofl1:


I didn't make a PCB to hold the display. My assumption was that people would wire directly to the pins on the display, since it appeared that was a popular option for the previous project.
Yes. Mounting inside the dash in the lower right portion of the speedometer would be my preference. Ideally that would mean a small display mounted on as short a box as possible for both clearance and aesthetics.

People who'd prefer to mount it outside the dash on some other part of the bike would want a taller case to facilitate that option. So yeah some of the people some of the time... We look forward to your progress and sitreps. Thanks.
 
Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
I received my circuit boards this week and built the GPI. I just installed it today, excluding the Hall effect sensor, and took a test ride. All was well. I connected both my own 7-segment display and the DIGI display at the same time so I could keep tabs on both for these tests.

Everything worked the way it was supposed to. So that was good. I did make one error in the circuit board though. But I worked around that. When I completed the schematic capture I modified it slightly to make it "better" but didn't test out my change. It turns out my latest modification didn't work. I should have tested it before making a PCB. Oops. But it was easy to work around by installing a wire where a component was supposed to go. No big deal. If I ever make another run of PCBs, I'll make that change in the board.

Here what the completed board looks like with my wiring. There are wires that connect VSS, IPG, neutral, +12 and ground from the bike to the GPI. Then a bundle of 8 wires for the 7 segment display. A bundle of 5 wires for the DIGI to drive it in pass through mode, and then a bundle of 3 wires for the Hall effect sensor. In a normal install, you'd use fewer wires because you would not be driving both a 7-segment display and a DIGI at the same time.







I used heat shrink to encapsulate the boards and stuffed the whole thing under the dashboard. I used Molex and Hitachi connectors to connect the GPI to all the connection points so I can route the wires easily.

The DIGI was not very easy to see in the bright daylight today. Neither was my particular 7-segment display. I didn't use the Kingbrite display yet. I'll wire that up next and try it. It turns out the Kingbrite display I had ordered was common anode but I wired the GPI for common cathode. So I wired in a common cathode display I had. It is easy enough to wire in and use a common anode display, but I decided to try that another day.

Next on my list, is to fabricate some brackets for the Hall effect sensor and maybe make a nice enclosure for the 7-segment display.

If anyone wants to play along and build one, you can send me a note. I'll sell the few PCBs I have at cost plus shipping, which basically means $3.50 for a board, and whatever USPS priority mail is. You still need the Parallax QuickStart board to go with this, which is about $35 plus shipping from Parallax.

The other parts to build this are inexpensive. I have some parts, but don't have a stock of displays to sell anyone. Depending on how you go about the build, you need a 7-segment display plus resistors, or a DIGI. And then depending on which path you choose you need a different bill of materials to complete it. It's just a few dollars worth of parts either way.

Joel
 
Last edited:
Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
I had a small breakthrough last night. I was getting ready to machine a mount for the hall effect sensor when I decided to try one last experiment. I wanted to know if I could adjust the trigger point of the switch to give me a beginning of stroke indication instead of the end of stroke indication. It turns out that there is about 2.5mm worth of gap between the switch plunger and the clutch handle. I created a 2.5mm shim and placed that between the clutch handle and the switch. This shim makes contact with the plunger, and triggers the switch prior to the clutch slipping. That's the key part. It means that I won't need to mount a hall effect sensor at all. At this shim size, I can still pull the clutch handle all the way in, and it does not foul or overload the switch plunger. That is, it won't break the switch.

I'm going to do an experiment tonight to determine if I can rework the board I made to accept the neutral switch input with the circuit I have, or if I'll need to lay out a revised circuit board. It's no big deal either way. I'm excited that I don't need to mount a hall effect sensor, since the shim is an even cleaner install.

I ordered a new Kingbrite display that is common cathode, and I'll wire that up when it arrives. If that's not bright enough for direct sunlight, I don't know what else will do better. So fingers crossed.

Joel
 
Joined
Aug 11, 2014
Messages
841
Location
Lake Zurich, Illinois
Bike
04 ST1300
I've been chatting about this over on the RC51 forum. Thought I'd post over here, since the good folks of the ST community might find this interesting too. I'm never really sure which category to post into, so I'll stick it in the "General" section. Mods, please move this as appropriate.

I've undertaken a renewed interest in embedded micro-controllers lately. Over the past 20 years, I've puttered around with various MC's. I've worked with MC's such as - Intel 805x, Motorola 68xxx, 6502, and Zilog Z80. But never MicroChip PIC MC's. So, I wanted to educate myself on PIC MC's. This little project was simply a means to and end.... learn PIC16Fxxx microcontrollers, using a real-world application. And have something to show for it in the end.

It all started one day a few weeks ago. A buddy and I were talking (he has a Suzuki TL1000R)... he says "I wish I had a gear position indicator". I said "I think we can do that". So, after some research and development, I built him a GPI using a PIC16F88. Turned out to be a rather easy task. Since the Suzuki has a wire coming out of the transmission carrying a voltage ranging anywhere from 0 to 5 volts, depending on what gear it's in, I just used the PIC16F88's A/D converter to read the voltage, and convert it to a gear number. Once the gear number is known, it is a simple matter of displaying it on a seven segment LED, which is now velcro'd to the side of his instrument cluster.

Voila... Now he has a GPI, and I have a good bit of real world experience on PIC micro-controllers.


But noooooooo...that wasn't good enough, I was thinking.... Now I gotta have a GPI too.

So, I set out to build a GPI that'll work on my ST1300 and my RC51.
However, because Honda doesn't have a wire coming out of the transmission (like the Suzuki's do), a very different approach was required.

Here is the approach I took -
- Hondas have a vehicle speed sensor (mine do anyway), which emits a very nicely formed 5v digital square wave. The square wave's frequency varies in direct proportion with wheel speed, via a variable reluctance sensor coupled to one of the gears on the final output shaft (aka, counter-shaft).
- Hondas also have an Ignition Pulse Generator (IPG). The IPG emits a very nicely formed semi-square A/C signal. The frequency of the signal varies in direct proportion with engine speed, via a variable reluctance sensor coupled to the flywheel. There are exactly 12 pulses/cycles per crank shaft revolution.
- Hondas also have a neutral switch. When the bike is in neutral, the switch provides continuity to chassis ground.
- Hondas also have a clutch switch. When the clutch lever is pulled in, the switch provides continuity to chassis ground.

Given those four signals....
Using a PIC16F88 micro-controller, I've written code that essentially counts pulses, monitors the neutral & clutch switches, and outputs a result on a seven segment display. The micro-controller's on-board microprocessor, running at 4Mhz, does this over and over, very quickly (like a few hundred times per second). If the neutral switch is closed, I know to display a zero (my choice for indicating I'm in neutral). If the clutch switch is closed, I display a dash (my choice for indicating I'm between gears).
The core algorithm, essentially just counts pulses arriving from the speed sensor, and at the same time tallies up the number of ignition pulses that arrive for a given number of speed sensor pulses. Given this ratio of speed sensor pulses -to- ignition sensor pulses, it calculates which gear the bike is in, and displays that gear number on a seven segment display. Very easy, and very elegant.
I've also included an "Initialization routine" that allows me to put the code into "Learning" mode. The learning procedure essentially allows the user to tell the micro-controller, via interaction with a single pushbutton on the back of the display, how many gears the motorcycle has (cuz the ST1300 is a 5-speed, and the RC51 is a 6-speed). And then allows the code to "learn" how many IGN pulses per given set of speed sensor pulse for each gear. These learned values are then stored in nonvolatile EEPROM memory built into the micro-controller. Thus, this "learn" mode only needs to be performed once, upon initial installation of the GPI.

It took me a week or so to develop the code, and build a prototype. I just installed it on my ST, and took her for a spin (on a lunch break). I'm happy to report, it worked beautifully. Solidly indicates which gear I'm in at all speeds (up to legal limits, of course) and all engine RPM's.

I did do a fair bit of googling, to see if anyone else had done something like this. I found a few commercial offerings, but no home-brew stuff.
So, in case there are others out there with a propensity to do so, and are a little handy with a soldering iron... I thought I'd share the intellectual capital here. It's a pretty simple circuit. It only took me one night to build (once I had debugged it on a breadboard). With the exception of the micro-controller and the seven segment display, all the components are readily available at places like Radio Shack, Jameco, DigiKey, or Mouser. There's one IC (a PIC16F88 micro-controller), a seven segment display, three transistors, two diodes, a couple capacitors, a 5-volt regulator, and a hand full of resistors. The seven segment display turns out to be a critical component. The first one I used (out of the junk box) just wasn't bright enough to see on a sunny day. I eventually managed to find a super-bright red seven segment LED display at Kingbright (www.us.kingbright.com), and it is very visible in direct sun light.

I'll post a schematic, and source code for the micro-controller, in a few minutes.

Before anyone asks "Can you make me one", or "Will you sell me one"... I just wanna set expectations up front. This was just an experiment for me. Like I said, it was a means to an end. I built this thing using nothing more than a few junk box parts. I am in no position to start mass-producing GPI's. It is, however, my sincere hope that, by committing the intellectual capital to the public domain, and GPL'ing the source code, others will benefit. I also hope that other like-minded, talented, innovators out there will pick it up, improve/enhance/change it, and contribute those innovations back here to the community.

Here is a quick pic of the thing installed on my ST1300. The ST is sitting on the center stand, idling, in second gear (as can be seen on the display). The GPI display is velcro'd to the base of the handle bars, just back from the ignition switch.

Edit: 12/28/2008 -
Added updated circuit schematics & code for V1.3. Changes include the incorporation of a photo-cell, so that the seven segment display's intensity will automatically adjust according to ambient light conditions.

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 builders kit.
I have 4 different types of builders kit. Each contains all the discrete components necessary to build a GPI, containing.... either;
1) External .8 inch LED display, with red acrylic display enclosure components, and ambient light sensor
2) External .8 inch LED display, with red acrylic display enclosure components, and no ambient light sensor
...... Note: see post #4 for an example of the prototype of the above two variations
3) In-dash .56 inch LED display (no display enclosure components), and ambient light sensor
4) In-dash .56 inch LED display (no display enclosure components), and no ambient light sensor
..... Note: see post # 154 and post # 161 for scoutdriver73's example of in-dash mounting.

All builders kits now include the custom printed circuit board (see post # 166 below). The kit contains a blank circuit board, and all the discrete components necessary to build the circuit. The microcontroller comes pre-programmed with the latest version of the code. You get to solder "everything" together, and integrate it into your bike. See post # 4 below for a document containing the steps taken to install it on my ST.
I stock only RED superbright seven segment LEDs from Kingbright. And only the two sizes noted above. If you want a different size and/or color, you are on your own.

PM, or email, me with your needs. Prices and availability may vary, depending on my suppliers & supplier costs.

Edit: 4/15/2010
The last of the remaining kits is gone. I do not plan to re-stock the kits. From this point forward, you're on your own for parts/components.
Sorry.
Nice article. I have an 04 ST1300. I am trying to install a cruise control using the output from the vehicle speed sensor. Do you know how many pulses the vehicle speed sensor sends out. Thanks.
 

ST Gui

240Robert
Site Supporter
Joined
Sep 12, 2011
Messages
9,282
Location
SF-Oakland CA
Bike
ST1300, 2010
I don't know what else will do better.
Well a backlit LCD display would probably work better. Day or night I never had a problem reading my V65's GPI. Not as sexy as LEDs but it would work if the Kingbrite doesn't.

If ebay is any indication that may be easier said than done: 0 Listings
 
Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
I was thinking of trying an OLED. The immediate issue I have with any of the LCD/OLED family displays is simply the weatherproofing. All of them will require something custom to frame the display and keep water out. It's not unsolvable, just an extra project.

The Kingbrite will be here tomorrow. So I'll give it a try and see.

Joel
 
Joined
Oct 19, 2012
Messages
27
Location
chicago
Bike
2008 ST1300 ABS
Left side of bike connector.... Pink w/green stripe is Vehicle Speed Sensor (speedometer pulse)..... Light Green w/red stripe is Neutral Light...... Tap top wire going to ignition coil for Tachometer Pulse....
IMG_2758.jpg
If the $25 ebay GPI unit is a knockoff of the HealTechl GPI, shouldn't there be a way to gather the needed signals off the diagnostics plug the way HealTech does? Has anybody tried this?
 

T_C

Joined
Mar 8, 2012
Messages
4,338
Location
St. Louis, MO
Bike
2005 St1300
STOC #
8568
Roughly 1.8 KHz @ 80 mph
I started countin' phone poles, goin' by at the rate of four to the seventh power. Well I put two and two together, and added twelve and carried five; come up with twenty-two thousand telephone poles an hour. (via CW McCall)

If we take 1.8khz over 3600 seconds and break it back from 80 to 1... for an ST1300... about 81k ppm.
 
OP
OP
pdfruth

pdfruth

P.D.Fruth
Joined
Jan 28, 2005
Messages
242
Age
61
Location
Somewhere near Denver, CO
I started countin' phone poles, goin' by at the rate of four to the seventh power. Well I put two and two together, and added twelve and carried five; come up with twenty-two thousand telephone poles an hour. (via CW McCall)

If we take 1.8khz over 3600 seconds and break it back from 80 to 1... for an ST1300... about 81k ppm.
That's a big 10-4 good buddy :)

So if I average 10k miles per year, for 1000 years, that would 810 Billion PPM (Pulses Per Millenia)
... ok, ok, enough already
 
Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
If the $25 ebay GPI unit is a knockoff of the HealTechl GPI, shouldn't there be a way to gather the needed signals off the diagnostics plug the way HealTech does? Has anybody tried this?
There are two versions of the Healtek GPI, one that connects to the sensor wires and one for 2008 or 2009 and newer that connects to the computer. If you have a newer bike you would need to figure out how to talk to that computer to get the sensor data. Mine is a 2006 and doesn't provide that data to the bike's computer like the newer models, so I'm connecting to the discreet sensor signals.

pdfruth, that was great to see you are still around. See what you have inspired?

I connected my Kingbrite display yesterday and found that it was better in direct sunlight than my previous display. I decided to create an enclosure with a sun shield, so I designed a basic case and 3D printed it. I'll be mounting that new case soon and will see how that goes. If I I like it, I can machine one from aluminum. I may also put a red acrylic lens over the display. I have some acrylic from an old clock I built 35 years ago and am considering salvaging the material from that. Otherwise I'll get some lens tape from the auto store and continue with that.

When I went back to using the clutch switch, it altered the circuit slightly so I had to rework things a bit. I prototyped all the changes on my board and got them working. I sent out the new boards to be fabricated last night so I'll have the revised version in another two weeks. If anyone is interested in this GPI and doesn't want to use the clutch signal, you don't have to. It can be made to function without it. Also, for those who wanted just a 5th gear light, there's a really simple software change to make that happen. So if lighting up a single LED is your thing, this will have you covered.

I'll post the new schematic and board files later when I have a few moments.

Joel
 
Joined
Oct 16, 2013
Messages
155
Location
Marlborough, MA, USA
Bike
2006 ST1300
Here's a photo of the shim I installed in the clutch handle to adjust the engagement position. It's the black rectangle in the photo. It's about 16mm x 8mm x 1mm with 0.5mm thick double sided tape holding it in place.

 
Top Bottom