Best of the best!
Acronis True Image our prefer Backup Solution for you + Readmore
Thai
AVG Acronis Lotus Express
CD Changer แบบบ้านๆ พิมพ์ อีเมล์
ความนิยมของผู้ชม: / 0
แย่มากดีมาก 
เขียนโดย Kanit Klai-Udom   
Wednesday, 08 August 2007

ผมนั่งคิดเรื่องเกี่ยวกับการสร้าง เครื่องเปลี่ยนแผ่นสำหรับ โปรแกรม Acronis Backup ของผมและได้ลองเขียนแบบ และออกแบบเครื่องเปลี่ยนแผ่นหลายแบบ โดยเน้นการใช้งานได้และไม่ซับซ้อน. วันหนึ่งผมลองใช้ Google ค้นหาว่ามีใครคิดสร้างเครื่องอย่างที่ผมต้องการบ้างมั้ย ก็ไปพบแขนกลเปลี่ยนแผนที่มีแนวคิดเดียวกันเป๊ะ (เค้าคิดก่อนตั้งแต่ปี 2002) จาก

http://www.sentex.net/~mwandel/tech/changer.html

เลยขอสำเนาแนวคิดของเค้ามาเล่าให้ฟัง

Home built CD changer / duplicator

ผมสร้างเครื่องนี้ในปี 2002 เพื่อใช้สำหรับเขียน CD หลายแผ่นซ้ำๆ - เช่นการทำสำรองภาพถ่าย หรือเขียน CD เครื่องจักรที่ว่านี้เป็นหุ่นยนต์ ที่สามารถให้ทำการเปลี่ยนแผ่นได้โดยไม่ต้องควบคุม. มันยังไม่ถึงขนาด random access - แค่มีส่วนของ input และหลาย output . Random access น่าจะสนุกกว่านี้ แต่มันก็ไม่จำเป็น.

Overall view

 The mechanicals

ความคิดเรื่องกลไก แรกที่เกิดขึ้นนั้นคือหาอะไรซักอย่างที่ง่ายๆ ไม่มีระบบไฟฟ้า โดยแค่คิดว่า การเคลื่อนไหวของ ถาด CD จะไปกระตุ้นอะไรบางอย่างให้เคลื่อนไปเอา CD ออกจากถาดแล้วก็ใส่แผ่นใหม่เข้าไป.  หลังจากนั่งคิดเป็นเดือนก็ยังคิดไม่ได้ว่าจะทำอย่างไรดี เพื่อจะให้มันทำงานได้. Pickup finger ความคิดถัดมาจึงเกิดขึ้น คือยกแผ่น CD ออกมา แต่จะยกมันยังไง ตอนแรกก็คิดว่าจะใช้เครื่องดูดขึ้น แต่นั่นจะทำให้ระบบซับซ้อน ทั้งเครื่องดูด วาล์ว Solinoid และอื่นๆจิปาถะ.  ในที่สุดผมก็คิดว่าหยิบมันทางรูดีกว่า โดยใช้นิ้วที่ถ่างออกได้ ดังรูปด้านขวา ที่ปลายนิ้วจะเป็นทรงกรวย ที่จะแหย่เข้าไปในรูของ CD เพื่อยกขอบของแผ่นขึ้น.  ผมผ่าครึ่งนิ้วนี้ออกเป็น 2 ส่วนแล้วใส่ลิ่มเพื่อให้เป็นคานกระดก โดยใช้ยางรัดนิ้วทั้งสองติดกันไว้ ก็จะกลายเป็นเสมือนนิ้วชี้ กับนิ้วโป้ง โดยมีหนังยางยึดนิ้วทั้งสองด้วยกัน ขด Soliniod จะดึงด้านหลังของนิ้วชี้เข้าหานิ้วโป้ง ปลายนิ้วก็จะถ่างออกตามลักษณะของไม้กระดก และรับแผ่น CD โดยแรงเสียดทาน ที่ปลายนิ้วต้องมีการเหลาแบบพเศษสักหน่อยเพราะ ต้องให้มันหยับมาเพียงแผ่นเดียวไม่ใช่สองแผ่น .

ความท้าทายอีกอันคือการเคลื่อนนิ้วมือนี้ โดยมันมีทิศทางทั้งขึ้นลงและซ้ายขวา ตอนแรกคิดว่าจะใช้ Stepping Motor แต่มันก็ต้องมานั่งเขียนโปรแกรมสั่งให้มันเดินอีก และยังต้องมีการตั้งตำแหน่ง Home อีกด้วย ดังนั้นผมคิดว่าน่าจะลองใช้ DC Motor ธรรมดากับ Micro Switch สองสามอันเพื่อระบุตำแหน่งก็น่าจะพอแล้ว ในแนวนอนนั้นผมต้องการให้นิ้วมันหยุดทั้งหมด 3 จุด และในแนวตั้งก็ปล่อยให้เคลื่อนที่โดยอิสระตามแรงดึงดูดโลกวิธีนี้ทำให้ผมไม่ต้องสนใจว่าจะมี CD กี่แผ่น.

before wiring ผมลงมือประกอบนิ้วเข้ากับแท่น ไม้ที่เจาะรูทะลุ เพื่อเป็นแนวสำหรับการเคลื่อนที่ แนวดิ่ง และมีล้อด้านขวาที่ผูกเอ็นเอาไว้ ยกนิ้วขึ้น แรงดึงดูดจะดึงนิ้ว ลงแต่หัวเกลี่ยวจะดึงนิ้วขึ้น 

โดยมี Micro Switch เป็น Sensor เพื่อให้ Solinoid ถ่างนิ้วออก ผมใช้
แท่งเหล็กนำศูนย์ที่แกะมาจาก เครื่องพิมพ์ดิดเก่าๆ เจ้าแท่งเหล็กนี้ทำให้ การเคลื่อนที่ลื่นไหล เพราะ ไม่ค่อยมีแรงเสียดทาน
   แท่นนิ้วของผมจะมีส่วนที่ เอาไว้แตะกับ Limited Switch เพื่อให้นิ้ว ไปหยุดตรงที่ผมต้องการ
   การเคลื่อนที่ในแนวราบผมใช้วิธี ดึงเชื่อก ลากแท่นนิ้ว ไปตามรางแท่งเหล็ก โดยอาศัยมอเตอร์ พูเลย์ ซึ่งแม้จะเกิดการลื่นเล็กน้อยก็ไม่กระทบการเคลื่อนที่.
 สังเกตุว่าผมจะมีมอเตอร์ ตัวหนึ่งที่ออกแบบมาเพื่อ ลากแท่นนิ้วที่ติดตั้งไว้ทางด้านหน้า.


The Electronics

ผมโชคดีที่เจอ แผงวงจรที่มี solid state relays ติดอยู่, เป็นรุ่น "ODC-5" ของ Potter & Brummfield.  Solid state relays ก็เหมือน mechanical relay.  อย่างไรก็ตาม, solid state relays ใช้ไฟน้อยกว่าแค่ 15 miliamperes ที่ 3 volts เพื่อให้มันทำงาน, และมันยังสามารถขับผ่านสัญญาณ Digital หรือจาก Printer port ได้โดยตรง.  ทำให้ผมประหยัดเวลาพอสมควร ในการต้องมาทำอุปกรณ์ขับ relay coils .   Relay board และผมยังมี input relays อีกด้วย.  ผมสามารถยึด switche เข้ากับ parallel port ได้โดยตรง, แต่ isolating relays ทำให้ผมทำมันได้ง่ายขึ้นในด้านรูปลักษณ์ ซึ่งช่วยป้องกัน printer port ของผมด้วย.   เพราะมันต่อตรงกับ motherboard ซึ่งผมไม่อยากทำมันพัง.
Relays ติดตั้งมาเรียบร้อยบน relay board มีถึง 24 sockets.  ผมไม่ต้องการมันมากขนาดนั้นผมเลยตัดมันให้เหลือแค่ 16 channels.  ผมบัดกรีสาย Printer ตรงเข้ากับ connector.  โชคดีที่สายมันมีสีมาจากโรงงาน ผมเลยไม่ต้องมานั่งวัดค่าหาว่าขาไหนเป็นขาไหน.  จากในรูปจะเห็นว่า board มีแปด output relays (สีแดง) และห้า input relays (สีขาว).  สุดท้ายผมก็ใช้แค่ 4 input และ 4 output channels.  ที่เห็นเป็นสายยุ่งๆด้านขวาบนของภาพ คือจุดรวมสายสำหรับ switches, power supply, และ motors.  จะเห็นว่ามี 2 mini DPDT mechanical relays (แ่งสีเหลืองด้านใต้). ใช้เป็นวงจรเปลี่ยนขั่วให้มอเตอร์หมุนสลับทาง.

Horizontal movement schematic

Horizontal motion schematic
Schematic legend
Out 1 Output side of solid state relay (direction)
Out 2 Output side of solid state relay (Activate motor)
Input 1 Left side hit input
Input 2 Right side hit input
Left Left limit switch (normally closed)
Right Right limit switch (normally closed)
Center Center position switch (normally closed)
 

Head / vertical schematic

Up / Down & head schematic
 Schematic legend
Out 3 Output side of solid state relay, up / down control
Out 4 Output side of solid state relay, clamp solenoid activate
Input 3 Head top detection input
Input 4 CD present switch
Cd Detect Cd present (on head) switch
Top Head movement top limit switch
Bottom Head movement bottom limit switch

The Software

สำหรับโปรแกรมก็ทำขึ้นมาง่ายๆ ผมเขียนโปรแกรมโดยใช้คำสั่งจาก command line โดยตรงให้ทำตามขั้นตอนนี้คือ ไปหยิบแผ่นจากถาดแล้วเอามาทิ้งไว้ตรงกลาง จากนั้นเคลื่อนที่ต่อไปหยิบแผ่นเปล่าที่วางซ้อนกันทางด้านซ้ายเพื่อเอามาวางในถาด. โปรแกรมที่เขียนขึ้นมีส่วน ควบคุมเอง อยู่นิดหน่อยที่ผมเอาไว้ตั้งค่าตำแหน่งและแก้ไข โปรแกรมนี้สั่งงานออก port printer โดยตรง ผมใช้ linux ซึ่งมันง่ายมากหากเป็น root นะ  ถ้าใช้ Windows NT/2000/XP, มันอาจจะยากกว่าซักหน่อยแต่ผมใช้ linux อยู่จึงไม่เป็นปัญหา.  Source code: changer.c

The rest is done by cdrecord.  cdrecord is a suite of command line driven CD authoring programs.  Obviously, the cd recording has to be done from command line, so that it is possible to run it in batch mode from shell scripts.  Comes standard with Linux distributions.  To my surprise, I found it also runs under Windows, provided that you have an ASPI driver.  It even worked with my HP 8200 USB cd burner!  So the whole setup could be run under Windows as well, although getting at the printer port is much harder.

I wanted to use this setup with my external HP8200 USB burner with my basement Redhat 7.2 Linux file server / web server box. Experiments my Linux wizard brother Markus had done earlier suggested that this should work.  Running with RedHat 7.2, I couldn't get it to work, even after a kernel upgrade.  It wouldn't always be usable, even though it showed up under /proc/scsi.  And when it was usable, I got kernel panics when I tried to record with it.  The machine has too many other tweaks and scripts running on it for me to just upgrade the whole system, so I eventually gave up, took the HP 8200 out of its USB case, and hooked it directly to the IDE cable.  That worked.  Seeing that I had the machine right in front of the PC, and the ribbon cable was long enough, I could even close the case and not move the machine!  I subsequently bought a 4x4x24 "refurbished" CD burner for $50 Canadian from Radio Shack and used that instead.

Now what...

There isn't much that I plan on using this gadget for.  I guess mostly its for bragging rights.  That, and I hadn't hooked up anything to a PC's printer port in ages.   If I wanted to, I could SSH log into it while at work, load a CD in the tray, burn it, and remove it all remotely.  Of course, the CD would still be in my basement, so the exercise would be somewhat pointless!

The setup in the basement

I will probably dismantle it again after a few months.  The relay board just has too many potential other uses.  Certainly, I have no hope of recovering the time I spent building it, because I mostly burn CDs one at a time.  I already ripped all the CDs in my CD collection that I like, so no point in writing bulk MP3 ripping scripts.  I do have a 20 gig collection of digital photographs, which I back up form time to time.

CD Duplication



Video clip of CD changer in action

People sometimes email looking for CD duplicators, asking for plans and such. But the machine is really not that practical. It was reliable enough to go through a stack of 12 CDs, but with the speed of burners nowadays, aligning and setting everything up just right is just not worth it anymore. Maybe if I burned 50 CDs at a time, but I don't have a need for that, and I suspect the machine may not be reliable enough to just let it do 50 at a time on its own. If you really need to duplicate a few hundred CDs or DVDs, the best option is probably to attach several drives to your computer. If you can automate the software enough to run multiple burns simultaneously, you'd probably spend most of your time just reloading drives.

For larger batches, you can find plenty of commercial machines. Look for "CD duplicator", because "CD changer" will give you too many references to those 5 CD changer stereo components. For batches of 500+, consider CDs pressed from a master (as opposed to recorded CD/Rs)