-
Vibe feeder (2)
11/28/2025 at 09:03 • 0 commentsThe new feeder is built and briefly tested:
![]()
It works ok:
- resonant frequency is just about where I wanted it - about 60Hz - right off the bat, which was handy.
- the DRV8871-based H-bridge motor driver and solenoid combination work nicely as a voice coil actuator. Current limit was set at about 250mA which seems to give plenty of displacement without getting the coil too warm from 12V. Adjusting the pulse width (zero up to about 5msec/30% duty) allows good control of the amplitude.
- items on the Vee tray progress along it nicely, but quite slowly. If the amplitude is increased they end up bouncing along rather than moving faster. So I need to do something about that. For a target of 2 bricks per second, assuming a mean brick length of about 30mm (4 studs), that means 60mm/s minimum.
I think there are two options for faster transport: i) increase the spring stiffness so that the frequency can be increased (more hops per second), and/or ii) increase the 'inclination angle' of the springs so that the hops are directed forwards more, and less upwards.
The resonant frequency of a spring-mass system is calculated by:
f = (1/2*pi) * sqrt(k / m)
The spring constant k is for a flat strip constrained at one end:
k = (E * w * t^3) / (4 * L^3)
m = mass
w = width
L = length
t = thickness
E = Youngs modulus
(This isn't a great model, of course, because the real springs are constrained from rotation too - the brass strip doesn't form a simple bend but more of an 'S' shape. I expect the real k will be a lot higher as a result).
So for a 10mm wide, 30mm long strip of 0.8mm brass (E=100x10^9 N/m), supporting 50g mass, the frequency is 50Hz - not far off the 60 I measured.
To double that, k must be 4x higher. I can either make the springs 4x wider (!) or 59% thicker (1.3mm), or 63% of their current length, i.e. 19mm. Or some combination of the above.
I can't easily increase the thickness, except in multiples of 0.8mm. I can increase the width, but perhaps only to 20mm before they're impractical. I can't really make them much shorter either or else there isn't room for the solenoid.
Let's try changing the angle instead...
Yeah that seems to work and, in conjunction with slightly shorter, wider springs, the frequency is up to about 140Hz. The video shows it easily achieves the target of 60mm/sec. Take away the drive signal and the pieces stop dead.
-
RGB vs HSL vs HSI
11/24/2025 at 15:26 • 0 commentsI got a bit sidetracked.
The new vibe feeder is under way, but stalled waiting for parts to arrive from the east.
In the meantime I've added a window over the colour sensor and, as predicted, the sensing got messed up and the machine wouldn't sort properly any more. So that prompted a whole bunch of work looking at the RGB sensor again:
- a proper calibration routine to scale the sensor outputs so that they are better matched and less affected by changes in ambient lighting.
- a dive into alternative colour spaces, such as HSV, HSI and HSL which, at least to my eye, seem to make the sample data easier to classify: white, grey and black have low saturation and can be distinguished by their brightness, and the other colours can mostly be classified by ranges of hue. I was able very quickly to put together a decision-tree classifier in HSL-space which, on a sample set of 2700+ bricks, achieves about 90% accuracy. Most of the remaining errors come down to the big variations in lighting each brick receives while it tumbles past the sensor. If I could slow them down and stop them tumbling, that should improve.
- a bit of research into other classifiers, such as k-NN and SVM, which might do better, but I'm not sure I can justify the effort just yet.
Right now the machine works really well. I can leave it pretty much unattended and it...well...sorts bricks!
-
A new vibe feeder
11/14/2025 at 15:27 • 0 commentsI'm going to run this part as a separate mini-project I think, until it's working, and then integrate it back into the rest of the machine.
![]()
The idea is twofold:
- Make a short section of Vee channel which works much more like a traditional vibratory feeder than the current 'jiggler'. By that, I mean the pieces are simply transported along, rather than subjected to significant upward impulses to try to get them to untangle and separate. That's such a useful function that I have to keep it, but this new feeder is in addition. Assuming high-frequency, small vibrations, it should be possible to transport them along a horizontal section of channel and, crucially, switching off the vibrations should cause them to stop dead in their tracks. This excellent article describes what I mean.
- Then, fit the end of the feeder with another light sensor to detect the precise moment a piece topples off the end. The vibrator can then be temporarily switched off - just a few 100 milliseconds - to give the piece a chance to get on its way past the colour sensor, before resuming the flow.
I'm hoping this stop-start mechanism will enlarge the spacing between the pieces enough for them to be dealt with individually. Thanks to this recent HAD article, I've now learnt there's a word for this: "singulator". Nice.
So I've bought a small solenoid (the sort that is used as a simple out-in piston actuator) and I'm going to attempt driving it at a few 10's of Hz or more using PWM to see if it will work as a vibrator/driver.
Watch this space!
-
And there's more...
11/14/2025 at 15:17 • 0 commentsOMG this is the project that just won't die...
I had the machine out again the other day and tried to use it to actually sort some Lego for once (rather than as a cute demo for some school kids). It still has niggly problems that I want to fix:
- the colour sensor is currently 'open air' - there's no window - so all kinds of fluff and dust, not to mention actual Lego, gets stuck in it.
- pieces, of all sizes, still come through in two's and three's all too often, degrading the sorting accuracy somewhat
- the very smallest pieces often don't slide all the way past the colour sensor; the gradient of that part of the Vee channel isn't steep enough and with so little momentum they stop until a bigger piece hits them from behind and nudges them along.
So, I've been thinking. Add a window over the colour sensor, and deal with whatever fallout comes from that. Shorten and steepen the final stage chute so that small pieces don't get stuck. And in the middle, maybe add a second vibratory feeder - with a twist. More on that in the next logs.
To date, I've modified the sensor to add a window made from a thin, curved piece of clear acrylic. It seems to be very good at keeping debris and Lego out of the sensor, but it's knocked the colour-classifier out of whack. Presumably everything now has a slight tint or something, which will need re-calibrating out.
-
Latest video
07/06/2025 at 13:33 • 0 comments -
More updates and improvements
07/06/2025 at 13:27 • 0 commentsThe drum scoops are redesigned to be smaller so that fewer pieces are dropped each time. Also I've gone back to six scoops instead of twelve, which leaves gaps between the scoops which is useful when there are only a few bricks left in the drum.
![]()
Here are just a few of the scoop designs I've tried along the way:
![]()
Also, after much coding, a bit of soldering, and the design and print of a case, the TOUCH CONTROLLER!
![]()
-
Updates!
06/07/2025 at 17:26 • 0 commentsSo it's been a while since the last log, and the machine has had many outings to school STEM events and the like. It has mostly worked really well, and got lots of interest and sparked lots of discussion - which was the whole point.
However, I've had some ideas for improvements. Some of those were implemented today:
- swapped out the vibrator motor for a larger one (a "280") since the original one got pretty warm and wore out too fast.
- added control of the stepper driver's nENABLE pin so that the stepper current can be switched off between moves to save power and stop it getting too hot. I think the shaft was previously getting so hot the 3D-printed PLA part attached to it actually melted slightly.
- added serial commands to start/stop the machine, adjust motor speeds, and read out a count of bricks in each bin.
The last item is there so that in the near future I can put together a touch-screen controller with a real-time display of brick counts, plus the option to tweak the speeds, stop it if there's a problem, etc. Watch this space...
-
Ready for first demos
06/16/2024 at 06:14 • 0 commentsA bit more tidying up, addition of a hopper and chute to load Legos into the drum, some fine tuning of the angles and software and it's done!
It's not perfect but it is really fun to watch. The main remaining issue is that the scoops inside the drum sometimes pick up quite a few pieces, which then overwhelm the vibe feeder and they end up tailgating each other past the sensor. Something to tweak later. I'd also like to add a touchscreen with start/stop buttons and some readouts of brick counts, speeds, etc. Other ideas in the comments please!
-
It's alive!
05/23/2024 at 06:10 • 0 commentsFirst time putting together all the parts:
-
Coming together now
05/20/2024 at 07:17 • 0 commentsI've chopped up something like 2.5metres of 2020 aluminium extrusion and turned it into a more permanent, more rigid frame for the drum feeder, vibration feeder and sensor head:
![]()
The drum is belt driven from a DC motor/reducer gearbox running at about 200rpm. I needn't have worried about the belt wandering off the drum - it's absolutely fine, without any need for additional guides or track to keep it centred.
Everything's adjustable - angles, clearances, etc. - so the next steps are to do some tuning to get it feeding reliably and quickly, before finally integrating it with the diverter and output bins.





