We choose to use several different microcontrollers for a few reasons. We are more familiar with the Microchip PIC controllers so these were our first choice for the main processor. After choosing a PIC for the USB host we found that it didn’t have enough PWM outputs to control both LED arrays and the vibration motor output so we delegated the vibration motor to a separate 8 pin PIC. We choose an Atmel chip for the stepper controller because we wanted to use the same code as on the previous version of the control board and delegating the stepper driver to a separate microcontroller would allow it to generate the pulses for stepper motor without pausing every time a USB command came in from the PC.
After building the control board we initially had problems getting Windows to detect it as a HID device. After a bit of head scratching and trawling through the datasheet for the PIC processor we found that we had forgotten to add a 220nF capacitor between the Vusb pin and ground so the microcontroller was not generating the correct voltages on the USB data lines. This was solved by soldering a capacitor between the two pins over the top of the microcontroller. Not the prettiest of bodges but it works.
Our previous pick and place software was then updated to issue USB commands rather than via the SmoothStepper board and after a few small issues such as the wrong valve switching we were able to run some test board files on the machine which are a lot faster than the old system.
The circuit schematic can be downloaded in PDF format.
The video below is an overview of the new board and a preview of the machine running a board build file.
The code for this board can be downloaded from https://github.com/briandorey/PNPControllerUSB