Laser Cookies: a YouTube collaboration

Lasers! Cookies! Raspberry Pi! We’re buzzing with excitement about sharing our latest YouTube video with you, which comes directly from the kitchen of maker Estefannie Explains It All!

Estefannie Explains It All + Raspberry Pi

When Estefannie visited Pi Towers earlier this year, we introduced her to the Raspberry Pi Digital Curriculum and the free resources on our website. We’d already chatted to her via email about the idea of creating a collab video for the Raspberry Pi channel. Once she’d met members of the Raspberry Pi Foundation team and listened to them wax lyrical about the work we do here, she was even more keen to collaborate with us.

Estefannie returned to the US filled with inspiration for a video for our channel, and we’re so pleased with how awesome her final result is. The video is a super addition to our Raspberry Pi YouTube channel, it shows what our resources can help you achieve, and it’s great fun. You might also have noticed that the project fits in perfectly with this season’s Pioneers challenge. A win all around!

So yeah, we’re really chuffed about this video, and we hope you all like it too!

Estefannie’s Laser Cookies guide

For those of you wanting to try your hand at building your own Cookie Jar Laser Surveillance Security System, Estefannie has provided a complete guide to talk you through it. Here she goes:

First off, you’ll need:

  • 10 lasers
  • 10 photoresistors
  • 10 capacitors
  • 1 Raspberry Pi Zero W
  • 1 buzzer
  • 1 Raspberry Pi Camera Module
  • 12 ft PVC pipes + 4 corners
  • 1 acrylic panel
  • 1 battery pack
  • 8 zip ties
  • tons of cookies

I used the Raspberry Pi Foundation’s Laser trip wire and the Tweeting Babbage resources to get one laser working and to set up the camera and Twitter API. This took me less than an hour, and it was easy, breezy, beautiful, Raspberry Pi.

I soldered ten lasers in parallel and connected ten photoresistors to their own GPIO pins. I didn’t wire them up in series because of sensitivity reasons and to make debugging easier.

Building the frame took a few tries: I actually started with a wood frame, then tried a clear case, and finally realized the best and cleaner solution would be pipes. All the wires go inside the pipes and come out in a small window on the top to wire up to the Zero W.

Using pipes also made the build cheaper, since they were about $3 for 12 ft. Wiring inside the pipes was tricky, and to finish the circuit, I soldered some of the wires after they were already in the pipes.

I tried glueing the lasers to the frame, but the lasers melted the glue and became decalibrated. Next I tried tape, and then I found picture mounting putty. The putty worked perfectly — it was easy to mold a putty base for the lasers and to calibrate and re-calibrate them if needed. Moreover, the lasers stayed in place no matter how hot they got.

Estefannie Explains It All Raspberry Pi Cookie Jar

Although the lasers were not very strong, I still strained my eyes after long hours of calibrating — hence the sunglasses! Working indoors with lasers, sunglasses, and code was weird. But now I can say I’ve done that…in my kitchen.

Using all the knowledge I have shared, this project should take a couple of hours. The code you need lives on my GitHub!

Estefannie Explains It All Raspberry Pi Cookie Jar

“The cookie recipe is my grandma’s, and I am not allowed to share it.”

Estefannie on YouTube

Estefannie made this video for us as a gift, and we’re so grateful for the time and effort she put into it! If you enjoyed it and would like to also show your gratitude, subscribe to her channel on YouTube and follow her on Instagram and Twitter. And if you make something similar, or build anything with our free resources, make sure to share it with us in the comments below or via our social media channels.



Having worked in the past with CO2 lasers in the 6kW range, as well as Nd:YAG lasers also in the kW range, I fail to see (pun intented) how this project in general is suitable to children or their parents, due to the lasers involved. Even if these are “low power” lasers at short Raileigh lengths, there’s still a lot of (mostly) coherent wavelight to be a simple project. Esteffanie can be glad she got away with only a slight vision injury. Working with this kind of stuff requires a deal more understanding in terms of safety precausions, and apropriate vision protection is paramount for such projects.

I would find it fine, if this post would right start not only with the approrpriate warnings but also with some guidance as to where get the necessary understanding and equipment to make such maker projects safe. As the post is at the time of this writing I find it a highly unsafe and irritating maker project. Even as it isn’t an industrial multi-kW project; many accidents already happen at low intensities or I even saw near-accidents with simmering lasers.


Not sure if you’re trolling or just trying to sound smart Lazarry, but these are such low power lasers that there isn’t risk of injury even if shone directly into your eyes. Not sure why you’re comparing high-power industrial lasers to low power devices like this.


Not sure if you are the one who is trolling, Enverex. When you worked with Lasers, you should have received instructions that apply both to heavy industrial stuff and also to solid state lasers, even if they are low power laser diodes. Your eyes aren’t made to withstand coherent light at these intensities.

With a working background in Laser physics as well as actually having worked with Laser devices I know for sure that even the low power laser diodes with their short coherence length due to their solid state resonator design are classified devices for good reason. The normal eye reflex isn’t going to protect you under somesome circumstances but not many. The story proves this because Esteffanie got actually burned (sunglasses). This is not about don’t tell people about such projects but about educating them first about safe and proper handling of laser devices. And laser diodes are not children’s toys, unless you happen to have very aware children.


As a technician working in a school physics lab we are limited to lasers less than 1mw in power and then under strictly controlled coditions. Some of the lasers sold as 1mw are much brighter and DO pose a risk to eysight either looking into the beam or its reflection.
Be careful. You only get one pair of eyes and developing a robotic seeing eye dog (pi powered of course) wont be easy.


I love this idea.

You will need 8 corners, actually, instead of 4 (we’re in 3-D!)

Did you consider using one laser and front-surface mirrors to bounce the laser around the cube? That would reduce the wiring, laser emissions, and cost but would make calibration more difficult. Could even eliminate the PI altogether.

Best Wishes


Hey Mark Ewert,

8 corners! That’s right had a slight brain freeze.

I did consider using a mirror but calibrating was hard enough as it was. I was able to get a good deal on those lasers and decided to use them all in the end. Why would you eliminate the PI? How would you take the picture, tweet it, and expose the thief?


I guess I was going for a more simple ‘Sound an alarm when a laser beam was broken’ idea :-)

I love it. Keep the ideas and projects flowing!


I am of two minds regarding this project. First I applaud Estefannie for her idea and her ability to bring this together. I had a similar idea years ago that was based on an array of mirrors with a single laser and a single detector.

But, having also worked in an industry where laser safety was emphasized and enforced, I cringed a bit when I saw that this project used 10 lasers.

I think if anything this article should have:
1) a big laser safety warning on it
2) laser safety glasses in the component list
3) The words “Must be built with adult supervision” and “Never look directly at a laser”


This looks like a really cool project. Where’s the GitHub page for Secret Agent Laser Obstacle Chess? : )

While this project looks like a lot of fun, Leonard Hofstadter might disagree. “Sorry guys, but Secret Agent Laser Obstacle Lunch is just stupid.”


Just grab tbe cookies from behind of the Raspberry cam, so there will be no evidence. Security system fail ;)


I use one RCWL-0516 sensor per room connected to a PiZeroW and it logs and emails, oh yeah twits me with any motion within 5-7-9 metres by node-RED.

The main problem is too sensitive, any motion at all, through drywall, cats, lions, neighbours triggers it.

Under $0.50 (delivered) is a lot safer than burning out the eyes of cats, lions, neighbours and myself.

Leave a Comment

Comments are closed