# Making Music Box Punch Machine With Arduino

6,165

51

16

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.

Warning:

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;

Tools:

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

Skills:

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

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: How It Works.

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

But I found out that musicboxmaniacs.com 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 : https://www.thingiverse.com/thing:3965396

YOU SHOULD CHANGE PRINTING OPTION TO STRENGTHEN

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

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

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 / https://bit.ly/2MUEIWb - 1
2. 1N4004 - 4
3. XH connector(M/F) 2pin https://bit.ly/2wYtuW5 - 3
4. XH connector(M/F) 3pin - 2
5. XH connector(M/F) 4pin - 5
6. 2p terminal / https://bit.ly/2RlewCQ -1
7. 100uF Capacitor - 1
8. 220uF Capactor - 1
9. 0.1uF Capacitor - 2
10. piezo - 1
11. LM1117-5 / https://bit.ly/2MT9cbe - 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) / https://bit.ly/31DljfR - 1
21. A4988 or DRV8825 Stepper driver - 2
22. tact switch 5mm / https://bit.ly/2wW4EWP - 1
23. Micro SD card module / https://bit.ly/2Iq06hI - 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 / https://bit.ly/2lPwRw6 - 8
2. (optional) 3M bumpon SJ5312(clear) or SJ5012(black) / https://bit.ly/2lJNglv - 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.

BOM

1. limit sensor / https://bit.ly/2WRZeGT - 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 / https://bit.ly/2m6TjB5 - 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) / https://bit.ly/2x55jVU - 2
17. 45MXL 56teeth timing belt (6mm) / https://bit.ly/2XXiYtR - 1
18. 12V geared DC motor(22RPM) / https://bit.ly/2N7HmZ4 - 1
19. loctite bond

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

BOM

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 / https://bit.ly/2WRZeGT - 1

8. GT2 20teeth 5mm bore timing pulley (width : 6mm) / https://bit.ly/2x55jVU - 1

9. GT2 20teeth 5mm bore timing ider pulley (width : 6mm) / https://bit.ly/2x1qQi3 - 1

## Step 8: Assembling #5 - Puncher Motor

Puncher module moves on the printed rail.

BOM

1. 605zz bearing - 4
2. MR63ZZ bearing / https://bit.ly/2lYjf1S - 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) / https://bit.ly/2lCGTkc - 1
9. GT2 belt 325mm - 1
10. 2.5 * 40mm steel rod / https://bit.ly/2lPCxqr - 1
11. M3 square nut / https://bit.ly/2lYM2n6 - 1
12. limit sensor / https://bit.ly/2WRZeGT - 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.

159 7.8K
16 1.2K
61 3.6K

## 16 Discussions

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

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.

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! :-))

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

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

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!

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

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

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.

얼마전 2019 메이커 페어에 가서 실제로 오르골 종이를 받아왔습니다ㅎㅎ 제가 좋아하는 BTS의 봄날 노래를 받아와서 잘 간직 중이에요~ 글을 읽으며 외국에도 이걸 시도한 사람이 있구나~ 라고 생각했는데 알고보니 제가 뵜던 분이셨네요!!! ^^ 갑자기 낯선 곳에서 한국인을 만나니 반갑습니다ㅎㅎ 좋은 글 남겨주셔서 감사합니다~!!