Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DAC on pcb

Status
Not open for further replies.

mstechca

New Member
After further research, it seems that the R/2R ladder is better for me, especially when dealing with 12 bits.

Here is the issue.
I have a pcb setup so that the DAC circuitry itself (just resistors, and the cmos counter (4040)) takes up more space than my regen receiver :shock:

If I removed the resistors, I would save about 2cm * 2cm of space. In fact, that is all I need if I made the super regen without any trimmers or DAC's.

I was wondering, what is the best way to minimize the required PCB space for my 12-bit DAC?
and yes, I'm using resistors as jumpers as well.
 
Below is the picture of my PCB

The grid is in the resolution of 1 mm.

The blue section is the DAC component.

If there is some way I can fit the entire circuit into a 4 cm by 3 1/2 cm space, (or 3 is even better), that would be great.
I bought small boxes, and buying bigger ones costs dollars more.
 
Last edited:
simple answer = surface mount parts...

0805 package resistors are just millimeters long, and 0603 are even smaller... and if you can find the IC in a narrow SOIC, it will be about 1/2 to 1/3 the size of the through-hole version...
 
mstechca said:
After further research, it seems that the R/2R ladder is better for me, especially when dealing with 12 bits.

Here is the issue.
I have a pcb setup so that the DAC circuitry itself (just resistors, and the cmos counter (4040)) takes up more space than my regen receiver :shock:

If I removed the resistors, I would save about 2cm * 2cm of space. In fact, that is all I need if I made the super regen without any trimmers or DAC's.

I was wondering, what is the best way to minimize the required PCB space for my 12-bit DAC?
and yes, I'm using resistors as jumpers as well.
The nice thing about R/2R ladders is that they only have two resistor values in them. Unfortunately, even a 12-bit R/2R DAC will require tolerances of better than 0.025% (12 bits=4096 steps, 1/4096~0.025%) if you want a monotonic output. This is the reason high-resolution DACs cost so much more than lower resolution ones. The resistors have to be laser-trimmed before the networks are encapsulated.
Have you seen **broken link removed**? It only has 32 steps, but I thought you might like to be aware of it. Xicor and Intersil (and maybe others) also have them. Google "programmable capacitor".
 
evandude said:
simple answer = surface mount parts

Other than surface mount?

Unfortunately, even a 12-bit R/2R DAC will require tolerances of better than 0.025% (12 bits=4096 steps, 1/4096~0.025%) if you want a monotonic output.
Is there anything I can do so that resistors with 5% or 1% tolerance work?
like maybe changing or adding resistor values?

I'll look at programmable capacitors.
 
mstechca said:
Is there anything I can do so that resistors with 5% or 1% tolerance work?
like maybe changing or adding resistor values?

No, you can only make a lower resolution D2A with lower quality resistors. You 'could' try matching resistors, but how are you going to match them to 0.025%?.

I'll look at programmable capacitors.

For a start I would check if they are suitable for VHF work?.
 
Here is the "standard" equation many websites claim for a 4-bit R/2R ladder:

Vout = Vin * (1/16 + 1/8 + 1/4 + 1/2)

It seems that the only way that equation works is if the output of the DAC is either tied high or tied low. In my case, I tied it low, and the equation works.

I need to know this, because then I want to understand why high tolerances (> 1%) are a problem. I know Ron did a chart before, but I want to see (or make) a chart that illustrates the possible ranges of resistances, because I want to make the assumption that a 5% resistor is 2% off.

Would it be a benefit if many resistance values are low (< 10K) and one or two are high (> 100K)? or am I going the wrong way?
 
from further research:

Take a look at:
**broken link removed**

https://www.evaluationengineering.com states that this is a String DAC.
Check this quote out:

The easiest-to-understand architecture is based on a Kelvin divider. As shown in Figure 1, the output voltage is selected from the taps on a long string of equal-value resistors. Also called a string DAC, this structure has the advantage of guaranteed monotonicity. Even if one resistor were to have zero value, progressing from the bottom to the top of the divider string, the output voltage would never decrease. Monotonic means that an output level will never decrease for increasing input codes.

"Figure 1" is the picture above.

Does it work for binary values?
and is that site telling the truth?
 
mstechca said:
from further research:

Take a look at:
**broken link removed**

https://www.evaluationengineering.com states that this is a String DAC.
Check this quote out:

The easiest-to-understand architecture is based on a Kelvin divider. As shown in Figure 1, the output voltage is selected from the taps on a long string of equal-value resistors. Also called a string DAC, this structure has the advantage of guaranteed monotonicity. Even if one resistor were to have zero value, progressing from the bottom to the top of the divider string, the output voltage would never decrease. Monotonic means that an output level will never decrease for increasing input codes.

"Figure 1" is the picture above.

Does it work for binary values?
and is that site telling the truth?
Search for "digital pots". Lots of companies make them. I didn't mention them because they only seem to go up to 10 bits (1024 steps), and you said you wanted 12 bits. They have internal decoders, so they will work with binary. Some are up/down pulsed units, which might be better for you.
 
mstechca said:
Does it work for binary values?

No, and if you apply a couple of seconds thought to it you will soon realise why - if a couple of seconds of thought don't help, try ohms law!.

and is that site telling the truth?

Yes, but I hope you are aware that it's ONLY a 3 bit D2A (8 possible outputs) - to make a 12 bit version would require 4096 resistors, and I though you were short on space? 8)
 
Nigel Goodwin said:
mstechca said:
Does it work for binary values?

No, and if you apply a couple of seconds thought to it you will soon realise why - if a couple of seconds of thought don't help, try ohms law!.

and is that site telling the truth?

Yes, but I hope you are aware that it's ONLY a 3 bit D2A (8 possible outputs) - to make a 12 bit version would require 4096 resistors, and I though you were short on space? 8)
Yeah, but you can probably get samples of the 10 bit digital pots, and increment-decrement will work fine if you don't need random access (and you won't need a 10 bit counter!). Here is a page that lets you look at **broken link removed**.
 
it looks like I'll have to go with the R/2R network.

and I'll have to make use of my ohmmeter quite often.

I do plan to buy a large number of resistors (100+) for this and other resistor hogging projects.

I was wondering, could each 5% resistor (independent of manufacturer) vary as much as 2.5% above or below its value, even if I am buying all the resistors in the same strand? In other words, would resistor 1 equal 1% off the value, resistor 2 2% off, resistor 3, 3% off, or no?

I'm wondering because I want to avoid measuring 100 resistors with an ohmmeter, and finding 12 or more that are exactly the same value.

and looking at the bands won't work, because I'm interested in tolerance.

also, 1% resistors cost twice as much as 5% ones.
 
mstechca said:
I was wondering, could each 5% resistor (independent of manufacturer) vary as much as 2.5% above or below its value?
No. They could be plus or minus 5%.
If they were all made at the same time (taped together) then most will be nearly the same value. You will need to measure and sort each one.
 
mstechca said:
I'm wondering because I want to avoid measuring 100 resistors with an ohmmeter, and finding 12 or more that are exactly the same value.

I would suggest buying 1% resistors, as you've not much chance of matching them that closely on your meter - which is probably no better than 1% anyway, and will be at least +/1 one digit as well.

Obviously this makes it pointless building a 12 bit DAC, but 10 bits would be plenty - and having 1024 different voltages is much more than enough for the full FM band.

But I would suggest you forget the DAC altogether for now! - use a simple potentiometer to provide the voltage for the varicap, and proof it works, and that you have sufficient tuning range. Once that's working fine, THEN start trying to replace it with a switched solution.
 
use a simple potentiometer to provide the voltage for the varicap, and proof it works, and that you have sufficient tuning range. Once that's working fine, THEN start trying to replace it with a switched solution.
I have a 4-bit binary-weighted DAC already working for me, but I realize that after it was built, the bits were backwards (the high bit as bit #0 instead of the low bit being bit #0).

I discovered that the 2N3904 transistor makes an EXCELLENT varicap which contributed to most of the success.

The reason why I wanted 12 bits is because I want to be able to fine tune a station and increase the range. I am using my receiver with my transmitter. You would obviously know that if the transmitter and receiver are on the EXACT same frequency, the transmitter can transmit to the receiver better.

I think that my 2N3904 works as an 8pF voltage controlled capacitor. I have the emitter and base tied together. Correct me if 8pF is wrong.

If I only used 4 bits, the steps would be in 1/2 pF increments, which is a little too large.
I was looking at 12 bits, because I have a counter that goes up to 12 bits.
Higher bits means finer resolution, and better chances of obtaining every single channel possible.
I think I'll have to do some math before continuing.
 
mstechca said:
The reason why I wanted 12 bits is because I want to be able to fine tune a station and increase the range. I am using my receiver with my transmitter. You would obviously know that if the transmitter and receiver are on the EXACT same frequency, the transmitter can transmit to the receiver better.

But completely pointless for a free running VHF oscillator, particularly a super-regen, which isn't very stable anyway.

12 bits gives 0.025% resolution, your super-regen won't be approaching anywhere near 1% - and you would be completely wasting at least five of the twelve bits.
 
Hi MStechca,
I thought we explained that you aren't using a varicap diode so you will have hardly any change of tuned frequency.
The 2N3904 has a max collector capacitance of 4pF, but its typical is only 2pF. It changes only a whopping 1pF when its voltage is changed.
When you add 10pF of stray capacitance then the total capacitance change is from 12pF to 13pF.

I showed you before that the capacitance of a 2N4401 transistor changes 4 times as much as a 2N3904, and a circuit that uses 2N4401 transistors as varicaps that tunes from 88MHz to 92MHz.
 

Attachments

  • 2n3904_capacitance.png
    2n3904_capacitance.png
    16 KB · Views: 360
Nigel Goodwin said:
mstechca said:
I'm wondering because I want to avoid measuring 100 resistors with an ohmmeter, and finding 12 or more that are exactly the same value.

I would suggest buying 1% resistors, as you've not much chance of matching them that closely on your meter - which is probably no better than 1% anyway, and will be at least +/1 one digit as well.

Obviously this makes it pointless building a 12 bit DAC, but 10 bits would be plenty - and having 1024 different voltages is much more than enough for the full FM band.

But I would suggest you forget the DAC altogether for now! - use a simple potentiometer to provide the voltage for the varicap, and proof it works, and that you have sufficient tuning range. Once that's working fine, THEN start trying to replace it with a switched solution.
I agree with Nigel about the potentiometer, and I believe that a digital increment-decrement pot is mstecha's best bet eventually. While I don't agree with mstecha's approach to this, I want to point out that he doesn't have to get the resistors matched to absolute value. They only have to be matched to each other. A 4-digit multimeter should be able to do this as long as the two measured values match 2:1 including the 4th digit.
It is important to realize that the 2R legs that go to the switches (the counter) are affected by the output resistance of the switches. To be perfectly accurate, you need to subtract the switch resistance from 2R. If you assume that all switches have the same resistance, you can measure one (be careful how you do this), and subtract that value from your 2R resistor value to get the final value. Making R high will obviously minimize any errors in this process.
 
I can't add 10 plus 2 today so I corrected my last post.

BTW, here is a 434 super-regen receiver that is used to receive data:
 

Attachments

  • 434mhz_super-regen_rx.jpg
    434mhz_super-regen_rx.jpg
    87.8 KB · Views: 403
Now that superregen is a little more complex to understand mathematically than mine. That's alot of inductors and capacitors in that circuit.

I showed you before that the capacitance of a 2N4401 transistor changes 4 times as much as a 2N3904, and a circuit that uses 2N4401 transistors as varicaps that tunes from 88MHz to 92MHz.
I know. Because I am using a 2N3563 in my superregen detector portion, it only accepts a tank circuit with a 0.1 to 0.15uH inductor with a capacitor between 4 and about 15pF. If I don't meet this, then I won't get proper output. Also, since I'm wanting VHF/UHF, I won't change the transistor.

I think a 1pF change is highly acceptable for me. In fact, if anything needs to be changed, it will be the inductor. So far, the 2N3904 as a varicap works great.

Maybe I can drop some of the bits.

This is getting more interesting as we speak, because I think I can now adjust the frequency in maybe 10Khz increments. This number is a guess, but the lower the capacitance of the transistor "varicap", and the lower the inductance, and the higher the bits, the finer the tuning is, and just maybe then, I can pick up signals from Audioguru who is about 40 or so km away. :lol: j/k
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top