Cookie CNC Spirograph From Trash

by ArvidJense in Workshop > CNC

8982 Views, 63 Favorites, 0 Comments

Cookie CNC Spirograph From Trash

final1.jpg
Cookie CNC Spirograph from Trash

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...!

Features:

  • 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!

Design

IMG_1103.JPG
IMG_1104.JPG
IMG_1105.JPG
IMG_1109.JPG
IMG_1106.JPG
IMG_1107.JPG
IMG_1108.JPG

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.

Stuff Needed

IMG_0712.JPG
IMG_1064.JPG
IMG_0836.JPG
IMG_0894.JPG
IMG_0856.JPG
IMG_0951.JPG
IMG_0854.JPG

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

Tools

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

Tearing Down the Hi-Fi

IMG_0737.JPG
IMG_0746.JPG
IMG_0729.JPG
IMG_0733.JPG
IMG_0899.JPG
IMG_0751.JPG
IMG_0765.JPG
IMG_0771.JPG
IMG_0790.JPG
IMG_0786.JPG

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.)

Constructing the Machine

IMG_0864.JPG
IMG_0867.JPG
IMG_0871.JPG
IMG_0881.JPG
IMG_0895.JPG
IMG_0906.JPG
IMG_0902.JPG
IMG_1007.JPG
IMG_1019.JPG
IMG_1026.JPG
IMG_1046.JPG
IMG_1056.JPG
IMG_1052.JPG
IMG_1054.JPG
IMG_1059.JPG
IMG_0976.JPG

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.

Alright!

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!

Electronics and Programming

cookiedrawerwiring.JPG
IMG_0797.JPG
IMG_0793.JPG

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() {
  readSensors();
  while (digitalRead(8) == 1) {
    digitalWrite(5, LOW);
    analogWrite(6, slideSpeed);
  }
  readSensors();
  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);
  }</p>

Glazing

IMG_1010.JPG
IMG_1065.JPG
IMG_1069.JPG

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!

It Works!

Cookie CNC Spirograph from Trash
cookie drawer overview
IMG_1095.JPG
IMG_1083.JPG
IMG_1088.JPG
IMG_1082.JPG
IMG_1102.JPG

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.