Author Topic: DAC circuit  (Read 3944 times)

0 Members and 1 Guest are viewing this topic.

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
DAC circuit
« on: January 24, 2019, 06:38:56 pm »
How do we get "K" in this circuit? Is the calculation correct?

Thanks.
 

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 694
Re: DAC circuit
« Reply #1 on: January 24, 2019, 06:52:53 pm »
didn't your teacher teach you to use units after each number?  ;D

it would also help if you'd specify the unit you want for "K"
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #2 on: January 24, 2019, 06:58:35 pm »
I think here we don't have any units. K is just a constant to get from ADC to the motor.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: DAC circuit
« Reply #3 on: January 24, 2019, 07:29:39 pm »
Calculation looks OK. Unit is RPM/bit.
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #4 on: January 24, 2019, 08:04:37 pm »
Calculation looks OK. Unit is RPM/bit.

Ok Benta, if you understand, can you explain how do I get "K" and some comments about derivation?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #5 on: January 24, 2019, 11:19:48 pm »
How do we get "K" in this circuit? Is the calculation correct?

Is the second term inverted?

Thanks.
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #6 on: January 25, 2019, 06:04:42 pm »
Can anyone explain to me how do we get "K"?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #7 on: January 25, 2019, 06:39:16 pm »
Can anyone explain to me how do we get "K"?

My earlier comment was wrong.
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #8 on: January 25, 2019, 07:16:57 pm »
This is great, but can you explain/comment in words what are we doing here? Some description.  :)
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #9 on: January 25, 2019, 07:29:30 pm »
This is great, but can you explain/comment in words what are we doing here? Some description.  :)
K is the small-signal gain from the digital input to the RPM of the motor.
If D steps from 0 to 4095, a delta of 4095, then:
4095 * (3.3/4095) (10/1.65) (1500/10) = 3000.  The output rpm changes from -1500 to +1500...a total output delta of 3000.

For a 1 LSB delta for D, the rpm changes:
1 * (3.3/4095) (10/1.65) (1500/10) = 0.7326 rpm

« Last Edit: January 25, 2019, 07:38:02 pm by Wimberleytech »
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #10 on: January 26, 2019, 12:08:35 pm »
Sorry, but I still don't understand. What do you mean by D? DAC? And what is delta?

So DAC outputs a voltage between 0 and 3.3 V.  And because it's 12-bit DAC the resolution is 3.3/4095?
What about those op amps? And there is +10 V or -10 V, shouldn't be the range then 20 V?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #11 on: January 26, 2019, 01:20:25 pm »
Sorry, but I still don't understand. What do you mean by D? DAC? And what is delta?

D is the digital input.  It has a value between 0 and 4095.  When D=0, the output of the DAC is 0, when D=4095, the output of the DAC is 3.3.

"delta" is a change.  0 to 3.3V is a delta of 3.3V.  1V to 2V is a delta of 1V.

Quote
So DAC outputs a voltage between 0 and 3.3 V.  And because it's 12-bit DAC the resolution is 3.3/4095?
The size of an LSB is 3.3/4095.  The smallest unit it can resolve is 1 LSB.
Quote
What about those op amps? And there is +10 V or -10 V, shouldn't be the range then 20 V?
The opamps do what opamps do.
Yes, -10V to +10V is a delta of 20V
 
The following users thanked this post: nForce

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #12 on: January 26, 2019, 01:39:38 pm »
Here is the circuit with some example values.

Use your circuit analysis skills and analyze the signal path.
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #13 on: January 26, 2019, 02:30:00 pm »
So V1 = 1.65 V.

And your U1 op amp has a gain of 3. In my case since the resistors are all the same, it has a gain of 2.

So: 1.65 * 2 = 3.3, and because the delta is 3.3 then 3.3/3.3 = 1 which is A = 1.

Right? But why is delta important here?

Thank you for your effort.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #14 on: January 26, 2019, 02:38:11 pm »
Delta is important because that is what the original "K" equation was calculating.  Calculating small signal gain.  Dont worry about the -1.65 V voltage source when calculating K.
« Last Edit: January 26, 2019, 02:41:54 pm by Wimberleytech »
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #15 on: January 26, 2019, 04:05:27 pm »
Thanks. So the second term is 10/1.65, because on the output we have 10 V, and at the input, it's 1.65 V. So the gain is 10/1.65, but why 10, because delta is 20V? And why at the motor it's 1500/10, here we are mixing rpm and voltage.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #16 on: January 26, 2019, 06:26:33 pm »
Thanks. So the second term is 10/1.65, because on the output we have 10 V, and at the input, it's 1.65 V. So the gain is 10/1.65,
Quote
but why 10, because delta is 20V? And why at the motor it's 1500/10, here we are mixing rpm and voltage.

The motor speed is 150 rpm/volt.  10 volts yields 1500 rpm.  Ergo..."10V"
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #17 on: January 26, 2019, 07:44:12 pm »
Yes, but delta, as you said why is important: Delta at the motor, is 3000 rpm. Not only 1500 rpm.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #18 on: January 26, 2019, 08:00:27 pm »
"K" is the gain of the system: K = Speed/D.  D is the digital input to the DAC.
K is important because this is likely part of a control system where the motor speed is sensed and fed back to the input of the DAC to maintain desired speed.
So, it is a control system (I assume).  In a control system, K is an important parameter associated with, among other things, stability.
If what I just told you makes no sense, then there is no value in me explaining "delta."
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #19 on: January 26, 2019, 08:10:58 pm »
Yes, I understand you.

I am just using the knowledge from known values:
First-term the numerator has delta which is 3.3 V so the same reason for the motor the numerator would have 3000 which is delta. Delta is the difference between min and max.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #20 on: January 26, 2019, 09:05:46 pm »
Yes, I understand you.

I am just using the knowledge from known values:
First-term the numerator has delta which is 3.3 V so the same reason for the motor the numerator would have 3000 which is delta. Delta is the difference between min and max.
No, the first expression converts bits to volts.  The second expression converts volts to volts.  The third expression converts volts to RPM. 

In term of units:
(Volts/bit) (Volts/Volts) (RPM/Volts) = RPM/bit  <--K

If your DAC input changed from 2000 to 2001, a delta of 1 bit, then using the equation, RPM would change by a delta of:

1 * (3.3/4095) * (10/1.65) * (1500/10) = 0.732 RPM

 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #21 on: January 26, 2019, 10:14:49 pm »
OK, now I understand in terms of units.

Can you just say why is then 1500 rpm? Or maybe another person can write it.

Let's be consistent:

The first term: delta = 3.3 V - 0 V = 3.3 V
Last term: delta = 1500 rpm - -1500rpm = 3000 rpm.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #22 on: January 26, 2019, 10:27:55 pm »
OK, now I understand in terms of units.

Can you just say why is then 1500 rpm? Or maybe another person can write it.

Let's be consistent:

The first term: delta = 3.3 V - 0 V = 3.3 V
Last term: delta = 1500 rpm - -1500rpm = 3000 rpm.
No, you misunderstand "delta"
In the first term 3.3/4095 just the transfer function from the D input to the output of the first amplifier.

As far as 1500rpm.  That is just the designer's choice based on motor used.  No magic.
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: DAC circuit
« Reply #23 on: January 26, 2019, 10:42:39 pm »
Why the first term the range 0-3.3 V is not delta? It seems to me that all the data on the schematic is consistent.

Omg, this is going to take forever.  :(
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: DAC circuit
« Reply #24 on: January 26, 2019, 10:53:34 pm »
Why the first term the range 0-3.3 V is not delta? It seems to me that all the data on the schematic is consistent.

Omg, this is going to take forever.  :(
3.3V - 0V is indeed a "delta"

BUT, that is not the first term.  The first term is a transfer function as I said.

How long this takes depends on you.  I understand the circuit and the equations.

You should install LTSPice if you have not already done so.  I will upload the LTSPice file and you can play with it.  Maybe it will help you get a feel for what is going on.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf