reading frequency, two wire system

i'm wanting to read frequency off a frequency generator, the signal comes from two wires coming off a natural magnet reading a tooth wheel. instead of a 3 wire set up where there is a supply voltage to a coil a ground and one signal wire.

anybody have any ideas on how to make Arduino read from the 2 wire system?

I would be tapping into the OEM system... the system in on a locomotive and I wanted to attempt to make my own speedometer. this is for a non-FRA unit and I don't wanna buy one from a company if I can make one for cheaper. and plus I think it would be a fun project

Maybe a picture or some more info about the sensor?

I wish I could find some info on it. Google is no help on this one.

its made by Quantum. all I can tell you is that there is NO power or grd for the sensor.

Then it is probably acting as its own generator. Put a scope/meter on the signal wire to the system/frame ground and check the signal. It will probably be nasty.

There are no GRD's on a locomotive. like I said earlier, the sensor is a magnet that reads a tooth wheel.
I imagine that the two wires are both sides of a coil wrapped around the magnet.

this sensor has NO pwr supply either, it is only meant to generate a frequency to tell speed.
its essentially a wheel speed sensor.

I guess there is a very small voltage produced from it.. it would be VAC

A coil & magnet is a generator and it's going to put-a varying voltage (depending on speed, etc.). I don't imagine you have access to an oscilloscope?

It's also going to put-out an AC signal, and negative voltages can damage the Arduino.

So, I'd recommend you start with a [u]voltage protection circuit[/u] (a resistor and 2 diodes or a resistor and a zener diode).

Then, connect to an analog input and run the [u]Analog Read Serial[/u] (except take-out the delay, and of course you won't need the pot) to see if you're getting anything that looks "useful". If you're getting less than 5V you may need to use an analog input, or you may need an amplifier.

no access to an oscilloscope.

I was thinking about amping the small VAC that comes off it, but since the original speedo that goes with the axle alt is a frequency reader I was trying to use frequency.

i'll probably go with the 2 diodes and resistor.

I know it can get over 10vac at very high speeds.

What are your thoughts on an opAmp with a common mode range of 3.5vdc.

Please Google "variable reluctance sensor". You will probably need an amplifier.

Paul

ok I googled it and youTube as well..
what I saw it makes a square wave, so would I even need the diodes then?

I was going to rectify it then amp it and the regulate the amped voltage, then use a pulse counter I guess??

yes?

What's the max frequency expected?

I will when I have the means to do so. #SouthFloridaProblems

I was just looking for some advise and a little guidance on the project.
on a further note, I imagine there is some sort of library on a "pulse count"???
it was mentions earlier to connect to analog input...If I were counting pulses wouldn't digital input be best?

for max frequency I can tell you that its 60ppr on a 40in diameter wheel and it shouldn't be doing more than 20mph. Math is involved. I don't know it off the top my head

This is where knowing the voltage comes in. If it can range from less than 1 V p-p to 10V p-p, it might not trigger the digital input at the low voltages.

If its 60 pulses per revolution, then you need RPM, not MPH, which is irrelevant to getting pulse count.

Paul

20mph is 8.94m/s, wheel circumference 3.19m so 168rpm, ie 168Hz, about 8.4Hz/mph

20mph = 1800fpm
40" diameter wheel = 37.68 foot circumference

it would take the wheel 47.77 turns to make that distance at that speed

47.77 * 60(for poles per turn) = 2866rpm at that speed

yes?

LandonW:
ok I googled it and youTube as well..
what I saw it makes a square wave, so would I even need the diodes then?

I was going to rectify it then amp it and the regulate the amped voltage, then use a pulse counter I guess??

yes?

Whatever it is, it would be handy to get some kind of visual indication of what the signal is like. This means using an oscilloscope of some sort. Then there might be noise to deal with. This could involve using circuits or software (employing hysteresis) to prevent unwanted counts due to noise.

HI,

If the generated voltage is < 1 Volt you will likely need an amplifier or comparator.

Since you don't know right now, you could connect the sensor through a diode to a capacitor. The voltage on the capacitor (if any) will be ~ 0.5 - 0.6 volts below the sensor output peak. Also see last paragraph.

Or you could try..... to drive the base of an NPN transistor through a resistor (maybe ~ 1k). You will need a diode across the Emitter to base of the transistor to protect it from negative voltage.

You would then connect the collector to your arduino input with a 10K to the Arduino +v. You could eliminate the resistor and use the arduino's internal pull-up if you wish. I prefer the resistor.

You don't even have to write much code if you don't already have it. You could just pole the input and see if you find some 1's and some 0's. If so at least you know you have a chance.

Now if memory serves me, a VR sensor has the lowest output voltage at the lowest speed. So it it works at some speed you should test to find the lowest speed it works at. Hopefully it will be safely below your minimum required sensing speed.

Good Luck.

Frequency with a 40" wheel with 60 teeth at 20 MPH = 168.067619905 Hz.
Bear down on that math! :slight_smile: