Author Topic: Howto: simple Differential Amp + TTL ?  (Read 196866 times)

0 Members and 1 Guest are viewing this topic.

Offline Xer0

  • Jr. Member
  • **
  • Posts: 65
  • Milliwatts: 0
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #60 on: February 14, 2010, 06:16:05 pm »
Ok, here we go:

Im currently not soldered anything to the SoundCard; im using a USB plug for power and for testing the opamp's stage behavior, im was using a 1MOhm potentiometer to adjust any signal voltage between +5 and -5V. now, after i thought the high resistance of it could be the error cause, i replaced it with 3x 10k R's at which i can get 4 different voltages for testing.

I attached my circuit plan, its exactly how i builded it. between +5V/GND and -5V/GND are a 100µF elko each for stabilising, otherwise currently no capacitors are used, except the ones for the ICL7660 negative voltage converter.


So i did a row of different measurements on different setups. Here are the results:

Code: [Select]
         1  |  2  |  3  |  4   

-5V :  -4.82 -4.80 +4.84 +4.95
 A  :  -1.55 -1.55 +0.94 +1.88
 B  :  +1.71 +1.71 -1.03 -2.06
+5V :  +4.99 +4.99 -4.74 -4.76


[ADD]

-vref + -0.94 = 3.49
-vref + +1.03 = 1.52


[SUBST]

-4.81 + -(0) = -2.41
-4.81 + -(GND) = -4.76
-4.81 + -(-vref) = -2.27
-1.55 + -(0) = -0.58
-1.55 + -(GND) = -1.16
-1.55 + -(-vref) = +1.39
+1.71 + -(0) = +0.64
+1.71 + -(GND) = +1.29
+1.71 + -(-vref) = +3.84
+4.99 + -(0) = +2.50
+4.99 + -(GND) = +4.96
+4.99 + -(-vref) = +4.95

+vref + -(0) = +1.28
+vref + -(GND) = +2.56
+vref + -(-vref) = +4.95

0 + -(+vref) = -2.55
GND + -(+vref) = -2.54
-vref + -(+vref) = -4.76

0 + -(0) = 0.00
GND + -(0) = 0.00
-vref + (-0) = -1.28

In the table, the 1st collumn is just measured with multimeter on the Vin 3*10k divider, withoud any load. second one is the divider voltages feed into a voltage-follower opamp circuit, 3rd one is fed into inverting-amplifier with 1x gain and 4rd finaly with 2x gain.

So this is strange. the "real" voltages on the divider are coming out unaltered with a impendance amplifier / follower; but are changing extreme when i use something with gain.
Also in the last test setup, the substractor, when i feed in 2.55V i got the half out, without any other voltage is going in which could alter it (0 in the table means unconnected cable)
On the other side, whenever i do operations with buffer stabilised negative n/o directly from LM336 reference circuit Vref ±2.55V Voltage; the output never differs from ideal theory values!


What the Fuck?!


I never get "zero-level" signal output on 2.55V "offset-level" input. SC is a CM106 so the Vref is set right. OPA's are rail2rail and able to deliver Vout = Vsupply - 0.01V !
Here's a bigger scan: http://www.abload.de/image.php?img=image0022ff8c.jpg

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Howto: simple Differential Amp + TTL ?
« Reply #61 on: February 14, 2010, 11:26:02 pm »
Two of the three voltage buffers you are using have an input resister of 10K. That has every bit as much effect on the voltage as any of the three 10K resisters you have in your voltage divider network. That is why 1M ohm was used in the previous design. This is not such a great idea anyway. It is not stable. If the supply voltage changes, your reference voltage will change with it.

You are making all of this WAY more complicated that it really is.

In engineering, the simplest working solution is always the best!

You live in Germany! Aren't you supposed to know that?  %) ;D

James.  :)
« Last Edit: February 14, 2010, 11:31:36 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline meandean

  • Sr. Member
  • ****
  • Posts: 466
  • Milliwatts: 13
  • It's about sight AND sound.
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #62 on: February 15, 2010, 12:10:38 am »
Quote
of course i could adjust the gain of the opa and thus make the -3 to +3V reference, but why? i thought the CM106 has this value as offset...

  The reason I asked is because you need a reasonable range of adjustment to get proper DAC offset correction
and that depends on the circuit you use. My circuit is a summing amp, so the offset reference (or correction
voltage) must be negative to add and cancel out the positive offset of the DAC. I suspect the Weartronics
circuit at the top of this thread might actually require a positive correction voltage, because the DAC is
applied to the positive input of the op-amp rather than being summed together with the correction voltage on
the negative input (I have never wired a circuit that way, so I'm just guessing).

  Take a closer look at the summing amp circuit. When R1 and R2 are the same value, you get zero output when
both inputs have a voltage that is equal and opposite polarity, but summing amps are quite flexible- for example,
let's say the DAC offset is 2.5v and I make the offset reference -5v, all I have to do is make R1 twice the
value of R2 and I'll still get 0v at the output! Here's the formula for zero balance (E=applied voltage):

  E(R1)/R1 + E(R2)/R2 = 0  and R1 = -R2*(E(R1)/E(R2))

  The point is, I could make the offset reference any fixed negative value and adjust R1 to get a perfect
balance for each channel. The DAC offset does vary a small amount from channel to channel, but it's probably
not enough to worry about.


  The DAC gain of the first stage of the circuit is -R3/R2. The second stage of the circuit is just a unity gain
inverter where gain = -R5/R4. With R4=R5, the output is equal and opposite of the first stage, and the total
voltage across -X & +X will be twice that of the first stage measured to GND. If R2=20K, set R3 (gain) to about
to about 32K to get a full +/- 5v for your Chinese projector...

Quote
So this is strange. the "real" voltages on the divider are coming out unaltered with a impendance amplifier / follower; but are changing extreme when i use something with gain.

  Now, you're getting deeper into electronics... The ideal voltage source has zero output resistance, so no
matter what load you put on it, you get the same voltage. A real volt source such as a battery, can be thought
of as a perfect volt source with a small amount of built-in resistance in series. As the load gets greater, some
of the battery voltage starts to drop across that internal resistance, causing the final output at the load to
drop. Devices such as op-amps, regulators, and DACs use feedback which allows them to maintain a constant
voltage as the load changes (within reasonable limits). My point is this: in a summing amp, the load seen by
the voltage source is equal to the series resistor (R1 or R2). If the volt source is coming from a resistor
divider, than that source resistance will affect the final result, making it less predictable. In an op-amp
voltage follower, the input presents almost no load at all to the volt source, yet the output is regulated,
and that (or a regulator) is what you need to use for your offset reference source.

  Look on the bright side, if you bought a correction amp that was ready-to-go, you would have missed out on
the fun and frustration of learning some electronics...
"Patience is for the dead."

Offline Xer0

  • Jr. Member
  • **
  • Posts: 65
  • Milliwatts: 0
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #63 on: February 15, 2010, 06:36:03 pm »
  Look on the bright side, if you bought a correction amp that was ready-to-go, you would have missed out on the fun and frustration of learning some electronics...

Yeah thats right. i didn't even know how an opamp works before i started to build this DAC. :)

So the problem seems to focus on the not-ideal test signal voltage source im using. Because i build the circuit right like you drawed ii, just with other values, but it works in theory (Simulation!)
and it works when using the opa-buffered Vref for Add/Subst Operations.

Im tired now and wanna sleep, will repeat the tests tomorrow with an follower buffered divider!
Thanks for all the hints. hope to get it working soon

Offline meandean

  • Sr. Member
  • ****
  • Posts: 466
  • Milliwatts: 13
  • It's about sight AND sound.
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #64 on: February 15, 2010, 07:26:00 pm »
 Cool!
"Patience is for the dead."

Offline Xer0

  • Jr. Member
  • **
  • Posts: 65
  • Milliwatts: 0
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #65 on: February 16, 2010, 09:57:11 am »
lol. it works now. the Problem was really the Load after the divider. on an 1MOhm Pot its even worser, i thougt the opposite. Now with a buffer after my "Testsignalsupply" i got 0 point at nearly 2.55 and could adjust gain etc. strangely i adjusted it to 4,5V on 3.8 in but then it goes full at 1,25 already. thus maybe of the USB supply. other than the AC adapter which gives about 5.12V @1A, the Laptop does only 4.95V wich gets converted to even only -4.8. But i think a swing of 8-9V should be enough most scanning angles.

Offline Xer0

  • Jr. Member
  • **
  • Posts: 65
  • Milliwatts: 0
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #66 on: February 16, 2010, 09:59:53 am »
@ James: yes Germany is known for Quality, so that's why i use Differential Out and an super stable LM336 Reference which stays precise at a huge temperature range. Also im Russian too, we say "thats firing with cannons on birds", thus Overkill.

But i like Overkill :D why not overkill when you can overkill at merely more cost?

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Howto: simple Differential Amp + TTL ?
« Reply #67 on: February 16, 2010, 02:11:17 pm »
I keep trying to tell you, you have no voltage regulator on your reference voltage. That's OK for one-and-only-one perfect computer with exactly +5VDC on the USB every time, that never changes, even when you plug in another USB device that draws some current.

Good luck finding that.  ;)

You should have either a voltage regulator or a zener diode.

If your DAC works any better than mine, I'll eat both of them!  ;D

James.  :)
« Last Edit: February 16, 2010, 02:14:36 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline Xer0

  • Jr. Member
  • **
  • Posts: 65
  • Milliwatts: 0
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #68 on: February 16, 2010, 05:57:32 pm »
The LM336 does! its an Zenerdiode-plus-some-more-Stuff-in-one-IC Chip :)

At least its still 2.55V no matter if i plug into my Laptop or the iPOD AC-2-USB Charger.
(nevertheless, the sucky DC-DC in last one does ripple hardcore, it let every voltage everywhere in the circuit contantly swing by 0.02V. but its just for testing. PC is stable)

Offline meandean

  • Sr. Member
  • ****
  • Posts: 466
  • Milliwatts: 13
  • It's about sight AND sound.
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #69 on: February 16, 2010, 07:37:24 pm »
  What circuit do you plan to use for the color channels?

  If you pump the audio in directly, the idle voltage of the DAC is very close to the TTL threshold...
"Patience is for the dead."

Offline Xer0

  • Jr. Member
  • **
  • Posts: 65
  • Milliwatts: 0
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #70 on: February 16, 2010, 08:01:38 pm »
Will try it with direct first. "close" maybe not close enough so i could work.

If not, a single ended stage with an TL074 quadopamp and fixed 2x gain.

Offline meandean

  • Sr. Member
  • ****
  • Posts: 466
  • Milliwatts: 13
  • It's about sight AND sound.
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #71 on: February 16, 2010, 08:53:11 pm »
  I think James is trying to say that the main power supply you are considering, the USB +5v together with a charge pump
to create a -5v, is unregulated (instead of using a plain +5v to +/- X volt DC-DC converter). As long as you have
decent bypass caps on your board you should be OK, as most op-amps have good power supply noise rejection, as long
as it is a low gain application.  I would suggest that you get some small tantalum or plastic film caps to go in parallel with
with the big Elco caps to make sure that any MHz noise from the computer is filtered out.
"Patience is for the dead."

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Howto: simple Differential Amp + TTL ?
« Reply #72 on: February 16, 2010, 09:16:52 pm »
YES!  ;D

If you get anywhere near the rails using rail-to-rail op-amps you will most definately have problems.

I bet the DC/DC converter you already have has ground isolation; meaning, you need to tie the input voltage ground to the output voltage ground. If it is not connected, you will get crap for a clean voltage reading on the output side.

James.  :)
« Last Edit: February 16, 2010, 09:18:32 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline meandean

  • Sr. Member
  • ****
  • Posts: 466
  • Milliwatts: 13
  • It's about sight AND sound.
    • View Profile
Re: Howto: simple Differential Amp + TTL ?
« Reply #73 on: February 16, 2010, 10:37:13 pm »
Quote
If you get anywhere near the rails using rail-to-rail op-amps you will most definately have problems.

  Oh crap, this is a bridged (differential) circuit, so you should not need to get anywhere near the supply rails to
produce the +/-5v that the glorious Chinese projector calls for... Never mind R2R!
"Patience is for the dead."

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Howto: simple Differential Amp + TTL ?
« Reply #74 on: February 16, 2010, 10:52:03 pm »
Quote
If you get anywhere near the rails using rail-to-rail op-amps you will most definately have problems.

  Oh crap, this is a bridged (differential) circuit, so you should not need to get anywhere near the supply rails to
produce the +/-5v that the glorious Chinese projector calls for... Never mind R2R!

Huh? ???

If you start with USB voltage at GND and less than +5VDC, then you invert that to get less than -5VDC to power your rail-to-rail op-amps, how would you get

Quote
the +/-5v that the glorious Chinese projector calls for...

James.  :)

"less than -5VDC" looks kinda' wierd. I mean a negative voltage of less than 5.
« Last Edit: February 16, 2010, 10:55:32 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2024, SimplePortal