Making Music Box Punch Machine With Arduino




Introduction: Making Music Box Punch Machine With Arduino

Do you ever see DIY Music Box?

You can make music by punching holes in paper.

But it's really hard.

When I first saw this music box, I bought it in love at first sight.

But once I punched it, I was exhausted.

So I decided to build a machine that punches automatically.


I explained it as easily as I could but I think an only well-skilled person can make this.

You need this to make this;


  • 3D printer(at least 210mm bed size)
  • solder
  • square-shaped file
  • drill
  • wire crimper
  • wire stripper
  • epoxy bond
  • sandpaper(coarse)
  • etc(drivers, pliers... basic tools)


  • Soldering
  • 3d printing(or maybe you can print in make shops)
  • Arduino programming

Step 1: How It Works.

It was very difficult for me to analyze the midi files and make coordinates.

But I found out that provides sheet music in dxf format.

The dxf format provides the coordinates of the punched circle directly.

So it's much easier because I just only have to read and organize each coordinate.

The coordinates of the dxf format were not sorted so had to be sorted by X coordinates.

The experts in the arduino forum gave me a lot of advice.

I used the easiest way - bubble sort because the other sorting algorithms were hard to understand.

This is a musical instrument, so I want to express some music.

I put a piezo in it so it can play Mario music at the beginning and the end.

Step 2: 3D Design

If I have to 3d design and electronic circuit design, I do 3d design first.

So I started sketching.

Basically, the X-axis moves using a belt and the Y-axis pushes the paper.

The punch is pressed using a geared DC motor.

I put a sensor on the X-axis to locate it at the beginning, and I put a sensor on the Y-axis to see if the paper is present.

STL files are here :


when printing Linkage_Press_V6-1.stl

I printed it 10 outline shell and 80% infill.

and print twoPaper_Roller_Support_C-1.stl and Paper_Roller-1 Paper_Roller_Pillar_V2-1.stl

Step 3: EagleCad Design

I've made a few revisions.

I started with the aduino nanos, but I changed to aduino MEGA because of the lack of memory.

Finally, I made a board that uses the Arduino Mega, a DC driver, two-step drivers, a piezo, an encoder switch, a 1602 LCD, and a SD card adapter.

Unfortunatelly arduino MEGA has not enough memory too, so this machine can punch only 700 notes maximum.

Step 4: Ordering PCB, Parts and Soldering

I uploaded Eaglecad schemetic and board files.

and two .zip files that can order PCB from JLCPCB directly for easy ordering for you.

One is switch board and the other is the main board. upload gerber(zip) files to JLCPCB and order then before a week you can get PCB.(minimum order is 5 each)

This is BOM List
I added some Aliexpress Link for example. But this is not the best selection, just example.

  1. L298N / - 1
  2. 1N4004 - 4
  3. XH connector(M/F) 2pin - 3
  4. XH connector(M/F) 3pin - 2
  5. XH connector(M/F) 4pin - 5
  6. 2p terminal / -1
  7. 100uF Capacitor - 1
  8. 220uF Capactor - 1
  9. 0.1uF Capacitor - 2
  10. piezo - 1
  11. LM1117-5 / - 1
  12. 100 ohm Resistor - 3
  13. 10 Kohm Resistor - 6
  14. 1x10 pin header(M) - 1
  15. 1x8 pin header(M) - 4
  16. 1x7 pin header(M) - 1
  17. 1x2 pin header(M) - 3
  18. 2x18 pin header(M) - 1
  19. 1x8 pin header(F) - 4
  20. Encoder SW(20mm) / - 1
  21. A4988 or DRV8825 Stepper driver - 2
  22. tact switch 5mm / - 1
  23. Micro SD card module / - 1

Step 5: Assembling #1 - Base Plate

Parts need insert nut for pcb.

Use solder to insert it.

and 3M bumpon

  1. M3 insert nut / - 8
  2. (optional) 3M bumpon SJ5312(clear) or SJ5012(black) / - 5

Step 6: Assembling #2 - Paper Roller

I tried but cannot make perfect BOM(but I tried).

because I used many parts that are already my own

There is not much to explain. See pictures.


  1. limit sensor / - 1
  2. M3 15mm bolt - 5
  3. M3 10mm bolt - 16
  4. M3 8mm bolt - 4
  5. M3 nut - 21
  6. M3 washer - 9
  7. silicone ring 22x16x3 / - 12
  8. nema17 step motor 34mm long - 2
  9. 605zz bearing - 4
  10. 603zz bearing - 4
  11. MR63zz bearing - 2
  12. M5 nut - 8
  13. M5 20mm bolt - 3
  14. M5 25mm bolt - 1
  15. M5 40mm bolt - 1
  16. GT2 20teeth 5mm bore timing pulley (width : 6mm) / - 2
  17. GT2 60teeth timing belt 120-6mm / - 1
  18. 12V geared DC motor(22RPM) / - 1
  19. loctite bond

Step 7: Assembling #3 - X Axis Motor and Pulley


  1. M3 10mm bolt - 4
  2. M3 8mm bolt - 4
  3. M3 nut - 4
  4. M3 washer - 4
  5. M5 25mm bolt - 1
  6. M5 nut - 2
  7. limit sensor / - 1

  8. GT2 20teeth 5mm bore timing pulley (width : 6mm) / - 1

  9. GT2 20teeth 5mm bore timing ider pulley (width : 6mm) / - 1

Step 8: Assembling #5 - Puncher Motor

Puncher module moves on the printed rail.


  1. 605zz bearing - 4
  2. MR63ZZ bearing / - 2
  3. M3 6mm bolt - 1
  4. M3 10mm bolt - 7
  5. M3 15mm bolt - 5
  6. M3 nut - 11
  7. M3 washer - 4
  8. 12V dc geared motor(22RPM) / - 1
  9. GT2 belt 325mm - 1
  10. 2.5 * 40mm steel rod / - 1
  11. M3 square nut / - 1
  12. limit sensor / - 2

Step 9: LCD, Switch and Wiring

Use wire crimper.

Pay attention to the order of wiring .

Step 10: Sketch Upload and Tune

49line's XdirFactor / YdirFactor is stepper motor direction variables.

53line's defaultStepPosX / defaultStepPosY is (0,0) cordination of music box paper.
If your puncher start punch wrong position, check this variables.

54line's XFactor / YFactor is step number to move 1mm

If your puncher moves more or less, check this variables.

Step 11: Done.

I submitted this puncher to Seoul Maker Faire 2019
So many people loved it.
and my long project is done.

Some people asked this puncher when I'm making on.
so I write this instructables.

I tried but explain in English is too hard. (thanks to google translator)

maybe next time I'll just use just Korean because translator is good enough on recent days.

thank you for reading.

Step 12: Bugfix.

There are only one LM1117 on PCB.

That can be too hot, because this circuit needs high current more than LM1117 can gives.

So I added one LM2596 Step-Down Converter so it can make 5V vcc power.

You can buy one from this;

And you need multimeter to adjust the convereter.

Solder 12V to Converter's IN+, 5V/VCC to Converter's OUT+.

and GND to IN-, OUT-.

Be the First to Share


    • First Time Author Contest

      First Time Author Contest
    • Backyard Contest

      Backyard Contest
    • Meatless Challenge

      Meatless Challenge



    2 years ago

    오, 완성을 하셨군요. 이제야 봤네요. 늦게나마 축하드립니다. ^^ 고생많으셨겠네요. 악보용지는 어떤 용지를 사용하시나요? 두께가 애매하던데 상장용지를 쓰면 되나요?


    2 years ago

    Project 정말 잘봤습니다. 너무 흥미 있고 굉장한 작품이네요 저도 언제가는 꼭 만들어 보고 싶습니다. 좋은 기운 주셔서 감사합니다. 작년에는 Make Fair를 놓쳤는데 정말 아쉽네요...혹시 더 많은 작품이나 작업을 볼수 있는 개인 SNS 있으시다면 공유 부탁드립니다.


    Reply 2 years ago

    와 정말 대단 하시네요 ~~ 많은 영감 받고 갑니다. 종종 들러 구경 하도록 하겠습니다. 지속 적인 Project 기대 합니다.
    좋은 하루되세요 ~


    2 years ago

    Everything work automatically, and then you need to spin the gear by yourself, put a motor
    Great project!


    2 years ago

    You could have shortened the video a bit as we got the idea after the first 20 holes. That said, it is a magnificent project and you should be well pleased with yourself. Being a lazy person, I would have added a motor to the player. ;-)


    2 years ago

    Wow, I also thought punching for tunes was truly difficult and hard because of the lines and easily getting the wrong place punched! Now you just need a motor to turn the music box crank! Bravo! Thank you for doing this.


    2 years ago

    Are you going to make these to sell?


    Reply 2 years ago

    I'm selling 3 machines that was on SEOUL Maker Faire 2019. email me.


    2 years ago on Step 11

    Wow, this is sooo great! I own such a music box and love to compose for it! I am afraid I have not the skills needed for building this puncher myself :-p … so I want to ask: do you also sell the puncher ( build on demand ) ? All the best from Austria! :-))


    Reply 2 years ago

    I have 3 machines now, that was on SEOUL Maker Faire 2019. If you want one, email me.


    2 years ago

    this is so brilliant! What a wonderful way to bridge the old with the new!


    Reply 2 years ago

    Thank You!

    Alex in NZ
    Alex in NZ

    2 years ago

    I have seen the music boxes and always thought that they were wonderful but too hard to make the tape for. Congratulations on this, and thank you for sharing it :-)


    Reply 2 years ago

    Yeah, It's sooo hard. I punched tape only 2 songs and never do it again(haha).
    After making this machine, I punched about 50 meters paper at one day!


    2 years ago

    잘 했어! 당신은 매우 능숙하며 인생에서 잘할 것이라고 확신합니다. 이것이 올바른 언어가 아닌 경우 죄송합니다 .Google Translate도 사용합니다!


    Reply 2 years ago

    instructables에 기록하고 싶은 많은 프로젝트가 있었습니다. 하지만 몇년 전에는 구글 번역기가 한국어-영어 번역을 잘 하지 못했습니다. 지금은 의미가 통할 만큼 잘 번역하는 것 같습니다.


    Reply 2 years ago

    Yes, I regret many part of this project. But my program skill wasn't going to upgraded fast at then. It takes about six months.
    Maybe I should use ESP series, It has much more memory and faster and cheaper than arduino Mega.