Digital control or analog?

Thread Starter

Hamed T

Joined Dec 28, 2018
18
But aren't ordinary rotary encoders 5x more precise? It will all depend on the accuracy and stability of your reference. Why do most modern instrument manufacturers use encoders?

If this were the 1970's, you might have an argument, but not today. It seems you are just reluctant to go digital.
I'm not "reluctant", in fact I'm disappointed that I can't go digital. rotary encoder is just a fancy switch, the precision comes from the DAC which precise ones are expensive.
 
Last edited:

jpanhalt

Joined Jan 18, 2008
11,087
I'm not "reluctant", in fact I'm disappointed that I can't go digital. rotary encoder is just a fancy switch, the precision comes from the ADC which precise ones are expensive.
Since you apparently had a solid reason to use analog, why did you ask the question?
 

Thread Starter

Hamed T

Joined Dec 28, 2018
18
Since you apparently had a solid reason to use analog, why did you ask the question?
I did some more research and also crutschow guided me...
I asked the question so people like you with their sarcasm can have something to be sarcastic about ;)
 

BobTPH

Joined Jun 5, 2013
11,515
I have no idea how and why should I do that, need more explanation please.
Because there is a voltage drop between the voltage source and the voltage at the load. You might control the voltage at the source to an acciracy if 1mV, but the voltage delivered to the load will be off by much more than that and will be dependent on the current.

A four wire Kelvin measurement is used to get around this on high accuracy voltage sources. The extra two wires are used to measure the voltage at the load instead of at the source and they carry a tiny current so there is little voltage drop.

Bob
 

Thread Starter

Hamed T

Joined Dec 28, 2018
18
Because there is a voltage drop between the voltage source and the voltage at the load. You might control the voltage at the source to an acciracy if 1mV, but the voltage delivered to the load will be off by much more than that and will be dependent on the current.

A four wire Kelvin measurement is used to get around this on high accuracy voltage sources. The extra two wires are used to measure the voltage at the load instead of at the source and they carry a tiny current so there is little voltage drop.

Bob
I did compensated for voltage drop with an opamp but I don't see how the resolution and linearity error of a DAC is related to that...
 

BobTPH

Joined Jun 5, 2013
11,515
I did compensated for voltage drop with an opamp but I don't see how the resolution and linearity error of a DAC is related to that...
Who said it was? I am just pointing out that your design is not going to achieve the 1 mV accuracy you specified.

Bob
 

DickCappels

Joined Aug 21, 2008
10,661
I have a 0 to 10V adjustable reference. I started with a TL431 but the 50 ppm/°C thermal drift whenever the air conditioner came on or shut off was very disturbing. Ended up replacing it with and LM4140-ACM and was greatly relieved.

Using an ATTINY2313 to read the user controls and display the battery check and voltage, and as a 16 bit PWM generator my most careful measurements indicate that I am getting resolution of 250 uV and errors less of than 1.0 mv.

By adjusting the PWM generator's top count to calibrate the scale factor of the PWM and a second PWM channel to adjust the offset, the design was able to use a TL062 low power Bi-FET opamp as the output stage.

Aside from the voltage reference and some slightly expensive voltage regulators, the rest of the parts are inexpensive.
 

Thread Starter

Hamed T

Joined Dec 28, 2018
18
Using an ATTINY2313 to read the user controls and display the battery check and voltage, and as a 16 bit PWM generator my most careful measurements indicate that I am getting resolution of 250 uV and errors less of than 1.0 mv.
Thanks for sharing your experience, How did you generated 16 bit PWM with attiny?
BTW I'd love to see some pictures of the project if possible.
 

Sensacell

Joined Jun 19, 2012
3,784
I just bought a new lab supply, a new fancy digital interface one.

That dumb thing slows my workflow 50%, fiddling with all those menus and buttons.
I say focus on what you are trying to accomplish, instead of jumping through hoops in the user interface.
 

DickCappels

Joined Aug 21, 2008
10,661
An ATTINY2313 has both a 16 bit and an 8 bit counter/timer which can cycle continuously producing PWM without firmware intervention once set up. Because of the flexibility offered by the two counter timers I was able to adjust the full scale voltage and the offset voltage without using pots (The irritating problems of pots, those of settability, hysteresis, and stability do not exist with PWM. All this for less than a dollar and a half.

I can send some documentation on the device in reply to a PM request. The documentation is not ready for prime time.

1576950930474.png

1576950972664.png
 
Last edited:

Thread Starter

Hamed T

Joined Dec 28, 2018
18
An ATTINY2313 has both a 16 bit and an 8 bit counter/timer which can cycle continuously producing PWM without firmware intervention once set up. Because of the flexibility offered by the two counter timers I was able to adjust the full scale voltage and the offset voltage without using pots (The irritating problems of pots, those of settability, hysteresis, and stability do not exist with PWM. All this for less than a dollar and a half.

I can send some documentation on the device in reply to a PM request. The documentation is not ready for prime time.

View attachment 195020

View attachment 195021
This is a really nice pocket size design. yes please send me the documentations whenever you can. PM sent.
 
Last edited:
Top