Mini Web Radio (ESP32)

15K12873

Intro: Mini Web Radio (ESP32)

Originally designed as a charity project, the MWR is a simple single-station battery powered internet radio. The design features a combined power-volume dial and 3.5mm headphone socket, utilising a 3D printed case


Firmware, documentation and STL files: https://github.com/AllanGallop/mini-web-radio



Don't want the battery? follow the steps below omitting the battery, battery LED, power circuit and connect the switch side of the potentiometer between 3v and GPIO 33 pins, finally use the "no-battery" branch firmware files found here:

https://github.com/AllanGallop/mini-web-radio/tree/no-battery

STEP 1: Prepare ESP32

  1. Carefully desolder the battery connector and clean the pads
  2. Solder ~4" of wire (Red and Black preferred) onto the battery pads as pictured
  3. Install 2x 2.54mm header into pads labelled 13 & 15

STEP 2: Prepare Max98357A Module

  1. Cut one pin of the supplied 2.54mm header so that only 6 pins remain
  2. Locate the header onto the module so that VIN pin remains unpopulated
  3. Solder the header to the board
  4. Solder ~6" of wire (red preferred) to the VIN pad of the module
  5. Attach the 2 pin screw terminal to the module

STEP 3: Prepare Battery Holder

  • Solder a 47K resistor to the studs at either end of the battery holder
  • Cover each resistor with a length of heat shrink tubing
  • Carefully bend the resistor legs around the body of the battery holder
  • Solder the ends of the resistors together along with 4" length of wire
  • Carefully heat the tubing to shrink it

STEP 4: Connect Audio Module to ESP32

  • Carefully align the Max98357 module so that the Gnd pins align
  • Solder the module in place
  • Flex the flying lead under the module and solder to 3v3 pin
  • Place a small blob of hot glue to retain the flying lead if needed

STEP 5: Connect Switch

  1. Cut a short length of tined wire and create a bridge on the potentiometer between one of the switch legs (rear) and one side of the potentiometer as pictured
  2. Attach red battery wire to the leg bridged previously
  3. Attach red ESP32 wire to the opposing switch leg (pictured)
  4. Cut a 2" length of black wire
  5. Locate both black wires from the ESP32 and Battery holder
  6. Slip a short length of heatshrink over the bundle of 3 wires
  7. Solder the bundle to the opposing leg on the potentiometer as pictured
  8. Attach ~4" of wire (yellow preferred) to the wiper leg of the potentiometer
  9. Secure Potentiometer to faceplate

STEP 6: LED's

  1. Secure LED's to faceplate with hotglue
  2. Flex cathode legs of the LED's so that they overlap and solder them together
  3. Solder black wire from Step 5 (Switch) to LED cathode
  4. Trim LED cathode legs to ~10mm
  5. Attach a ~4" length of wire to each LED cathode
  6. Solder flush & upright both remaining (330R) resistors into pads 5 & 18 respectfully as pictured
  7. Trim the exposed resistor legs to ~10mm
  8. Attach LED wires created ealier to each resistor
  9. Solder Battery sense wire to pad 33 on the ESP32
  10. Solder Volume sense wire to pad 34 on the ESP32

STEP 7: Finishing Touches

  • Cut 2 lengths of wire and attach to headphone socket
  • Install battery holder and ESP32 into the shell
  • Install headphone socket onto the faceplate
  • Connect headphone wires to the Max98357 terminals

Follow instructions on github to upload firmware and configure the Mini Web Radio

63 Comments

Can PCM5102 be used here?
I bought Dell ax510 speakers that are powered by 12v 1 and I wanted to ask if, after using a 12v 2 amp power supply, I will be able to power esp32 as well. I also want to ask about throwing away the potentiometer and reprogramming so that the ESP 32 board, my internet radio, always works with the maximum set value after turning it on. volume because I will adjust the volume from the loudspeaker. Please remember that this time I will use the pcm5102 amplifier
Use you browsers developer tools (F12 key normally) and use the network tab to view all the URL's called by the page, filter by "media" and select play on the page / reload and it should show on the lost
First of all, thank you very much for your commitment to running.
I just finished my project according to your idea. :) Wow! It works! :))

https://youtu.be/Dh8_dGSo-cg

One thing that puzzles me is whether the diode on the ESP32 board (LED charging bat) should be lit after turning off the power using the potentiometer? This blue diode on 5 GPIO goes out, but the factory one on the board quickly pulses with blue light.
I got so excited that I started to assemble another one and ... I have to watch out for the potentiometer. it is very easy to overheat. and after finishing one I had to replace. the lamellae in it deform under the influence of high temperature. are there other stronger ones made of better material?
Omeg make some nice ones, though I find the trick for potentiometers and headphones sockets is to tin the wire and flow abit of solder on the tab first, then just heat it briefly while introducing the wire so neither part is heat for too long
Thank you, yeah that's normal behavior for the Lolin32 boards as the LED is connected directly to the TP4056 charger IC which is always on
A common pitfall when building this project is the new Arduino IDE 2.x, at time of writing it is not possible to use the ESP-Tools plugin (Data files upload) with IDE 2.x due to breaking changes caused by the IDE moving from Java to Electron. I recommend using Arduino IDE 1.8.x along with the 1.8.x version of the Expressif ESP32 library or use PlatformIO instead.
Useful radio and the page 'from scratch' was priceless to me. Actually this is the best way to to get to know the world of IoT.

Note: if you don't use the battery and connect R1 to 3V3 pin, the board might go to sleep state time to time (the trigger of sleep state is 3.0V)
Hi! I'm going to power via microUSB, I will never have a battery. Where is R1? How do I do it so that the radio does not go to sleep? Should the script also be modified?
I've added a new "no battery" branch that removes the power sense & battery circuit and allows you sleep/wake the esp32 using the potentiometers switch via pin 33. Just make the circuit modification as described in the readme and upload the new INO from this branch

https://github.com/AllanGallop/mini-web-radio/tree/no-battery
You likely have installed esp32 library version 2.0.x which is for IDE 2.x, you need 1.8.x for IDE 1.8
Udało mi się ze skryptem i przechodzę do następnego kroku: https://github.com/AllanGallop/mini-web-radio
i nie widzę sieci MWR-WIFI-SETUP. Jak zdiagnozować co może być przyczyną? Czy zasilanie 3,7V ma być z akumulatora czy może być z USB jak na zdjęciu? Niebieska zworka jest ustawiona zgodnie z opisem z instrukcji, ale nie mam wifi z ESP32. Czy to ma znaczenie, że nie mam jeszcze podłączonego potencjometru i diod?
Take a look at the serial monitor while it's connected via USB and it should provide some insight as to what it is doing. As a guess if no battery is connected, and the battery task line has not been commented out it is presuming the battery voltage is low and going into protective sleep
That's true. Therefore, after deleting line 49, everything is fine and the radio works on the programmed station. Now I am looking for a way to connect on / off from the USB port because I will not use where we have batteries. My board is always supposed to be USB powered. Now what changes need to be made to make it work this way? Does not need battery power.

For this purpose, he wants to use the microUSB that is on the ESP32 board
You can hook up the potentiometer switch to a spare RTC gpio pin and configure the esp32 to use that as an external wake-up source when closed, likewise in the loop check the GPIO state of that pin to put it into sleep when open
More Comments