The dispenser consists of four separate 3D printed components and uses a bipolar stepper motor to dispense individual 45mg food pellets. An infrared break-beam attached to one of the external interrupt pins is used to keep track of how many pellets have been dispensed. The dispenser is designed to be operated with an Arduino using an Adafruit motor driver shield and can be adapted to any other micro-controller and H-bridge.
4x - M3x0.5 hex nut (McMaster-Carr part number: 90695A033)
2x - M3 35mm socket cap screw (McMaster-Carr part number: 92095A201)
2x - M3 50mm socket cap screw (McMaster-Carr part number: 92095A475)
1x - 3mm IR break-beam (Adafruit part number: 2167)
1x - Adafruit Motor Shield v2 (Adafruit part number: 1438)
1x - Nema 14 bipolar stepper motor (Pololu part number: 1208)
STL files are provided ready to print. The original SOLIDWORKS part files are also availalbe if you wish to make any changes for your application. An assembly file is included to show how the parts assemble, but this should not be used for printing.
Break-beams are interrupt driven to keep track of the number of pellets dispensed. The Adafruit motor driver library was used to handle the motor control.
The dispenser is set to switch the direction of the rotor after every five steps. This was found to reduce jamming and crushed pellets. A delay of 100ms was added after each step to help the break-beams to detect individual pellets.