Critique Request (Schematic for now) - Page 1
Forum section: electronics / projects

author: staze
author_rank: Frequent Contributor
timestamp: July 29, 2014, 11:31:09 pm
content: All,I'm taking my first foray into schematic/PCB layout. The board in question is for a GPSDO I'm building, and thought I'd rather have a printed board than just a rats nest of 22-30awg wire on perfboard. So, I'm hoping to get some comments/critiques out of my schematic before moving onto the board routing.The board is to go along with James Millers GPSDO PLL board, and the venerable Jupiter GPS Board. The board houses an ATMEGA328 that controls whether the OCXO is running via a P-Channel LL MOSFET. Basically, I want to be able to use the whole setup as a GPS time source (for an NTP Server), without the wasted power of running the OCXO when I'm not in need of the 10Mhz output. The ATMEGA also outputs to an LCD via I2C, and gets that data via JP3 (coming from the GPS board). The OCXO is controlled via the PLL, and the LT1006 is just a buffer for the VCO pin on the OCXO. Hopefully this all makes sense. It's all driven off 5V, which is nice. The 1000uF cap is only there because I figured on OCXO startup, there might be a significant droop in the 5V line and cause a reset of the micro, but I haven't breadboarded it out fully yet, so I don't know if this is true or not (hell, I might even need bigger than a 1000uF cap there).Please critique, let me know if it's difficult to read, or if some things should be moved around to make it easier to understand. I figure once there's a good schematic then I can go to routing the board. This is all hobby, so it's not like anything is really on the line. So, please be honest, but understand, I'm not an EE by trade. =)Thanks!

author: staze
author_rank: Frequent Contributor
timestamp: July 29, 2014, 11:38:35 pm
content: Just realized I need a pull-up resistor on the MOSFET gate... will add that now.Attached.

author: LukeW
author_rank: Frequent Contributor
timestamp: July 30, 2014, 04:00:10 am
content: Some things to consider.- Add a decoupling capacitor (0.1uF) close to the power pin on the AVR.- Pull-up resistor on the AVR reset line (where the serial reset coupling capacitor goes to pin 1)- What's the 600 ohm resistor on the output of the voltage follower for? What's its function?- Do you need a crystal on the microcontroller? Or are you using something like internal RC oscillator?- Add a power LED or reset button maybe, but those are really just things that are "to your taste".- Add a decoupling capacitor (0.1uF to ground) on the AVR's AREF pin.- You will need a common ground going to the GPS board, not just Tx and Rx- You may want to consider providing power from this board to the GPS board too, so everything is powered in one place.- Unless you can rely on the user always using a centre-positive regulated 5V plugpack, don't just use a DC jack directly feeding your microcontroller and GPS etc from the external power supply without including a voltage regulator or protection circuit of some sort on board.

author: DJohn
author_rank: Regular Contributor
timestamp: July 30, 2014, 11:31:11 am
content: Are you programming the AVR through JP5, with a bootloader? How does the bootloader get there?

author: dannyf
author_rank: Super Contributor
timestamp: July 30, 2014, 11:41:34 am
content: QuoteYou don't. It can be ignored or your can use the weak-pull on the pin.The design works for 5v ocxo. It needs some modification to use a 12v ocxo.A more generic solution would be to switch the oxco on the low side, via a npn or n-ch mosfet.

author: staze
author_rank: Frequent Contributor
timestamp: July 30, 2014, 05:52:07 pm
content: Quote from: LukeW on July 30, 2014, 04:00:10 amGood points! Also added a reset button, just in case. Pulling the power would probably work too, but a reset button is easy enough.Quote from: LukeW on July 30, 2014, 04:00:10 amIt's in the datasheet for the LT1006 when used as a voltage follower/buffer.http://cds.linear.com/docs/en/datasheet/1006fa.pdf(page 9) I'd previously asked about it here, and the thought was to leave it. Largely because the input resistance for the OCXO is listed as >9k, so the opamp isn't going to respond very fast without that resistor there. Probably doesn't NEED to respond very fast, but I figured since it's in the datasheet.Quote from: LukeW on July 30, 2014, 04:00:10 am-Crystal isn't needed, as I'm using the internal 8Mhz RC oscillator. Unit doesn't even need 8Mhz. =)-LED for power will be supplied by the PLL board (it's got a 1PPS LED and power LED. LCD will also function as a sort of power LED.-Decoupling the AREF I hadn't heard, but makes sense.-Power and ground I forgot for the PLL board. Added those to this revision. The PLL board then has the connections for power and ground to the GPS board. Technically the TX/RX for the GPS come off the PLL board's MAX233, which gets it's data from the GPS board, so there shouldn't be any issues there.Quote from: LukeW on July 30, 2014, 04:00:10 amRegulator would suck because it would require more than 5V, and I'd like to keep things simple. I hate doing it (because I think it's lazy), but I've added a diode back biased across the power/gnd so if a center negative pack is used, the diode will keep things safe. If you have a more elegant way, that doesn't require more than a 5V dc input, I'm all ears (eyes?).Okay, think I got everything. Also added a button I forgot that toggles the data on the LCD, as well as activates the backlight (single press, activate backlight, press again, change data). Also, if held, the button will turn on/off the OCXO. I added hardware to debounce the switch... pretty sure it's correct. I might move the pin it's on and stick it on an INT pin, but I'm not sure on that. I might also wire the 1PPS signal to the INT pin so I can sleep between updates.

author: staze
author_rank: Frequent Contributor
timestamp: July 30, 2014, 05:54:01 pm
content: Quote from: dannyf on July 30, 2014, 11:41:34 amI thought of that, but other feedback indicated there might be enough leakage through the other pins and the rest of the circuit that I should switch on the high side.I'm not overly interested in universality on this design. But yeah, it would need some mods... probably per the little daughter board James Miller already makes for the buffer VTC/EFC control... and certainly it would need a 12V rail added.

author: staze
author_rank: Frequent Contributor
timestamp: July 30, 2014, 05:58:14 pm
content: Quote from: DJohn on July 30, 2014, 11:31:11 amSorry, guess I should have detailed that. Bootloaded is loaded elsewhere (have a little board I wired up with the ICSP Header to load the bootloader itself... after that, the JP5 is only for code updates. It would be nice to run JP5 out to an DB9 connector at the back, but I'm not sure I have room for a MAX232/MAX233 on the board... I think there are some DB9 boards that have the level shifter onboard... maybe something like this:http://www.ebay.com/itm/MAX3232-RS232-to-TTL-Serial-Port-Converter-Module-DB9-Connector-MAX232-/141268615846Except that it doesn't have the RST and DST, so there's no way to have the programmer do the reset after loading... I would need to create my own board, I would think. =/ So, I'll just settle for taking the top off the case, plugging in my FTDI programmer, and updating code that way. =/

author: TheBorg
author_rank: Frequent Contributor
timestamp: July 30, 2014, 09:18:07 pm
content: Wiring out the ICSP if you have room (assuming a custom board here) never hurts. It's way more frustrating to have soldered a chip in and the bootloaders is all wonky. Plus with ICSP you can change fuse settings, etc.

author: staze
author_rank: Frequent Contributor
timestamp: July 30, 2014, 09:19:14 pm
content: Quote from: TheBorg on July 30, 2014, 09:18:07 pmGood point. I'll see if I have the room...Though, if I'm putting that in there, why not just replace the "FTDI header" with an ICSP... you can program it with that.

author: staze
author_rank: Frequent Contributor
timestamp: July 31, 2014, 09:41:38 pm
content: Added ICSPEverything look pretty decent?

author: staze
author_rank: Frequent Contributor
timestamp: August 07, 2014, 06:17:58 pm
content: As my first PCB routing experience, I'm having a heck of a time. Any tips for something like this? It's a lot to cram onto a 3.2"x1.75" board. =/ Mind you, this is Single Sided. I'm just doing a toner transfer single sided home etch of this... so...Any tips would be great.Thanks!

author: David Hess
author_rank: Super Contributor
timestamp: August 08, 2014, 08:52:27 pm
content: Quote from: staze on July 30, 2014, 05:52:07 pmI remember this discussion.The specifications for the OCXO say that the typical control range to bring the oscillator into its specified frequency when new is 3.2 to 4.8 volts so the 600 ohm load resistor on the LT1006 is not not going to do anything useful. The example circuit shown in the datasheet is for testing saturation voltage in a repeatable way and not a generally recommended configuration although other operational amplifier like the LM358/LM324 would benefit from it. In fact, that resistive load will degrade the offset voltage, common mode rejection ratio, and open loop gain via thermal effects. I would not use a load resistance lower than 2k and in a precision application, I would use a value higher than that.There is a more serious problem however; the common mode input range of the LT1006 only extends to within 1.6 volts of the positive supply yielding an input range of 0 to 3.4 volts. 3.4 volts is significantly *lower* than the upper end (and even the typical value of 4.0 volts) of the specified input voltage range of the OCXO to bring it to its specified frequency so it is very likely that the OCXO will not be able to be brought on frequency with an LT1006 used as a non-inverting gain of 1 buffer.Another OCXO related problem is the regulation of the +5 volt supply. The specifications say that a variation of +/- 5% may cause up to a frequency change of +/-5 ppb which is an order of magnitude larger than the specified aging over one day and a significant fraction of other environmental errors.If the OCXO supply cannot be regulated, then a precision amplifier is probably not needed so replacing the LT1006 with a rail-to-rail input and output amplifier (and no load resistor) will at least get things running although I would add an RC filter to the non-inverting input. Given the 100 kOhm minimum input resistance of the OCXO, a direct connection with a low leakage RC filter at the OCXO input would probably work fine. I think the capability of the OCXO is being wasted without a tightly regulated supply.I would do an error analysis to select an appropriate operational amplifier but it is not real clear to me what the slope of the OCXO control voltage is from its specifications. It looks like it may be up to 1.8 ppm over 8 volts?

author: staze
author_rank: Frequent Contributor
timestamp: August 08, 2014, 09:03:08 pm
content: Quote from: David Hess on August 08, 2014, 08:52:27 pmThe OCXO data you're looking at is incorrect if it says the control voltage is any higher than 5V (since it runs off 5V, it would be odd if the control voltage was any higher than that). This data sheet:http://www.isotemp.com/wp-content/uploads/2011/03/OCXO-131.pdfis largely about the 12V variant. The 5V variant is closer to these:http://www.isotemp.com/wp-content/uploads/2011/10/131-1002.pdfWhich says the center voltage is 2.5V ± 0.3V, easily doable by the LT1006.But interesting on the regulation... Great... more crap to add to the board, and that means I'd need a regulator. I just used an LT1006 since it was what was in jrmillers design with a 12V ocxo... to me it looks like into no load (without 600R resistor), the max output is up to +4.4v, which should be fine (I would assume)Hmm... so, remove the 600R resistor?

author: David Hess
author_rank: Super Contributor
timestamp: August 08, 2014, 09:48:09 pm
content: Quote from: staze on August 08, 2014, 09:03:08 pmThat neatly solves the input range problem then. I did not think having the input control range larger than the supply voltage all that remarkable for a crystal oscillator.The LT1006 (programmable single supply) is one of my favorite amplifiers next to the LT1097 (picoamp input current and overcomp). Noise analysis might show that a lower noise amplifier is better but I do no think that can be determined without studying how the OCXO voltage control input performs.QuoteI would have made suggestions about this but could not think of any good ones. I have seen similar problems resolved by regulating the supply voltage down to the minimum acceptable limit. If the raw supply could be relied upon to be at 5 volts + 5%, then a low dropout regulator could produce 5 volts - 5%. Maybe the OCXO can reliably operate on say 4.75 or even 4.5 volts?A regulator which can supply 800 milliamps with a 0.25 volt dropout is not trivial but not impossible either.Recently I have come to the conclusion that my first GPSDO will use a TCXO because of economy, warm up time, and error budget.QuoteDefinitely remove the shunt resistor on the output. It does some good on an LM358/LM324 style amplifier in specific applications but not on an LT1006 which has a much improved output stage. I would add an RC filter to the non-inverting input though if only for protection.

author: staze
author_rank: Frequent Contributor
timestamp: August 08, 2014, 09:53:30 pm
content: Quote from: David Hess on August 08, 2014, 09:48:09 pmThis is present on the jrmiller PLL board coming from the XOR.http://www.jrmiller.demon.co.uk/projects/ministd/manual.pdfEasy enough to drop that resistor though. Wish I could drop some other stuff... since, routing this thing is becoming a bit of a nightmare on a single side. Might have to resort to some jumper wires.Who the hell thought it was a good idea on the AVR to have the supply/grounds on opposite sides of the AVR, and CROSS! Wish there was an AVR that was like half the size... bigger than attiny, but smaller than the full on 328. Don't really need most of the pins, but more than an attiny.

author: tautech
author_rank: Super Contributor
timestamp: August 08, 2014, 10:41:52 pm
content: QuoteIf you are struggling to rout it consider TH resistors or diodes in non-critical areas to open pathways for routing

author: David Hess
author_rank: Super Contributor
timestamp: August 08, 2014, 11:17:49 pm
content: Quote from: staze on August 08, 2014, 09:53:30 pmThe RC filter or the shunt resistor to ground?I would add an RC filter at the input to the operational amplifier if the phase comparator filter is remote to remove incidental RFI and coupled noise. 2.2 kOhms and 0.001 to 0.01 microfarads would be typical. The time constant will be much to fast to affect the PLL filter.QuoteCrossing them is suppose to make them easier to layout. The power and ground were moved from the corners to the middle to lower the inductance.

author: staze
author_rank: Frequent Contributor
timestamp: September 02, 2014, 06:34:00 pm
content: Quote from: David Hess on August 08, 2014, 11:17:49 pmExcept when you're dealing with a SS board.

author: staze
author_rank: Frequent Contributor
timestamp: September 02, 2014, 06:38:12 pm
content: I'm officially stuck with this layout. I'm sure I'm doing something stupid, as I've never done this before, but I've been starring at this for days, and can't seem to make any progress. I THINK I have the right side laid out relatively well... but the left side is just a rats nest of wires.Any thoughts? Help!

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2014, 06:43:30 pm
content: Quote from: staze on September 02, 2014, 06:34:00 pmWhat is the preferred pinout arrangement when routing a single sided board?

author: staze
author_rank: Frequent Contributor
timestamp: September 02, 2014, 06:51:46 pm
content: Quote from: David Hess on September 02, 2014, 06:43:30 pmOne ground and one VCC pin... but, guess that must not be possible.

author: tautech
author_rank: Super Contributor
timestamp: September 02, 2014, 11:14:59 pm
content: 3 things I would try to get further:1. As circuits are built from several functional "blocks", try arranging each block "off board" to arrive at an achievable layout. You will have to visualize the routing. Then select that block and drag it back onto the PCB.In Altium, one can rotate a selected block for best fit and location on PCB.2. Seriously consider mixing SMD components with TH, many will easily fit inside the footprint of DIP IC's. I try to do as much as possible SMD and reserve TH for times that I have trouble routing as TH can often open pathways for routing.3. Work with a much bigger PCB to hopefully achieve the desired result, then you will likely see how to compact it to the size you desire.When I am really stubborn(stuck), I open several new PCB's and play with different layouts, giving emphasis to different "blocks" in each. A mixture of all suggestions will hopefully let you see "light at the end of the tunnel".Doing a difficult SS PCB without jumpers is a beautiful thing and something to be proud of, so keep trying.That it might take 100 hrs or more should not concern you, the experience gained will be worth it.

author: staze
author_rank: Frequent Contributor
timestamp: September 03, 2014, 01:35:53 am
content: Quote from: tautech on September 02, 2014, 11:14:59 pmAll good suggestions. I'll have to plug on it a bit more. Sadly, since I'm using eagle, a bigger PCB isn't an option. =/ Maybe the free Altium that DJ mentioned last Amp Hour will save us from this... since KiCad doesn't work on the Mac currently.I really want to stick with TH, but you're right, I might be forced to do SMD stuff. =/ I'll have to play some and see what I can do. I think the key is going to be the "unit" idea. I seriously hope places pay their routers good money... because it's a pain. I will say though, it's entertaining when you get in the groove. But it's more frustrating than writing a novel when you get something half routed then realize you're going down the wrong track and have to rip it all back up. =(