Inexpensive(?) Potentiometer & 7 Segment LED

Thread Starter

s7ven77

Joined May 26, 2022
7
Hi,

I'm familiar with audio circuits and making PCBs but I'm trying to find information about something I have no experience with.
I've seen numerous examples of people using an Arduino with a potentiometer to control the numbers on 7 segment LEDs.
What would be the most inexpensive way to have a potentiometer control the numbers (1-9) on a single 7 segment LED (using an 18V source)?
Is this something that is possible using $15 worth of parts, for example?
 

MrSalts

Joined Apr 2, 2020
2,767
Hi,

I'm familiar with audio circuits and making PCBs but I'm trying to find information about something I have no experience with.
I've seen numerous examples of people using an Arduino with a potentiometer to control the numbers on 7 segment LEDs.
What would be the most inexpensive way to have a potentiometer control the numbers (1-9) on a single 7 segment LED (using an 18V source)?
Is this something that is possible using $15 worth of parts, for example?
Yes,
$7 - Arduino nano.
$2 - 10k ohm potentiometer
- 7 pieces 330 ohm resistors
- 1 digit x 7-segment LED
- 1 voltage regulator (step down from 15 to 12v)
 

Papabravo

Joined Feb 24, 2006
21,159
Don't know about the cost, but it is a trivial exercise to convert a voltage from the wiper of a potentiometer into the digits 0 thru 9.
 

Thread Starter

s7ven77

Joined May 26, 2022
7
Thanks so much, I actually didn't realize it would be so cheap.
Here's another question though: considering I'd be making my own PCBs anyways for this project, what parts would I need to buy if I wanted to do this without a premade Arduino? Is it possible to buy the components that make up an Arduino and integrate them into my PCB design? I suppose it might not be much cheaper? This project might involve hundreds of units so even a $5 savings per unit would be worth it.

Thanks
 

JohnInTX

Joined Jun 26, 2012
4,787
I do mostly PIC work and like the Curiosity boards for something quick. All you need is a USB cable to get started. Download MPLABX IDE, XC8 C compiler, review the demo code, and fire up the built-in debugger/emulator. They work pretty well. MCC is a graphical code generator that provides a graphical approach to using peripherals like the ADC for your pot. Not as easy to use as the Arduino library but check it out.
https://www.microchip.com/en-us/development-tool/DM164137
This comes with a PIC18F1619 (I think) which is overkill feature-wise but would allow you to get the prototype working while sourcing a cheaper chip for production. The board supports many different PICs. PIC is not as user- friendly as arduino to get started with but lots of help here and from Microchip.

Most PICs in the family will directly drive an LED display.
A quick look at related chips shows the 16F1613, a related part that should do the job for $0.85 in 100's.

MikroC is an alternative compiler for PICs that isn't free but has an extensive library that is very easy to use as well. I don't know if it supports the Curiosity but worth a look.
https://www.mikroe.com/mikroc-pic

Lots of members here like the TI Launchpad stuff but I haven't used them myself. Probably worth a look. It depends on you and the eventual target chip, cost, availability etc.

Give it some thought and welcome to AAC!
 
Last edited:

Thread Starter

s7ven77

Joined May 26, 2022
7
I do mostly PIC work and like the Curiosity boards for something quick. All you need is a USB cable to get started. Download MPLABX IDE, XC8 C compiler, review the demo code, and fire up the built-in debugger/emulator. They work pretty well. MCC is a graphical code generator that provides a graphical approach to using peripherals like the ADC for your pot. Not as easy to use as the Arduino library but check it out.
https://www.microchip.com/en-us/development-tool/DM164137
This comes with a PIC18F1619 (I think) which is overkill feature-wise but would allow you to get the prototype working while sourcing a cheaper chip for production. The board supports many different PICs. PIC is not as user- friendly as arduino to get started with but lots of help here and from Microchip.

Most PICs in the family will directly drive an LED display.
A quick look at related chips shows the 16F1613, a related part that should do the job for $0.85 in 100's.

MikroC is an alternative compiler for PICs that isn't free but has an extensive library that is very easy to use as well. I don't know if it supports the Curiosity but worth a look.
https://www.mikroe.com/mikroc-pic

Lots of members here like the TI Launchpad stuff but I haven't used them myself. Probably worth a look. It depends on you and the eventual target chip, cost, availability etc.

Give it some thought and welcome to AAC!
Thanks so much, it's been a little overwhelming so I appreciate the information.
 

MrChips

Joined Oct 2, 2009
30,708
Hi,

I'm familiar with audio circuits and making PCBs but I'm trying to find information about something I have no experience with.
I've seen numerous examples of people using an Arduino with a potentiometer to control the numbers on 7 segment LEDs.
What would be the most inexpensive way to have a potentiometer control the numbers (1-9) on a single 7 segment LED (using an 18V source)?
Is this something that is possible using $15 worth of parts, for example?
Do tell us exactly what you are trying to do.
You have 18V supply.
You turn a knob and a display changes from 1 to 9.
What are you controlling?
 

Ya’akov

Joined Jan 27, 2019
9,069
Just a suggestion that one of the Atmel AVR processors, which is what is on the original Arduino could be very and allow you to use the Arduino IDE and the many libraries and examples compatible with it. While you would have a one time cost for something that wound allow you to program the chip (it could even be an Arduino with a socketed MCU), the part itself is very affordable and the external components could be minimal.

For example, the Arduino Uno has a socketed ATMEGA328P. The board is available for about $25.00 from Arduino or a lot less as a clone. The chip itself is available for less than $3.00.

1653654307988.jpeg
The idea is to develop the device using the Uno, then remove the chip and use it standalone (with the necessary power supply circuit, bypass capacitors, and, if needed external clock). As I said, nothing at all wrong with @JohnInTX’s suggestion of the PICs, this is so the Arduino IDE and its resources—which are prodigious—are available.
 

Thread Starter

s7ven77

Joined May 26, 2022
7
Do tell us exactly what you are trying to do.
You have 18V supply.
You turn a knob and a display changes from 1 to 9.
What are you controlling?
The potentiometer actually only has one function which is to display 1 through 9 as it is swept clockwise... it won't be attached to or controlling anything else.
 

Thread Starter

s7ven77

Joined May 26, 2022
7
Thank you for this, it's very helpful.
Just a suggestion that one of the Atmel AVR processors, which is what is on the original Arduino could be very and allow you to use the Arduino IDE and the many libraries and examples compatible with it. While you would have a one time cost for something that wound allow you to program the chip (it could even be an Arduino with a socketed MCU), the part itself is very affordable and the external components could be minimal.

For example, the Arduino Uno has a socketed ATMEGA328P. The board is available for about $25.00 from Arduino or a lot less as a clone. The chip itself is available for less than $3.00.

The idea is to develop the device using the Uno, then remove the chip and use it standalone (with the necessary power supply circuit, bypass capacitors, and, if needed external clock). As I said, nothing at all wrong with @JohnInTX’s suggestion of the PICs, this is so the Arduino IDE and its resources—which are prodigious—are available.
This sounds like I could wrap my head around it. The one time purchase of the Arduino isn't an issue so this could also work. Thanks for your advice.
 

MrSalts

Joined Apr 2, 2020
2,767
Yeah, that's a really nice option, thanks.
Since you're up for designing your own PCB, you can place the microcontroller and 10 LEDs in any orientation you want - including in a 3/4 circle around the pot to show exactly the position. Or you can use a fader/slider/linear pot with 10 Indicator LEDs to show the slider position.
 
Top