Show your support for community science. Donate to Public Lab »

Public Lab Research note

Assembling the Public Lab Lego Spectrometer

by warren |

Follow these steps to assemble a Lego Spectrometer, for use with the Raspberry Pi camera.

This design builds on, and is version 4 of, the Desktop Spectrometry Kit. It is still a prototype! For more on Do-It-Yourself spectrometry, see this page; see more on the Lego Spectrometer Kit.

To preorder a kit, visit the Public Lab Store:

Pre-order a kit

Design files (including Lego Digital Designer files and parts lists) are kept here:

1. Lay out your pieces

You should have 53 parts, of 10 different types:

  1. Four (4) 1 x 2 bricks - 3004
  2. Thirty three (33) 1 x 4 bricks - 3010
  3. One (1) 1 x 6 brick - 3009
  4. Two (2) 2 x 2 corner - 2357
  5. One (1) 4 x 6 plate - 3032
  6. One (1) 6 x 8 plate - 3036
  7. Two (2) 2 x 4 45 slopes - 3037
  8. Four (4) 1 x 2 Technic brick with hole - 3700
  9. Two (2) 1 x 4 Technic brick with holes - 3701
  10. Three (3) Technic pins with friction ridges - 2780

Here are images of all the pieces in the order above:

image descriptionimage descriptionimage descriptionimage descriptionimage descriptionimage descriptionimage descriptionimage descriptionimage descriptionimage description

Also see this page for links to 3D-printable models on Thingiverse and Tinkercad.

Assemble the case

The case is made of legos, in three levels, as shown here. It's designed to be rigid but to be made of as few different types of Lego as possible, and using cheaper pieces:

image description

Level 1

Start with one of the 6x8 plates and use 5 1x4 bricks to enclose all but one side. Add a sloped piece as shown.

image description

On the other 6x8 plate, use four 1x4 bricks to line the sides only.

image description

At what will become the "front" of the spectrometer, add one 1x4 Technic brick with holes with one peg in the middle. Behind it, place a regular 1x4 brick (to stop light leaking in).

image description

Level 2

Start with a single 1x6 brick at the "back" of the box, and then add a second sloped piece to make a ramp -- this is where your camera will go.

image description

Use 1x4 bricks to continue the Level 2 walls to the front, but end with the L-shaped 2x2 bricks to create a narrower window at the front:

image description

In front of the L-shaped bricks, add two 1x2 Technic bricks with holes and pegs. This forms the locking interface with the sample holder, or any other "compatible" attachments.

image description

Level 3

Now use 10 more 1x4 bricks to line the top, but leave the back open for the camera cable, and double up the front for strength.

image description

Sample holder

Now take the 4x6 plate and use 3 1x4 bricks and 1 1x4 Technic brick with holes to make a first layer of walls.

image description

Use 4 of the 1x2 bricks and 2 of the 1x2 Technics bricks with holes to complete the second layer and the negative side of the pin "interface" -- see how they line up with the pegs on the main body? A hole is left at the back for light to shine in, although if you're doing some kinds of analysis (like #fluorescence), you'll want this hole on the side instead.

image description

Finish the 3rd level of the sample holder with 4 1x4 bricks, and snap it onto the main body.

image description

Here it is assembled! The hole on top is for sample containers -- like cuvettes. You may want to pad it with black paper or foam core to make a tighter fit for whatever sample containers you use.

image description

On the inside of the window of the main body, tape or glue the narrow slit we've printed on negative film. You can also make your own from two sheets of precisely cut paper or metal foil, or two razor blades.

image description

You can use permanent double-sided foam tape, or hot glue, to affix the camera to the slope. Once it's in the box it won't be moved around, but you want it to be firmly attached. If you have a webcam instead of a Raspberry Pi camera, attach it here instead, although you may need to modify the box to fit it snugly.

image description

Cut out a slice of DVD and peel off the transparent layer, then cut it down to size as shown here (from the papercraft spectrometer instructions).

image description

Tape or glue the DVD slice onto a piece of stiff black card paper (as provided in our kit), or use Lego to make a frame if you like. Just be sure it's very firmly affixed in place - I've used some very strong tape, but you can also use hot glue. Be sure the outer edge of the DVD is at the top -- see the curvature in the image below as a guide.

image description

Now fold up and add the black paper liner included in the kit. This is really just a simple black box to add extra light-damping protection, especially where Legos may be shiny enough to cause reflections.

image description

Now put the cover back on and seal up the end where the ribbon comes out, using some opaque tape. I could do a better job in this picture, but it's nice to illustrate:

image description


Now plug your Raspberry Pi into the camera cable and you're done with assembly! See this post by @partsandcrafts for instructions on setting up your Raspberry Pi to stream images over WiFi, or with the right cables you can plug in a monitor and keyboard and capture images that way.


There are a lot of things we could refine about this, and we're hoping you'll share your setups and any new add-ons you develop.

Upgrades and next steps

We're hoping to simplify the process of connecting to the Raspberry Pi to fetch images. There's some great challenges and next steps posted on this page -- if you can help improve this open source kit, please pitch in!

If you modify the design at all, please leave a comment. And tell us what goes well or what goes wrong! Post a comment here or use this page to post questions, and help one another out as well -- we're a peer-driven community!

Thanks and good luck!

I did this 

People who did this (0)

None yet. Be the first to post one!

This is marked this as an activity for others to try.
Try it now   Click here to add some more details.

spectrometer spectrometry fluorescence raspberry-pi lego raspberry-pi-spectrometer lego-spectrometer

activity:education activity:raspberry-pi-spectrometer activity:lego-spectrometer


I just got a lego spectrophotomer "kit" a bag of some lego pieces, a slit, and a CD. Directions are online I guess and the buyer must supply the raspberry pi I assume.
$ 50 dollars for the above seems a little steep (actual cost $ 2 - 3?) and mailing cost of ~ $7 hard to believe for such a light package.
Am I missing something here?

Is this a question? Click here to post it to the Questions page.

Hi @dcanprdn you're not missing anything, our initial pre-order was so that folks could get in early to start making their own and contributing to the project, and there are other variants of the kit coming soon. That said, we're sorry to hear you're frustrated with what you received! If you would like to drop us a line at, our store manager can work with you to facilitate a return/exchange/unpgrade/etc.

You must be logged in to comment.