Media Controller for Laptop/Phone
by vikramksc2604 in Circuits > Wireless
2849 Views, 75 Favorites, 0 Comments
Media Controller for Laptop/Phone




This device lets you control your music or media. I use it regularly while Im using Spotify on my pc.
You can also use it with your smartphone.
Features:
- Play
- Pause
- Volume +
- Volume -
- Next song
- Prev song
The youtube video shows the tutorial and usage of these features.
Supplies


Hardware parts:
ESP32 DOITDEVKIT V1 : https://a.co/d/7rwitrc
KY 040 Rotary Encoder: https://a.co/d/6ejCpry
some wires
NOTE: Please buy exactly these parts, it can be from any site, for reference I have given the amazon links.
3D Printed parts:
Available on makerworld:
List of parts:
- base.stl
- encoder_holder.stl
- top_part.stl
Software: flash_download_tool.zip (ESP flash download tool)
Code: muso_ventoron.zip
Both the files can be found here: https://github.com/VikVentor/muso-media-controller
The uploading of the firmware step will involve these two files.
Connect the Hardware
.png)

Refer the circuit diagram provided and make the connections on the rotary encoder and esp32.
NOTE: Solder the rotary encoder first, insert the other end of the unsoldered wires through the encoder_holder.stl part (as shown in the video). Then solder to the pins of the esp32.
Test the Connections

Once the code has been uploaded test the working of the device by connecting it using bluetooth on your PC.
The default name is ESP32 knob.
Once it has paired and connected, rotate the encoder to observe change in volume or push the encoder switch to see if it pauses/plays the song.
Connect the Esp32 Board to Your PC
- Connect your board to your laptop using a USB B type cable.
- You can see if your board is detected or not in the device manager as shown in my image
- Under Ports(COM & LPT) section, you will observe a name like Silicon Labs 210x etc. It means your Board is dtected properly.
- In case you cannot see anything like that, you will need those drivers.
- You can download the drivers here:
- https://www.silabs.com/developer-tools/usb-to-uart-bridge-vcp-drivers
- Its available for windows and MAC OS
Uploading the Firmware/code & Testing
Refer to the below video to upload my code to your board:
https://youtu.be/UHlxNuUlFP0?si=_gNPbstDowRn3o5V&t=459
NOTE: the tutorial is for another device, but steps are same so you can follow it, only thing is instead of stream_ventoron.zip, you will be using muso_ventoron.zip
Once that's done connect your device with your windows PC bluetooth and test it out.
Assemble the Parts




Before applying hot glue assemble as shown in the images to check the alignment of the rotary encoder part.
As you can see in the third image, the rod of the encoder is not exactly in the centre. Simply rotate it 180 degrees and it will be in the centre.
Apply Hotglue and Finish Assembling




As shown in the first image, make sure the esp32 power/microusb port is facing towards the gap I have given in the part.
Finally power it using a microusb Cable, and thats it!
Thats It!

Do check out the video, to know how to use all the features.
Hope you liked this project, see ya on the next one.