2-wire ABS sensor, trying to read reluctor using interrupts. ZERO luck.

I've seen LOTS of sketches, examples, and diagrams for a 3-wire Hall Effect sensor, but not the 2 wire ABS sensor in my car, which I assume is an inductive sensor. I need a speedometer for one wheel. The ABS sensor is a 2 wire.

There is no available data on the sensor anywhere, but if it helps identify it, here is what I've learned.
There are 2 ways to test if this sensor is working properly, by unhooking it and jumping a multimeter across the 2 pins:

  1. Measure the Ohms. It will read ~1050 ohm or so.
  2. Set it to AC voltage and connect to the sensor. Spin the wheel, and it will read mV that increase with wheel speed.

I'm not sure if its a 5v or 12v sensor, but since its a late 80s GM sensor, I went with 12v.
I connected it to the arduino with this diagram:

Before I go any further, I'm using an Arduino NANO and am A TOTAL NOOB AT THIS.
I'm using the following sketch that I found here on a forums, and modified slightly.
I connected the pin from the ABS sensor to either digital 2 or 3 to use interrupts and changed the code accordingly.
When I spin the wheel up to 100+ RPM, I still get no reading at all, even though it is reading extremely quickly with a 47 tooth wheel. I get nothing.

#include <SPI.h>
#include <Wire.h>
#include <NeoHWSerial.h>
#define DEBUG_PORT_TYPE NeoHWSerial
#define DEBUG_PORT NeoSerial

// Variables:
volatile byte rpmCounter = 0;           // pulse counter
unsigned long  counter = 0;              // total number of counting pulses since begining only for debugging
unsigned int  rpm = 0;                  // rotational wheel speed in rpm
unsigned long previousTimeSensor = 0;   // end time of the last sensor period in micros
unsigned long previousTimeScreen = 0;   // end time of the last screen period in micros
unsigned long currentTime = 0;          // actual time in micros
unsigned long deltaTimeSensor = 0;
const long periodSensor = 10000;        // time period for pulse counting in micros
const long periodScreen = 300000;      // time period for refresch the screen in micros
const int ppr = 47;                     // pulse per revolution
const float radiusRearWheell = 0.3307;  // radius of the wheel in m
const float pi = 3.14159;               // pi constant
float Speed = 0;                        // vehicle speed in km/h
float distance = 0;                     // travel distance in m

void rpmCountFun() // function for attachInterrupt
  rpmCounter++ ;   // Update rpm counter
  counter++;       // Update global counter just for debugging

void updateSensor() // function for attachInterrupt
  deltaTimeSensor = currentTime - previousTimeSensor;
  if (deltaTimeSensor >= periodSensor) {
    detachInterrupt(3);                                             // disable interrupt when calculating
    rpm = rpmCounter * 6000000 / (ppr * deltaTimeSensor );          // convert frecuency to RPM be carefull period is in micros and need to be multiplied by 6000000 to be converted in min
    Speed = 3.6 * radiusRearWheell * rpm * 2 * pi / 60;             // speed calculation v=3.6*r*w with w in rad/s
    distance = distance + rpmCounter * 2 * pi * radiusRearWheell / ppr; // distance calculation
    rpmCounter = 0;                                                 // restart the RPM counter

    DEBUG_PORT.print("\t \t \t ");
    DEBUG_PORT.print("\t \t ");
    DEBUG_PORT.print("\t \t ");
    DEBUG_PORT.print("\t \t \t ");

    previousTimeSensor += periodSensor;       // uptade previousTimeSensor
    attachInterrupt(3, rpmCountFun, RISING);  //enable interrupt



void setup()   {

  attachInterrupt(3, rpmCountFun, RISING);

  DEBUG_PORT.print("\t RPM \t");
  DEBUG_PORT.print("\t speed\t");
  DEBUG_PORT.print("\t distance\t");
  DEBUG_PORT.println("\t global counter\t");

void loop() {
  currentTime = micros();


Is it possible I'm going about this in the wrong way? There is almost zero information out there about reading a 2 wire proximity or inductive sensor for RPM

It should be noted that the only reason I'm using the ABS sensor for speed is that the GPS modules I was using before are pathetically unreliable. Cell phones had more reliable GPS 10+ years ago. Since my entire sketch is very very depending on having an accurate speed, a lost signal from a GPS sensor would spell chaos.

2. Set it to AC voltage and connect to the sensor. Spin the wheel, and it will read mV that increase with wheel speed.

It sounds like you can measure the speed by connecting it to a rectifier and read it through the ADC.

Its an AC tachogenerator, Rectify and voltage divider may get you somewhere, but you'll lose the
lowest speeds to the diode drop.

Yeah, I don't know how I ignored the part where its a VR signal.

I'll have to find an appropriate rectifier. I've heard that the MAX9926 is a very good choice, but they aren't available local. I'll have to order from China and wait a month.


No matter what computer and where I try to edit it from, I get an error and get locked out of the website. I was trying to fit the IMG tags on my last post, but I end up having to reset my router just go to get back here once I had that Edit button.

Anyway, I apparently have a VR signal and need to do some signal conditioning.

Maxim makes some very good stuff I can get from Digi-key.
The 2 recommended are the MAX9924 and MAX9926.
My understanding is that the 9924 is the single channel version, and the 9926 is the dual channel version.
Since I need to read 2 of these sensors, I assume the 9926 will accomplish what it would take 2 of the MAX9924 to do?