Page 1 of 30 12311 ... LastLast
Results 1 to 10 of 300

Thread: ST1300 - Gear Position Indicator (Do It Yourself)

  1. #1
    P.D.Fruth pdfruth's Avatar
    Join Date
    Jan 2005
    Location
    Somewhere near Denver, CO
    Age
    51
    Posts
    279
    My Gallery

    ST1300 - Gear Position Indicator (Do It Yourself)

    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.



    › See More: ST1300 - Gear Position Indicator (Do It Yourself)
    Attached Images Attached Images
    Last edited by pdfruth; 05-10-2008 at 05:11 AM. Reason: Clarification on builders kits

    "I'm not a total idiot.... there are a few parts missing"
    03 ST1300

  2. #2
    P.D.Fruth
    (Threadstarter)
    pdfruth's Avatar
    Join Date
    Jan 2005
    Location
    Somewhere near Denver, CO
    Age
    51
    Posts
    279
    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    Here is the schematic and the custom PCB art work

    For those who need it, here is a link to the data sheet for the PIC16F88 -> http://ww1.microchip.com/downloads/e...Doc/30487c.pdf
    Here is a link to the data sheet for the .8 inch seven segment display -> http://www.kingbrightusa.com/images/...A08-11SRWA.pdf
    Here is a link to the data sheet for the .56 inch seven segment display -> http://www.kingbrightusa.com/images/...A56-11SRWA.pdf

    Edit: 12/28/2008
    Added updated schematics (V1.3) for the auto-brightness feature. There are two variants. The first includes components to sense ambient light conditions, and adjust the display's intensity accordingly. If you don't care for this feature, then use the second variation (tie pin 1 to ground, and leave pin 2 open).

    Edit: 2/25/2008
    Added custom PCB (Printed Circuit Board) artwork for those who may wish to etch their own boards. This is a double layer board.

    Edit: 4/7/2008
    Pulled the old V1.2 schematics. If anyone still needs them, send me a PM or email.
    Attached Files Attached Files
    Last edited by pdfruth; 10-25-2008 at 11:17 AM.

  3. #3
    P.D.Fruth
    (Threadstarter)
    pdfruth's Avatar
    Join Date
    Jan 2005
    Location
    Somewhere near Denver, CO
    Age
    51
    Posts
    279
    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    Here is the micro-controller source code.
    Due to file size limits for .txt file attachments, I had to split it into multiple files.
    You will have to concatenate them upon downloading.


    Edit: 12/28/2008
    Added new code (V1.3) for the auto-brightness feature.

    Edit: 4/7/2008
    Pulled the old V1.2 code. If anyone still needs it, send a PM or email.
    Attached Files Attached Files
    Last edited by pdfruth; 04-07-2008 at 05:48 PM.

  4. #4
    P.D.Fruth
    (Threadstarter)
    pdfruth's Avatar
    Join Date
    Jan 2005
    Location
    Somewhere near Denver, CO
    Age
    51
    Posts
    279
    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    Here is a picture of my completed prototype, and an Installation & Setup manual.

    I used;
    - A small Radio Shack 3x2x1 project box (Radio Shack part # 270-1801).
    - A Radio Shack grid-style prototype PC board (Radio Shack part # 276-150). I have since had a custom printed circuit board manufactured.
    - For the cable between the black box and the display, I cannibalized an old computer 15-pin VGA monitor cable.
    - To connect the black box to the bikes wiring harness, I cannibalized an old 6-pin keyboard extension cable I had laying around.
    - For the display enclosure, I had a friend cut some 0.1 in. red acrylic on his laser cutter, which I then glued together (w/ Plumbing GOOP) to make a nice tidy little box.

    There is a mini pushbutton switch (S1 in the schematic) soldered to the back of the circuit board inside the display enclosure. The pushbutton switch is used during "learning" mode. The back of the display enclosure has a small hole, thru which I insert a straightened paper clip to operate the switch. I use a piece of tape to close that little hole once the "learning" process is complete.

    Edit: 2/25/2007 - Added an updated Installation & Setup manual. Due to file size limitations, it had to be split into 4 parts. It's a 40 page .pdf file (about 5.5MB total) containing lots of digital pictures.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by pdfruth; 04-07-2008 at 05:50 PM.

  5. #5

    Bike
    2013 K1600GTL
    Join Date
    Aug 2006
    Location
    San Diego, CA
    Posts
    618
    2014 Miles:
    004872

    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    For those of us that are electronically challenged . . . . are you going to be making these so we can buy them?

    Ok I re-read your post. Does anyone else want to jump in here and make a few. I'd buy one!!

    JD
    Last edited by MAC_JD; 12-18-2007 at 08:50 PM.

  6. #6
    P.D.Fruth
    (Threadstarter)
    pdfruth's Avatar
    Join Date
    Jan 2005
    Location
    Somewhere near Denver, CO
    Age
    51
    Posts
    279
    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    I mounted the little black box on the inside of the left inner fairing. The attached picture was taken with the left mid-fairing removed, showing the little black box velcro'd to the inside of the left inner.

    Then I ran a cable back to the area near the fuse boxes & relays on the left side, just under the seat. Turns out, all six of the connections needed are all right there. The job was especially easy since I have a speedo-healer already installed.

    For the ignition pulse generator - if you remove the seat, you'll see a white 2-pin connector right next to the right frame tube, right there atop the main wiring harness. This connector has two wires in it (yellow, and white/yellow). The yellow wire carries the ignition pulse generator signal.

    For the speed sensor - I cheated (sort of). I have a speedo-healer installed. And (my) speedo-healer is physically situated up by the fuse boxes & relays on the left hand side of the ST. Since the speedo-healer is already tapped into the speed sensor signal, I just piggy backed on their connector. If you have a speedo-healer installed, it's the white wire on their connector. If you don't have a speedo-healer, then you'll have to tap into the ST's wiring harness connector. It's on the right side. You have to remove the right-side mid-fairing. You'll find the connector just back from the tip over wing. The connector has three wires in it. Black, Green, and Pink. The Pink wire carries the speed sensor signal.

    For the neutral switch and clutch switch - These are both on the back of the fuse box that holds the clutch diode, on the left side of the ST. The light-green wire is the neutral switch signal. The green/red wire is the clutch switch signal.

    For power & ground - I cheated again. I piggy backed on the speedo-healer connector's red and black wires.
    Attached Images Attached Images
    Last edited by pdfruth; 12-20-2007 at 11:27 PM.

  7. #7
    SISU an inner spirit dannyk's Avatar
    Bike
    05 ST1300
    Join Date
    Dec 2004
    Location
    U.P. of Michigan, Winter, Water, Wonderland
    Age
    67
    Posts
    1,035
    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    You lost me after the first word, some people have such a talent, you should build and market them, I'm sure it would be worth your while.

  8. #8
    P.D.Fruth
    (Threadstarter)
    pdfruth's Avatar
    Join Date
    Jan 2005
    Location
    Somewhere near Denver, CO
    Age
    51
    Posts
    279
    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    Quote Originally Posted by MAC_JD View Post
    For those of us that are electronically challenged . . . . are you going to be making these so we can buy them?

    JD
    I thought I'd get this question... which is why I addressed it in my opening post, quoted below


    Quote Originally Posted by pdfruth
    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.

  9. #9
    Frank Wells Wheels of Fire's Avatar
    Bike
    05 ST1300
    Join Date
    Feb 2007
    Location
    Hutsonville, IL 20 minutes from Moonshine (as the ST flies)
    Age
    48
    Posts
    170
    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    A home-brew speedo-healer sounds like a good project, too.

    Take a ride with me, watch my videos: My latest YouTube video
    http://www.roadbikemag.com/home/web-...ht-solo-rider/
    Follow me on Twitter @LetMeBe_Frank https://twitter.com/#!/LetMeBe_Frank

  10. #10

    Bike
    2013 K1600GTL
    Join Date
    Aug 2006
    Location
    San Diego, CA
    Posts
    618
    2014 Miles:
    004872

    My Gallery

    Re: My home-built DIY gear position indicator - includes plans

    Sorry I updated my post above . . .

    Quote Originally Posted by pdfruth View Post
    I thought I'd get this question... which is why I addressed it in my opening post, quoted below

+ New Posts
Page 1 of 30 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •