Wednesday, 16 March 2016

"ISO-compatible" Speed Sensors

Many of our machines, including the air drill and the sprayers, have a 3-wire sensor to detect speeds. On the Air drill there is one on the cart wheel to detect ground speed, and there's another on the fan to detect fan RPM. On the the air cart and the sprayers they all use the same sensor, CNH part number 13976. The parts catalog calls this an "ISO-compatible speed sensory." But just what is this sensor?

Some online sources call this a hall sensor but that's not correct. It's actually an inductive proximity sensor. I'm not sure of all the specifications for sensing distance, etc but I do know it's a fairly standard 12V inductive sensor inside, but with a twist and some additional circuitry.

CNH Sensor Characteristics

When the sensor is not detecting metal, there is about 2.9k ohms resistance between the white wire and ground. The purpose of this resistance is to allow the computer to detect whether the sensor is plugged in or not or the wire is broken. A normal NPN sensor would ordinarily have either very high impedance between sensor and ground when the sensor is not triggered (open) and very low impedance when triggered (closed). This would make it difficult for the computer to quickly and easily detect if the sensor was attached. If the sensor is open that could mean either the sensor is unplugged, or maybe it's stopped between gear teeth. This resistance acts as a sentinel.

When the sensor is detecting metal, the resistance between the white wire and ground goes to between 200 and 260 ohms. It does not go to zero, which would be the normal behavior for an NPN sensor when in closed position. The reason some resistance is desirable is that this allows the computer to detect a short-circuit on the white wire.

Not Actually an NPN Sensor

Some additional circuitry is thus required to adapt an off-the-shelf proximity sensor to be "ISO compatible. My first attempt involved using an NPN proximity sensor with a single 2.9k resistor between white and ground. This worked sometimes but only if the sensor was in the open position when the computer booted up. Otherwise it said there was a short on the speed sensor. This clued me into the fact that the closed position isn't a short to ground but rather about 200 to 260 ohms.

We can get behavior identical to the ISO-compatible CNH sensor by using an NPN normally-closed proximity sensor with a nFET, or a PNP normally-open proximity sensor with a regular NPN transistor, and three resistors in either case. Here are the circuit diagrams:

The idea behind these circuits is tie the signal wire to ground through a 2.9k (or 3k) resistor. This ensures that when the sensor is in one state (we shall call it "open" though it may be exactly opposite of the inductive sensor state depending on whether the sensor is NPN or PNP), the resistance between white and ground is 2.9k. When the transistor is switched on, this connects the white wire to ground through a 300 ohm resistor, which means that the 2.9k and 200 ohm resistors are now connected in parallel, which yields an impedance of around 260-270 ohms on the white wire to ground. This is the "closed" state.

It really does not matter if using a normally open or normally closed sensor for this purpose. The number of teeth on the gears is always the same as spaces, so it doesn't matter if we're counting spaces or teeth. The speed is the same. But to match the CNH behavior exactly, normally-closed for NPN, and normally-open for PNP. (Did I get that right or exactly backwards?)

Unfortunately, with the NPN sensor (Bought from Automation Direct, Part number PNK6-CN-3A), an NPN BJT transistor won't work. I think this is because the impedance of the NPN proximity sensory load wire when closed is high enough that current still flows through the transistor. In other words even though the proximity sensor pulls the voltage down, there's still current flowing through the transistor. Electricity may take the path of least resistance, but it does so equally. Current flows through the proximity sensor load wire and the transistor at the same time. Thus the transistor never switches.

An N-type mosfet does work in place of the BJT, however, as it has super-high impedance and switches on voltage, not current. So the load wire on the inductive sensor is able to pull the voltage down low enough to switch the mosfet off. Thus the circuit works and we get the desired impedance levels. However mosfets are extremely sensitive to static and other voltage events and burn out easily. So I expect the mosfet-driven arrangement will not be reliable. (Update Sept 12, 2016: As of now the sensor is still functioning so it seems to be reasonably robust.)

The most reliable arrangement may be the PNP inductive sensor, such as Automation Direct part number PNK-AP-3A, connected to the base of a normal NPN BJT transistor, held to ground by a 10k resistor.

Conclusion

So rather than buying an expensive CNH part to replace a bad sensor, an off-the-shelf 12V normally-open PNP sensor can be used with some simple additional circuitry of a transistor and 3 resistors. What could be more simple?! CNH's parts business likely remains secure.

Here's a picture of the sensor, embedded in the 22-mm plastic housing that the old sensory was in. I should have bought the longer sensor. The short sensor was too short, so I pulled apart the original, failed sensory and reused the 22-mm plastic housing. In the future I'll just use the longer PNP sensor, and some washers.

And here's a picture of the little circuit, between the Deutsch plug and the sensor, before I encased it in silicone sealant and wrapped it up nicely:

No comments:

Post a Comment