Cookie CNC Spirograph From Trash




Introduction: Cookie CNC Spirograph From Trash

About: I'm a Dutch guy doing things with music and technology. At the moment I'm finishing my MSc in Industrial Design. Not limiting myself to any genre or discipline, I like to work on anything related to music, des…

Cookie monster loves cookies, but sometimes he gets bored of looking at the same old cookies.

Let's help our poor friend by putting colored glazing on some cookies...with a CNC machine...we've build ourselves... out of scrap...!


  • Draws glazing on cookies
  • Can draw with any color you put in it
  • Can also draw on cupcakes, because you can adjust the height
  • Has two knobs and a fader
  • Has control for cookie speed
  • Has controls for spirograph speed and distance
  • Does not really print pretty cookies...yet

This project was made by me and the lovely Marie Caye, enjoy!

Step 1: Design

For some reason brainstorming always happens late enough or lasts long enough to get you dead hungry. That's how you get an idea like making a CNC cookie spirograph decoration machine.

I always had this broken Hi-Fi in my garage which might be perfect to recycle for this job. So, we pretty much knew that this would be the basis of our machine. However, some of our ambitions needed some more thought to be realized (like adjusting the machine to the type of cake you like: cookies or cupcakes or who knows what, giving it a fun touch,...) .

We sketched a few different scenarios for the mechanism to give a wide range of ideas. This step is very useful when you plan to get your materials at second hand shops, because they might not have everything you want. Always have a plan B,C,D,... So then we went to the store and finalized the design ideas while scavenging. This approach is a bit wild but very exciting; you never know how your things are going to look until you've made it.

Step 2: Stuff Needed

Do we want crazy cookies, that's for sure. But do we want to spend billions on this madness, certainly not. That's the reason why we started with a broken Hi-Fi and continued with scrap things for a total of 6 € spent. We could do it, so we swear that you can make it too. Take a look at our list to get sure:

Stuff we had:

  • Broken hi-fi
  • Arduino (any type is ok)

Stuff we got from a second-hand store:

  • Two tea boxes
  • A funnel
  • A pen-cap (from a mechanical pen)
  • A set of plastic toy construction material
  • Two potentiometers
  • A fader
  • The Cookie monster

Stuff from the store:

  • Cookies (ok, next time we'll make our own!)
  • Glazing sugar
  • Butter
  • Milk
  • Food coloring


  • There's a lot, check the picture for an easy overview! You might also need a microwave and a 5V power supply.

Step 3: Tearing Down the Hi-Fi

Sometimes it feels sad to destroy an object and sometimes you feel this unraveled curiosity of taking it apart, especially when the poor thing isn't working anymore. Choose your clan, we sure had fun to revive it!

It is important to have a good variety of screwdrivers for this part. Most of the plastic is easy to break down. Once inside your goal is to free two essential parts: the cassette player mechanism and motor on one side, and the CD lens reader mechanism with its motor on the other side (in the center of the overview picture). A little tip: the round rubber part (on the Hi-Fi cap that holds CDs in place, see fifth picture) is perfect to be put on top of the cassette mechanism (with a bit of poster putty) as a future cookie holder.

You can now test these two parts. We've connected them to a power supply. It is also possible to do it with batteries even though it is less precise. Once reassured on the good state of our electronics we promptly tried some spirograph drawings before getting to the next step : programming.

(You can keep the other parts of the Hi-Fi; the amplifier, radio or lcd might just come in handy for a next project.)

Step 4: Constructing the Machine

This part will focus on making a structure for the mechanism!

First thing will be to fit the electronic parts in the two boxes we found. It is best to center them so you are sure to have enough space. Also adjust the center of the cookie turner with the CD lens mechanism as shown in the pictures. So grab a pen and draw the contour of the parts on the wooden boxes. Don't cut on that contour but 5mm inside so you have a margin to screw your mechanisms. In this case the wood was very tender so we could cut it with a knife.

Next step is drilling a lot of holes! First to fix our electronic parts, to attach the arms and to let the cables through. A little tip for the electronics: if the screws are too big to fit in existing holes they can always be used as clamps. With our set of construction toys we made three articulated legs. The bottom box will need three holes for the arms and the top one as well. Make sure to try it out before drilling so it's in the right place! One hole at the back of the top box will free the USB/power cable. Also make a small hole in each box will be necessary for the bottom electronics to connect to the Arduino placed on top. The part of the CD mechanism where the lens was needs to be widened to be able to fit the glazing funnel. Also make an opening in the top box to allow free movement of the funnel. Finally, if you want to implement controls like we did, you will need to open some space for them too.


Now the electronics are placed, the arms can be build and screwed (though you might have already done that), they will enable adjustment of the height of your machine, so you can also draw on pancakes, cupcakes,... Don't forget to add your favorite Cookie Monster element to the front of your master piece, the machine is nearly done!

Step 5: Electronics and Programming

And then suddenly the desk is full of all kinds of electronics and tools....

While the cookie simply spins on the cassette mechanism (voltage limited by a potentiometer) the glazing depositing system needs some more control. Luckily, using the mechanism from the laser of a CD player means that we only need some very basic Arduino control.

Because the mechanism uses a DC motor, it has no idea on where it is. But to remedy this, the end-point sensor can be used. The way the program works is as follows:

  • Check the fader and potentiometer for the current settings
  • Move towards home until home is reached with the set speed
  • Check settings again
  • Move away from home with the set speed and time

A little smart thing we put in, is that we've connected the CD motor to pin 5 and 6. Now when we want to make it spin one way, we make pin 5 low and pin 6 high and vice versa. By using analogWrite, we get quite a precise control. With some more work everything could become more smooth and precise, but hey, let's just draw some spirals onto some cookies ok?

Here is the full Arduino code:

<p>int slideDistance = 500;<br>int minSlideDistance = 200;
int maxSlideDistance = 1200;

int slideSpeed = 200;
int minSlideSpeed = 100;
int maxSlideSpeed = 255;</p><p>void setup() {
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);</p><p>  pinMode(8, INPUT_PULLUP);</p><p>}</p><p>void loop() {
  while (digitalRead(8) == 1) {
    digitalWrite(5, LOW);
    analogWrite(6, slideSpeed);
  digitalWrite(6, LOW);
  analogWrite(5, slideSpeed);
  delay(slideDistance);</p><p>}</p><p>void readSensors() {
  slideSpeed = map(analogRead(A0), 0, 1023, maxSlideSpeed, minSlideSpeed);
  slideDistance = map(analogRead(A1), 0, 1023, minSlideDistance, maxSlideDistance);

Step 6: Glazing

We now enter one of the last steps before eating incredibly beautiful cookies. Welcome to the food part.

We decided that a funnel would be the most effective way of getting the glazing in the machine. However, the standard ones have a too big opening so our solution was too had the end of a cheap mechanical pencil (you might have to cut the opening wider though) with some epoxy glue on the outside.

Glazing is quite easy to make. In the case of this machine keep in mind that it will work better with a fluid glazing. Make some butter melt (you can use a microwave), add and mix the glazing sugar until you get a stiff consistency, then add milk (very little) until it is fluid enough for your plans. By now you've probably noticed we're not very precise cooks, check this recipe for more detailed instructions. If you wanna be fancy, food coloring is a must.

Finally, we are ready to get the weird experiments started!

Step 7: It Works!

Finally, the supreme moment where we put the glazing in the machine....

bom bombom...

It works, we made our friend happy! Well, it was not entirely perfect right from the start, but with some tweaking, we got some quite cool results. Good thing is that if an experiment completely fails you can also fill it with all the colors of glazing and swirl it around with a stick to make a cool spacey effect; hope is not lost! Now you can have some fun drawing on your cookies and eat them all.

CNC Challenge

First Prize in the
CNC Challenge

Tools Contest

Participated in the
Tools Contest

Automation Contest

Participated in the
Automation Contest

Be the First to Share


    • Rocks, Gems, and Stones Speed Challenge

      Rocks, Gems, and Stones Speed Challenge
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge
    • Tinkercad Student Design Contest

      Tinkercad Student Design Contest



    6 years ago on Introduction

    Always wanted to have one of these!!!!



    6 years ago on Introduction

    You just made my day. This is by far the best and most accessible DIY CNC I've ever seen. It has everything a great machine needs. It certainly has the looks to be a superb cookie decorator. And I guess the best thing is all cookies made with it will be a one of a kind treat.

    Dr Froggy
    Dr Froggy

    6 years ago on Introduction

    I like it very much.

    Take the following as improvement advice only if you wish to make a version 2.0

    But I see great optimisations possible. Especially you need a better system to apply your food decoration on the cookie. Apply it with a air jet like you will spray it over or using a much more viscous fluid.

    See the reprap community worked on such a system to apply plastic ABS on a rotating base (like you are)

    You must pay attention of the centrifugal forces otherwise. making the fluid at the outer part of the cookie flowing to the outter part. then mixing with other fluids and then you lost your design...

    Another point -> make a modular rail or stoppers (that moves alltogether to be allways located at the same distance from the center) around the cookie. to get it as centered as possible. plus add in the center rotor a mechanical ball linkage. to allow free move (of some 10 of degrees only) of the cookie at that point. Under rotation the cookie will be then equilibrate itself naturally in the horizontal plane. More or less like a spinning top. (OK this is a guess)

    Hope you do a further one with improvement features., I cannot wait seeing that stuff!


    Reply 6 years ago on Introduction

    Amazing reply! We'll be sure to keep these things in mind for the next version.

    Is the rotating reprap you're talking about this one?
    Maybe for a next version we should make the machine print whipped cream, so it can really build a structure...


    6 years ago on Introduction

    This is excellent! I want a cookie spirograph on my desk for bespoke cookie designs on demand


    6 years ago

    awwwww! So cute!


    Reply 6 years ago on Introduction

    We're still adding the last details, but the video is there!