DAC stands for

DAC stands for "digital to analog c

DAC stands for "digital to analog converter." Since the Arduino does not have analog out capabilities, we need to use a DAC to convert digital data (numbers/ints/bytes) to an analog waveform (oscillating voltage). A simple, easy to program, and cheap way to do this is to use something called an R2R resistor ladder. Essentially, it takes incoming digital bits (0V and 5V from Arduino), weights them, and sums them to produce a voltage between 0 and 5 volts (see the schematic in fig 2, taken from the Wikipedia resistor ladder page). You can think of a resistor ladder as a multi-leveled voltage divider.

The resistor ladder I'll be demonstrating in this tutorial is an 8-bit DAC, this means it can produce 256 (2^8) different voltage levels between 0 and 5v. I connected each of digital pins 0-7 to each of the 8 junctions in my 8 bit DAC (shown in figs 1 and 3).

I like using these resistor ladder DACs because I always have the materials around, they're cheap, and I think they're kind of fun, but they will not give you the highest quality audio. You can buy a chip that works in the exact same was as an R2R DAC (and will work with all the code in this instructable), but has internal, highly-matched resistors for better audio quality, I like this one bc it runs off a single 5V supply (you can even do stereo audio with it), but there are many more available, look for "parallel input, 8 bit, dac ic".

Alternatively, there are chips that take in serial data to perform digital to analog conversion. These chips are generally higher fidelity (definitely better quality that the resistor ladder DAC) and they only use two or three of the Arduino's output pins (as opposed to 8). Downsides are they are a little more challenging to program, more expensive, and will not work with the code in this Instructable, though I'm sure there are some other tutorials available. After a quick search on digikey, these looked good, for Arduino, try to find something that will run off a single 5V supply.

One more note - there seems to be kind of a misconception abut 8 bit audio- that it always has to sound like the sounds effects from a Mario game- but 8bit audio with this really basic DAC can actually replicate the sounds of people's voices and instruments really well, I'm always amazed at the quality of sound that can come from a bunch of resistors.
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
DAC ถึง "ดิจิตอลเพื่อแปลงสัญญาณแอนะล็อก" ตั้งแต่สืบได้แบบแอนะล็อกออกความสามารถ เราจำเป็นต้องใช้ DAC แปลงเป็นข้อมูลดิจิตอล (ตัว เลข/ints/ไบต์) เป็นรูปคลื่นแบบแอนะล็อก (ขาแรง) ง่าย ๆ ง่ายต่อการโปรแกรม วิธีประหยัดคือการ ใช้สิ่งที่เรียกว่าบันไดเป็นตัวต้านทาน R2R หลัก ใช้บิตดิจิตอลขาเข้า (0V และ 5V จากสืบ), น้ำหนักเหล่านั้น และผลรวมเหล่านั้นเพื่อสร้างแรงดันไฟฟ้า 0 และ 5 โวลต์ (ดูแผนผังวงจรในฟิก 2 นำมาจากวิกิพีเดียภาษาตัวต้านทานบันไดหน้า) คุณสามารถคิดของบันไดตัวต้านทานเป็นแรงดันแบ่งผ่านหลายบันไดตัวต้านทานผมจะเห็นในกวดวิชานี้จะมี DAC 8 บิต ซึ่งหมายความว่า มันสามารถผลิต 256 (2 ^ 8) ระดับแรงดันค่าต่าง ๆ ระหว่าง 0 ถึง 5v ฉันเชื่อมต่อแต่ละหมุดดิจิตอล 0-7 8 junctions แห่งในบิตของฉัน 8 DAC (แสดงในมะเดื่อ 1 และ 3)ชอบใช้ตัวต้านทานเหล่านี้บันได DACs เพราะมักจะมีวัสดุรอบ ๆ จะประหยัด และฉันคิดว่า พวกเขากำลังชนิดสนุก แต่พวกเขาจะไม่ให้เสียงคุณภาพสูง คุณสามารถซื้อชิพที่ทำงานแน่นอนเหมือนถูกเป็น DAC R2R (และจะทำงานกับรหัสทั้งหมดในนี้ instructable), มี resistors ภายใน จับ คู่สูงสำหรับคุณภาพเสียงที่ดีกว่า ชอบ bc หนึ่งนี้มันล้นซัพพลาย 5V เดียวที่ (แม้คุณกับระบบเสียงสเตอริโอ), แต่มีจำนวนมากขึ้น ค้นหา "แบบขนาน 8 บิต dac ป้อนข้อมูล ic "หรือ มีชิปที่ใช้ในอนุกรมข้อมูลการแปลงดิจิตอลกับอนาล็อก ชิเหล่านี้มีคุณภาพสูงโดยทั่วไป (คุณภาพดีกว่าแน่นอนที่ว่า ตัวต้านทานที่บันได DAC) และพวกเขาใช้เพียงสอง หรือสามการสืบของหมุด (ตรงข้ามกับ 8) ไดร์จะมีราคาแพงมากขึ้น ท้าทายน้อยเขียนโปรแกรม และจะไม่ใช้รหัสในนี้ Instructable แต่ผมมั่นใจว่า มีสอนบาง หลังจากการค้นหาด่วนใน digikey สิ่งเหล่านี้ดูดี สืบ พยายามหาสิ่งที่จะใช้ปิดซัพพลาย 5V เดียวหนึ่งเพิ่มเติมหมายเหตุ - ดูเหมือน จะเข้าใจประการสำคัญ 8 บิตเสียง-ที่มันจะมีเสียงเช่นเสียงผลกระทบจากเสียงแต่เกม 8 บิตเป็นมาริโอกับ DAC นี้จริง ๆ พื้นฐาน สามารถจริงจำลองเสียงของเสียงและเครื่องมือของคนดีจริง ๆ ฉันประหลาดใจที่คุณภาพของเสียงที่สามารถได้มาจากกลุ่มของ resistors เสมอ
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2026 I Love Translation. All reserved.

E-mail: