Home Built Gear Position Indicator (GPI)

Discussion in 'Mechanics Garage' started by scoutdriver73, Sep 22, 2008.

  1. scoutdriver73

    scoutdriver73 New Member

    Country:
    Kenya
    Joined:
    Apr 30, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,
    I did some searching and didn't find any home made solutions on the forums so I thought I would share this.

    The original idea and plans that this thread is based on come from pdfruth, a poster on st-owners.com. The hardware/software design is all his. His original post/thread can be found here.

    Brief overview:
    1. Install a home made GPI monitor four signals from the bike.
    2. The GPI uses a PIC (programmable integrated circuit) to run the software needed to interpret signals
    3. The GPI controls an LED display, which indicates the current gear
    4. The GPI requires four signals from the bike:
    Ignition Pulse Generator - IGP
    Vehicle Speeds Sensors - VSS
    Neutral Indicator/switch
    Clutch Indicator/switch​


    Brief instructions:
    1. Order/find necessary parts (pdfruth does sell kits with all the necessary parts if needed. See this post his first post.)
    2. Assemble GPI
    3. Program the PIC with the supplied code (kits from pdfruth come with the PIC already programmed)
    4. Install GPI and LED on bike.

    I installed one of these on my st1300 and on my VFR. The instructions are for the ST, since I did that first, and then there is some additional information for specific to my 2000 VFR.

    This is what I did to build the hardware for the ST

    1. You can get the PIC for free. Go to http://sample.microchip.com/Default....stCookies=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 one 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, but not all of them will work with the 16f88.)

    Please note that JDM style programers require a "real" serial port on the PC. Many "newer" PC do not supply enough power to the serial port if it even has one.

    3. I used IC-PROG which can be found here to control the programmer. The site with the JDM programmer instructions also has instructions for setting the options in IC-PROG.

    4. You have to compile the source code which jdfruth provided. Download all parts of the source code and combine into one file (I've included a single file). Give the 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/schematic supplied by jdfruth to build you circuit and enjoy.

    VFR Specific:
    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 has 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.

    Due to the low frequency of the VSS, the indicator will not be accurate when going less than ~ 10mph. I did design a signal multiplier which would fix this, but never built it and now I don't know where I put the plans.

    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 32 (4) due to the decreased number
    ; of pulses on the VFR - Edited 03/22/08 by Joe Wagnell
    btfss VSSINTS,4 ; 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
    

    Please note:
    I installed this on a 2000 VFR. Other years may have variations which will require modification of the instructions. Also, Gen 4 and earlier may not have the require sensors/signals to hookup the GPI as described (IPG ???).

    The source code that I've included already has the changes noted above. 2002 and later bikes might have a different speeds sensor which would require this value to be changed again.

    I have included the HEX file that I used on my VFR project. The included pictures show the locations of all necessary connections on a 2000 VFR.

    I had to remove all the pictures from the instructions so that the file would be small enough to post. The original instructions can be found on the st-owners forum.
     

    Attached Files:



    This site may contain affiliate links for which VFRworld may be compensated
    #1
  2. Wesley J

    Wesley J New Member

    Joined:
    Dec 21, 2007
    Messages:
    171
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Calgary
    Map
    Tres Cool

    Wesley J
     


    This site may contain affiliate links for which VFRworld may be compensated
    #2
  3. Witch Doctor

    Witch Doctor New Member

    Country:
    United States
    Joined:
    Oct 17, 2008
    Messages:
    29
    Likes Received:
    2
    Trophy Points:
    1
    Location:
    San Rafael, CA
    Map
    Practically assembles itself!

    Wow! I had read the article about the RC51 gear shift indicator, and the author mentioned "someone" had modified the code for a VFR. Nice work!

    I'm fixin' to get into PICs and this would be a good, as well as functional starter project. Thanks for the tip on the programmer; I thought I was going to have to buy one of the pre-made PIC programmers out there.

    Each time I read about this project, I start thinking about using "vampire taps" to hook it up to the bike's electrical system, instead of messy soldering. Thing is, the last time I remember hearing about vampire taps was on old co-ax network cables.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #3
  4. scoutdriver73

    scoutdriver73 New Member

    Country:
    Kenya
    Joined:
    Apr 30, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I would recommend that you solder all your connections because of the vibration from the bike. If you need any help, shoot me a line and let me know.

    Joe
     


    This site may contain affiliate links for which VFRworld may be compensated
    #4
  5. MarkBartels

    MarkBartels New Member

    Joined:
    Feb 6, 2008
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    0
    I tried to understand that....it made my head hurt!:redface:
     


    This site may contain affiliate links for which VFRworld may be compensated
    #5
  6. Gerard30

    Gerard30 New Member

    Joined:
    Apr 4, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello, the files are damaged, I them Me cannot decompression be able to send it for e-mail.

    gerardcc21@hotmail.com

    Thx.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #6
  7. scoutdriver73

    scoutdriver73 New Member

    Country:
    Kenya
    Joined:
    Apr 30, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Could you be more specific. I had no problem downloading and extracting the files. If the download is corrupted/interrupted, then you will not be able to decompress. Please try to download again.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #7
  8. SLOVFR

    SLOVFR Member

    Country:
    United States
    Joined:
    Oct 30, 2006
    Messages:
    1,929
    Likes Received:
    0
    Trophy Points:
    51
    Location:
    Lompoc Ca.
    Map
    Ok is there even a pic of what we are talking about? Im looking for a small unit to install within my gauge cluster like I did with the digital meter.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #8
  9. Spike

    Spike New Member

    Joined:
    Aug 26, 2006
    Messages:
    1,579
    Likes Received:
    2
    Trophy Points:
    0
    This seems like a lot of trouble when there are no less than two commercially availible gear indicator units; why go through all this hassle??
     


    This site may contain affiliate links for which VFRworld may be compensated
    #9
  10. Cex123

    Cex123 New Member

    Joined:
    May 2, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello,
    Thank you very much for this post.
    I've been looking for something like this for months.

    But... I algo got that the files are damaged. I downloaded several times and it looks like they are corrupt or compression method is unknown.
    Which program and version did you use for compression?
    Could yopu please upload again in another format (RAR for example).

    Thank you very much.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #10
  11. bruceanderson

    bruceanderson New Member

    Joined:
    Sep 9, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Tried to open the zip files all are corrupted and will not work so not a lot of point keeping them on this site anymore as they are just taking up space IMHO.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #11
  12. Bartjuuuh

    Bartjuuuh New Member

    Joined:
    Mar 14, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Just downloaded the files and they work perfectly. No corruption here. :) Although this is already an older topic I still want to thank you for this information! I'm going to try and build this for my '00 VFR also.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #12
  13. ZEN biker

    ZEN biker New Member

    Joined:
    Apr 1, 2009
    Messages:
    767
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Assiniboia, SK
    Complex yet elegant, maybe ill build it to test out, though trusting the gear position to the vehical speed sensor may lead to incorrect gear indicated.

    I built a test unit for my bike, much simpler though, i use a "sensor" on my shifter read the count direction and use counters and a bcd to 7seg decoder to output to a 7 segment display. Is simple and works, but doesn't show N and if you are in N and shift up or down your count is off. I plan to encode the logic to a PIC controller but just havent done it yet.

    If anyone needs this project burnt into a PIC chip, PM me and I will do it for free, provided you send me your chip. I can also provide programmed chips for the cost of the chip, Microchip will only give you so many free ones before you get cut off.

    Cheers
     


    This site may contain affiliate links for which VFRworld may be compensated
    #13
  14. Bartjuuuh

    Bartjuuuh New Member

    Joined:
    Mar 14, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    OK, I built one!
    On first sight it works perfectly. It does everything that's described in the 'manual', the digits are right, etc. etc.

    However, when I run through the initial learning mode, at the end it doesn't seem to remember anything. After learning the sixth gear, it starts blinking 5 and 6 again. Is there any known way this can be happening? Do I miss a signal (the multimeter doesn't think so)?
     


    This site may contain affiliate links for which VFRworld may be compensated
    #14
  15. twistedvfr

    twistedvfr New Member

    Joined:
    Apr 26, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0

    Hi you don't miss anything , this GPI is designed too VTR and ST , and doesn.t work for VFR , in my VFR i have same situation 4xvid.avi - YouTube
    I am gonna test it soon for my second bike Aprilia RSV1000R.

    I am busy with another GPI which is build on PIC16f84

    Cheers Paul
     


    This site may contain affiliate links for which VFRworld may be compensated
    #15
  16. scoutdriver73

    scoutdriver73 New Member

    Country:
    Kenya
    Joined:
    Apr 30, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    This GPI does work on VFRs. The PIC determines the selected gear by comparing the ratio of VSS pulses to the IPG pulses. As explained in the first post, the VSS signal on the VFR is much lower frequency than what is on the ST1300 (and presumably the VTR), so the PIC has a harder time determining the ratio. That is why the divider was reduced for the VFR models (fewer pulses need increase count). When you program the GPI, it stores the learned ratio between VSS/IPG. For sixth gear, the GPI does not store a ratio but assumes that if it does not recognize the current ratio, it must be in 6th gear. That is why the GPI switches between 1 and 6 at low speeds.

    When programming first gear, increase the throttle to indicate at least 20mph on the speedo. This will allow the GPI to properly indicate 1st gear when going faster than ~10mph. Due to the low number of pulses from the VSS, I don't think the current version will ever display 1st gear at slow speeds. One way to fix it would be to change the code to store ratio for 6th gear and default to 1st if ratio is unknown. However, I have since sold my VFR so I have little interest in pursuing this any longer.
     


    This site may contain affiliate links for which VFRworld may be compensated
    #16
Related Topics

Share This Page