Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:24 08 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Questions, observations about Armmite F4 audio & amp modules

     Page 2 of 2    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4847
Posted: 12:55pm 31 Mar 2021
Copy link to clipboard 
Print this post

Hi Lizby,

I'll try to explain. The F4 audio DAC is directly connected to the output pin (through a switchable buffer). All inside the chip.
The DAC is 3.3V and 12 bit (4096 steps). That means each step in the DAC is 0.8mV
That can not be changed.

To control the volume in the F4, software will limit the range of values that are written to the DAC.

If you drive PLAY VOLUME 100,100 the DAC's will output 3.3V audio in 4096 steps (best  quantisation noise is +/- 1 LSB). This will result in +/- 0.8mV noise on 3.3V audio peak level.
The signal to noise ratio is 20 log ((2*0.0008)/3.3) = 66dB. This is very nice. FM radio quality (not CD quality, that is 80dB).

When you turn the volume down (i.e. PLAY VOLUME 10,10) the output voltage will be 3.3V/10 = 0.33V peak to peak. However the DAC keeps the same step size. This the signal to noise ratio will be 20 log ((2*0.008)/0.33 = 46dB. To compare that is closer to AM radio quality. If your source material is (like in my case) from and 8bit source (nintendo game boy) the 46dB signal to noise is still better than the source material, so it does not matter.

However, if you want to make this into a music player, the 66dB is what you would want.

matherps proposal was to use an analog volume control. In that case you attenuate the signal, but also the noise in the same ratio. So the signal to noise remains the same.

I have downloaded a few FLAC reference music parts. And they play very well.
It is a real joy to listen to them. At full volume... But I need an analog volume control to add to the circuit. It was classical music, and the loudest parts where really LOUD....
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4847
Posted: 01:22pm 31 Mar 2021
Copy link to clipboard 
Print this post

Hi Phil99,

Your proposal is a good idea. Appart from the resistor in the ground. The F4 chip references to the ground (al be it noisy) So you need your amplifier to use the same ground. Otherwise you increase the noise.

The component values you propose must be tuned. (2 of these buffers consume close to 100mA, so the voltage drop on the 10 ohm resistor will be 1 volt)

But as it stands, I do not need this. The noise was caused by a hub.

Regards,

Volhout



  phil99 said  Extra low pass filtering on the input and 5V supply may help with the noise a bit, however much of it could be on the ground return. The usual cure for this is to take your ground wire directly to the analogue ground ref. pin on the processor. I think this is pin 20, though the junction of C23, c24 & R35 would be easier to solder to.
If that is too difficult add a 10 to 33 ohm resistor between supply ground and your decoupling capacitor.


PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6218
Posted: 02:10am 01 Apr 2021
Copy link to clipboard 
Print this post

Here are a couple of useful test signals taken from the Denon Audio Technical CD
Saved as FLAC

track65
1kHz at 1Vp-p followed by a sweep from 5Hz to 22.05kHz at 600mVp-p

track70
401Hz at 330mV p-p with phase between channels rotating through 360 degrees

testtones.zip

Warning: Track70 has the two channels going out of phase so using the PAM modules or any other with differential output will result in big voltage differences between the Right and Left negative outputs. Not nice if you have the negs tied together such as feeding headphones.

I am not sure about the availability of the CD (or copyright status) but I am sure there will be similar ones out there.

Jim
VK7JH
MMedit
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4847
Posted: 06:17am 01 Apr 2021
Copy link to clipboard 
Print this post

These are free to test your audio. Rightclick, download, and copy to SD card.

FLAC reference audio

I tried the 16bit 44kHz ones.

Volhout
Edited 2021-04-01 16:19 by Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025