DEV Community

Adam Crockett ๐ŸŒ€
Adam Crockett ๐ŸŒ€

Posted on

๐Ÿ“Building a Lego Raspberry Pi case for robotics ๐Ÿฆพ

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.

Image description

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)

Collapse
 
michaeltharrington profile image
Michael Tharrington

Awwww yeah! Hands for the win. ๐Ÿ™Œ

Haha, very ingenuitive. This is sawesome!

Collapse
 
adam_cyclones profile image
Adam Crockett ๐ŸŒ€

Thanks!