Many n00bish PCB schematic/layout questions

Building a new system? Need help choosing between parts? Then step in and let our trained gerbils assist you.

Moderator: JustAnEngineer

Many n00bish PCB schematic/layout questions

Postposted on Fri Aug 23, 2013 12:43 pm

I'm making a custom PCB that will be controlled by an Arduino Due. The Arduino Due provides 5V, 3V3, and a GND pin. I'm going to use this for most of the chips, and I will use a 9V battery or maybe even a separate power supply for the voltage reference and opamps.

1. Will the behaviour/output of opamps and voltage regulators/references such as the MAX6325 change appreciably with some droop in power supply voltage (e.g. from a battery?)
2. For every component on my schematic, I have a +power pin, and at the other power pin I put a GND there. However, some components on my PCB will be powered by a battery. The second terminal of the battery has to be connected somewhere... so how do I reconcile this? The MAX6325 has a GND pin, so I guess it wants to be connected to the same ground as all my other logic chips, and the return current will go out through that pin.
3. A DAC, a MAX5318, says I can connect a pin called AVSS to either a negative voltage power supply ~-1V or GND. I heard that the negative power supply is needed if you want the DAC to output negative voltages. But the datasheet never said anything about this. From what I can gather, it might not make a difference. Is this true/plausible?
Mothership: Thuban 1055T@3.7GHz, 12GB DDR3, M5A99X EVO, GTX470+Icy Vision Rev.2@840/3800, Vertex 2E 60GB
Supply ship: Sargas@2.8GHz, 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Macbook Air Ivy Bridge
Crayon Shin Chan
Minister of Gerbil Affairs
 
Posts: 2241
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia

Re: Many n00bish PCB schematic/layout questions

Postposted on Fri Aug 23, 2013 2:03 pm

1. For the reference, the datasheet guarantees the specs down to an input of 8V. Beyond that it's hard to say. Depending on your requirements, you may be able to go lower, but you'll need to verify that for yourself. For op amps, they are generally characterized at a few different supply voltages. You'll have to consult the datasheet to see if the changes (which are generally bandwidth and amplitude related) affect your application.

2. Battery voltage sources need a reference point. In this case, you'll connect the negative side of the battery to the Arduino ground, at zero volts. The positive side of the battery will then be at 9V.

3. Connecting AVSS to ground will hurt your linearity at the low end, see pages 2 ("INL") and 22 ("Negative Supply Voltage"). If this doesn't matter to you then don't worry about it.

Just an aside, 18 bits in a 2.5V range is about 10 uV/step. I think this is difficult to achieve in practice; you have to be very careful about noise.
E3-1230v2 | GA-6UASL3 | 16 GB ECC | Seagate 600 240GB | WD Black + Red | GTX 660 | Silverstone TJ08-E | Seasonic X650 | Win Server 2012 | Dell U2713HM || Zotac CI320
mako
Gerbil
Gold subscriber
 
 
Posts: 91
Joined: Sat Oct 30, 2004 6:09 pm
Location: North Bay

Re: Many n00bish PCB schematic/layout questions

Postposted on Fri Aug 23, 2013 3:38 pm

mako wrote:1. For the reference, the datasheet guarantees the specs down to an input of 8V. Beyond that it's hard to say. Depending on your requirements, you may be able to go lower, but you'll need to verify that for yourself. For op amps, they are generally characterized at a few different supply voltages. You'll have to consult the datasheet to see if the changes (which are generally bandwidth and amplitude related) affect your application.

2. Battery voltage sources need a reference point. In this case, you'll connect the negative side of the battery to the Arduino ground, at zero volts. The positive side of the battery will then be at 9V.

3. Connecting AVSS to ground will hurt your linearity at the low end, see pages 2 ("INL") and 22 ("Negative Supply Voltage"). If this doesn't matter to you then don't worry about it.

Just an aside, 18 bits in a 2.5V range is about 10 uV/step. I think this is difficult to achieve in practice; you have to be very careful about noise.


Thanks so much! It looks like I will have to get a -1V supply after all - but I don't know where to get it! I already have to have a 5V and 3.3V as well as a very stable 2.5V reference which in turn needs to be powered by at least a 9V battery... now I need to get a -1V? Where would I get that?

Hmmm... thanks for the concern about noise. The DAC's output will go into an opamp with a potentiometer for variable gain. I thought keeping the opamp far away from the DAC would keep the digital noise low - but then that means the signal from the DAC, not yet amplified (although rather strong in its own right) would have to go through long routes, which can pick up noise. So I've crammed the DAC and opamp close together, and once the opamp has amplified the output, the output goes through rather long leads to get to the output pins (the hope is that any noise picked up by the long leads will be dwarfed by the now amplified signal). Is this a good idea?

Yeah, I'm new to all this.
Mothership: Thuban 1055T@3.7GHz, 12GB DDR3, M5A99X EVO, GTX470+Icy Vision Rev.2@840/3800, Vertex 2E 60GB
Supply ship: Sargas@2.8GHz, 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Macbook Air Ivy Bridge
Crayon Shin Chan
Minister of Gerbil Affairs
 
Posts: 2241
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia

Re: Many n00bish PCB schematic/layout questions

Postposted on Sat Aug 24, 2013 11:26 am

Negative voltages can be made with a switching DC-DC circuit, but you probably don't want that. In this case you probably want to add another battery, perhaps a AA or a coin cell. You put the (+) side to ground, and then the (-) side will give you a negative voltage.

You might want to ask yourself if you really need 18 bits, because digital noise is just one of many noise sources to worry about. Start with the regulators -- a "low noise" LDO I used recently quotes 15 uVrms noise, which would basically kill two bits of resolution. Then you have the op-amps, which do add some noise to whatever they're amplifying. And you also have to consider the noise contribution of the resistors in the signal path. So you see, you have to be very careful.
E3-1230v2 | GA-6UASL3 | 16 GB ECC | Seagate 600 240GB | WD Black + Red | GTX 660 | Silverstone TJ08-E | Seasonic X650 | Win Server 2012 | Dell U2713HM || Zotac CI320
mako
Gerbil
Gold subscriber
 
 
Posts: 91
Joined: Sat Oct 30, 2004 6:09 pm
Location: North Bay

Re: Many n00bish PCB schematic/layout questions

Postposted on Mon Aug 26, 2013 4:56 pm

mako wrote:Start with the regulators -- a "low noise" LDO I used recently quotes 15 uVrms noise, which would basically kill two bits of resolution. Then you have the op-amps, which do add some noise to whatever they're amplifying. And you also have to consider the noise contribution of the resistors in the signal path. So you see, you have to be very careful.

I'm using a MAX6325. On page 4 of the datasheet, near the bottom, it says "Output Noise Voltage" and quotes it for two frequencies - frequencies of what, I have no idea. But the noise from the 6325 would be 2.5 microV RMS, well below the step resolution of the DAC. So I think that should be OK.

As for the opamp, a MAX44246, I'm not sure which figure it is. Input Voltage Noise? Why would I care about that, it's the noise introduced at the output signal that I care about. Total Harmonic Distortion? Is that the one?
Mothership: Thuban 1055T@3.7GHz, 12GB DDR3, M5A99X EVO, GTX470+Icy Vision Rev.2@840/3800, Vertex 2E 60GB
Supply ship: Sargas@2.8GHz, 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Macbook Air Ivy Bridge
Crayon Shin Chan
Minister of Gerbil Affairs
 
Posts: 2241
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia

Re: Many n00bish PCB schematic/layout questions

Postposted on Tue Aug 27, 2013 8:13 pm

mako wrote:You might want to ask yourself if you really need 18 bits, because digital noise is just one of many noise sources to worry about. Start with the regulators -- a "low noise" LDO I used recently quotes 15 uVrms noise, which would basically kill two bits of resolution. Then you have the op-amps, which do add some noise to whatever they're amplifying. And you also have to consider the noise contribution of the resistors in the signal path. So you see, you have to be very careful.

Hmmm... I'm using a MAX1726, which quotes 350uVrms of output noise. But I think small fluctuations in the supply voltage to an ADC or a DAC should not have much of an effect on the actual value it puts out. After all, these guys operate from an internally generated/external voltage reference. Only if the reference fluctuates, should there be cause for worry. In this case, I have an ADC (MAX11040K) output its internally generated 2.5V reference, and I share that with the instrumentation amplifier and DAC. The REFIO output noise is quoted as 3uVrms, and I think this should stay the same regardless of how much the supply voltage fluctuates.
Mothership: Thuban 1055T@3.7GHz, 12GB DDR3, M5A99X EVO, GTX470+Icy Vision Rev.2@840/3800, Vertex 2E 60GB
Supply ship: Sargas@2.8GHz, 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Macbook Air Ivy Bridge
Crayon Shin Chan
Minister of Gerbil Affairs
 
Posts: 2241
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia

Re: Many n00bish PCB schematic/layout questions

Postposted on Tue Aug 27, 2013 8:59 pm

Sorry, I forgot that you were using a voltage reference. You will probably be okay, but you are never sure until you test it. I have avoided high-resolution stuff like this since I lack the means to verify performance to such a precise degree.

For noise analysis in general, you need to consider the working bandwidth. For example, if you set your rolloff frequency at 1 kHz, you'd only need to concern yourself with noise from DC to 1 kHz. (You probably have a low-frequency pole/zero, but the idea is that the working bandwidth is the noise bandwidth.) Take a look at the first plot on page 7 of the MAX44246 datasheet. This shows you the noise density, and you want to integrate this over your frequency range of interest. For the op-amp, the fun part is that the input noise gets amplified along with your signal, over the op-amp bandwidth. Take a look at manufacturer tech notes for more details.

THD is a little different. Harmonic distortion comes from circuit nonlinearities. If you put in a sine wave at frequency f, what comes out is a sine wave at f and also 2f, 3f, 4f, etc. Depending on the nature of the nonlinearity, you may get only odd or only even harmonics. Depending on the severity of the nonlinearity, the unwanted harmonics may be close to the noise floor and thus disregarded. You can see on page 8 how the op-amp's THD rises past about 10 kHz.

For noise and distortion, basically you want to do the analysis and quantify how it affects your application.
Last edited by mako on Tue Aug 27, 2013 10:12 pm, edited 1 time in total.
E3-1230v2 | GA-6UASL3 | 16 GB ECC | Seagate 600 240GB | WD Black + Red | GTX 660 | Silverstone TJ08-E | Seasonic X650 | Win Server 2012 | Dell U2713HM || Zotac CI320
mako
Gerbil
Gold subscriber
 
 
Posts: 91
Joined: Sat Oct 30, 2004 6:09 pm
Location: North Bay

Re: Many n00bish PCB schematic/layout questions

Postposted on Tue Aug 27, 2013 9:08 pm

Here are a couple of thoughts and tips.

First, this will sound like a put down but I am simply stating it as a fact and not trying to be demeaning as we all had to start somewhere and learn (I once had the same question I am about to pick on). If you are confused about GND and the negative terminal of a battery supply, there is no way you will get a custom board with an analog noise level in the 100s of uV, much less 10s.

Do not use a potentiometer until the output stage of amplification. A POT is a good source of noise and putting it in the initial amplification stage will just allow that to be amplified. Unless you are using extremely high-presicion resistors in your amp circuits, I wouldn't worry about trying to get a negative voltage. The non-linerity will be there, but low precision resistors will mess with the circuit anyway. That said, the amplifier gain is going to be so low (see later comments) that amplification of noise won't be a huge issue, but it will likely eat up 6-7 LSB if you are not careful.

Divide the board in two, with seperate ground planes. The only thing that should cross the two sides of the board is the DAC. See the MAX5318 eval board data sheetfor an example layout. Note that they use a four layer board.

The initial amplifier stage needs to be as close to the DAC output as humanly possible and the traces from the opamp to the resistors should be as short as possibe too. You really don't need a whole lot of gain if you are using a single ended 9V supply to power the opamps. A gain of 3 (1k/2k 0.1% resistors) would be enough and that is going to be dependent on the battery voltage anyway. Run the output trace to where you need it on the board, the put the potentiometer in an attenuator and follow that by a buffer amp (gain 1).

Finally, read up on analog grounding for PCBs. There are all sorts of interesting things

Now, I'm not an analog design person so take it all with a grain of salt, but you have certainly set a lofty goal for yourself.

--SS
SecretSquirrel
Gerbil Jedi
Gold subscriber
 
 
Posts: 1715
Joined: Tue Jan 01, 2002 7:00 pm
Location: The Colony, TX (Dallas suburb)

Re: Many n00bish PCB schematic/layout questions

Postposted on Thu Aug 29, 2013 2:36 pm

Also a good way to brain check is to use a fairly simple to use simulation tool such as LTSpice. Sure they may not have a part you are intending to use in the library, but you can choose something close or add your own Spice directive. Very handy way of testing ideas.

You don't always need to generate a negative voltage. Instead you can lift up everything in relation to the negative voltage requirement.
If you need 5V, 0V, and -1V, instead lift by 1V so you need 6V, 1V, and 0V. 0V would become your negative terminal on the battery, but you would then create a "phantom ground" of 1V. You can do this by using a stout Opamp gain of one buffer set to a 1V output which has enough drive capability for the rest of the circuit or a 1V LDO. Then a 6V LDO would do the trick for the top voltage. If you do this, you just have to remember the 1V rail is really the ground, not the negative terminal of the battery.

A lot of the other advice here is excellent. If you want lots of effective bits out of your conversions, general rules of thumb:
Don't use a switching power supply, if you do, follow on with an LDO regulator/filter. This is typical practice, but current return paths must be carefully managed.
Manage ground return paths the same way you do the signals. Understand that current will flow directly back to the source, so you can manage where that current goes by routing noisy grounds away from sensitive circuits, such as switching power supply return paths returning under inputs to sensitive circuits. You can route these noisy grounds as a trace rather than relying on a copper pour.
Keep sensitive analog circuitry grounds separate from digital/switching power supplies. Specify a common point usually referred to as a Mecca near to the main power connector OR, depending on topology, right under the A2D reference ground point.
Use low value resistors if at all possible. The lower the value, the lower the noise contribution.
Use metal-based resistors, not thin-film.
Lot of bits on a per-sample bases can be recovered through digital averaging (over-sampling) though in general it is best to start with more effective bits in the analog realm.
Ground loops should be recognized and eliminated. For example the Mecca is a single point to which all electrons return, but if you have another point (on purpose or on accident) it is actually worse than just having one large single ground instead. If unsure how to separate your grounds and deal with it, use a single solid ground pour on the board. Safer.

There is a lot more, but tough to go into detail.
liquidsquid
Minister of Gerbil Affairs
 
Posts: 2447
Joined: Wed May 29, 2002 10:49 am
Location: New York


Return to System Builders Anonymous

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron