Build a Remote Volume Control & Variable Power Supply using Digital Potentiometers!
Today, we are working with an interesting component: the Digital Potentiometer or Digipot. As the name implies, these devices are potentiometers whose wiper position is set digitally. While they are primarily used for interfacing analog and digital electronics, they also have a few other uses.
Today, we will work with three digital potentiometers: an integrated circuit with two digipots and a couple of full-featured modules from Adafruit. You’ll see how easy it is to code for an Arduino and ESP32 board.
After that, we will build a couple of projects that use digital potentiometers. The first is a remote analog volume control that uses an infrared remote (any remote will work; I used one from a television) to control an analog audio signal.
We will also use a digital potentiometer to construct a linear power supply with a variable output voltage. Since our design uses an ESP32, it just made sense to give it a web-based interface!
Here is the Table of Contents for today's video:
00:00 - Introduction
02:04 - Digital Potentiometers
08:32 - MCP4231 SPI Digipot
16:51 - DigiPot as Waveform Generator
21:42 - Adafruit DS1841 & DS3502
30:26 - Audio Remote Volume Control
39:31 - Remote Controlled Power Supply
51:15 - Conclusion
Please also check out the article accompanying this video for all the code and wiring diagrams. It can be found at https://dronebotworkshop.com/digital-potentiometers.
Hope you enjoy the video!
Bill
"Never trust a computer you can’t throw out a window." — Steve Wozniak
I built a half wave rectifier using Bill's digital potentiometer as an input:
Hi,
regarding the circuit of the 'Remote Controlled Power Supply', what components could I leave out if I would already use a DC input with 12V? The current running at 12V is about 120mA at the load. When I use an mechanical pot and reduce the voltage to 1.66V, there is a current of about 7mA.
Thank you, kopi
@kopi Eliminate the bridge rectifier and attach your power supply to what was the rectifier's positive and negative(ground) output. Be prepared to adjust the 1k resistor for the different voltage level.
😎
Bill
"Never trust a computer you can’t throw out a window." — Steve Wozniak
Thank you Bill 😊, I will try to get a hold of the other components. Unfortunately, all the electronics stores permanently closed a while ago and so I've to order everything online. This takes forever and most of the time the shipping costs outweigh the component's prices 🙄
Update:
I searched my treasure trove and found:
- 10μF capacitors
- 22nF capacitors
- 10Ω, 1kΩ and a bunch of other values
Also have:
- 470μF capacitors (maybe using two in parallel to get to the 1000μF?)
Still looking for (probably from a friend or will have to order)
- Zener diode
- Voltage Regulator
Thank you, kopi
@kopi If you're using a DC power supply instead of the AC supply/Bridge Rectifier combination, then the 470uf capacitor would be fine on its own - its purpose is to smooth out the DC from the rectifier, which your power supply already does.
Consider using a trimpot (2k or 5k) instead of the 1k resistor to adjust it for the optimum range. Once you find a value, you could substitute it with a fixed resistor if you like.
Have fun!
😎
Bill
"Never trust a computer you can’t throw out a window." — Steve Wozniak
@kopi Are you ordering from AliExpress? Right now shipping is either free or very low. The other advantage is you get 10 of x for the same price of 1 on Amazon. What country are you in?
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@dronebot-workshop thanks again. i'll get the components next week. can't wait to test it 🙂
hello @zander, i'm not a huge fan of aliexpress. yes it's cheap, but for all the wrong reasons 😐
@kopi What reasons? It's not much diferent than Amazon, in fact Amazon sources many of their products now from Ali. I have made dozens of orders, and yes a couple got lost but I was quickly re-imbursed and ordered again. I had much more trouble with local delivery people leaving packages in the rain or delivering to the wrong address and one of those was away for months so I ended up with two and Ali said just keep it.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.