Electronic – Arduino sensor ground isolation on motorcycle

arduinogroundinghall-effectopto-isolator

I am attempting to use a 5v Arduino pro mini to display the current gear on a 2005 Kawasaki Ninja based on the ratio of the wheel speed and the engine RPM. The display is a single digit 7-segment display. The RPM input is coming from the 12v coil signal wire. The wire provides 12 volts and then goes to 0 volts to trigger the coil to fire. I have no problem reading the 12v-0v-12v pulses with the arduino. The Arduino groud is connected to the motorcycle's ground and the coil signal wire is going to digital pin 2 via a 1k ohm resistor.

The wheel speed is coming from a hall effect sensor provided with the TrailTech gauge pack I already have on the bike (http://www.trailtech.net/digital-gauges/vapor/752-300). The voltage difference in between the two wires is 3 volts except when the magnet passes by where is goes to 0 volts. I have been able to read the 3v-0v pulses by simply splicing two wires off of the sensor leads and connecting the positive wire to digital pin 3 and the other wire to the arduino's ground. With the sensor connected like this, the arduino can read the pulses from the sensor and the gauge pack can read wheel speed without any problem.

The problem comes in when trying to read both wheel speed and engine rpm. I have the coil signal wire and the wheel speed sensor connected as described above and am able to read the coil pulses but not the wheel speed pulses and the gauge pack is also not able to read wheel speed.

I believe this is because of a lack of isolation and the noise from the motorcycle's electrical system but I am not sure. My first thought is to use an optoisolator to send the wheel speed signal. My (possibly naive) thought process and limited understanding of optoisolators lead me to believe that I should be able to connect the two wires from the hall effect sensor to the input for the optoisolator and use the output from the optoisolator to trigger the arduino.

Can anyone tell me if my assumptions are correct? Are my issues reading wheel speed likely caused by a lack of isolation? Is an optoisolator the way to go?

Best Answer

You are correct in your assumption of how an optoisolator works.

Yes I believe your issues can easily be caused by lack of isolation. And direct connection to the bike's electrical will be "noisy" as opposed to a nice clean output from an optoisolator.

Yes I believe that is the way to go.

I would do it for both sensors.

Your title question mentions ground isolation. That may not be a problem, or it might be. Best is if your Arduino's power suppply is regulated if running from the bike's battery. I often use small 12v-to-5v converters (this is a search) to power my arduinos from noisy 12V sources like those types of batteries connected to trickle chargers. Bottom line is that a noisy power source can mess up a perfect program.

I did some searching and came up with this optoisolator that does not require the grounds to be the same on both sides. Optoisolator

It says long-distance, all that means is that the leads can be long enough for your purposes. We do not give shopping or specific purchasing recommendations on this site, but I am showing this to you just to give you an idea of the kind of unit you should look for.

If you can keep the grounds separate then by all means do so. No good reason to get the bike's magneto impulses into your circuits. Just running the wires will probably pick up some, so your optoisolator should be located next to the computer. Let it clean up any extraneous signals that come in on the wires.

Sounds like a fun project. Enjoy!