Hi Tim,
that design won't require a microcomputer. It more or less requires one XOR-gate to determine a short nail. It even ignores missing nails completely.
(mis load).
In the meanwhile I designed two cirucuits, one containing the sensor circuit around the TDA0161 with the option of horizontal and vertical mounting of the sensor coil.
The second board contains the power supply (selectable 115 or 230V) and the logic circuitry. The input uses a NAND Schmitt-Trigger for signal conditioning, being followed by the XOR-gate. The truth-table for XOR:
A-0, B-0, Q-0
A-1, B-0, Q-1
A-0, B-1, Q-1
A-1, B-1, Q-0
applied for the nails that means sensor A (top of nail) generates a logic 1. If the nail is long enough sensor B (bottom of nail) also generates a logic 1, leading to an output of logic 0. (Nail length within determined tolerance). If the passing nail is too short sensor B will generate a logic 0, causing the output to shift to logic 1. The following NAND gates are not necessary, but they must be connected anyway and are used as double inverter. The output controls T1 which energizes the self latching relay and putting out all three terminals (potential free) for further action.
If a nail is completely missing both sensors generate the same output (logic 0), meaning the (absent) nail is being ignored.
If the machine has been shut down due to a procuction failure the circuit must be completely disconnected from mains to reset it.
The sensor board is completely made with SMD components (except for three pin connector) for maxium freedom at the machine.
The PCB outline shows the cutting line if the sensor coil is mounted vertically, assuming a board thickness of 1.5mm and a coil height of 3mm.
The power and control board is single sided and contains two wire jumps + the jumps for mains power selection.
The circuit is designed for a gap of 2mm between nail and coil.
If you want to build the circuit as shown please PM me for the Eagle files.
Boncuk