Pick and Place Picker Software Upgrade

Tuesday 04 March 2014

PNP Update

Since building the DIY Pick and Place machine we have had a problem with the Atmel processor powered component selector which was using the AccelStepper library which would randomly push the selector ram down when the X axis was still moving. This would cause the picker needle to try to pick a component from a picker which wasn’t ready and this caused the board build to fail until everything was reset again.

The code wasn’t crashing at any consistent point and it appeared that the AccelStepper library was reporting that it had finished the move to the new feeder before it had completed and this caused the code which triggered the picker ram to run and then the actuator would go down too early.

We tried several rewrites of the code using the AccelStepper library but it still had the random problem so we had to start from the beginning again and write our own stepper code with basic acceleration and deceleration routines and failsafe code to ensure that the picker actuator could not go down while the stepper motor was still moving.

The new code uses an interrupt timer to produce the pulses and uses different maximum speed rates depending on how many pickers the actuator has to move across for each new selected picker.

The Atmel processor communicates with the main Microchip processor via I2C commands.

The new picker controller code is available to download from: https://github.com/briandorey/PNPControllerKFlop

The video below shows the new code running on the pick and place machine while building an ADC Pi expansion board for the Raspberry Pi.