Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Wanting to build a simple logic device for my motorcycle

  1. Jun 15, 2006 #1
    I always think of little things I want to build or do. I originally studied EE when i first got into college, but switched to IS.

    I have a base understanding and can solder. I'm basically looking to build a device that hooks inline with a sensor on my motorcycle. The plug has 3 wires (power, ground, and sensor). Not 100% sure what it senses for, but I believe it's different resistances/voltages.

    I'm wanting to build a simple logic device that senses resistance and displays a number on a single digit LCD display and outputs that resistance, unless it picks up a specific resistance.

    Application & Purpose:
    For my bike, I want a gear indicator that I can mount on the gauge cluster and display what gear I'm in. I also want it to pick up every gear, including neutral, and when it's in 6th gear, I want it to tell the computer it's in 5th gear. In 6th gear, timing is retarded to limit HP, and RPM is limited to 10,200.

    They have the gear indicator for the bike, and they have the device called a TRE (Timing Retard Eliminator). However, the TRE tells the computer that it's in 5th gear ALL THE TIME. This is bad for a few reasons: 1) neither during start nor idle, timing is not retarded; 2) each gear has its own timing map that Suzuki did R&D to get.

    The reason why the cheap TRE's are popular, aside from the obvious, is because the timing map in 5th gear puts out the most HP. With this cheap TRE, the aftermarket gear indicator will show 5th gear all the time, and the neutral indicator will not work.

    I don't know what chip to use, nor do I have a programmer for it. How could I program it to pick up a specific resistance, maybe look for a specific voltage drop? I'm guessing it could derive power from the plug going to the sensor, but I don't know how much voltage it is, and perhaps a cap to keep the charge up for sending voltage to the sensor. Fundamentally, I understand what I need to do, but I don't know where to begin.

    This is my first post (obviously), so if I'm posting in the wrong section (or site all together), then I'm sorry and can you point me to the correct location?
  2. jcsd
  3. Jun 15, 2006 #2


    User Avatar

    Staff: Mentor

    Welcome to PF, cougar. You posted your question in the correct forum.

    Since it is a 3-wire harness, it seems most likely that a voltage is what is being sent up the sensor wire. If it were just a resistance being sensed, you would only need 1 or 2 wires at most. What voltages do you measure with a DVM on that sensor wire for each of the 7 shift positions?
  4. Jun 15, 2006 #3
    That's what I thought, but didn't want to make any false assumptions. I'm not sure on the voltages yet, I'll have to go home and check it. I'll see if I can test that tonight. I need to change the oil & filter, so I can pull the plastics off and see what I find.

    Would a BASIC stamp work, or would I need something more sophisticated?
  5. Jun 15, 2006 #4


    User Avatar

    Staff: Mentor

    Well, if the sensor is just a potentiometer or something, giving you a voltage between 0 and 12V depending on the gear selection, then the cheater circuit may be as simple as a CMOS opamp and a limiter of some kind to keep from getting all the way up to 12V for 6th gear. You'd pass through the sensor voltage accurately for 1-N-2-3-4-5, but stay with the 5 voltage at the opamp output even when the input voltage goes to the 6 voltage.

    Check out the voltage behavior, and let us know what you find. There will hopefully be a simple and reliable way of keeping 6th looking like 5th.
  6. Jun 15, 2006 #5


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Your post exhibits a common (fatal) flaw of many similar kinds of posts asking for help on custom circuitry: you have no idea what kind of signals are actually present on the wires. As a result, we really cannot help you design any kind of cheater circuit. As berkeman said, you need to thoroughly understand the original circuit before you can build anything on top of it.

    - Warren
  7. Jun 15, 2006 #6
    Thanks for the info.


    I just thought of it about 30 minutes before I posted this thread. I'm at work, so I can't test it right now, but can tonight. I was curious if it's plausible and something that isn't overly complicated (at least not too complicated for myself) before I ventured into it more. Again, I'll try to check it when I get home.
  8. Jun 15, 2006 #7


    User Avatar

    Staff: Mentor

    Chroot makes a good point that I didn't even think about. What if the sensor is sending serial data up the line to the instrument cluster? A simple DVM measurement would be misleading at best. Can you take a portable oscilloscope home to do the checks?
  9. Jun 16, 2006 #8
    My brother's got a scope, but he's fly to NC this evening for his honeymoon. I'll see if I can get it, but I believe you're right about it being a potentiometer. The other TRE's are a small plug that appear to contain some caps & resistors, maybe just resistors.
  10. Jan 20, 2007 #9
    Okay, I finally got around to testing, and here's what I found:

    It has three wires, Black, Blue, and Red. Black is grounded 100% of the time, guessing to see if the sensor's attached and functioning. The Blue wire is grounded when it's in Neutral.

    Now, the Red wire grounds through different resistances depending on the gear, as follows:

    1st = 560 Ohms
    2nd = 820 Ohms
    3rd = 1.5K Ohms
    4th = 2.73K Ohms
    5th = 6.79K Ohms
    6th = 14.97K Ohms

    When I originally tested it, I checked voltages referenced to ground and came up to with this:

    1st = 1.80
    2nd = 2.26
    3rd = 2.99
    4th = 3.68
    5th = 4.38
    6th = 4.70

    I was going to use a PICAXE 28x to monitor the analog input and return the voltage I wanted. Since it's grounded, that wouldn't work because the 28x can't read resistance.

    How can I build this with the PICAXE 28X?

    Sorry it took so long, but I've had other priorities.
  11. Jan 21, 2007 #10
    I figured if I installed a 12K Ohm resistor in parallel, it'll provide these resistances:

    1st = 535 Ohms
    2nd = 768 Ohms
    3rd = 1.33K Ohms
    4th = 2.22K Ohms
    5th = 4.34K Ohms
    6th = 6.66K Ohms

    I know that will fool the ECU into thinking it's in 5th when it's in 6th, but it looks like 5th gear may be in the middle somewhere (not sure what the spec is). The only problem that arises from this is the ECU will see 12K Ohms in Neutral instead of ∞. To defeat this, I figured I could hook a relay in with the blue wire and open the Red wire circuit whenever the blue wire's grounded.
  12. Jan 25, 2007 #11
    So, does anyone have any idea how to get this done?

    In order for those voltages to hold true with the resistances I measured at the sensor, the ECU supplies 8.25v with a 650 Ohm resistor in line (guessing so if it shorts it doesn't fry the ECU). Am I wrong in my calculations?

    I figured if I was to install a zener diode and resistor, it would accomplish what I'm after as well. However, this doesn't have gear indicator. I used a PCB simulator to test the zener diode and created the circuit as I stated above. From the red wire I had a 2.75k Ohm resistor and a 5v zener diode that connected to ground (or the black wire) and this locked me where I wanted to be in 6th gear.

    However, I'd like to have some controller that did this for me and provided a gear indicator. For the gear indicator, instead of a single digit display, I'd like to do 6 LED's in a bar graph. First, second, and third, I want to be green LED's; fourth and fifth, I want to be orange; and sixth I want to be red.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook