Shop OBEX P1 Docs P2 Docs Learn Events
Motorcycle Tachometer issues. I'm at wits end... — Parallax Forums

Motorcycle Tachometer issues. I'm at wits end...

Ernie RErnie R Posts: 4
edited 2012-03-18 06:41 in BASIC Stamp
HI all,
This is my first Basic Stamp project. It's based on the tachometer by Kamran Nili:
http://www.floridaame.org/Plans/Kamran Nili/rpm/tachometer.html

I used Kamran's design and expanded it.

To make a short story long, my son is scratch building a AMOD race car for Autocross using a 1978 Kawasaki 650cc motor. I was assigned the task of making the electrical system including the dash. I couldn't find an LED tachometer with a 5 digit display that would fit the application so I decided to make one. I stumbled upon Kamran's tacometer using the BS2 and the MC14489 LED display driver and the MLX90217 hall effect sensor. His tach only has 4 digits, but it's easy to modify it for 5 digits. While I was reading these forums and the NUTS and VOLTS columns, I realized that the Basic Stamp could do so much more than counting the RPMs. I added another LED Display driver with a series of 10 LEDs used for a Formula 1 style progressive shift light. After that I added another hall sensor and LED driver with the 7 segment LEDs to display the MPH. There was still room for more inputs on the Basic Stamp, so I added a pull down switch for the oil pressure sensor.

Everything worked perfectly on the bench. Everything worked perfectly in the car, at least until the motor was started. The display flashed on and off about every 5 seconds, information was garbled. My project is useless. So, back to the forums I went. Searched for TVS. I read the Nuts and Volts again. Tried a few things I found in the Nuts and Volts: Column #53, September 1999: Protecting Your Stamp from the Cold, Cruel World. I installed the dash back in the car and the same thing happened. The flashes and garbled display is getting worse. At first it happened about every 5 seconds, now it's almost continuous.

Ok, next I purchased a 5v switching power supply to clean that up. It did not work.
I replaced the sensor wiring with double shielded cable. No joy.
So then I made a jumper from my BOE to the tach and used a plug in transformer to power the tach. The tach power is now seperate from the car. Failed again.
I unplugged each sensor one at a time until I ran out of sensors. That worked. I traced it to the tach sensor which I mounted inside the flywheel and alternator. The flywheel has 6 magnets on it and gives better resolution than other parts of the motor, like the magnetic field of the coils.

Well, now I'm rethinking the use of the flywheel, maybe use a IR sensor on the flywheel instead of the hall sensor. Wait! What about using an inductive pickup in the spark plug wire? I took a piece of phone wire and wrapped it around the spark plug 4 times and hooked it up the tach input. FAIL AGAIN!

I disconected the wire from the tach input and the tach still did not work until the wire was about 8" away from it. Nothing but a seperate power supply is connected to the tach. Everytime I move the wire close to the tach, it freaks out. Move it away and it's fine. What gives?

Is there something I missed? Should I try a faraday cage?

Here a video my son made of the car in action. The tachometer shows at 1:08. Before he starts the engine, the upper display is flashing "OFF" the lower display is flashing "OIL". When the engine starts, the RPM is displayed on the top and the MPH is below. The speed sensor was not installed at the time, so the lower display is random. The tach happens to be working in the video. The beginning of the video shows my son's first toy before the serious one.

th_GoKart2.jpg


In frustration, I ordered new project boards and components. I'm planning to build a new tach on two seperate boards. One will be for the LEDs and display drivers, the other will be for the BS2, power supply and IO wiring. That will allow more room for TVS circuits.

My skill level is on the low side. I took some high school electronic classes and basic programming classes in 1975 to give you an idea. Any help is greatly appreciated. Sorry for the long post.

Ernie

Comments

  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-01-08 10:55
    Really great first post!! Welcome to the Parallax Forums!

    Looks to me like you have some seriously good fabrication skills!


    It sounds like you could possibly have a ground loop problem, but I am sure smarter folks than me will chime in soon.

    Paul
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-01-08 11:18
    Ernie R wrote: »
    ...
    I unplugged each sensor one at a time until I ran out of sensors. That worked. I traced it to the tach sensor which I mounted inside the flywheel and alternator. ...

    Welcome to the forums.

    I'm a little confused. Is your Hall sensor somehow inside or very close to the alternator? If so, could magnetic fields from the alternator coil be messing up the signals you hope to get from the flywheel?
  • Ernie RErnie R Posts: 4
    edited 2012-01-08 11:52
    Welcome to the forums.

    I'm a little confused. Is your Hall sensor somehow inside or very close to the alternator? If so, could magnetic fields from the alternator coil be messing up the signals you hope to get from the flywheel?


    The hall sensor is nestled between the coils of the alternator. The flywheel is shaped like a hollow cylinder with magnets on the inside. The coils (and hall sensor) fit inside the flywheel cylinder. I'm fairly certain I may be able to find a new location for the sensor if I drill a hole from the end of the alternator to access the flywheel. Or would it be better to paint stripes on the flywheel for an IR sensor?

    Thanks,
    Ernie
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-01-08 13:30
    I'm not an automotive dude, so forgive me if my perspective totally misses the mark here. But it seems to me that if the only thing you're trying to do is measure the rate at which a shaft is turning, then you want the electro/magnetic environment around your Hall switch to be as clean as possible. If magnets on your flywheel are interacting with the coils of the alternator, then I can imagine all sorts of weird fields whipping around inside that cylinder. I'm guessing you would want your Hall switch to be away from those coils, outside the cylinder somewhere. For example, if you can mount a small magnet somewhere on the shaft outside the alternator, then position the Hall switch so it detects the passing of only that magnet, you should be able to get nice clean signals. But, again, maybe I'm missing the point of what you're trying to do with the Hall switch inside the alternator, so please take my advice with a grain of salt.
  • $WMc%$WMc% Posts: 1,884
    edited 2012-01-08 17:43
    I would count the negative pulses on the ignition coil. One neg. pulse per revaluation on your 650 motor.I would also use an opto-isolator.
    '
    Take a look at the jpeg below to get an idea of what I mean.This is how most Tach's work.
    '
    You may want to add a 5volt zener to the I/O pin on the stamp to keep the voltage from going over 5volts.
    '
    '
    Welcome to the Forums
    1024 x 754 - 34K
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-01-08 19:32
    It sounds like the Stamp is resetting due to stray pickup, and one path that can be at fault is the ATN input, pin 3 on the Stamp module. This often happens if a programming cable is connected to the Stamp but not at the computer end, or, the ATN input is not connected to anything except traces on a circuit board that act as an antenna for electrical noise. Grounding that pin often takes care of the problem. One possibility anyway.
  • Ernie RErnie R Posts: 4
    edited 2012-01-08 20:40
    I think you have a good point Tracy. I made a harness that plugs into the BOE so I can program the stamp while it's installed in the dash. I'll try grounding pin 3 in the next couple of days and report back.

    Thanks everyone.
  • Ernie RErnie R Posts: 4
    edited 2012-03-18 06:41
    The redesigned dashboard is installed and it's WORKING!! I applied many of the solutions in the replies above. Mainly taking care to watch where all the grounds are and I used double sheilded cables to the sensors. I installed a grounding switch to the ATN pin on the BS2. The hall efect sensor is still inside the alternator nestled between 2 coils and it's stable. A 5v switching power supply is used to take care of any power line issues. I have some minor software issues to fix, but the hardware is all good.

    I'll post some pictures when the whole package is finished.

    Thank you
    Thank you
    Thank you
Sign In or Register to comment.