WiFi remote for Volumio based on ESP32 and OLED

Hi there

I am actually working on a small remote control for my Volumio system.
Based on an ESP32 microcontroller that connects to Volumio via SocketIO.
Left rotary switch is for navigation, right switch for volume and play/pause.
The beauty is, it uses WiFi, so I could place the control whereever I want or build multiple of them.

Still work in progress, but all necessary functions (I need) are already working.
(Status display, play/pause, change volume, browse library)
Actually the “housing” constists of two stacked pcb-boards, the Volumio-logo is made from solder.
Just pledged on Kickstarter for a 3D printer, so I hope I will soon be able to print a housing.

Rest of hardware is an Allo-Vana player with additional relay attenuator and Dali Zensor 1 speakers.

I looked for similar projects but found nothing, are there any?
Also feel free to tell me what I could do better.






12 Likes

Wow, great concept!
You could add a battery and it is really “mobile”
Could you post some more photos with details of the board?

Are you going to share your code and write a tutorial?

Harry

Thanks for the feedback.
Was already thinking about battery powered but I am not sure how long it will last. ESP32 has some energy saving mode in theory but I assume WiFi will drain the battery quickly.

Code and PCB-schematics will be shared, but I think I have to tidy a few things up before I do that :wink:

I use a complete board from AZ-delivery, WiFi and USB already included.
Maybe later I will only use the ESP32 directly without board.

Therefore schematics are rally simple, they just connect display, controllerr and rotary encoder together. Sadfully I made a mistake in design (pin 4 of the ESP32 is doulbe and 17 is missing)
So I had to rework a little bit, because all pins shifted by one and G35 has no pullup…



2 Likes

Hi,

Wow - that is exactly what i’ve been looking for. Superb.
I’m looking forward for the code. Great.
Sure it would be possible to also add some momentary push buttons for radio station presets or playlist direct access.

Battery or not - it wouls be also great to integrate it into the streamer case to save GPIO pins. And if battery - a power switch could save the energy if not needed for a longer time.

I’m so happy to find this here.
Thank you very much.

Best Regards
Josef (…also from Bavaria :wink:

2 Likes

Hi Josef

Think I will release the code next month when everything is cleaned and tiedied up.
Also have to clarify a few things about licenses of used libraries.

I did not add push buttons because I wanted a clean design.
But there are some digital inputs left, so one could easily add them.

10 of the ESP32 inputs are capacitive (3 already used for encoders, so 7 left)
Just could connect them to any metallic surface to convert it into a touch-button.

Maybe in later design I will use my volumio logo (made from HAL-coated copper) as a capacitive wakeup switch. Or maybe add a few more “solder-hotkeys” (menu back, next/prev, etc.).
Only problem is the visible routing from the front side of the pcb to the backside.
Could maybe be hidden in the space the rotary encoder knob covers.

Btw: I am from upper Austria :slight_smile:

br Jakob

1 Like




1 Like

HI,
are firmware and codes loaded on ESP32 available?

Thanks

1 Like

Hi
I will try to release the code on github by end of the month.
There are a few things I want to clean up and fix before publishing.

1 Like

Thanks,
I’m a developer too and I Electronic Engineer, so I would like to make this.
If you need help for coding, let me know.
Meanwhile can you link the purchase URL for display and rotary encoder?

Marco

Encoder:
For my project i had to unsolder them, but maybe you want to use them as they are.
As far as I know all encoders are more or less the same, so feel free to look for others.

Metal knobs for encoders (better feeling, not really necessary).
Still looking for some without marking, had to modify mine with black marker :wink:

Display (128x128 oled)

I am using the u8g2 library, so other displays will also do with small modifications
In the beginning I used a with 128x64 oled

I bought the 128x128 in color variant for testing purposes and with big luck will get it today or tomorrow.
u8g2 may not support it (only monochrome as far as I know), so I may stay with the white oled.
Just want to try if it is possible to display album covers

ESP32

Thanks for your offer, Marco.
I dont see the possibility to help me now, but I think you will modify the code and adapt it to your needs.
If so, it would be nice to share the changes (and maybe bugfixes :wink: ) with us

Some ideas for additional features would be:

  • System settings
  • Different languages (actually only german and english with #defines)
  • WiFi setup assistant
  • Cover display (may only make sense on color screen)

Also some features actually dont work, like creating playlists (need for text input)

I wonder if you have considered using the new ESP32-S2?
I have not used it myself, but it is supposed to be very good for low powered battery operated wifi projects. Digikey sells the ESP32-S2-SAOLA-1M development board for $8.

To be honest, I used the ESP32 because it was lying around :grinning:
S2 sounds interesting and seems to have all features I need, so thanks for the info.

1 Like

Today I got my new color OLED for testing.
It is not pin-compatible, so switching is not easy without making a new pcb.
I will stay with the monochrome one now, but maybe in future I will upgrade.

The possibility to display album covers sounds nice.
Quality is not bad (looks better than on the photo)

cover

Menu
Menu
Playback
Status
Browse
Browse
Artists
Artists
Artist
Artist
Album
Album
Song
Song
Toast
Toast
Webradio
Webradio
Control
Control
Queue
Queue

Just made my Github repository public:

Its still beta, so bugs and instabilities can occur and some things may not work.
I used “Visual Studio Code” with “Platform IO” but Arduino IDE may also do.

Third party library u8g2 is required

Flags in AppDebug.h and “LibDebug.h” can be set to activate debugging on COM-port.
You can configure your system and set a few parameters in “config.h”
The pins I choose may not the best, pin 35 of right encoder needs an external pullup.

1 Like

Hi drvolcano,

thanks for this great idea and work!
I was able to build your remote with some modifications. Please find my changes below (perhaps someone can use them).

But unfortunately the stuff is not very reliant. Sometimes after 5, sometimes after 10, sometimes after 120 minutes, the remote stops working. In case the error occurs, the remote is singable but no interaction is possible. No more display changes, no reaction using the encoders or the switch button. Do you have any idea, where this comes from or how i can troubleshoot this error?

Modifications:
1.) i used a different display. I only had an oled 126x64, so i tried this and was successful :grinning:
#define PIN_SPI_SCL 22
#define PIN_SPI_SDA 21
U8G2_SSD1306_128X64_NONAME_1_SW_I2C display(U8G2_R2, /* clock=/ 22, / data=/ PIN_SPI_SDA, / reset=*/ U8X8_PIN_NONE); // ESP32 Thing, pure SW emulated I2C`
2.) i was not able to connect to my wifi using your code. I googled around and found a different method to connect which was successful for me:

while (WiFi.status() != WL_CONNECTED)
{
  //WiFi.disconnect();

  i++;

  DEBUG_PRINT("Main: WiFi: Connecting to ");
  DEBUG_PRINTLN(ssid);

  int laswtifistate = WiFi.status();

  //WiFi.disconnect();
  WiFi.begin(ssid.c_str(), password.c_str());
  int intRetry = 0;
  while ((WiFi.status() != WL_CONNECTED) && (intRetry < 50)){
    intRetry++;
    DEBUG_PRINTLN(intRetry);
    delay(500);
  }

  for (int i = 0; i < 10; i++)
  {
    DEBUG_PRINT("Main: WiFi: Status: ");
    DEBUG_PRINTLN(WiFiStatusString());

    if (WiFi.status() == WL_CONNECTED)
      break;

    if (WiFi.status() != laswtifistate)
      break;

    delay(100);
  }
}

3.) i used GPIO 13 (#define PIN_RightEncoder_CLK 13) instead of GPIO35 (as far as i understood, this port has a pull-up)

greetings
Jens

1 Like

Hi Jens

Nice to get some feedback.
Wifi is not very reliable, had to play around a lot to get it working on my system.
If you found a solution for you, perfect. I will later try if it also works for me.

My system is actually very stable, running for days without problems,
But stability may depend on your volumio and your music library.

When my system freezed, it was mostly stuck in a loop in the backend after a telegram was received.
Mostly the JSON-Parser is the cuplrit.
You may look for the LibDebug.h and set the DEBUGLEVEL_JSON to 2
This will put a lot of data to the COM-port and your system will slow down a bit, but maybe we can find the problem then.

Hi,

where is tha libdebug.h located. Looked for it, but can‘t find it. The appdebug.h exists or am i required to first create libdebug.h?

jens

1 Like

Its located in the folder “lib/LibDebug”

Level 0 = no debugging
Level 1 = normal debugging
Level 2 = extended debugging

Content as follows:

//Set to 1 or higher to enable debugging on COM-port
#define DEBUGLEVEL_VOLUMIO 0
#define DEBUGLEVEL_JSON 0
#define DEBUGLEVEL_SOCKETIO 0
#define DEBUGLEVEL_INFLATE 0