Monday, March 14, 2011

Design Changes for the Geiger Lund Asparagus Harvester Master Controller

In a previous blog I described how I came up with the design for the circuitry to control various functions of the asparagus harvesting machine. I built a bread boarded circuit and worked on programming it.

I decided the circuitry had a lot of unnecessary redundancy, and there were ways to simplify the circuitry further still. After I’ve worked on programming for a while I often think of ways to improve the hardware. In this case I decided to move the air regulator functions to a separate 12E675 PIC chip. It greatly simplifies the programming.

Functions of the controller:

Turn on electronics by hydraulic pressure.

Lock out air valve when the machine is not moving.

Provide for cut timing adjustment.

Regulate air pressure for air cylinders

Sound alarm horn when air pressure drops below minimum setting.

Sound alarm horn in if there is a cylinder malfunction.

Provide the tractor driver with up and down buttons for the header.

Control the lift cylinders valves to float the headers 9" above the bed.

Raise the header fast in case of an air cylinder malfunction.

Buffer the shaft encoder and send encoder output to optics boards.


Lift cylinder "slow" valve Up Solenoid

Lift cylinder "slow" valve Down Solenoid

Lift cylinder "fast" valve Up Solenoid

Lift cylinder "fast" valve Down Solenoid

Alarm Horn

B+ for air valves

Encoder signal for optics boards

Output for air regulator valve


Up proximity switch - open collector output

Down proximity switch - open collector output

Driver pendant up button - momentary contact to ground

Driver pendant down button - momentary contact to ground

Shaft Encoder output - open collector output

Photo electric switch - cyl. fault detector - open collector output

Air pressure transducer - 0 to 5 volt = 0 to 250 psi analog output

B+ from Hydraulic Pressure Switch

Explanation of the circuit

The circuit board has a couple of relays, one of which operates without the aid of any microcontrollers, but consists primarily of interfacing between the input sensors and the microcontrollers and providing high current output drivers for the microcontroller outputs.

All of the inputs and outputs use screw terminals. I’ve tried pluggable connectors on my harvester in the past and I’ve had problems with them. I never have any problems with screw terminals.

J1 and J2 are 3 terminal blocks for connecting the proximity switches that determine the bed height. They provide ground, +12 volts and provide 4.7k ohm pull-up resistors for the open collector outputs of the proximity switches.

J3 is a 4 terminal connector for the driver pendant. It provides a ground, a terminal for the up button and a terminal for the down button. A spare up button terminal is also provided.

J4 is a 3 terminal connector for the photo switch that detects air cylinder malfunctions. The connector provides a ground, +12 volts, and a signal terminal which ties to the up switch terminal on J3.

J5 is a 4 pin terminal, with two ground terminals, +12 volts, and a signal pin tied to a 4.7k pull-up resistor. The signal pin ties to the input a ULN2067B driver for buffering, and to the 16F627 chip.

J6 is a 3 terminal connector supplying ground, +12 volts, and pin for connecting to the pressure transducer. The output of the transducer is an analog 0 to 5 volt output and so doesn’t require a pull-up resistor.

J7 is a 3 terminal connector that sends the encoder signal and the timing voltage to the optical board. It has a ground pin, encoder output pin, and a 0-5 volt dc analog signal pin. The 0 to 5 volt timing signal pin connects to the wiper of a 5 k pot forming a voltage divider. The encoder out pin connects to input of the UL2067B logic driver.

J8 is a 6 pin connector provides terminals for the slow and fast hydraulic cylinder valves, the alarm, and the air regulation valve. The inputs of the drivers are driven by the microcontroller pins.

J9 is a 6 pin connector which having two terminals for connection directly to the battery and a terminal for the hydraulic pressure switch. It has output pins providing the B+ for the optical sensor and hydraulic valves.
The terminals to the battery pass through a fuse, and goes on to provide 12 volts to everything that uses 12 volts.

The alternator needs a field connection to the battery to begin putting out voltage and needs to be disconnected when the alternator isn’t spinning. A hydraulic pressure switch connects the positive battery terminal to the alternators field. The field side of the switch also drives relay K2s coil directly.

Relay K2 provides a connects the fuse to the B+ terminals for the optical board, alarm horn, hydraulic valves and to the relay that provides B+ to the air valves.

The relay that powers the air valves is driven by a npn transistor which is in turn driven by an output pin on the 16F627 chip. The two relays both have suppression diodes across their coils.

The fused 12 volts from the battery feeds to a 3 terminal +5 volt regulator, and bypass and filter caps provide 5 volts for the chips and the pull up resistors.

Chip U2 is a 16F627 PIC chip and provides the functions of floating the header at a pre-determined height above the bed, enabling the air valves when the machine is in motion, raising the header rapidly if a cylinder malfunctions or the up button is pushed activated. It also provides an for an alarm horn signal for a couple of seconds whenever the header is raised rapidly.

Chip U3 Provides the air regulation function and sounds the alarm horn if the air pressure drops too low. A pot is connected from ground to +5 volts with the center lead connected to the analog to digital converter in the chip to obtain an air pressure set point.

In the future I will blog about the programming of the chips.