Author Topic: Review my Eagle PCB design?  (Read 4247 times)

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Review my Eagle PCB design?
« on: August 13, 2015, 09:12:57 AM »
Hey everyone,

I've been working on a Moteino-based security system.  My first design is an accelerometer-based intrusion sensor that can be place on windows and doors.  I've been making them using all off-the-shelf boards from here and Sparkfun, but it was a really good opportunity for me to learn Eagle and create something myself (even if it's just hacking together a bunch of open source designs). 

If any of you have the time, I'd appreciate you taking the time to review my board and schematic.  It's essentially a Moteino, but I've added an accelerometer, and battery charging circuitry with load sharing and a voltage divider battery monitor, as described on some of the previous forum posts.  I only broke out a couple of IO pins, but I've broken out FTDI and SPI so I can load sketches and program the bootloader.  (I do need SPI to program the bootloader, right?  That will be a new one for me.)

Thanks in advance for your time, patience, and help!

YOU GUYS ARE AWESOME!
« Last Edit: August 13, 2015, 10:45:32 AM by Felix »
Fail fast. Fail often.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Review my design?
« Reply #1 on: August 13, 2015, 10:45:07 AM »
Nice design for a starter!!

- signal vias are 19mil, they can safely be 13-15
- clearances look good
- if you plan to hand solder these reducing some thermal isolation will help soldering GND points, if you reflow disregard this for SMD devices. For hand soldered headers, this is important, remove some of the thermals with rectangles on the trestrict/brestrict layers. Otherwise you will need a really good soldering iron.
- You'll need the ISP pins to program via a ISP programmer (I recommend only the AVR ISP MKii, or Atmel ICE). I recommend just putting a ISP header on the board if you can, otherwise you'll need a POGO jig to get to all the ISP pins.


Otherwise a very nice board!

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Review my Eagle PCB design?
« Reply #2 on: August 13, 2015, 12:17:20 PM »
Design looks good but there is at least one change you should make (in addition to Felix's comments). 

On the FTDI connector, your pin 1 should be connected to the ATMega328P RESET pin via a capacitor, not direct connected.  The FTDI signal is DTR and will keep the Moteino in constant reset without the cap.  I'm not sure I would tie anything to your pin 5 of the connector unless you KNOW that it's not used on your FTDI cable.

The RFM69 footprint is actually bigger than the Eagle Model and you have the NC pin on the RFM69 overlapping the VBat+ via in the vicinity of U2.  I'm not sure this will harm anything but it should be checked...

Optional: A potentially useful thing is to monitor the charge pin on the MCP7383x device, but you can't do this with the MCP73831 since it's Charge pin is pushpull output.  If you use the MCP73832, which has open drain output, and tie the LED/resistor to 3.3V instead of the 5V supply, you can monitor the signal with a spare input to the 328P.

That's all I saw in my quick scan...
Tom

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Re: Review my Eagle PCB design?
« Reply #3 on: August 13, 2015, 03:23:36 PM »
Based on your responses, I've attached some modifications, but I have some questions.

On the FTDI connector, your pin 1 should be connected to the ATMega328P RESET pin via a capacitor, not direct connected.  The FTDI signal is DTR and will keep the Moteino in constant reset without the cap.

Duh!  Bad miss on my part!

The RFM69 footprint is actually bigger than the Eagle Model and you have the NC pin on the RFM69 overlapping the VBat+ via in the vicinity of U2.  I'm not sure this will harm anything but it should be checked...

I nudged them down a bit.  You're just concerned that the radio will be covering the via?  I've only left those exposed as test points.

Optional: A potentially useful thing is to monitor the charge pin on the MCP7383x device, but you can't do this with the MCP73831 since it's Charge pin is pushpull output.  If you use the MCP73832, which has open drain output, and tie the LED/resistor to 3.3V instead of the 5V supply, you can monitor the signal with a spare input to the 328P.

I took a look at the data sheet, and frankly, I guess I don't understand "open drain" vs. "tri-state" and how I could actually implement that in a useful way.

- if you plan to hand solder these reducing some thermal isolation will help soldering GND points, if you reflow disregard this for SMD devices. For hand soldered headers, this is important, remove some of the thermals with rectangles on the trestrict/brestrict layers. Otherwise you will need a really good soldering iron.

Felix, what do you mean by "thermal isolation", just more space between parts? 

...remove some of the thermals with rectangles on the trestrict/brestrict layers.

Thermals?  I don't really see much on the trestrict/brestrict layers, just the resonator.


You'll need the ISP pins to program via a ISP programmer (I recommend only the AVR ISP MKii, or Atmel ICE). I recommend just putting a ISP header on the board if you can, otherwise you'll need a POGO jig to get to all the ISP pins.

Felix, I've seen that you can just use an existing Arduino as a programmer for the bootloader.  Is this possible with the Moteino and have you tried it?

Thanks again, guys!
Fail fast. Fail often.

ulli

  • Jr. Member
  • **
  • Posts: 87
Re: Review my Eagle PCB design?
« Reply #4 on: August 13, 2015, 04:02:01 PM »
Felix, I've seen that you can just use an existing Arduino as a programmer for the bootloader.  Is this possible with the Moteino and have you tried it?

I do use an Arduino as bootloader programmer. Works fine for me :)

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Review my Eagle PCB design?
« Reply #5 on: August 13, 2015, 04:39:02 PM »
Based on your responses, I've attached some modifications, but I have some questions.

On the FTDI connector, your pin 1 should be connected to the ATMega328P RESET pin via a capacitor, not direct connected.  The FTDI signal is DTR and will keep the Moteino in constant reset without the cap.

Duh!  Bad miss on my part!
Not a problem, that's why you have multiple eyes looking at it...

Quote
The RFM69 footprint is actually bigger than the Eagle Model and you have the NC pin on the RFM69 overlapping the VBat+ via in the vicinity of U2.  I'm not sure this will harm anything but it should be checked...

I nudged them down a bit.  You're just concerned that the radio will be covering the via?  I've only left those exposed as test points.
I am concerned that the radio pad could short out with the via.  The RFM69 datasheet says it's an NC pin, but that it 'should be connected to ground'.  Well, if it's truly NC, why would it need to be connected anywhere?  Maybe it's a test circuit, maybe nothing, but it would be safer to avoid shorting to it, IMO.

Quote

Optional: A potentially useful thing is to monitor the charge pin on the MCP7383x device, but you can't do this with the MCP73831 since it's Charge pin is pushpull output.  If you use the MCP73832, which has open drain output, and tie the LED/resistor to 3.3V instead of the 5V supply, you can monitor the signal with a spare input to the 328P.

I took a look at the data sheet, and frankly, I guess I don't understand "open drain" vs. "tri-state" and how I could actually implement that in a useful way.
An open drain pin can only pull current to ground, while a push-pull pin not only pulls current to ground, but supplies voltage to the pin.  In this case, the MCP73831 supplies 5V to the Charge pin.  Not a problem if you only have an LED load.  However, if you want to monitor this signal at the ATMega328P, then you'll need to drop it to 3.3V max.  The simplest way, then, is to use an open drain device with the LED pulling the signal up to 3.3V instead of 5V.

I've attached an example below.  In this case, the 'BAT_CHARGE' signal is tied to pin 2 of the MCP73832 and to the D1 pin as an input to the processor.

Tom
« Last Edit: August 13, 2015, 04:41:32 PM by TomWS »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Review my Eagle PCB design?
« Reply #6 on: August 13, 2015, 08:16:12 PM »
Felix, what do you mean by "thermal isolation", just more space between parts? 
Thermals?  I don't really see much on the trestrict/brestrict layers, just the resonator.
Felix, I've seen that you can just use an existing Arduino as a programmer for the bootloader.  Is this possible with the Moteino and have you tried it?
Thermal isolation is the isolation space and spokes that connect say a GND through hole to the GND fill plane/pour. As you try to solder a pin to that hole, a large GND pour will quickly dissipate heat away and it's very difficult to make a good solder joint, unless you have a good soldering iron, or if the hole is thermally more isolated (less spokes) to the fill. So removing some of the spokes makes heat harder to escape, you can do that with some rectangles on the restrict layers
- Arduino as ISP will work but it's like a civil war rifle where you load the bullet manually versus an automatic machine gun :)

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Re: Review my Eagle PCB design?
« Reply #7 on: August 13, 2015, 09:45:58 PM »
Thermal isolation is the isolation space and spokes that connect say a GND through hole to the GND fill plane/pour. As you try to solder a pin to that hole, a large GND pour will quickly dissipate heat away and it's very difficult to make a good solder joint, unless you have a good soldering iron, or if the hole is thermally more isolated (less spokes) to the fill. So removing some of the spokes makes heat harder to escape, you can do that with some rectangles on the restrict layers

Ah, good to know.  I've attached modified Eagle files based on this suggestion.  All I've done is try to limit any of the "spokes" to one spoke per pad.  Is this sufficient in your experience, or do you think it's necessary to increase the polygon isolation.  Currently it's set to 12mil, per Sparkfun's suggestion.  I'm in the process of putting together a reflow toaster, but if I fail miserably, I'd certainly like to fall back to hand soldering.  I have a decent iron, but I don't want to make my life too hard!

Thanks again!

Arduino as ISP will work but it's like a civil war rifle where you load the bullet manually versus an automatic machine gun :)

I definitely prefer an automatic over a bolt-action, but my hobbies are starting to hit the pocketbook rather hard, so initially, I'll try working with what I have!   ;D
Fail fast. Fail often.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Review my Eagle PCB design?
« Reply #8 on: August 14, 2015, 07:36:07 AM »
Arduino ISP will work when you're on a budget and have more time and neurons to kill than money.
One spoke per layer is OK. For SMD this won't matter as much if you reflow. You still have to solder headers, that's where i'd increase thermal isolation.
You just need a bare bones toaster oven, no fancy controllers, just a thermocouple probe. Then turn on the oven until it reaches 130C, off until it settles around 170C, then ON again until it's at 220C or you see all the joints reflowed. This is for lead-free paste.

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Re: Review my Eagle PCB design?
« Reply #9 on: August 18, 2015, 11:55:42 AM »
Quick question for you guys.  I've been reading about bypass caps, and in many places it's recommended to put one on VCC beside the MC.  Is there a reason you've done this on AREF but not on VCC?
Fail fast. Fail often.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Review my Eagle PCB design?
« Reply #10 on: August 18, 2015, 01:44:18 PM »
Quick question for you guys.  I've been reading about bypass caps, and in many places it's recommended to put one on VCC beside the MC.  Is there a reason you've done this on AREF but not on VCC?
Moteino R4 has a bypass cap on VCC (C4, 0.1uF).  Further, 'calculating' bypass caps is an Art.  It really depends on the switching speeds and currents of the devices on the board.  The radio has it's own caps on its module for that reason.  C4 on the Moteino is probably enough for its speeds and currents. 

The cap on AREF really is a 'filter' cap, not 'bypass', and is necessary.  The distinction is that a 'bypass' cap will bypass switching currents around the nearest devices, keeping them from propagating to the rest of the power supply.  The 'filter' cap keeps electrical noise from entering the AREF input, there are no switching currents (technically not totally true, but, true for this discussion).

I hope this helps.

Tom

mattmunee

  • NewMember
  • *
  • Posts: 11
    • MTRTech Wikia
Re: Review my Eagle PCB design?
« Reply #11 on: August 28, 2015, 10:30:30 AM »
Thanks, Tom.  I wasn't looking in the right place!  I now see them by the regulator.  Thanks for the info.  From what I've been reading, the more bypass caps the better.  :)
Fail fast. Fail often.