Author Topic: Digital-to-Analog Converter (DAC) Not Working  (Read 1180 times)

0 Members and 1 Guest are viewing this topic.

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Digital-to-Analog Converter (DAC) Not Working
« on: March 26, 2024, 11:53:43 am »
Hi everyone,

I'm having trouble with a circuit that's no longer functioning. To fix it, I need to understand how it works, but I'm stuck.

From what I can gather, it seems to be a digital-to-analog converter (DAC) that uses a summing current method. I've been trying my best to understand its operation, but I'm just not getting it.

Here's what I think it does: it takes a digital signal from the (74HC574N) chip, converts it to current, and then uses optocouplers and PNP transistors with resistors to control the amount of current. Finally, the OP07CP op-amp converts this current back into an analog voltage that gets sent to the VFD's analog input.

I've tried to draw a schematic of the circuit based on my understanding (attached below).

The problem I'm facing is that the output voltage is always around 11v, regardless of the digital input value. This makes me think there might be an issue with the circuit itself.

I've already tried troubleshooting by replacing the OP07CP op-amp and the 2N5401 transistor with new ones, but unfortunately, the issue persists.

I would be incredibly grateful if anyone could help me understand how this circuit works, or point out any mistakes in my schematic, especially anything that could explain the constant 11v output. Any insights would be greatly appreciated!

Thanks in advance,

Shaydzmi
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2009
  • Country: fi
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #1 on: April 05, 2024, 12:48:46 pm »
Have you measured activities around optos?
Advance-Aneng-Appa-AVO-Beckman-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Triplett-YFE
(plus lesser brands from the work shop of the world)
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #2 on: April 05, 2024, 01:59:08 pm »
Yes, they are on and off according to the binary output of the 74HC574N, I'm also sure of the functionality of the PNP transistors.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1740
  • Country: is
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #3 on: April 05, 2024, 02:15:04 pm »
What load is connected to the output terminals. The feedback loop won't work correctly if the transistor doen't have some sort of path to the collector. The whole output circuit is suspicious. Are you sure you have drawn the opamp and its connections properly? Also you don't show any node connected to the cathode ends of the opto's although you did say the opto's appear to be working.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1740
  • Country: is
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #4 on: April 05, 2024, 02:22:12 pm »
I can see the opamp output through the B-E transistor junction back to the inverting opamp input forming a unity gain feedback loop with a one diode drop offset but it seems any current coming to the emitter from the collector is really going to mess with the R2R ladder operation. That really is a strange output circuit.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #5 on: April 05, 2024, 02:27:35 pm »
Quote
What load is connected to the output terminals.
It should be connected to the analog input of a VFD.

Quote
The feedback loop won't work correctly if the transistor doesn't have some sort of path to the collector. The whole output circuit is suspicious.
I attempted to comprehend it, but was unsuccessful.

Quote
Are you sure you have drawn the opamp and its connections properly?
I tried my best!
 
Quote
Also you don't show any node connected to the cathode ends of the opto's although you did say the opto's appear to be working.
I am quite confident that there are no issues concerning Optos and their associated transistors.
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #6 on: April 05, 2024, 02:30:13 pm »
I can see the opamp output through the B-E transistor junction back to the inverting opamp input forming a unity gain feedback loop with a one diode drop offset but it seems any current coming to the emitter from the collector is really going to mess with the R2R ladder operation. That really is a strange output circuit.

I believe it is not an R-2R ladder.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1740
  • Country: is
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #7 on: April 05, 2024, 03:48:28 pm »
Look at the resistor values, 250, 500, 1K, 2K, 4K, 8K  That is the very definition of an R2R ladder 8K being the least significant bit. I do agree the feedback circuit wrapped around the opamp is a bit strange. My best guess is that the R2R ladder voltage controls a variable collector current and uses the unity voltage gain coupled with significant current gain of the opamp / transistor to form a current control output. So it would sink a varying amount of current from the +d.c. supply rail through the external connection.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #8 on: April 05, 2024, 03:54:49 pm »
I'm still not convinced that we have here an R2R ladder, I'm a beginner though!
https://en.m.wikipedia.org/wiki/Resistor_ladder
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2009
  • Country: fi
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #9 on: April 06, 2024, 10:31:17 am »
Check that the trimmer is actually trimming.

Your 0 level is 510 ohms away from +V and 1 is 510 || 8k ohms.
The trimmer is adjusting when that change happens and so flips the opamp.
Advance-Aneng-Appa-AVO-Beckman-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Triplett-YFE
(plus lesser brands from the work shop of the world)
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #10 on: April 06, 2024, 11:38:00 am »
Quote
Check that the trimmer is actually trimming.
I've tested it by rotating fully to the right and left, observing voltage fluctuations from 9.30V to 11.60V.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2009
  • Country: fi
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #11 on: April 06, 2024, 01:57:09 pm »
At some point when trimming the trimmer opamp pin 6 should start pulling down.
Transistor's collector is floating when pin 6 is high.

Connect few kilo ohms between output connectors and short opto pin 4 of 8k to GND.
That will ensure your live situation and you can do standalone testing.

When you short other equal opto pins to GND you can finally test all levels.
But only zero level is adjusted.
Advance-Aneng-Appa-AVO-Beckman-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Triplett-YFE
(plus lesser brands from the work shop of the world)
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1740
  • Country: is
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #12 on: April 06, 2024, 02:16:14 pm »
Can you show a schematic of what the circuit is driving? That circuit looks like it could be supplying a variable current output or working as a variable current sink down from the fixed +V rail. Depending on the load being driven you could see variable current with very little change in voltage across the output of the circuit in your supplied drawing. As an example, if the positive rail (The +12 of the floating supply) was connected to the emitter of a PNP transistor and you other output terminal in your drawing was connected to the base then the circuit you have shown could place a variable current of perhaps .1ma up to maybe 10ma and you would see very little voltage change across your output terminals. Perhaps .62v up to perhaps .7v when measured across the terminals. What is the real problem you are troubleshooting? Variable speed that doesn't vary? Variable brightness that doesn't vary? Perhaps the problem has nothing to do with this circuit you have shown since the two most important solid state devices have already been replaced and you have stated the optos are responding properly. You have replaced suspect parts with no improvement. Can you verify if the parts you took out are bad? They are probably good and your problem is elsewhere. If you don't believe the circuit is a true R2R ladder, then at least understand it functions like one. Each opto has twice the effect of the preceding one and half the effect of the next one in line and that is plainly obvious from the resistor values. The output of the circuit you have shown should produce 256 binary current steps, and perhaps not 256 binary voltage steps. We need more info.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline r6502

  • Regular Contributor
  • *
  • Posts: 129
  • Country: de
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #13 on: April 06, 2024, 05:02:24 pm »
Hi Shaydzmi,

the schematic shows a constant current source. connect a resistor between the outputs, like shown below.



test with a resistor of 100Ohm, and change the settings.

Strange for me is R8 that seems to be really low?  Would have expected to have it in the range of 8k. if you switch on Q2, the resistors R8 and R12 are more or less parallel, and the current throuh the output will de doubled and so on.


I just saw, that som of the base resistors are 10k and there is also 1k (R23) shown is this correct?

BR Guido

Edit: spelling and link for photo, remark according base resistors
« Last Edit: April 06, 2024, 05:22:52 pm by r6502 »
Science can amuse and fascinate us all, but it is engineering that changes the world - - Isaac Asimov
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #14 on: April 07, 2024, 02:20:52 pm »
At some point when trimming the trimmer opamp pin 6 should start pulling down.
Transistor's collector is floating when pin 6 is high.

Connect few kilo ohms between output connectors and short opto pin 4 of 8k to GND.
That will ensure your live situation and you can do standalone testing.

When you short other equal opto pins to GND you can finally test all levels.
But only zero level is adjusted.
Using 10K and 2.7K resistors, the output still fluctuates by a few millivolts, even when inputting bits from 00000 to 11111.
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #15 on: April 07, 2024, 02:38:08 pm »
Can you show a schematic of what the circuit is driving?
It's a standard analog input for a VFD, which in my case, has a 20KOhm impedance.

Quote
That circuit looks like it could be supplying a variable current output or working as a variable current sink down from the fixed +V rail. Depending on the load being driven you could see variable current with very little change in voltage across the output of the circuit in your supplied drawing. As an example, if the positive rail (The +12 of the floating supply) was connected to the emitter of a PNP transistor and you other output terminal in your drawing was connected to the base then the circuit you have shown could place a variable current of perhaps .1ma up to maybe 10ma and you would see very little voltage change across your output terminals. Perhaps .62v up to perhaps .7v when measured across the terminals.
I've measured the current with the load, and it's nearly constant.

Quote
What is the real problem you are troubleshooting?

The output is supposed to range from 0 to 10 volts; previously, this was the case, but now it's consistently around 11 volts.

Quote
Variable speed that doesn't vary?
Yes.

Quote
Can you verify if the parts you took out are bad? They are probably good and your problem is elsewhere..
Yes, I believe they are good, but I cannot say for certain.

Quote
The output of the circuit you have shown should produce 256 binary current steps, and perhaps not 256 binary voltage steps. We need more info
No, only 64 steps.
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #16 on: April 07, 2024, 02:43:24 pm »
test with a resistor of 100Ohm, and change the settings.
Hi r6502,
I tested with 2.7k, no results.

Quote
I just saw, that som of the base resistors are 10k and there is also 1k (R23) shown is this correct?

No, it's my mistake, they are all 10k.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2009
  • Country: fi
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #17 on: April 07, 2024, 03:51:53 pm »
Can you change opamp pin 6 level by adjusting the trimmer?

With 2.7k and zero input bits you should have a voltage divider of 510 and 2k7, and some over the transistor.
Advance-Aneng-Appa-AVO-Beckman-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Triplett-YFE
(plus lesser brands from the work shop of the world)
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11652
  • Country: my
  • reassessing directives...
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #18 on: April 07, 2024, 03:52:55 pm »
I'm still not convinced that we have here an R2R ladder, I'm a beginner though!
https://en.m.wikipedia.org/wiki/Resistor_ladder
from minutes of understanding your circuit. it is R2R ladder, except active one. the resistor to ground in wiki is replaced with Q3 and anything between M01. Q3 will change resistance based on U4 output p6. if U4p6 goes low, it means to fully close (short low resistance) Q3 to make U4p2 low as well, if U4p6 goes high means it want p2 to be high... your condition p6 HI suggests p2 is too low wrt p3, they are probably out of balance, p2 cant reach p3's voltage level. i suggest probing U4's p2, p3, p6 whats going on while trimming R9. you probably need to change resistance values here and there to reach the balance, please note Q3 will always active (not infinite resistance)  since OP07 is not rail to rail opamp so it's output cant reach exactly 12V. ymmv.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #19 on: April 08, 2024, 10:21:28 am »
Can you change opamp pin 6 level by adjusting the trimmer?

With 2.7k and zero input bits you should have a voltage divider of 510 and 2k7, and some over the transistor.
Adjusting the trimmer, U4 pin 6 goes from 8.00v to 13.43v, regardless of the bits input. I'm measuring pin6 with respect to Gnd (M0 -I)
« Last Edit: April 08, 2024, 10:23:13 am by Shaydzmi »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #20 on: April 08, 2024, 11:13:37 am »
It is absolutely *NOT* a R-2R ladder.  What it is, is a binary weighted conductance resistor network, (+ R6, 510 ohms in parallel to set a 'base' current) sourcing current from the OPAMP's +V to its -in, which acts a a virtual earth, at a potential controlled by the +in which is biassed by the R9 pot, which thus sets the resistance to current factor.   Q3 passes >99% of the balancing feedback current to the virtual earth through the load, acting as a controlled current source with a compliance voltage approx 1V below the virtual earth potential.

As all the transistors are PNP and the whole circuit 'hangs' of the positive rail, to avoid confusion measure with respect to OPAMP V+ (bridge rectifier + out)! 

U4 pin 6 (OUT) behaviour is exactly as expected.  Irrespective of the load at the M01 terminals, and the digital inputs, it should track the voltage at the R6 pot wiper, except one Vbe drop higher, till the OPAMP rails, approx 2V below its + supply.  Therefore R6 should be ineffective for approx 1/3 of its wiper range, with the effective end being wiper towards the 7905 regulator output.

The circuit's min full scale current is approx 13mA, and its max 43.5mA, adjusted by R9.  To convert this to 0-10V at the M01 terminals it requires a load across those terminals of  between 230 ohms and approx 750 ohms.   I suspect it was originally designed as a 4-20mA loop sender, with R8 adjustable to trim to 4mA.   To test it, simply connect a DMM on a 200mA range across the M01 terminals.

Odds are its missing a load resistor across the VFD's input terminals.  If the VFD has been replaced this is a prime candidate.  Check the specs on the old VFD, if it had a 4-20mA loop input option, all is explained.

Edit: corrected direction of Q3 Vbe drop offset.
« Last Edit: April 08, 2024, 02:03:24 pm by Ian.M »
 
The following users thanked this post: Mechatrommer

Offline m k

  • Super Contributor
  • ***
  • Posts: 2009
  • Country: fi
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #21 on: April 08, 2024, 05:49:05 pm »
Can you change opamp pin 6 level by adjusting the trimmer?

With 2.7k and zero input bits you should have a voltage divider of 510 and 2k7, and some over the transistor.
Adjusting the trimmer, U4 pin 6 goes from 8.00v to 13.43v, regardless of the bits input. I'm measuring pin6 with respect to Gnd (M0 -I)

When 510 and 2k7 are dividing the middle point is 16% below +V.
So you should be able to turn the transistor on and off.
Maybe you should add a capacitor parallel to 2k7.

Can you see any difference in Vce of the transistor when you adjust the trimmer?
Advance-Aneng-Appa-AVO-Beckman-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Triplett-YFE
(plus lesser brands from the work shop of the world)
 

Offline ShaydzmiTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ma
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #22 on: April 09, 2024, 12:19:25 pm »
..


Hey Ian.M,

Spot on! You're absolutely right, this is a 4-20mA current loop circuit and it seems to be functioning as intended. Thanks for clearing that up.

I was confused because all of my other boards (about 10) utilize the 0-10V method. This board, being the only one with a 4-20mA loop, certainly added to the confusion.

And just like you said, the issue arose after the VFD replacement. 

Thanks again for your help! The board's working now, but I'm still curious about how it functions.  Specifically, I'd like to wrap my head around the role of the op-amp in this circuit.

Anyone else out there have some insight into how the op-amp works in this context?

Well done Ian.M
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: Digital-to-Analog Converter (DAC) Not Working
« Reply #23 on: April 09, 2024, 01:17:31 pm »
The OPAMP doesn't do much except correct for some sources of error!

Q3 is pretty much a conventional single transistor current source, with its collector current set by its emitter current, which is determined by the resistors and the difference between the positive rail and its emitter voltage.  Where it differs from the usual circuit, is instead of holding the base at a fixed voltage to approximately set the emitter voltage, it has an OPAMP driving the base to servo the emitter voltage to the voltage set point from the potentiometer.   This cancels out the effects of Q3's intrinsic emitter resistance and eliminates any loading effects on the potentiometer, thus improving the linearity of the current source. It also cancels out Vbe variations with temperature, making the current source far more temperature stable.

Unfortunately this improved accuracy and linearity is degraded by the Vce saturation voltage of the transistors switching the individual DAC resistors, which would ideally be replaced with logic level P-MOSFETs.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf