Wednesday, 6 April 2016

Raven SmartBoom Part 3

Well the SmartBoom unit is now installed in the tractor, connected to John Deere's GPS over the serial cable, and plugged into the Flexi-coil switch box using the circuitry I designed and spoke about previously. In dry run tests it appears to work! The system has one weakness and that is that, as far as I know, it does not compensate for the way the sprayer tracks behind the tractor as it turns. I believe SmartBoom assumes the booms are perpendicular to the tractor's direction of travel. For most things I think that will work okay. For spring herbicide we can always manually override it from time to time as the turning wedges get tighter as the we get towards the outside edges of the circle. For fungicide and insecticide it's not quite as critical and I'd rather concentrate on not hitting the bee tents! If it does turn out to be too much of a problem, a computer with 2 serial ports could probably calculate the tracking path and adjust the reported position sent to SmartBoom. I'm looking into this.

Homemade Harness and Plugs

Rather than pay $500 for a SmartBoom wiring harness that I could chop up, and since I couldn't find the necessary plug anywhere on the internet, I ended up machining my own end cover and making my own plugs. Since I did not want to modify the board in any way, I chose not to solder any wires to the board. Instead I made up little plugs with male 2mm pitch pin strips that plugged into the appropriate pins on the female pin plugs that I referred to earlier. Serial is 3 pins on one connector, and the sections come from 4 pins on another connector. I chose not to mess with the master switch at this time, so I didn't bring those wires out of the chassis. I'm just using the Enter button on the front to toggle SmartBoom on or off.

For the serial port I used an RJ-45 jack, wired to Cisco's serial standard, though only using the Gnd, TX, and RX pins:

For the section control signals, I used a standard 4-pin Mic plug. I put a female plug on the SmartBoom, and another female plug on the switch unit, and use a cable with two male ends to connect them, though I could have wired the cable permanently on the SmartBoom end of things. I chose not to since I wasn't sure what length of cable I wanted as I plan to use SmartBoom on other outfits in other tractors doing things like spreading edge with the Valmar.

Tying it all Together

Here's a pic of the inside of the switch unit. This is my spare switch unit and when I get the replacement toggle switch I need, I'll wire it all up and post pictures of that here. For now you can see the mic plug and the little tiny circuit board wrapped in a nice electrical tape blanket. The colored wires will attach to switches 1,2,3, and 4, and the black wire will go to ground.

Inside the tractor, a 4-conductor cable attaches from the back of the SmartBoom to the Switching unit:

As you can see, it's working. Here it's driving the sections. Even though the switches are down, the red lights are on, showing that the section is operating. The main on/off switch still works so I can easily shut down the sections if I need to quickly stop things. Here's a picture where the sprayer is overlapping and is only running two sections:

Pretty exciting! In a few days we'll try it with foam markers and water and see if we can get it tuned right.

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.