Solar Weather Station PCB Layout Review - Page 1
Forum section: electronics / general

author: Dave Wave
author_rank: Contributor
timestamp: March 02, 2018, 10:11:18 pm
content: So I decided to build a solar weather station....I renamed the .BRD and .SCH files to .hex to U/L here, you will have to rename them to open in Eagle.The REV0 unit works, but uses too much power, killing the station after about three days with no sun.The biggest draw in the station is the external wind sensors, drawing over 100mah 24hrs a day. I realized they are only checked once every 15 seconds and can be off the rest of the time, saving quite a bit of power.I used a mosfet (IRF540)to turn the 12 volt sensors on/off. I think this part is wired properly.The 3.3v rail has a 1000mfd filter cap and a smaller ceramic cap right at the chip to try to keep the power quite for the ESP8266.The station has external reset switch, external status LED, external SCL/SDA bus for I2C sensors and 12V voltage sensor (voltage divider) to monitor battery health.This is my first try at Eagle, so go easy on me.Thanks for the help/advice!-Dave

author: cowana
author_rank: Frequent Contributor
timestamp: March 02, 2018, 10:38:22 pm
content: Can you upload .pdf or .png versions of your design files? That'll allow you to get feedback from everyone, rather than Eagle users only...

author: Aodhan145
author_rank: Frequent Contributor
timestamp: March 03, 2018, 12:59:19 am
content: I had a bit of spare time so I took a look at it. Just to make the schematic a bit easier to read I have spread it out a bit. The easier it is to read the easier it is to spot errors. The schematic should be set out however you like it but anybody should be able to understand it.The use of net labels really cleans up the design as it allows you to split the schematic into working blocks and connect by the names. Just name the net using the name tool and then add a label to it.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: March 03, 2018, 02:15:14 am
content: I noticed three main possible errors in the schematic:There was no reset resistor on the ESP8266 ResetThere was no ground connection on the ESP8266 only through a 10k resistor.The serial connection I assume was to allow 5V serial device to interface with the 3.3V device but the resistor was on the wrong side of the diode.The ADS1115 SCL and SDA connections looked to be swapped.The DS3231 module pinout doesn't seem to be the same as the common ones I've seen but that doesn't really matter.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: March 03, 2018, 02:37:05 am
content: For the FET circuitry, the IRF540 probably isn't the best bet, I have made that mistake for my self as a beginner and have a few of them still lying in a cupboard because of it. The problem is it's not a logic level FET. The VGS required to "turn on" the FET is at least 4V. I have attached the VGS vs Current Draw graph of the IRF540. At 5V VGS the means a current draw of approximately 10.25A but that results in a resistance of more than an ohm which would most likely work, but there could be better options.If you switch from a low side switch to a high side switch and use a P-Channel FET you can use an NDP6020P. P-Channel FETs are similar to N-Channel but the current drain is 0A when VGS is 0V and the current draws when VGS goes negative as this is high side this means when the gate is at 12V the current draw is 0A, and when the gate is at 0V the FET will be very low resistance and pass the 12V through.The resistor pulls the gate to 12V and the transistor pulls it 0V which is controlled by IO13. When IO13 is high the FET is on and when its low the FET is off.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: March 03, 2018, 02:57:44 am
content: As for the PCB, it looks good like a good component layout, the only thing that needs to be looked at is the traces are very thin at 6 mil and the spacing between the traces are quite low. 6 mil routing and 6 mil spacing are the minimum specifications usually offered by PCB fabs within standard pricing and it is a good idea to stay within. I tend to stick to a standard 12mil traces and 8 mil when I need the tight spacing. I have re-uploaded the eagle files from the schematic I have changed.Did you use the auto-router? I strongly recommend against this as it is a poor design technique if not used correctly. Most boards should just be manually routed.Overall it is a very good first use of eagle with a complex enough design to start with I remember I only started with routing 555 timers. It's an impressive design and I hope it works out for you.

author: Dave Wave
author_rank: Contributor
timestamp: March 03, 2018, 08:24:38 pm
content: Wow, thanks for all the input!I have attached a couple PDF's of the SCH and BRD for those without Eagle."For the FET circuitry, the IRF540 probably isn't the best bet"That is a Typo on my end. I meant to use a IRL540, but could not find a model in Eagle. Both parts are pin equivalent. Is there any reason not to use the IRL540 in this power-limited situation? Would there be any benefit to using the IRL510 or something else? Remember I am only switching 100 ma and trying not to waste any power (efficiency is important, but it will only be on 2-5 secs per min). Simplicity is important given my limited skill set.Quote from: Aodhan145 on March 03, 2018, 02:15:14 amA couple good catches here:I added a resistor to the reset buttonThe zener on the serial is input protection if somebody uses a 5V serial connection; I moved the resistor around.I triple checked the ADS1115 and SCL/SDA are correct.The DS3231 is one of the tiny-china ones with a lithium cell soldered on. It appears to be correctly wired.I'll make the above changes (the attached files are the original ones) and change the routing clearances and re-upload for final approval.Thanks again for all the help!-Dave

author: Dave Wave
author_rank: Contributor
timestamp: March 04, 2018, 01:29:24 am
content: Attached find PDF's of the revised SCH.Also attached are the .BRD and .SCH files for Eagle (they have to be renamed .BRD and .SCH from .HEX)Thanks for all the help,-Dave

author: Aodhan145
author_rank: Frequent Contributor
timestamp: March 04, 2018, 01:16:47 pm
content: Move R6 to only be connected to IO15 and connect Serial GND and the flash switch straight to GND. R6 where it currently is would hold GPIO0 at 2.5V instead of 0V when the switch is pressed.PCB looks a lot better some connections are a bit close and form holes in your ground planes but it will work fine after the modifications are made from the schematic corrections.I'd say you should work on your schematic layout, it needs to be a clean design; It's very difficult to spot mistakes with a difficult to read schematic. Take a look at Adafruit and Sparkfun's schematics, they are a very good example to follow.Always have your positive power symbols going up and your negative / GND going down.Always leave a gap between components don't put them right up against each otherThese are a good reference for cleaner PCB design:https://www.sparkfun.com/tutorials/115https://www.sparkfun.com/tutorial/Eagle-DFM/Eagle%20Rules.pdfTake a look at the examples within Eagle as well.If you make your modifications to your schematic then everything should work fine.

author: ebastler
author_rank: Super Contributor
timestamp: March 04, 2018, 10:13:57 pm
content: A good first schematic and PCB! In the attached I have shown a couple of suggestions how you might clean up your schematic. I have kept the arrangement of components and connectors largely unchanged to make it easier to get your bearings.There is no absolute "right" or "wrong" with this, and personal taste plays a role. But Aodhan145 stated a few conventions that one should always adhere to, to make schematics readable and give them a competent look. I would add "no wires running through components" as another ground rule. (No matter whether the wire connects to the same component on its far side, or runs further so some other destination -- this doesn't look right, and is easy to misinterpret.)To get into the "personal taste" aspects, this schematic already approaches a complexity where I would not draw all the connections as lines, but instead use labels on both ends to identify some of them. I have not done this here, to stay close to your approach. As another matter of taste, I like to align the vertical position of neighboring power supply and ground symbols, respectively -- where it makes sense and can be done without running wires all the way up and down the schematic. I have tried to do that in the attached.Two things that struck me while moving the symbols around: (a) Your two power connectors in the lower right may invite connection errors, since they have the VCC and GND in two different orders. (b) On the connectors on the left, did you really mean to have two inputs to the voltage divider, or was one of them intended to be another GND connection?Have fun with your project!JuergenEDIT: Minor tweaks to the schematic -- mostly cleaned up the serial ground placement.BTW, I am not sure what the intent is for GPIO15. Changed it from your schematic, to make the flash input on GPIO0 work; but the lone pulldown on GPIO15 does not look right either...

author: Dave Wave
author_rank: Contributor
timestamp: March 06, 2018, 02:41:20 pm
content: GIPO15 has to be pulled low (directly or with a resistor) for normal or flash operation.It looks like I need to add a pull up on Gipo02 as well...sighThe following ESP8266 pins must be pulled high/low for either normal or serial bootloader operation. Most development boards or modules make these connections already, internally:GPIO Must Be Pulled15 Low/GND (directly, or with a resistor)2 High/VCC (always use a resistor)If these pins are set differently to shown, nothing on the ESP8266 will work as expected. See this wiki page to see what boot modes are enabled for different pin combinations.GPIO2 should always use a pullup resistor to VCC, not a direct connection. This is because it is configured as an output by the boot ROM. If GPIO15 is unused then it can be connected directly to ground, but it's safest to use a pulldown resistor here as well.-Dave

author: westfw
author_rank: Super Contributor
timestamp: March 28, 2018, 01:39:44 am
content: Make your traces fatter and your vias bigger, especially on the power traces. (yes, even thicker than your revised board, for the power...)Take a look at:https://www.instructables.com/id/Make-hobbyist-PCBs-with-professional-CAD-tools-by-/Similarly, increase the "clearance" value in the DRC parameters...Try to remove traces and fill polygon from around the ESP antenna area (draw some rectangles in tRestrict/bRestrict, for instance.)

author: homebrew
author_rank: Frequent Contributor
timestamp: April 30, 2018, 07:30:09 pm
content: Hi Dave,I've a little spare time this evening. So if you like I could go over your layout...However, a little input is needed:1) What are the exact modules that you'll be using/buying? Some of the variants have screw holes that could be matched on the board.2) Where does the power come from? There's 12V, 5V, 3.3V. Do you have external regulators? Otherwise, why not add some local regulators?3) Do you have a special case in mind? It is so much easier to consider existing mounting posts from a given case.Best,HomebrewEdit----Added Questions:1) I2C needs pullup resistors to work properly. Are the the onboard pullups (if any) on the ESP sufficient?2) Is the 12V rail directly connected to some battery? If so, a fuse would be nice.3) The 3.3V RESET pullup was not connected to the 3.3V rail.4) The serial ground through the 10K resistor is strange - looks just wrong. Is there a reason for that?Although this is *far* away from perfect, attached some fiddling around with the layout without moving anything except resistors and the diode - just as a little demonstration ...

author: TomS_
author_rank: Frequent Contributor
timestamp: October 19, 2018, 08:57:41 pm
content: Quote from: Dave Wave on March 03, 2018, 08:24:38 pmIf that is the case, change the value of the component to avoid confusion.