(I removed both of the two old questions since they are going wild and off-topic, but the main concept is the same, just as title states. Also some details are clarified and informations are appended.)

I need to record the output of two sound generator chips with a Sony PCM recorder.

The recorder does not specify the maximum input level, the only technical specification on manual is

Microphone/External input jack (minijack, stereo)Input for plug in power, minimum input level 1.0 mV

To make sure the recorded audio does not become distorted, I need to keep the input below 0dB. After many trying, it seems like when the VU meter shows 0dB, the input voltage is about 0.5V. I am not sure how to measure the exact voltage for 0dB, which seems like has many definitions (0.6V, 0.775V, 1V, etc).

Both chip are designed to simply drive an NPN transistor as amplifier, and drive a speaker with it:

enter image description here enter image description here

And the datasheet both have this entry about output current, but not voltage (I am not sure what does the VOH and VDS mean), and when I measured the voltage of the output pin when the chip is working (a song being played), the voltage is about the same as VCC:

enter image description here enter image description here

So I tried various ways to capture the highest quality of audio from them. I have found that I will need a resistor from AUD (the output pin) to ground, to provide the chip a load and make sure that the output voltage is correct. But how do I determine the value of that resistor? For example, I used a potentiometer to try many times on the HT3894, and seems like the optimal value which I am getting max audio level without peaking (which from the measurement above, should be around 0.5V maximum) is ~390Ω. But I assume there will be some mathematical way to get this value from the specs the datasheets provide, since it won't be random?

enter image description here

Also when I used the method stated above to capture the output, it sounds nothing wrong when played back and heard by ear, but when I examine the waveform in DAW, I saw something unusual:

enter image description here enter image description here

The waveform has a downward peak, which I assume it's some DC thing in the output. To prove this, I tried to connect a low voltage DC source to the audio input and record it, and sure enough:

enter image description here

So the second question is, is it possible to eliminate this DC signal mixed in the output of the chip? How to? I tried to connect a capacitor in between, but the sound just becomes hoarse, and the downward "bulges" in the waveform are still there.

Also I have found a recording sample of the same song done by others (bottom image), which does not have the "bulges". After comparing the two, I found out that my recording (top image) is more of a square wave variation, looks like some sort of PWM signal.

enter image description here

Here are the datasheets if you ever need other information:



  • \$\begingroup\$ Is this "visual distortion" causing any real problems in terms of your actual audio application? Or do you just find it aesthetically displeasing? \$\endgroup\$
    – Dave Tweed
    Sep 15, 2020 at 20:14
  • \$\begingroup\$ @DaveTweed I am not able to hear any difference from the recording and the original signal the chip produces. But I have never seen this phenomenon before. I believe the input signal should not have DC in it? \$\endgroup\$
    – whc2001
    Sep 15, 2020 at 20:54
  • \$\begingroup\$ Given how the signal is generated, I would say that it's unavoidable. It's part of the "character" of the sounds that those chips produce. Don't worry about it. \$\endgroup\$
    – Dave Tweed
    Sep 15, 2020 at 20:57
  • \$\begingroup\$ @DaveTweed That's interesting to know, but I have found another recording sample of the same chip, I don't know how they recorded it, but the waveform looks normal? Also I just discovered my recording has a very heavy PWM accent (?), as the images I updated in the question body. \$\endgroup\$
    – whc2001
    Sep 15, 2020 at 21:05

1 Answer 1


You're looking at the low frequency response of your soundcard input : both the waviness and the response to a DC step. The flat top squares on your waveform (last plot) are trapezoids in the "other" recording : this just says your recording has better bass response.

If it sounds fine on playback, don't worry about it. If you want poorer bass response, either AC couple into the soundcard, or simpler, use the sound editor facilities to cut the bass. Which is probably all they did on the other recording.

  • \$\begingroup\$ Thanks, you are right, I applied equalizer on my recording to cut low frequency, the waveform becomes exactly like another, and the "bulges" become less obvious. After knowing this guess I'll stick to the original audio signal without bass reduction. Actually I also tried to do AC coupling by connect an electrolytic capacitor between in between, but then the sound become hoarse and unrecognizable (only the attack state of notes are heard with a very glitchy texture, decay state simply disappeared quickly). Now the only question is the first one which is about getting the optimal amplitude. \$\endgroup\$
    – whc2001
    Sep 15, 2020 at 22:57
  • \$\begingroup\$ For that, I'd simply go with 390R. \$\endgroup\$ Sep 15, 2020 at 22:59
  • \$\begingroup\$ The 390R is an approximation from repeated attempts with a potentiometer and many times of recording. I am wondering if there is a way for me to calculate the resistor value needed directly from the specifications from the datasheet, so if I still have other similar need I won't have to manually try the value out. \$\endgroup\$
    – whc2001
    Sep 15, 2020 at 23:03
  • \$\begingroup\$ You have a current from the datasheet. If you have a target voltage, divide one by the other and you have a resistance. \$\endgroup\$ Sep 15, 2020 at 23:05
  • \$\begingroup\$ Aw I must've been dumb. Thanks a lot, seems like that's what I am looking for. \$\endgroup\$
    – whc2001
    Sep 15, 2020 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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