Replacing the arduino with a digi pot

Thread Starter

Njiua

Joined Feb 17, 2021
3
Hey Guys,

A few days ago I sketched some designs for a new lamp. Before I can finalise the design I want to have the electric circuits in order.

situation right now is:
I've got an arduino Nano, this guy is on stand-by all the time to save data, I've got a touch receptor as on/off button, and two receptors for increasing and decreasing the light intensity. I really want to get rid of the arduino tho, but I need a bit help with that.

I hope to reach the following.
A touch sensor enables the circuit, (we can judge this as an on/off switch)
two touch sensors take care of the intensity of the light due to a digital pot meter.

I've been wondering tho, I've heard something about potentiometers with an up/down function... so in my thoughts these potentiometers can change the wiper every time someone pushes the button.

example:
I push the + button, this enables a tiny amount of power getting to the potentiometer, the potentiometer lowers the resistor, the light shines brighter.

how ever, to make it even easier for the costumer I'd like the wiper to go up or down even more when long pressing the button

example:
I push the + button, this enables a tiny amount of powert getting to a component, this component sends the data throught to the pot meter,
3 seconds later I still have my finger on the button, the component notice still getting power, sending a signal to the potentiometer again.

what kind of component am I missing here?

cheers!
 

KeithWalker

Joined Jul 10, 2017
3,063
When the button is pushed, you need to activate a pulse generator circuit that will send pulses to either the "increment up" or increment down" input on the digital potentiometer. If the pulses repeat about every half second, keeping the button closed will keep changing the level.
 

crutschow

Joined Mar 14, 2008
34,282
When the button is pushed, you need to activate a pulse generator circuit that will send pulses to either the "increment up" or increment down" input on the digital potentiometer.
That could be done with a 555 astable oscillator, and a quad NAND or AND gate IC at its output to select the desired digital potentiometer input.
 

Thread Starter

Njiua

Joined Feb 17, 2021
3
Thanks for the reactions, a 555 timer sounds familiar.. Took a quick look on YouTube but there's plenty of information about them on how they are use to (per example) turn an LED on and off.

Just one question left, what kind of potmeter can I use with this kind of interface? It should be around 5k ohm.. The amount of whiper steps are not that important since I'll try and only use like 5 steps or so.

Cheers!
 

KeithWalker

Joined Jul 10, 2017
3,063
Thanks for the reactions, a 555 timer sounds familiar.. Took a quick look on YouTube but there's plenty of information about them on how they are use to (per example) turn an LED on and off.

Just one question left, what kind of potmeter can I use with this kind of interface? It should be around 5k ohm.. The amount of whiper steps are not that important since I'll try and only use like 5 steps or so.

Cheers!
I recommend the x9c102-103-104-503 series potentiometer for this project. The datasheet is attached. It will be simple to interface to without a microcontroller. When you design your control circuit, be aware that all three of the potentiometer terminal voltages must be within the 0 to 5VDC supply.

https://www.bing.com/search?q=x9c102-103-104-503+datasheet&pc=MOZI&form=MOZLBR
 

Deleted member 115935

Joined Dec 31, 1969
0
Slightly off topic,
can you expand as to why you want to replace the Nano please,
 

Thread Starter

Njiua

Joined Feb 17, 2021
3
Slightly off topic,
can you expand as to why you want to replace the Nano please,
Just for personal purpose, I understand how I can make this circuit with an arduino. the thing is I'd have to have my arduino on stand-by all the time, or write the settings to the EEPROM. I'm really trying to understand how the circuit will work without any form of micro computer. I'm a designer for hobby but if I ever manage to present a product to a second party with the use of an arduino it might raise questions.

What type of light is it? AC incandescent? DC LED?
How is the light powered? AC? DC? Voltage and current?
the light will probably be a 12v LED strip. so 12v dc, incomming power wil be 5v USB C which will be boosted to 12v. or just 12v dc via an adapter, this goes through a voltage regulator. The out going power from the regulator will be managed by a adjustable resistor. a second circuit will be able to ajust this resistor. This will be the circuit using the digital potentiometer.

So this circuit will have nothing to do with powering the LED, just the dimming of the voltage regulator.

here's an example with a reguar potertiometer.
 

BobTPH

Joined Jun 5, 2013
8,813
Well, you could do it without a microcontroller, but you will not make the circuit cheaper or smaller that way, If I did this with a PIC, it would take:

1 8-pin PIC
2 capacitors
1 resistor
1 MOSFET

Your digital pot alone will cost more than this.

Bob
 

KeithWalker

Joined Jul 10, 2017
3,063
Your digital pot alone will cost more than this.

Bob
The one I recommended cost me $2.90 Canadian each, including delivery from Aliexpress. In spite of the adverse comments some members have made against them, I have had no failures yet.
That price is definitely not going to break the bank!
 

Deleted member 115935

Joined Dec 31, 1969
0
You would be amazed to know how many products out there are basically an arduino,
Especially as you can so easily "spin your own". All debugging done on off the shelf units, and then spin your own to change the look / add bits on board that are on shield on an Arduino.

Same also for raspberry Pi to some extend, especially with the Pico now available,
 

BobTPH

Joined Jun 5, 2013
8,813
The one I recommended cost me $2.90 Canadian each, including delivery from Aliexpress. In spite of the adverse comments some members have made against them, I have had no failures yet.
That price is definitely not going to break the bank!
And to thst you need to add a PWM controller to connect the pot to, and a touch switch controller to handle 3 touch plates, and a digital up / down counter. All of which can be done in micro.

Bob
 

KeithWalker

Joined Jul 10, 2017
3,063
And to thst you need to add a PWM controller to connect the pot to, and a touch switch controller to handle 3 touch plates, and a digital up / down counter. All of which can be done in micro.

Bob
The only things needed to replace a microcontroller would be a 555 pulse generator, a digital pot and a transistor to invert the switching logic. The other components would be the same for both circuits.
 

BobTPH

Joined Jun 5, 2013
8,813
I do see that the digital pot linked has the counter built in.

You need something to do the touch buttons. I would use a PICs that has capacitive touch built in. Not sure how he is doing that with Arduino, maybe it has that as well?

You are not going to beat my 5 component solution without a micro.

Bob
 

djsfantasi

Joined Apr 11, 2010
9,156
There is a capacitive touch library available for the Arduino.

You wouldn’t need the digipot because the Arduino has built-in PWM output. all you’d need are the touch plates, a logic level N channel MOSFET and a resistor or two.

The TS can program the ATMega328 and remove it from the Arduino board to use it in his product.

Or perhaps, an ATTiny MCU. That could be programmed and inserted on a custom PCB...

But the bottom line is he doesn’t want to use an Arduino. By extension, he doesn’t want an MCU. But excluding the touch plates and LED strip, it’s a 3 component solution.
 
Last edited:

KeithWalker

Joined Jul 10, 2017
3,063
Guys, you are ignoring his original request. He already has the touch sensors. He has explained why he does not want to use his Arduino. He is not competing in a minimum component count competition. You are not helping him to solve his problem.
 

djsfantasi

Joined Apr 11, 2010
9,156
Guys, you are ignoring his original request. He already has the touch sensors. He has explained why he does not want to use his Arduino. He is not competing in a minimum component count competition. You are not helping him to solve his problem.
i do understand. But an MCU is the best solution. I also misunderstood his objectives and came to this realization after rereading his posts.

But the bottom line is he doesn’t want to use an Arduino. By extension, he doesn’t want an MCU.
I think he is looking for a simple chip to solve all his problems. But many people have provided answers to this question with various chips, but what is missing is a system solution. A solution that pulls all of these suggestions into a complete system. I’m not capable as I cannot get past the MCU solution.
 
Digital pots have all sorts of "annoyances". They are good for low currents and sometime non-volatle storage. LED perceived brightness is supposedly non-linear with current.

0-10V or 1-10V LED dimmers are available. Resistance, voltage and PWM are normal diiming controls.
 

BobTPH

Joined Jun 5, 2013
8,813
Don’t know if this is a one-off or to be produced in quantity. I think it is the latter, since he said something about customer perception if using Arduino.

If that is the case, a micro will, by far, have the lowest BOM cost.

I also think he has the misconception that the digital pot can be connected directly to the LED.

Bob
 
Top