Bipolar variable voltage for breadboard

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
Design 924 Up Down counter option for DAC0800.PNG Design 336 DAC0800 LM741.PNG
Just to add another possibility, how about a DAC based voltage source. Perhaps more of an exercise for a DAC0800, but here it is anyway.

Objective:
+V to -V out, 9 V to 12 volt range easily adjustable
Cheap.
70 V to 100 mV per step
8-bit digital (256 steps)
100 mA or more output drive capability
+15 V, -15 V and 5 V for logic.

Precision is not so much a concern. Yes 1% resistors are typically suggested. Accuracy is not so much a requirement. I adjust the input until I get the desired output voltage. I have no need to accurately represent the input value. 5% resistors were used. Reference voltage also is not so much a requirement. An LM317 was used to get to 10 V (about).
DAC0800 and LM741 were used because it was what I had on hand. Most any other op amp would work and be an improvement.
Reference voltage could easily be adjusted.

Design one used a DIP switch for the digital input. A later design (not built yet) might use an Up / Down counter. Looking at what I had in stock I had 74xx191, 74xx193 or 74xx169 to choose from. I went with 74LS169 just because I had more of them. The counter option has one switch to set up or down. Two other switches set either a single count per pushbutton or run mode at about 10 counts per second.

The 10 V reference gives about 7.5 mV per step (+9.5 V to -9.5 V about). Acceptable for most diode, transistor and analog exercises.

(edited for a brain fart in math ...)
 
Last edited:

OBW0549

Joined Mar 2, 2015
3,566
You need to re-check your math: I don't know where you got some of those numbers from, but an 8-bit DAC absolutely, positively WILL NOT cover an output range of ± 9.5V in 7.5 mV steps. Sure you didn't misplace a decimal point somewhere?
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
You need to re-check your math: I don't know where you got some of those numbers from, but an 8-bit DAC absolutely, positively WILL NOT cover an output range of ± 9.5V in 7.5 mV steps. Sure you didn't misplace a decimal point somewhere?
Yep, you are right. That was 75 mV, not 7.5 mV. Working too late into the night.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
View attachment 114625 View attachment 114624
Just to add another possibility, how about a DAC based voltage source. Perhaps more of an exercise for a DAC0800, but here it is anyway.

Objective:
+V to -V out, 9 V to 12 volt range easily adjustable
Cheap.
70 V to 100 mV per step
8-bit digital (256 steps)
100 mA or more output drive capability
+15 V, -15 V and 5 V for logic.

Precision is not so much a concern. Yes 1% resistors are typically suggested. Accuracy is not so much a requirement. I adjust the input until I get the desired output voltage. I have no need to accurately represent the input value. 5% resistors were used. Reference voltage also is not so much a requirement. An LM317 was used to get to 10 V (about).
DAC0800 and LM741 were used because it was what I had on hand. Most any other op amp would work and be an improvement.
Reference voltage could easily be adjusted.

Design one used a DIP switch for the digital input. A later design (not built yet) might use an Up / Down counter. Looking at what I had in stock I had 74xx191, 74xx193 or 74xx169 to choose from. I went with 74LS169 just because I had more of them. The counter option has one switch to set up or down. Two other switches set either a single count per pushbutton or run mode at about 10 counts per second.

The 10 V reference gives about 7.5 mV per step (+9.5 V to -9.5 V about). Acceptable for most diode, transistor and analog exercises.

(edited for a brain fart in math ...)
Changing volts per step.
If we wanted to change our Volts per step we just change the Reference voltage. For a nice 100 mV per step we need a reference voltage of 12.8 V, 128 steps of 100 mV from 0 V to 12.8 V, 256 steps from -12.8 V to +12.8 V. No problem. We change the bottom resistor on the LM317 to 2.2K, or better yet make it a pot.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
Changing volts per step.
If we wanted to change our Volts per step we just change the Reference voltage. For a nice 100 mV per step we need a reference voltage of 12.8 V, 128 steps of 100 mV from 0 V to 12.8 V, 256 steps from -12.8 V to +12.8 V. No problem. We change the bottom resistor on the LM317 to 2.2K, or better yet make it a pot.
Nonmonotonicity
(Or why cheap parts are better for the classroom. It is hard to discuss imperfections in components if we deal with flawless parts.)

Ideally out output voltage should change the same amount at each increment. But if we take a voltage reading at every step we hit a snag at one point. Going from 3E, 3F. 40, 41, 42 our output voltage goes at -6.61, -6.51, -6.37, -6.27. -6.17. Right at an input of 40 (hex) our output changes 0.14 V instead of 0.100 V. Above and below that we change the proper 0.100 V per step, but right at 40 we get a change of 0.140. A flaw in our DAC. This is called nonmonotonicity..
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
View attachment 114625 View attachment 114624
Just to add another possibility, how about a DAC based voltage source. Perhaps more of an exercise for a DAC0800, but here it is anyway.

Objective:
+V to -V out, 9 V to 12 volt range easily adjustable
Cheap.
70 V to 100 mV per step
8-bit digital (256 steps)
100 mA or more output drive capability
+15 V, -15 V and 5 V for logic.

Precision is not so much a concern. Yes 1% resistors are typically suggested. Accuracy is not so much a requirement. I adjust the input until I get the desired output voltage. I have no need to accurately represent the input value. 5% resistors were used. Reference voltage also is not so much a requirement. An LM317 was used to get to 10 V (about).
DAC0800 and LM741 were used because it was what I had on hand. Most any other op amp would work and be an improvement.
Reference voltage could easily be adjusted.

Design one used a DIP switch for the digital input. A later design (not built yet) might use an Up / Down counter. Looking at what I had in stock I had 74xx191, 74xx193 or 74xx169 to choose from. I went with 74LS169 just because I had more of them. The counter option has one switch to set up or down. Two other switches set either a single count per pushbutton or run mode at about 10 counts per second.

The 10 V reference gives about 7.5 mV per step (+9.5 V to -9.5 V about). Acceptable for most diode, transistor and analog exercises.

(edited for a brain fart in math ...)
Threshold
Pin 1 of the DAC0800 is Threshold. The DAC0800 is designed to work with various logic families. The Threshold pin sets the logic level recognized by the digital inputs. For TTL this pin is grounded. This sets the threshold at 1.4 Volts. For 5 V CMOS we need to move this up a bit to 2.8 Volts. For this we might just put a couple of silicon diodes (1N4148) from Threshold to ground, cathodes toward ground. We could adjust it accordingly for other voltages.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
View attachment 114625 View attachment 114624
Just to add another possibility, how about a DAC based voltage source. Perhaps more of an exercise for a DAC0800, but here it is anyway.

Objective:
+V to -V out, 9 V to 12 volt range easily adjustable
Cheap.
70 V to 100 mV per step
8-bit digital (256 steps)
100 mA or more output drive capability
+15 V, -15 V and 5 V for logic.

Precision is not so much a concern. Yes 1% resistors are typically suggested. Accuracy is not so much a requirement. I adjust the input until I get the desired output voltage. I have no need to accurately represent the input value. 5% resistors were used. Reference voltage also is not so much a requirement. An LM317 was used to get to 10 V (about).
DAC0800 and LM741 were used because it was what I had on hand. Most any other op amp would work and be an improvement.
Reference voltage could easily be adjusted.

Design one used a DIP switch for the digital input. A later design (not built yet) might use an Up / Down counter. Looking at what I had in stock I had 74xx191, 74xx193 or 74xx169 to choose from. I went with 74LS169 just because I had more of them. The counter option has one switch to set up or down. Two other switches set either a single count per pushbutton or run mode at about 10 counts per second.

The 10 V reference gives about 7.5 mV per step (+9.5 V to -9.5 V about). Acceptable for most diode, transistor and analog exercises.

(edited for a brain fart in math ...)
Settling time.
The DAC0800 is not very fast as DACs go. From the instant we apply a digital value it takes about 100 ns before the output voltage is stable (plus time for any circuitry we add to the output).
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
View attachment 114625 View attachment 114624
Just to add another possibility, how about a DAC based voltage source. Perhaps more of an exercise for a DAC0800, but here it is anyway.

Objective:
+V to -V out, 9 V to 12 volt range easily adjustable
Cheap.
70 V to 100 mV per step
8-bit digital (256 steps)
100 mA or more output drive capability
+15 V, -15 V and 5 V for logic.

Precision is not so much a concern. Yes 1% resistors are typically suggested. Accuracy is not so much a requirement. I adjust the input until I get the desired output voltage. I have no need to accurately represent the input value. 5% resistors were used. Reference voltage also is not so much a requirement. An LM317 was used to get to 10 V (about).
DAC0800 and LM741 were used because it was what I had on hand. Most any other op amp would work and be an improvement.
Reference voltage could easily be adjusted.

Design one used a DIP switch for the digital input. A later design (not built yet) might use an Up / Down counter. Looking at what I had in stock I had 74xx191, 74xx193 or 74xx169 to choose from. I went with 74LS169 just because I had more of them. The counter option has one switch to set up or down. Two other switches set either a single count per pushbutton or run mode at about 10 counts per second.

The 10 V reference gives about 7.5 mV per step (+9.5 V to -9.5 V about). Acceptable for most diode, transistor and analog exercises.

(edited for a brain fart in math ...)
Digital inputs and analog outputs

We have 8 digital inputs labeled B1 to B8. It seems backwards but B1 is the most significant digit and B8 is the least. The output current is proportional to the binary value on these inputs. Our two reference resistors sets this maximum current. Resistors (or other circuitry) turns this current into an output voltage.
 

OBW0549

Joined Mar 2, 2015
3,566
This is called nonmonotonicity..
No, it is not. It's called differential nonlinearity. There's a BIG difference.

The sequence -6.61, -6.51, -6.37, -6.27, -6.17 is monotonic, because each element in the sequence is different from the one before it in the same direction; each voltage level is more positive than the one before.

But that sequence shows differential nonlinearity, because the voltage steps are not all the same size.

Proper terminology is important.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
You need to re-check your math: I don't know where you got some of those numbers from, but an 8-bit DAC absolutely, positively WILL NOT cover an output range of ± 9.5V in 7.5 mV steps. Sure you didn't misplace a decimal point somewhere?
The output

We have our standard classroom LM741 as an inverter. To meet our desires of 100mA + drive capability we buffer the output with a couple of transistors, putting the transistors inside the gain loop of the op amp.
Most any other op amp would be an improvement in this circuit. With our power at + and -15 V we are just about at the limits of what the LM741 can work at with the + and - 12 V out.

Is this circuit an improvement over just using a 25 turn trimpot and an op amp for a variable voltage source? Not really. The pot gives us much more variation. But then this is a lesson in DACs.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
No, it is not. It's called differential nonlinearity. There's a BIG difference.

The sequence -6.61, -6.51, -6.37, -6.27, -6.17 is monotonic, because each element in the sequence is different from the one before it in the same direction; each voltage level is more positive than the one before.

But that sequence shows differential nonlinearity, because the voltage steps are not all the same size.

Proper terminology is important.
Dang, you are right again. If we did a constant increase in our value and the voltage took a negative step would that be nonmonotonicity? Just an aberration is nonlinearity?
 

OBW0549

Joined Mar 2, 2015
3,566
Also, you might want to do some work on the output stage of this variable supply: as it is, Q1 and Q2 have absolutely no short-circuit protection or current limiting. Shorting the output to ground is guaranteed to let out the magic smoke.

Also, take a look at Q1 and Q2 power dissipation. Suppose you've got the output set to +3.0 volts, with +/- 15V supplies feeding your circuit. Connect a load which draws 100 mA (your stated maximum load). The power dissipated by Q1 is then (15V - 3V)*0.1A = 1.2 watts. Q1 and Q2 are in TO-92 packages, and their rated maximum dissipation is 625 mW. Oops!

You need current limiting, and heftier output transistors.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
Also, you might want to do some work on the output stage of this variable supply: as it is, Q1 and Q2 have absolutely no short-circuit protection or current limiting. Shorting the output to ground is guaranteed to let out the magic smoke.

Also, take a look at Q1 and Q2 power dissipation. Suppose you've got the output set to +3.0 volts, with +/- 15V supplies feeding your circuit. Connect a load which draws 100 mA (your stated maximum load). The power dissipated by Q1 is then (15V - 3V)*0.1A = 1.2 watts. Q1 and Q2 are in TO-92 packages, and their rated maximum dissipation is 625 mW. Oops!

You need current limiting, and heftier output transistors.
All very good comments. Thank you. As it is cost of components was under $2.00. :) Cost of replacing output transistors, maybe $0.10.
Certainly not a marketable product, but ...
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
Design 336 B other output.PNG

Also, you might want to do some work on the output stage of this variable supply: as it is, Q1 and Q2 have absolutely no short-circuit protection or current limiting. Shorting the output to ground is guaranteed to let out the magic smoke.

Also, take a look at Q1 and Q2 power dissipation. Suppose you've got the output set to +3.0 volts, with +/- 15V supplies feeding your circuit. Connect a load which draws 100 mA (your stated maximum load). The power dissipated by Q1 is then (15V - 3V)*0.1A = 1.2 watts. Q1 and Q2 are in TO-92 packages, and their rated maximum dissipation is 625 mW. Oops!

You need current limiting, and heftier output transistors.
Okay, current limiting. 250 mA. But it looks like I am pushing the limits of the LM741 here. Maybe 7 mA of output current. Barely within the 1K ohm load limits to get 12 V out from 15 V power. I haven't built it yet. TO-220 transistors don't fit easily into my breadboard. It will take me a while to adapt things to this.
 

OBW0549

Joined Mar 2, 2015
3,566
TO-220 transistors don't fit easily into my breadboard.
I found a simple fix for that problem: just give the leads a 90° twist. That allows the sockets inside the breadboard to engage the flat side of the TO-220 lead rather than the edge.
 
Last edited:

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
I found a simple fix for that problem: just give the leads a 90° twist. That allows the sockets inside the breadboard to engage the flat side of the TO-220 lead rather than the edge.
Ouch! That sounds kind of rough on the pins of the breadboard. What is the current carrying capacity of the breadboard pins? I don't remember ever seeing a spec for that. I have soldered wires to the leads of TO220 packages but limited the current to about 100 mA just out of worry and ignorance of the spec.
 

OBW0549

Joined Mar 2, 2015
3,566
Ouch! That sounds kind of rough on the pins of the breadboard.
Huh???? Putting a 90 degree twist in the pins makes it EASIER on the breadboard, because the gripping surfaces of the breadboard socket don't have to spread out so far to accept the pins. This makes it easier to insert the part, and that's the whole point.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
Huh???? Putting a 90 degree twist in the pins makes it EASIER on the breadboard, because the gripping surfaces of the breadboard socket don't have to spread out so far to accept the pins. This makes it easier to insert the part, and that's the whole point.
EasIER, yes. but more than the suggested pin size of, what is it, 0.025"?
 
Top