Following on from my first post asking for recommendations on Raspberry Pi sensors and HATs, I’ve finally commenced the early design/development for an Automatic Lego Sorter.
I’ve separated it into 4 stages:
- Source bin & feeder
- Physical separator (vibrating v-channel)
- Part Identification - Tensorflow on network
- Exit bin(s) - pivot chute mechanism
Each stage is monitored and controlled by a Raspberry Pi CM4/IO Board combination, however, the intent is that this could be operated by any Pi-compatible platform that uses the same 40-pin GPIO headers and can run Python. I’m using 3 of the Adafruit 2348 Stepper/DC Motor Controller, 2 fitted with stacking headers, to control a series of DC/Stepper/Vibration motors. A series of IR Break Beam sensors are planned for signalling when a part has crossed threshold points, with code activating/deactivating motors in each of the stages.
I’ve been given 3 NEMA17 stepper motors to drive 2 separate conveyor belts and a pivot chute.
Stage 1 - Source bin & Feeder.
Parts: 1x NEMA17 Stepper, 40mm PVC pipe, 3x 8mm x 22mm x 7mm precision bearings, 8mm threaded axle stock, 5mm coupler w perpendicular plate (for NEMA17 spindle), Custom designed/3D printed coupler (connect PVC pipe to form conveyor roller), M8 bolts/nuts, M3 bolts/nuts, grip material (the kind used to line kitchen drawers, to be used for making the conveyor belt), 6mm MDF.
After realising that my woodworking skills hadn’t improved in the 3 decades since high school, I sat down with LibreCAD and designed a series of panels to be lasercut out of 6mm MDF/Ply. Currently awaiting quotes on getting this done, but have also found an interesting online project from V1 Engineering, called the “Lowrider CNC” that I might just end up investing some time and $$ into.
I also needed to find a way to use off-the-shelf PVC pipe as a roller for the conveyor belt, as every option for purchasing a conveyor belt system was a combination of too large and too expensive. I came up with a design for a coupler that connects 40mm pvc pipe, bearing and drive coupler, with an option of a straight through passive axle and a drive/passive combination. I managed to find a local 3D printing studio that refined the design further and has produced the quantity required for this stage. An earlier attempt sent to PCBWay resulted in mixed success, but could easily be used in future once the design is finalised.
The prototype design at this stage mounts all components to the laser cut panels, with some recessing for bolts/nuts and options for thrust bearings if needed. I’ve been able to obtain some v-split rails (2020 and 2040) from some broken 3D printers to test a few different ideas. I had thought of using this for the final project, but the costs may be too restrictive.
The other side of this stage is the electronics, specifically soldering motor HATs, connecting up the Pi, powering everything, and finding the right operating system. I plan on using a common power supply (a 65W 12V off the shelf from Jaycar with a 5A max) with an inline switch followed by a 4 way splitter to connect to the Pi’s IO Board and each of the 3 HATs.
Tasks that remain for this stage:
- Software - importing the necessary Adafruit python libraries
- Wiring for motor HAT to motor
- Testing motor control
- Integrating IR break beam sensor & testing
- Code for activation - sensor - deactivation logic
- Revisions for mechanics/structure - in this area, I’m likely going to have to revise the belt system to allow for adjustment and tensioning.