Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Saturday, 2 April 2016

Cheaper Replacements for CaseIH 2-wire Inductive Proximity Sensors

$200 Sensors

On CaseIH combines of recent vintage, there are several sensors throughout the combine that measure shaft speed or chopper knife position. Years ago shaft speed sensors were hall-effect sensors and required a magnet on the shaft to trigger the switch inside the sensor to generate a ppm signal. Now usually inductive proximity sensors are used. These sensors can be placed near gear teeth to measure speed, or they can simply indicate proximity to metal, which can help sense position. For example if the chopper knives are not retracted when the chopper is switched to low speed on Case combines, the computer alarms. There's a proximity sensor on the lever. These sensors are easy to identify because they are round and threaded, stick close to a moving part, have a wire sticking out, and usually have an LED on them that glows and blinks as sensor detects metal.

Proximity sensors come in various diameters and usually come with 3-wire plugs (or 4 wires). There are wires for power and ground, usually 12V. The third wire is essentially the emitter leg of a transistor. There are two kinds of sensors, NPN and PNP just like transistors. Also the sensor is either normally closed or normally open when not detecting any metal. When the circuit is closed, the LED will glow and the emitter wire will be connected to ground in the case of NPN, or 12V in the case of PNP. Either NPN or PNP can be adapted for use in these Case machines. However typically the sensors are normally closed (opposite of the sprayer speed sensor, which is normally open), meaning the LED glows when there's no metal nearby.

Also sensors have different specs for distance. Normally sensors are about 8mm maximum distance, but some sensors are rated at no more than 2mm and some are rated up to 20mm. I believe that the CNH sensors are standard distance, or about 8mm.

The sensor I have on hand is CNH part number 87342073, chopper speed sensor. It's 18mm in diameter and looks something like this:

Disclaimer: I removed the Deutsch plug and put it back on for this picture, but the wires might be backwards. Look at an existing sensor on your own machine to see the proper polarity. I'll edit this post with the correct polarity at a later date.

As you can see, the sensor has only two wires. We can power it up on the bench by applying 12v to the yellow wire and Ground to the blue wire. I find that it's a normally closed sensor. The LED glows when it's not near metal, and goes out when it is near metal. The distance seems to be about 8mm, which is standard for this sort of sensor. According to Case's parts site the same sensor is used for the following things:

  • Chopper speed sensor
  • Ladder position sensor
  • Unloading auger position
  • Chopper knife position
  • Shoe shaker speed

How to Convert 3-wire to 2-wire sensor

Two-wire sensors are easily made from three-wire sensors. You can buy off-the-shelf two-wire sensors, but 3-wire sensors are more versatile and useful for other applications besides the combine. Also if the combine computer requires a specific current characteristic, the three-wire sensor is easy to configure. Plus they are also slightly easier to find. I chose to buy the 18mm shielded, normal length, normal detecting distance, NPN, normally-closed sensor from Automation Direct. Part number PNK6-CN-3A. In the future I'll buy the PNP variety, since they will work better as speed sensors on my sprayer and air drill. Either way, this sensor is about $20 USD. Here's what it looks like next to the CNH sensor:

The way a computer reads a two-wire sensor is by sensing current. When the sensor is closed (not next to metal), a small amount of current flows through the sensor. When the sensor is open (next to metal), the current flow drops to zero. This is how the computer senses whether the sensor is near metal or not. As the current pulses the computer can calculate pulses per minute and thus RPM. I don't know what the range of current variation the computer can work with is. It would depend on how they designed their system.

Analyzing the Sensors' Characteristics

We can figure out how much current the CNH sensor uses with a multimeter in series with the power. According to my multimeter, the current flow is about 7 mA (0.007 amps) at 13.8 V. Using ohms law we can determine that the internal resistance must be about 2000 ohms. Our goal is to make the Automation Direct sensor have similar current flow characteristics.

Internally the CNH part must be either an NPN or PNP system but the emitter is used to light up the LED and also possibly tied to an internal load resistor, and not passed out externally to the sensor body. Again all that matters to us is how much current flows, and that the sensor is normally-closed.

On the bench we can plug in the AD sensor to it's power wires. It has its own LED that operates the same as the CNH sensor. When it's not near metal the LED glows, and goes out when it's near metal. We can put the multimeter in series with the power wire and we find that this sensor behaves similarly to the CNH sensor, even if we ignore the third wire entirely. When the LED is on, it consumes about 5 mA of power, and when it's off, there is no current flowing. It's possible that this would work as is on the combine, just ignoring the third wire entirely (cut it off and tape it up). However we can use it with a resistor to make this sensor very close to the CNH sensor in terms of current signalling.

Adding Load

Since the current draw is lower on the AD sensor, that means the internal resistance is higher than the CNH one. The AD sensor is about 2500 ohms, and the CNH sensor was just under 2000 ohms. Since the third wire is like a transistor emitter, and the sensor I bought was NPN, when the LED is on, the third wire is connected to ground. So an appropriately chosen resistor between the 12V power and the third wire will add a small load to the sensor, and bring the current draw up to the 7 mA the CNH part has. If the sensor was PNP, the resistor would go between the third wire and ground. Either way it would work, provided the sensor is normally closed since that's what the CNH sensor is. If you use normally-open, it would work for speed sensing, but some of the sensors like ladder position or chopper knife position wouldn't work at all.

We can calculate an approximate resistor value using this formula:

1/2000 = 1/2500 + 1/x

Solving for x, we get 8000 ohms. That's pretty close to 10k, which is a common size. And testing on the bench shows that 10k works pretty well.

Now all we need is solder the resistor to the correct wires (load and ground for PNP-type, or load and 12V for NPN type), cover it in shrink wrap or tape, connect it into the Deutsch plug (possibly using the old, non-working sensor's plug), and we've now replaced a $200 CNH part with a $20 Automation Direct NPN-NC or PNP-NC sensor plus a few pennies for a 10k resistor. Later this season I'll wire one up and do a follow up post.

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: