0
\$\begingroup\$

I am trying to "isolate" an audio signal that is transmitted on top of a 24V (DC) power supply voltage.

This construct is used in door intercom systems from TCS.

The audio signal is the speech between the outdoor station/bell and the indoor terminal.

Can some one point me into the right direction how I can remove the DC?

I read that a simple capacitor can be used to block the DC part:

enter image description here

Would the schematic above give me the "pure" analog audio signal without the (24V) DC part?

I have no clue about the level/voltage of the audio signal. I guess/assume phono/microphone level. The goal with the signal in the Arduino is to capture/sample it and transfer it over the serial interface as "raw bytes" to the computer where I can convert it into an into a audio file with FFmpeg.

If the above schematic is right, I need to learn about sampling and buffering.

\$\endgroup\$
5
  • \$\begingroup\$ What Arduino are you planning to use? Will you be using the Arduino libraries to do the sampling? Why use an Arduino when most computers have a soundcard that is made for capturing audio? \$\endgroup\$
    – JRE
    Dec 6, 2023 at 16:14
  • 2
    \$\begingroup\$ If you want to digitize the audio, you'll need to add your own DC bias on the right side of the capacitor for the benefit of the ADC. Also, 1M/160k seem a bit high for this -- reducing those by a factor of 10 would probably be a good idea. \$\endgroup\$
    – Dave Tweed
    Dec 6, 2023 at 16:14
  • \$\begingroup\$ A couple of questions. \$\endgroup\$
    – RoyC
    Dec 6, 2023 at 16:22
  • \$\begingroup\$ @JRE I want to build something like Doorman with the improvement of transmitting audio. Putting my computer into the wall/"flush-mounted box" and power it from the bus is not possible ;) Also wanted to start with the absolut basics. \$\endgroup\$
    – Marc
    Dec 6, 2023 at 16:33
  • 2
    \$\begingroup\$ If you can run a serial cable from the PC to the Arduino at the door, then you can just as easily run an audio cable from the door to the PC. \$\endgroup\$
    – JRE
    Dec 6, 2023 at 18:27

4 Answers 4

3
\$\begingroup\$

If you connect your MCU GND to one of the door intercom lines you may introduce a massive hum noise in this system or even a short cut. So I recommend to use some kind of isolation in such a context.

The turn on voltage gradient of the intercom system is unknown and there may exist voltage spikes from lightning or other artefacts. To clamp these voltages, that have a much larger amplitude than the audio signal, I added 3.3 V zener diodes D1 and D2 and a resistor R1 to limit the current of such impacts. The DC part of the line voltage is removed by C1.

The 1:1 audio transformer provides isolation and D3 clamps inductive kick backs from large DC line voltage changes to protect the ADC input.

R2 and R2 set the analog mid point voltage here and an ADC ref voltage of 3.3 V is assumed. The DC input resistance of the typical ADC input is above 1 MΩ and has no large impact on the voltage divider.

R4 adds additional protection for the ADC input because D3 clamps the negative voltage only to -0.5 V, which is close to the typical limit.

R4 and C3 form a low pass filter of about 7 kHz to avoid conversion alias and RF artefacts from cell phones.

C2 separates the transformer from the DC midpoint voltage and forms a high pass filter in combination with R2 and R3, here around 70 Hz.

C3 also holds the voltage during the ADC sampling phase, where the internal sampling capacitors are charged.

I added a step voltage V1 to simulate the intercom line turn on and to see, how the circuit deals with that.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
\$\begingroup\$

The capacitor totally blocks the 24V DC signal so the voltage divider before the capacitor is not needed. You need a voltage divider after the capacitor as shown below. The resistors in the divider should be sized to be about 1/10 of the ADC input resistance. This will bias the ADC in to about 1/2 of the ADC input range.

The diode has been added to clamp the input to ADC supply on power up. That input will have over voltage protection this takes some of the stress of that.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
7
  • \$\begingroup\$ The ADC has no input resistance, so nothing explains the 100k resistor value. \$\endgroup\$
    – Justme
    Dec 6, 2023 at 16:32
  • \$\begingroup\$ @Justme IF the ADC input is taking no current, which you seem to suggest, 100k is low enough to set the bias voltage and high enough not to load the AC part of the input. \$\endgroup\$
    – RoyC
    Dec 6, 2023 at 16:36
  • \$\begingroup\$ It takes no DC current but it charges a capacitor each time you take a sample. The resistors must be rated to be able to keep the impedance low enough for not sagging more than half LSB while taking a sample, and to charge the DC blocking capacitor enough back to the original level. So it can be thought to take DC current, but in pulses. \$\endgroup\$
    – Justme
    Dec 6, 2023 at 16:58
  • 1
    \$\begingroup\$ The power up of the 24 V line might destroy the ADC input using 1 uF. \$\endgroup\$
    – Jens
    Dec 6, 2023 at 17:19
  • \$\begingroup\$ Good point see amended diagram. \$\endgroup\$
    – RoyC
    Dec 6, 2023 at 17:28
1
\$\begingroup\$

You can use a capacitor to block DC.

But you can't do it like in your schematics.

The DC bias of the Arduino side is left undefined. You need to bias it to mid-supply with another set of resistors to re-apply a suitable DC bias for Arduino ADC.

But your audio divider is not suitable for Arduino ADC. The impedance is too high to be correctly sampled.

Also if you don't know what the audio level is, you don't know how much dividing it down needs, if by any amount.

If you want to sample the audio into an audio file, why bother with an Arduino that's not really suited for the task, since you can simply feed the audio (without DC) into a cheap USB sound card or mic/line in of your PC and use any sound recording program you want, and the audio is sampled at some standard sampling rate and hardware has required antialiasing filters for any sampling rate you want and the bit depth is at least 16 bits for even most basic products out there, so seriously better than trying to do the same with an Arduino.

\$\endgroup\$
4
  • \$\begingroup\$ I want to improve a existing project, Doorman, with transmitting audio. As start i wanted to capture the audio signal on the bus and convert into a mp3 as example to listen to it. The goal is the improve the project so far that speaking/listening with the other person is possible via VoIP. As simple start i wanted to capture the audio. \$\endgroup\$
    – Marc
    Dec 6, 2023 at 16:46
  • \$\begingroup\$ @Marc Then use a sound card or audio interface or PC with audio inlet. They can readily do it better than any kludge to be able to sample it with an Arduino. \$\endgroup\$
    – Justme
    Dec 6, 2023 at 17:07
  • \$\begingroup\$ How should i put my computer into the wall and power it from the bus? Thats not suitable for me. And its overkill af. \$\endgroup\$
    – Marc
    Dec 6, 2023 at 18:03
  • \$\begingroup\$ @Marc You never mentioned you want to do that. But if you want to sample the audio with Arduino and send the results to PC, you need the Arduino to be connected to PC, and it will be powered from the PC already, via USB. If you are going to power something from the bus and send audio, how about a Bluetooth audio transmitter? \$\endgroup\$
    – Justme
    Dec 6, 2023 at 18:08
0
\$\begingroup\$

DC-wise this circuit is floating between the cap and the pin A0. Or actually some pin parasitics will determine the DC point: This could be by some small ground current pulling the DC voltage to zero (and by that cutting off your lower signal half-wave) or by pulling it to Vcc by some small pull up current or something entirely different. In other words: The DC operating point is just undefined.

Too solve that problem you can place a high impedance voltage divider between cap and analog pin. Set the DC point to 50% of your maximum analog input voltage (e.g. by using twe 100k resistors between AREF and AGND).

\$\endgroup\$
1
  • \$\begingroup\$ Are you using an intercom circuit that works in "half-duplex"? It cuts off your mic when the outside person talks and cuts off their mic when you talk to avoid howling feedback. It also messes-up communicating. \$\endgroup\$
    – Audioguru
    Dec 6, 2023 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.