Edzelf / ESP32-Radio

Internet radio based on ESP32, VS1053 and a TFT screen.
GNU General Public License v3.0
987 stars 229 forks source link

Feature request: I2S DAC and Touch control #41

Open harmverbeek opened 7 years ago

harmverbeek commented 7 years ago

The ESP32 supports I2S, so why not use the I2S output to connect a Audio DAC like this one: https://www.aliexpress.com/item/Interface-I2S-PCM5102-DAC-Decoder-GY-PCM5102-I2S-Player-Module-For-Raspberry-Pi/32807703240.html

It is very cheap and will probably solve the noise issue as wel.

Another thing is, the ESP32 supports touch control. That could replace the mechanical controls.

locki-cz commented 7 years ago

Noise in audio is terrible and i cant use batteries :(

Edzelf commented 7 years ago

Just use 2 separate power supplies, or one power supply and buy DC-DC converter for 80 cents like this.

Edzelf commented 7 years ago

@harmverbeek : Programming the software for mp3, aac, ogg, .... conversion is a lot of work, so I don't think I will step in to this.

harmverbeek commented 7 years ago

@locki-cz : I used an I2S DAC on a Raspberry Pi Zero, all on breadboard, no noise at all. Or do you mean the touch sensors generate noise? These are also nice: https://www.aliexpress.com/item/10-pcs-red-color-HTTM-Series-2-7V-6V-Capacitive-Touch-Switch-Module-Strong-anti-interference/32814839036.html

harmverbeek commented 7 years ago

@Edzelf : I don't see how you could completely isolate the power supplies with a DC-DC converter, they would have to share the ground line.

Edzelf commented 7 years ago

Who says so? Besides, whats is the point of having a 5 to 5 volt converter if it would not isolate? The cause for the noise is the VS1053 not having a real GND for the analog output. Therefore headphones (without the need for a GND work well. The Raspberry Pi has a common ground for the power supply and the analog output as well as most smartphones..

Edzelf commented 7 years ago

Touch control is now implemented.

harmverbeek commented 7 years ago

Cool!

Landor-Nirsan commented 7 years ago

Hi, I got rid of the noise by modifying the VS1053 board's output. Cut the track from the chip (pin 42) to the output connector's ground pin between the resistor and the output plug. This is important, because the GBUF output needs to have a resistor/capacitor combo to ground. Then tie the connector's ground pin to "real" ground. Also you need to cut the track coming from pins 39 and 46 (left/right outputs), again after the resistor/cap combo, and insert a 2.2 microfarad capacitor into the gap you made by cutting the track. This must be done to decouple the DC on the chip's outputs. Not every amp has AC coupled inputs. See drawing.

vs1053 mod

It's a bit fiddly but worth the effort.

Landor-Nirsan commented 7 years ago

Or just take out the entire output connector and make the mods off-board... Of course keeping the wires from where the connector used to be to your mod as short as possible.

rihani commented 6 years ago

any help to convert this o play through PCM5102A please

sansjunk commented 5 years ago

I came across this modification to produce better analog output for connecting to amps. Line out, Line in and Headphone connections

eXadra commented 5 years ago

Hello guys, the thing with the VS1053 output is that like said before the signal of left and right audio is not referenced to GND but to a Vreference, this is used to boost the audio output level of the phones. The only way to solve this problem without loosing audio quality is by using 2 isolating 600:600R audio micro transformers (check ebay), one for left and another for right aoudio signals. the transformers are connected in one side between audio (L or R) and reference and in the other side between ground and amplifier input. The audio is cristal clear without any distortion or wifi noise.

Edzelf commented 5 years ago

You may also use a separate power supply or an isolating amplifier (look for BA3121).