DEV Community

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

Posted on

5 1 1

๐Ÿ“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

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

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!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

๐Ÿ‘‹ Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay