Patents, Prototypes, Manufacturing, and Marketing New Inventions
Designing a circuit board for controlling an invention using a Microchip PIC microcontroller chip.
My new selective asparagus harvester invention needs a master control circuit board. Here are the functions the board needs to control:
To control the various functions I will be using a Microchip PIC microcontroller, a 16F627, an 18 pin device. The chip has an 8 bit microprocessor with built in timers, counters, analog to digital converters etc.
Since all of the functions will be implemented in software I only need to know which external devices I need to connect to which pins on the chip, and take care of any interfacing needs.
The inputs to the control circuit board consist of two inductive proximity switches, one digital shaft encoder, one analog pressure transducer, one photoelectric switch, and three manual push buttons.
The proximity switches, shaft encoder, and photoelectric switch have open collector outputs and thus only need a pull up resistor to interface to the PIC chip.
The pressure transducer has a 0 to 5 volt analog output and thus needs to connect to one of the pins internally connected to an analog to digital converter.
The manual push buttons require pull up resistors.
To interface the 16F627 to the valve solenoids and audio alarm device Ive chosen to use ULN2067B Quad darlington transistors mounted in an 18 pin DIP chip. The devices have built in suppression diodes and have inputs directly compatible with TTL logic. Each of the four darlingtons will handle up to 1.5 amps.
All of the devices driven by the control board are 12 Volt DC devices and are directly driven by one of two UL2067B chips.
To design the board I use ExpressPCB software for the schematic and the board layout. The software is free and very easy to use.
A pressure switch in the hydraulic manifold closes its contacts when there is hydraulic pressure present. The switch is needed to provide 12 volts to the field windings on the alternator. One side of the switch connects directly to the battery, and the other side connects to the alternator field winding.
Ill use a connection to the field side of the pressure switch to energize a relay, (K1), which will in turn provide power to the rest of the circuitry.
Referring to the schematic below, K1 is a SPDT 25 amp relay. When energized it connects the battery + terminal to wires that head off to the various components like the sensors, hydraulic valves etc. It also supplies B+ to a second relay, K2, an identical relay, which in turn supplies B+ to the air valves. Relay K2 is controlled by the 16F627 via a 2N2222 npn transistor.
Ill use a # 12 gauge wire from the positive battery terminal to the control circuit board. Im using multi-cord cord grip strain reliefs to get the wires and cables in and out of the metal enclosure housing the control circuit board.
The wires will all terminate with screw terminal blocks.
Im including a fuse on the circuit board, and the fuse will connect the B+ on the circuit board screw terminal to the relay contacts.
The 16F628 has 16 input/output pins. Each of the peripheral devices, i.e. valve solenoids or audio device, are driven by one pin on the chip.
An audio signal is used to alert the driver of problems like an air cylinder fault, or low air pressure. The audio alert device is directly driven by one of the darlingtons.
The air regulator valve
The air regulation is provided by using an analog pressure transducer which produces a voltage from 0 to 5 volts depending on the pressure. The output of the transducer is connected to an input pin on the 12F675 which is connected to an internal analog to digital converter. A software program in the chip turns the valve that lets air into the manifold on and off as needed to maintain the pressure at a pre-set level.
To provide an adjustment to fine tune the air pressure a pot is connected to a second internal analog to digital converter which the program uses to adjust the pressure set point.
Also on the control board is a pot connected as a 0 to 5 volt voltage divider which goes to the optical sensors where it is used to adjust the cut-timing on the delay boards.
The output of the shaft encoder is fed into one of the ULN2067B chips to provide buffering since it will be needed by 3 delay boards in the optical sensors.
The home pulse of the shaft encoder is also fed to the 16F267 to provide a safety interlock. The software will use the home pulse to determine whether the machine is moving forward at a pre-set speed and if it isnt then the air cylinders will not receive the B+ power provided through relay K2.
The two controls, air pressure setting and cut-timing adjustment are provided by screw driver adjustable 10k pots shaft mounted through the board.
Now its time to breadboard up the circuit and get busy programming the 16F627 chip. I will of course, do an article on that part as well.
© copyright InventionsPatents.com 2015