This post is my notes for attaching a raspberry pi to Lego to run power functions / powered up motors and hopefully start by build a train!
- Ive got the track - purchased โ
- Train motor - purchased โ
- A pi 3 B+ - lying around should I swap for a 0 W2?
- A power supply โ
- A builder hat or BrickPi if still available and compatible โ
- A method of attaching a pi to base plate without glue or modifications to either or.
Thinking outside of the brick
I raided my sons Lego today to try and find some suitable standoffs. You may have wondered about bars, all bar like elements have a diameter of 3.18mm (Lego has crazy tolerances and intentions beyond accident) that means that all hands, clips, bricks with holes, jumpers you name it they all fit around that size. Not only do I find that fascinating I thought maybe the piโs standoff holes may fit a barโฆ sadly I was mistaken they are a hair to large.
As far as I know there arenโt many things smaller in lego as I mentioned, after many desperate attempts (including bananas) to find some Lego, I searched deep in my brain, and thought > What about minifigures? I took off the hands and used the reverse end and it fits! It fits so well I built a hole scaffolding around it.
As you can see the severed hands of minifigure stumps wearing the pi like a bracelet ๐ฌ, the โboneโ of the wrists serve as compression fittings and the bar underneath is now supporting the pi with full adjustment in all directions! itโs good to know that the plate size (ice blue) is perfect but the pi needs to be on 2x2 jumpers to offset its position, this isnโt stressing any parts which is crazy!
Iโm going to change the design a little, adding cross bars underneath and 1x1 clips mounted straight onto the base, I will continue to use those pieces with the skinny tiles wall as they allow the pi to fit.
Iโm also thinking about making this even smaller if the pi zero w 2 can drive the motors and run code fast enough!
Many thanks ๐
Iโm an AFOL now it seems
Top comments (2)
Awwww yeah! Hands for the win. ๐
Haha, very ingenuitive. This is sawesome!
Thanks!