Design principles

Via MySensors, the radio can be switched on and off, and the volume can be adjusted.

Based on https://github.com/CelliesProjects/ESP32_VS1053_Stream.

A MySensors gateway with a ESP-32 should work according https://forum.mysensors.org/topic/9510/esp32-gateway-pinout/5 especially since there is no NRF24L01+ radio.

The MySensors S_INFO and V_TEXT properties are used to transfer the song title to Domoticz. This has the problem that MySensors text is limited to 22 (or so) characters, and this in not enough.

So, the ESP-32 also incorporates a webserver with only one page, showing the radio name and the song title.

Used components

Datasheet VS1053B.

Wiring

Component Pin Wire Pin Component
VS1053B 5V red VIN ESP-32
VS1053B GND black GND ESP-32
VS1053B DREQ green D4 ESP-32
VS1053B XCS (not CS) white D5 ESP-32
VS1053B XDCS (or DCS) blue D16 (RX2) ESP-32
VS1053B SCK orange D18 ESP-32
VS1053B SI (MOSI) Purple D23 ESP-32
VS1053B MISO gray D19 ESP-32
VS1053B XRESET yellow EN ESP-32

The VS1053B card "CS" pin is not connected.

Source Code

Code at: RadioWifi2 and platformio.ini.

The radio as webserver

When browsing to the IP of the radio, you will see the following simple UI, where you can toggle the radio on or off.

Screenshot_20220609_074755.png

Conclusion

The Wifi radio works fine, sound quality is good.

Some improvements may be needed though: It is a pity that the song title in MySensors is cut off. And the webpage with the song title does not auto-refresh.

Tags: domotica nodes
Comments: