Wednesday, 17 July 2019

arduino - Convert PWM to Analog using a DAC chip in order to emulate a Potentiometer for audio


I'm trying to control audio level/gain (from line or amplified signal) using an Arduino. I do not want to use SPI, for this project I can only use the PWM outputs, thus I do not want to use a digital pot. I found some related questions here, but they do not fully explain how this approach applies to audio applications.



From the PWM I know I can use a low pass filter, but I want to save time and space using a DAC chip. One option is the TDA1543 (http://www.docethifi.com/TDA1543_.PDF).


So my questions are:



  1. How do I connect the PWM and audio in/out using the DAC TDA1543?

  2. Will this approach work as an audio pot controlled by PWM or is there a more straightforward option?


The TDA1543 has 8 pins:


1: bit clock input


2: word select input


3: data input



4: ground


5: voltage


6: left channel voltage output


7: reference voltage output


8: right channel output


Where do I connect the PWM, and audio in and out? I believe I also need to indicate the resistance somehow or add resistors such as in a 10K pot (amplified) or 100K pot (line).


Any help will be very much appreciated!!




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...