Author Topic: My first PCB design  (Read 3233 times)

0 Members and 1 Guest are viewing this topic.

Offline rob.mandersonTopic starter

  • Regular Contributor
  • *
  • Posts: 100
  • Country: us
My first PCB design
« on: December 17, 2016, 10:25:23 pm »
I know this is old hat to many of you but I wanted to show off my first ever PCB design.  It's a VHF phase locked oscillator - powers up at 150 MHz, locks from 134 to 161.  I used an ATMega328 microcontroller to program an LMX2306 PLL chip.  There's an LM324 op amp buffer after the PLL loop filter to expand the voltage range to 12V.  I also used a 12V regulator to supply the oscillator itself and three 5V regulators to supply the digital rail and two analog rails on the LMX2306.  Possibly overkill but at about 3 cents each it's cheap isolation between rails.

The board is from ITEAD who did a really nice job for US$22 including delivery!



This is not just my first ever PCB - it's also my first attempt at SMD components.  I *did* spend 99 cents (including shipping  :D) on one of those Ebay SMD soldering kits - very well worth it.

Lessons learned?  Check, check and check again.  And then check one more time.  I routed a different pin from the microcontroller to the CE pin on the PLL than the one I'd intended - as a consequence the board didn't work at first.  Oh, the digital side seemed to work, as did the oscillator itself, but the two didn't work together.  Some basic diagnostics involving internal register settings in the PLL revealed it wasn't being programmed at all and so then I did some checking (of the type I mentioned above that should have been done *before* committing to a real PCB).  Change one #define in the code and recompile and away it goes!

I also didn't notice that the pins on the trimmer I was planning to use (c12 in the photo) were bigger than the holes I used.  The pin spacing is just right - pity the holes are too damn small!  (I used DipTrace and if it has the trimmer I used in the library I couldn't find it - so I created my own component definition and missed that the holes were the wrong size).

Finally, I seriously underestimated the current the display (not shown above) draws.  The 5V digital regulator and the 12V regulator run mighty hot with the display attached! 

Oh, and one final lesson - they charge the same whatever's on the silk screen - so my next PCB will have much better labelling for each pin.  I remember right now the purpose of every connector pin - will I remember half a year from now?  Unlikely!
 

Offline Dubbie

  • Supporter
  • ****
  • Posts: 1115
  • Country: nz
Re: My first PCB design
« Reply #1 on: December 17, 2016, 10:32:23 pm »
Nice work! Sounds like you have learned a lot from this project. Hopefully it will be the first of many to come.


Sent from my phone using Tapatalk
 

Online wraper

  • Supporter
  • ****
  • Posts: 19516
  • Country: lv
Re: My first PCB design
« Reply #2 on: December 18, 2016, 12:16:29 am »
A few notes. First of all, there seem to be no decoupling capacitor at the input of U3-U5, especially weird considering there is an inductor in series, which defeats decoupling by capacitors on the same power rail. And against requirements in the datasheets. Secondly, why do you use those obsolete god awful through-hole tantalum caps at the outputs of the vregs? They require much lower capacitance, and ceramic cap would be the best. But even if using tantalum, why not modern SMD? Third, crystal oscillator layout looks very suboptimal.
 
The following users thanked this post: rob.manderson, Ig_sherwood

Offline rob.mandersonTopic starter

  • Regular Contributor
  • *
  • Posts: 100
  • Country: us
Re: My first PCB design
« Reply #3 on: December 18, 2016, 12:33:19 pm »
A few notes. First of all, there seem to be no decoupling capacitor at the input of U3-U5, especially weird considering there is an inductor in series, which defeats decoupling by capacitors on the same power rail. And against requirements in the datasheets. Secondly, why do you use those obsolete god awful through-hole tantalum caps at the outputs of the vregs? They require much lower capacitance, and ceramic cap would be the best. But even if using tantalum, why not modern SMD? Third, crystal oscillator layout looks very suboptimal.

Hi,
  The inductor isn't in series with the feed to the 5V regulators - it's in the feed to the oscillator and it's decoupled on the other side.  (There's another inductor feeding power to the LM324 - L2).   Nevertheless I take your point and now that I think about it, I can't imagine why I didn't put a SMD decoupler right next to U5.   There's a tantalum bypass (C5) right next to the output of the 12V regulator.

Choice of components?  I'm a cheap bastard and had a bunch of tantalums around - and no high value SMD caps  :)

And strange you should say that about the crystal oscillator layout - I was looking at it yesterday and thinking exactly the same thing.  If I were laying the board out again I'd move the crystal right next to the microcontroller and have the 22pf caps from each leg to ground in line with the crystal (one on each side) to keep trace length to a minimum.
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2473
  • Country: us
    • medpants.com
Re: My first PCB design
« Reply #4 on: December 18, 2016, 04:23:37 pm »
That's usually what's recommended in microcontroller datasheets, keeping the oscillator close and then just putting the caps on the opposite side (basically just swapping the resistors and the crystal would be right right way to go).

Personally, I like to use wide traces when possible, especially for power management stuff, so while the little QFP may need fairly narrow traces to the pads, I'd double or triple the width of the ground traces and power traces, just as a matter of course.  It's not that the traces are going to get hot with the amount of current consumed, it's just a nice general practice.

Now I haven't laid out any boards at this frequency or above, I wonder if the ground plane is useful.  The capacitance of of the plane could be as much as 10pF or so, and while that can be great for low speed analog lines and keeping high speed switching noise from getting into other stuff, it may actually be hindering the performance of the design slightly.  No ground plane would mean more radiated noise from the board, but it would probably give you sharper clock pulses, which could slightly improve the locking speed of the PLL - probably not worth reworking the board, but it could be an interesting experiment if you decide later that you want to do a revision.


Anyways, it's great being able to use surface mount parts, isn't it?  ;)
 
The following users thanked this post: rob.manderson

Offline rob.mandersonTopic starter

  • Regular Contributor
  • *
  • Posts: 100
  • Country: us
Re: My first PCB design
« Reply #5 on: December 18, 2016, 04:57:08 pm »
Anyways, it's great being able to use surface mount parts, isn't it?  ;)

It's great working up the courage to even try! :-)  Last time I played with electronics everything was DIP and through-hole.  It seems that if you want to play with any of the interesting stuff you have to master surface mount.  I'm not sure I'll ever be up to BGA - we shall see.

The other comment I'd make is that all the interesting RF chips seem to need programming.  Since that's my day job (I do health insurance software in .NET) I was hoping to find a technical hobby without programming but it seems unlikely.  On the other hand, microcontrollers get me a lot closer to the metal than .NET ever will, which isn't a bad thing.  Quite takes me back to the days when I wrote assembly language code for Z80's (and Natsemi SC/MP before that).
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3732
  • Country: ca
  • Place text here.
Re: My first PCB design
« Reply #6 on: December 18, 2016, 05:15:18 pm »
Anyways, it's great being able to use surface mount parts, isn't it?  ;)
I was hoping to find a technical hobby without programming but it seems unlikely.

Have you considered cooking? Just get into a discussion about what material makes the best knife...
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline ZeTeX

  • Frequent Contributor
  • **
  • !
  • Posts: 610
  • Country: il
  • When in doubt, add more flux.
Re: My first PCB design
« Reply #7 on: December 18, 2016, 08:28:30 pm »
Anyways, it's great being able to use surface mount parts, isn't it?  ;)
I was hoping to find a technical hobby without programming but it seems unlikely.

Have you considered cooking? Just get into a discussion about what material makes the best knife...
toolsteel, O1, A2 and so on.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->