You need to use EasyEDA editor to create some projects before publishing
Multi-layer Capacitor and Resistor Pads?
2383 60
Ryan St. John 5 years ago
`Hey guys this is my first time making a PCB board so I am not sure about whether or not mine is to the standards or not. In order for me, to my knowledge, to connect all of my components together, I had to make a few of the resistor and capacitor pads multi-layer instead of just top layer. Is this allowed and and does something like this actually work still? Sorry if this is a dumb question but in the PCB designer it looks like the pad has a hole in int when it is multi-layer which makes me think it is not acceptable to change the pads to multi-layer. Also if anyone has any suggestions or ideas for my circuit please let me know as well!` [https://easyeda.com/ryanstjohn3/testpcb](https://easyeda.com/ryanstjohn3/testpcb) \*\* I see there is a clearance issue with two of my capacitors\, is this due to my traces or the actual components?
Comments
Ryan St. John 5 years ago
Update: I fixed the clearance issue by selecting another capacitor, this new capacitor has larger pads which fixed the error.
Reply
martin 5 years ago
I don't think I've ever done multi-layer for a SMT pad (I guess it should work - as you point out, it created a pth to get to other layers). What's usually done is to choose the top or bottom layer, then add a via somewhere along a trace to link to another layer.
Reply
andyfierman 5 years ago
It's bad practice to put a via  or other hole in the middle of a pad intended for a connection to a n SMT component. The hole sucks the solder away leaving a poor quality and so unreliable joint. If you need to connect a net from a single (top or bottom) layer SMD pad to a track on another layer then do as Martin suggested and run a short length of track to a via then track from the via on the new layer. Multi-layer pads are primarily intended for use with through hole components.
Reply
MikeDB 5 years ago
Given most of the other components are through-hole, why not just use through hole resistors and capacitors as well.  Much easier to assemble and you're not short of space.   Select AXIAL-0.4 for the resistors and whatever is correct for each capacitor (RAD-02 quite often).  Then they will all be multilayer.
Reply
MikeDB 5 years ago
Oh and put 100nF or 220nF on both the input and output pins of the 7805 to ground as well or it WILL honk :-)
Reply
Ryan St. John 5 years ago
Thanks for all of the information guys. I changed the SMT component pads back to just top layer as they should be and added a via where I needed to go through another track. I also picked SMT components as I thought it would allow more to have more room on the board overall. It may just be easier to replace the SMT components with through hole components and redesign the board. If you guys have any other tips or tricks for me I am open to suggestions. Thanks again!
Reply
Ryan St. John 5 years ago
@MikeDB The datasheet suggested 10uF caps, do you think I should go to 100nF or 220nF? Thanks for this!
Reply
andyfierman 5 years ago
@ryanstjohn3, Not sure where you have seen 10uF as recommended input and output decoupling caps. 220nF - 330nF input and 100nF output is what the TI and Foshan  (the part you have chosen from the LCSC) datasheets recommend: Page 1 in: [https://datasheet\.lcsc\.com/szlcsc/1812061730\_BLUE\-ROCKET\-7805\_C305416\.pdf](https://datasheet.lcsc.com/szlcsc/1812061730_BLUE-ROCKET-7805_C305416.pdf) Figure 18 in: [http://www.ti.com/lit/ds/symlink/lm340.pdf](http://www.ti.com/lit/ds/symlink/lm340.pdf) As Mike says, even though the datasheet says it's optional, chances are if you don't have a 100nF across the output then it will hoot. You may get away with the decoupling capacitance of the rest of the circuit across the 5V rail doing the job for you but place one directly across the LM7805 output to ground anyway and save yourself the embarrassment. :) Is this circuit just a test project to learn EasyEDA or is it to do a specific job? If the latter then what loads are the BC337 bjts driving? Do they need to be short circuit or flyback voltage (i.e. are they driving relay coils) protected? Do you need one or more separate ground connections on the board to provide the ground return path connections for the input signals? Do you need one or more separate supply connections from the board to provide the supply current return path connections for the output signals? Are your traces wide enough to carry the required currents? How about using a ground copper area on one side of the board and a +5V copper area on the other side? Do you really need the accuracy of a crystal or, if the ATMEGA supports it, could you just run off an internal free running RC clock oscillator?
Reply
Ryan St. John 5 years ago
@andyfierman Hey Andy, I am not sure what I was reading - I will definitely replace the 10uF caps with the 220nF caps. > Is this circuit just a test project to learn EasyEDA or is it to do a specific job? > If the latter then what loads are the BC337 bjts driving? It is both - I am driving 4 LED strips at 12VDC and about 150mA per strip with PWM. I am also taking 4 12VDC inputs through the 22k/10kohm voltage divider in order to read control signals from a car at 12VDC. > Do they need to be short circuit or flyback voltage (i.e. are they driving relay coils) protected? They are directly driving the LED strip so I don't believe a flyback diode is needed > Do you need one or more separate ground connections on the board to provide the ground return path connections for the input signals? Then input signals are in reference to the cars chassis ground (connected to negative battery terminal) and since my board will be powered by the car it already is referenced to that ground so I would have to say no > Are your traces wide enough to carry the required currents? I am planning for a maximum current of 250mA which using this online calculator gives me a 5mil trace width ([https://www.4pcb.com/trace-width-calculator.html](https://www.4pcb.com/trace-width-calculator.html)) ![image.png](//image.easyeda.com/pullimage/alLSHRK4jZcQVl6DPG7mm3ksRb3BLPf0Vac9O5Ow.png) > How about using a ground copper area on one side of the board and a +5V copper area on the other side? I honestly have no idea how to do that, or what that would be used for, could you provide some clarification please? > Do you really need the accuracy of a crystal or, if the ATMEGA supports it, could you just run off an internal free running RC clock oscillator? Since I am using PWM I would like to have a more accurate crystal - but I doubt any variances would be noticeable to the human eye. I am not sure if my assumption is correct here or not
Reply
Ryan St. John 5 years ago
I also swapped out the SMT components for through hole components and now have the following PCB layout: ![image.png](//image.easyeda.com/pullimage/ar9TnaRsBbzwMEiqi0dKVsmOV2yKYM5uvtzk3FtO.png)
Reply
MikeDB 5 years ago
Ah I didn't mean remove the 10uFs - just add the 100nFs as well :-)   The 100nFs need to be closer to the 7805 - the 10uFs can go where the 100nFs are currently, but you really should have another 100nF as close as possible to the ATMEGA as well.   Capacitors are cheap, fixing a honk isn't. I'd lose the crystal and look at the calibration values programmed into the MCU to correct the internal oscillator.   Those are normally more than good enough for any application less than digital audio. If driving LED strips, you might want to consider having a separate pin for the positive on each one as well - makes wiring them up easier.  Also space out Q1 to Q4 a bit - they won't get that hot by the sound of it but they do love a little space to breathe :-) After that do as Andy suggests and add ground and power planes top and bottom.   You can also lose an awful lot of your vias for example the one from R6 to C5 can be on the blue layer the whole way.  And I've no idea what those two by C3 and C4 are doing.   JLCPCB don't seem to charge for vias but most PCB places do set limits so it's good practice to reduce them as well as making a better board.
Reply
martin 5 years ago
My only remaining comment is: I'd use a 4x1 0.1" pin header instead of 4 individual pins.
Reply
Ryan St. John 5 years ago
@martin I don't see where I would find a header structure like that, this is all I see: ![image.png](//image.easyeda.com/pullimage/zNI4Rzh0lR76F0sSPjgZ3C6NsUuYNHLTVQLJO2hl.png) @MikeDB This link says just to use the two 10uF caps ([https://www.arduino.cc/en/Main/Standalone](https://www.arduino.cc/en/Main/Standalone)). You are saying to use them but also put 220nF in parallel with them, correct? After some via clean-up, additional through-holes for powering the LED strips, and adding back the 10uF caps this is where I am at: ![image.png](//image.easyeda.com/pullimage/4nE1v1ZpxEV3Q4c9EhmmuZFmuEItuD4xpHLr90mh.png) Thanks for all of the help guys! I am learning a lot!
Reply
martin 5 years ago
On the left, click "Libraries", and search for "header". The system will find a good number of female and male headers, including some 1x4. Mind the pitch -- 0.1" or 2.54mm.
Reply
MikeDB 5 years ago
Yes if you look at any 7805 datasheet it says "All characteristics are measured with a 0.33-μF capacitor across the input and a 0.1-μF capacitor across the output." But in fact 0.22uF on input and output works fine. Click the Connector box on the EElib on left window and with the down arrow select "Header-Male-2.54_1x8 (or 2x4 if you prefer)
Reply
MikeDB 5 years ago
Oh and rotate C3 and C4 and place them nearer to the pins of the 7805.  Don't actually touch it or you'll affect heating but remember golden rule for decoupling capacitors, short is good, shorter is even better :-)
Reply
martin 5 years ago
Say\, while I'm around here\.\.\. Is there another microcontroller you can use? Most of the pins aren't used on this one\. You'd also save on space\.\.\. and remember MikeDB's suggestion: do you \_really\_ need that crystal?
Reply
Ryan St. John 5 years ago
I swapped out the individual pins for connectors and it looks much better already. I moved the decoupling caps closer to the voltage regulator as suggested. I also increased the track width to 15mils for the ground and 12VDC connections that will power the LEDs just as a safety measure, is there a cost to increasing the track width? I also added another 220nF cap right at the microcontroller as suggested as well. With regards to the microcontroller: I know of no other MCs that have at least 4 PWM outputs as well as 4 inputs. Controllers such as the ATTiny series do not have enough I/O, and the ATMega series has a few too many I/O. To save space the only thing I could think of is to go surface mount instead of through-hole for the MC but soldering that would be difficult I imagine. As for the crystal, I am going to have to do more research and playing around to see if I can figure out how to use the internal clock correctly, but for now I am going to leave it in since it is easy to remove later on. I am also thinking of adding a few jumper connectors for different settings on the board so that should use up a few more I/O pins on the MC as well. Thanks for all of the help I am learning a lot! ![image.png](//image.easyeda.com/pullimage/XEH7Ebq9MrKekqjlICpfKBntSimXLWHumYronAwD.png)
Reply
MikeDB 5 years ago
Yes that's actually a good point - put the crystal on the board and then don't load it if you don't need it. And no, the ATMEGA328 is fine - if the code fits the ATMEGA88 is pin compatible and a bit cheaper
Reply
andyfierman 5 years ago
@ryanstjohn3, You might find this helpful: [https://easyeda\.com/andyfierman/Elements\_of\_a\_simple\_PCB\-e42c7b2a4e17449f821a97d04806aeeb](https://easyeda.com/andyfierman/Elements_of_a_simple_PCB-e42c7b2a4e17449f821a97d04806aeeb)
Reply
martin 5 years ago
On a board like this, there's no reason not to use real fat tracks since there's plenty of room. Also, I kinda get the feeling you can achieve a much better layout if you reorder resistors on the left. Try to avoid tracks that snake around. If you keep the crystal, might consider fixing its layout. You should, among other things, be able to use a ground pour for the return path of everything on the board. Your tuning caps should have a more direct path to ground, ideally not switching layers (though at these frequencies, not a huge deal, but for the sake of cleanliness!)
Reply
Ryan St. John 5 years ago
@andyfierman -That definitely helped clarify a few points, thank you. @martin - Which tracks are "snaking around" and what is the downside of having a track that snakes around? I have the resistors all aligned as they are since I read somewhere that you should keep all of your sets of components ordered and facing the same direction if possible. I am not sure if that is just opinion or if there is some kind of fact backing that up. Could you shed some light on that? I increased the thickness of the tracks to 20mil and added a ground track that goes all the way to the left side of the bored just as a precaution. I also added some helpful text labels and an additional ground to the tuning caps on the top layer as suggested. ![image.png](//image.easyeda.com/pullimage/v9pYHsUBSOWi4DzABqCLzMJvCuFG9QhPYPdUHPDR.png)
Reply
martin 5 years ago
There is no "fact" that states have to keep things tidy and easily understood, I suppose.  I took a couple minutes to outline what I am talking about (and even that could be improved -- but it's not my board, so really, the choice is yours). ![Screen Shot 2019-02-25 at 8.22.48 PM.png](//image.easyeda.com/pullimage/EgIA58Wat44bg7v8z28VUA7hWo8pRNYPrwUWXbfo.png)
Reply
Ryan St. John 5 years ago
@martin I like the look of that, but the other end of the resistors are connected to ground which is the copper area, correct? I want to try and use the copper area but I am not sure how to tell it what track to connect to, as in ground as you have it. I am going to make a new PCB layout with what you did in mind and see what I can further enhance! Also would you do a copper area on the back side as well? I am not seeing the significance of a copper area besides for a large common ground between components to reduce resistance to ground.
Reply
Ryan St. John 5 years ago
I think I figured it all out, with the help of all of you guys! This is probably going to be the final product after a few tweaks, unless anyone else has any suggestions; Thanks for all of the help once again ![image.png](//image.easyeda.com/pullimage/dXlUfMt9pesDBSwloKIHB6mkeU9MWL3PUcMavxMB.png) ![image.png](//image.easyeda.com/pullimage/eQYqTtkVgFIN5txmGdfQRGTvVw4fsApc04biPqIz.png)
Reply
andyfierman 5 years ago
@ryanstjohn3, You could make the supply voltage rail into a copper area on the bottom layer. Then you get the same sort of lowered resistance in the supply side as in the ground return. If nothing else it makes the decoupling more effective. Having got this far, you might like to read (2.2), (4) & (6) in: [https://easyeda\.com/andyfierman/Welcome\_to\_EasyEDA\-31e1288f882e49e582699b8eb7fe9b1f](https://easyeda.com/andyfierman/Welcome_to_EasyEDA-31e1288f882e49e582699b8eb7fe9b1f)
Reply
MikeDB 5 years ago
Yes - the power supply plane is just as important as the ground plane.  Remember with CMOS exactly half of all the transistors are referenced to Vcc, not GND, and so that needs to be just as clean and low impedance as the GND. Good practice is also to have all polarized components facing the same direction to reduce loading errors so reverse C7.
Reply
Ryan St. John 5 years ago
@andyfierman - Thank you for the great source  @MikeDB - I have done just that, my only concern with the VCC supply plane is that it goes around the microcontroller which operates at 5V and the VCC supply is 12V and this could cause excess noise and unexpected triggers?
Reply
andyfierman 5 years ago
@ryanstjohn3, "my only concern with the VCC supply plane is that it goes around the microcontroller which operates at 5V and the VCC supply is 12V..." Not the 12V supply. Understandable misunderstanding...  I said: "You could make the supply voltage rail into a copper area on the bottom layer." Mike referred generically to: "Remember with CMOS exactly half of all the transistors are referenced to Vcc, ..." The supply that you need to make into a copper area is the 5V supply to the MCU not the input 12V supply into the linear regulator. Copy and run these simulations to understand more about decoupling capacitors: [https://easyeda\.com/andyfierman/Power\_supply\_decoupling\_and\_why\_it\_matters\_\-451e18a0d36b4f208394b2a2ff7642c9](https://easyeda.com/andyfierman/Power_supply_decoupling_and_why_it_matters_-451e18a0d36b4f208394b2a2ff7642c9)
Reply
MikeDB 5 years ago
Ah sorry.  For me VDD is always the positive on the main logic ICs.  Analog is VDDA and anything else is labeled "+12V" or things like that.  I hadn't checked you had different assignments.   Yes a 12v plane would be horrendous :-)
Reply
Ryan St. John 5 years ago
Is something like this acceptable where I have two different copper regions; 1 for the 12VDC that powers the LEDs, and a 5V region that runs the rest of the board? Also, would adding a third ground copper region on the back be too much as well? ![image.png](//image.easyeda.com/pullimage/UHlZKFtrCO0AxMZR7aSiYWcPGjAen0fTguqrkmQf.png)
Reply
andyfierman 5 years ago
You can have a plane for 5V and another for 12V. "Also, would adding a third ground copper region on the back be too much as well?" But that was how this discussion on planes started. If you look back at my second post, I said: "How about using a ground copper area on one side of the board and a +5V copper area on the other side?" So that's what I (and I think Mike too) thought you were doing anyway. :)
Reply
Ryan St. John 5 years ago
@andyfierman to clarify, I was asking if having 3 separate copper regions on the back side would be too much for manufacturing or cause any drawbacks Like so: ![image.png](//image.easyeda.com/pullimage/Xp9d0X69w4a8Vyut3yeXJ1WFZJ759a6ekHQtf6X5.png)
Reply
andyfierman 5 years ago
There's no manufacturing problem with that but you'd be better to simplify it and have an (as far as possible) uninterrupted ground plane on one side and just 5V and 12V planes on the other. For your board where you have a ground plane on one side and no switch mode supply, having a small ground area on the other side will have negligible benefit. So apply Occam's Razor. Otherwise known as KISS: Keep It Simple, Stupid!
Reply
martin 5 years ago
You don't need that track on the crystal tuning caps, unless you've removed the ground pour on the top layer.
Reply
MikeDB 5 years ago
Although it's within recommended safety limits, I always increase the ground plane spacing for primary and source voltages - i.e. the 12v in your case. Stops any arc-over if a voltage spike arrives and doesn't conduct crap onto other tracks. And crystal oscillators need their own separate guard ground.  See page 32 of https://www.st.com/resource/en/application_note/cd00221665.pdf Always follow this exactly for the rest of your career and you should never have a problem.
Reply
Ryan St. John 5 years ago
I removed the track on the crystal caps, added the 24VDC copper area and 5V copper area with 25 mil clearance for the added safety factor as well. I removed the extra grounds on the bottom layer for the transistors since the ground plane on the top layer covers it. I also added some cool graphics and versioning to make it look legit(: To make the ground guard, is there a certain way to cut out a section of the copper area? I tried to overlay a new ground copper area but they just merge together since they are of course both of the same network. Is the isolated ground actually connected to ground or does it float? I tried to follow the PDF that you linked but I am not able to follow what they are doing on the PCB yet. Thanks! ![image.png](//image.easyeda.com/pullimage/arkwQVxDcwWAgfV53tPpTIWNgM6mtDErFxs5q9Mo.png) ![image.png](//image.easyeda.com/pullimage/0ybPSh0a3J7w2OjTaBuzFCC6j3dJK8PvBl74Xnvw.png)
Reply
MikeDB 5 years ago
Yes it needs to connect to the main ground plane, but only at the single point as shown in the ST document,  The idea was originally invented by either Bob Widlar or Bob Pease who in the analogue world are regarded as always right but unfortunately some EDA packages don't always make implementing their ideas easy.  Best thing is to call the guard nodes GNDX or something, then create the ground plane, then put a small link in the correct place to link GNDX to GND.  Real PITA I agree, but something that I have to do all the time for high current circuits where everything is grounded, but some grounds are more equal than others.   An alternative workaround is a 0.1" wire link. And I trust you'll agree looking at the board now and the first attempt, it now looks far better.  But what are P1 and P2 and why are they SMT ?
Reply
Ryan St. John 5 years ago
I agree it looks much better than when I started and I have learned so much in a short time, so thank you all. I am currently working on making the GNDX plane and linking it to the GND plane. The P1 and P2 are just surface pads for me to jump to enable/disable features. I believe they should be closer together so I am going to be playing with the geometry of the pads. Also, I would like to use this board inside of my car to control some LEDs as well, I think I am going to add a 5.1V Zener Diode to the voltage divider inputs just to ensure that there won't be any over voltage to the microcontroller. As it stands the voltage divider can handle up to 16VDC, but with an alternator and other components like the ignition system, I want to be even more safe and make sure I don't run any risks. It looks like with the 5.1V Zener and my current voltage configuration, I will be getting a 5V output from a VCC of as high as 20V, and a 3.44V output from a VCC as low as 11V which is still enough to register as "HIGH" on the microcontroller. Does anyone see anything wrong with this? Thanks as always! ![image.png](//image.easyeda.com/pullimage/KPMiq5YaSxBX0WfOGBtr9RWqVVgtg774V5IrCUAD.png) ![image.png](//image.easyeda.com/pullimage/iPBRez93RW2dKW5Frc7hGqJ5FqgONHb8iOvXuoqN.png)
Reply
Ryan St. John 5 years ago
With Zeners: ![image.png](//image.easyeda.com/pullimage/2MBd4is3fuJb861yHmKuNjhszign70MZMZbmd2yH.png)
Reply
andyfierman 5 years ago
This probably won't affect you but how fast do the input signals change? The capacitance of the Zener will form a lowpass filter with the Thevenin equivalent source resistance of the attenuator (the resistance of the two attenuator resistors in parallel) so if the input signals vary at above the frequency determined by the cutoff frequency of the lowpass filter so formed they will be attenuated. For low frequency inputs, your use of zeners should be OK. * Where does the input supply for your circuit come from? If it comes from the car 12V supply then I recommend you read the comments on alternator load dump in the description for this project: [https://easyeda\.com/example/Automotive\_12V\_to\_USB\_5V\_2A\_output\_power\_adapter\_\-L1xrlfxrJ](https://easyeda.com/example/Automotive_12V_to_USB_5V_2A_output_power_adapter_-L1xrlfxrJ) One other question: I notice that that you have set up a simulation using the Falstad simulator. Are you aware that you can to run simulations in EasyEDA? For more about using EasyEDA for simulations, see the (2.1) and (3) in: [https://easyeda\.com/andyfierman/Welcome\_to\_EasyEDA\-31e1288f882e49e582699b8eb7fe9b1f](https://easyeda.com/andyfierman/Welcome_to_EasyEDA-31e1288f882e49e582699b8eb7fe9b1f)
Reply
MikeDB 5 years ago
Can we see the complete schematic please Ryan - I've got a bit lost as to what the Zeners do
Reply
Ryan St. John 5 years ago
@andyfierman - The input of the circuit will be the car's battery. The 12V inputs will be from both toggle switches, and the turn signal relay, so in this case the switching frequency should be very very low. I am going to read through the link you provided tonight to get a better understanding of what all needs to be done on top of the crystal isolated ground plane that I would like to put in as well. I am aware that there is a simulation tool built in, but I still am not familiar with it and so in the interest of saving time I just used the Falstad simulator. I plan to dig a lot deeper into the EasyEDA documentation for both the PCB design and circuit design. @MikeDB - Yes, sorry I made a new project once I started updating the schematic so I could always go back to the old one, here's the new project; [https://easyeda\.com/editor\#id=\|42941374c76544589bca4593b2927f98\|a659d85421a347ec8789edc22c769cbf\|8c7c46ee9db8406395c2203dd2ed1442\|4aa9b9bd4d9340e8a1b6947192b7343c](https://easyeda.com/editor#id=|42941374c76544589bca4593b2927f98|a659d85421a347ec8789edc22c769cbf|8c7c46ee9db8406395c2203dd2ed1442|4aa9b9bd4d9340e8a1b6947192b7343c)
Reply
MikeDB 5 years ago
Ah thanks.  I see what you are trying to do now.  Unfortunately some transient on a car wiring system may get through as Zeners are rather slow. You can get special diodes but cheaper is to use either a) Schottky diodes (BAT85 or similar) wired the other way around to the Zeners from the junction of the voltage divider to the OUT pin of the 7805 (and add a +5V label to this line whilst you are at it :-) .   This shorts any transient voltage into the +5V line so it can never go higher than 5V. b) Diodes (IN4148 or similar) wired the same way around as the Zeners but with the anode going to the processor pins rather than ground and then setting the internal pull-up resistor on the four processor ports.  This effectively turns the data from the car into open-collector lines as only the ground level is relevant. In critical systems both techniques are sometimes used but one or the other will do for your application.
Reply
MikeDB 5 years ago
Oh and I just noticed the power in and negative output connectors may interfere with the mounting screws in the top and bottom right corners so better to move the connectors slightly as you've loads of room. I would also add a few test pins.  Definitely one on GND and probably one on +5V so that you can check there is voltage on the board.  I use veropins but everybody has their different favourite pin.  They only cost 1p each so can pay for themselves 100s of times over when debugging.
Reply
andyfierman 5 years ago
@ryanstjohn3, If you do as Mike suggests and connect a Schottky diode, anode from the MCU input, cathode to the 5V supply at the mcu then you can replace the zener with another Schottky diode, cathode from the MCU input, anode to ground. That will give you the same over 5V and under 0V protection as a 5.1V sender but faster so giving the better protection in the case of fast transients that Mike describes. Because the 7805 output will effectively turn off if it is pulled above 5V, a proviso for this technique to work is that there must be adequate decoupling on the 5V rail to stop it being pulled up by the transient. You can work out how much capacitance is needed but it's quite complicated because it depends on the energy in the transient. In your case a few tens of uF should be OK because the source resistance at the MCU input is relatively high at about 6.8k (10k//22k).
Reply
Ryan St. John 5 years ago
I started a new schematic for all of the new changes and I added a 3A general purpose diode as well as a 2A fuse for reverse voltage protection. I am having trouble with two things still; the GNDX copper area for the crystal, and the IN4148 open collector change. I would like to use the IN4148 open collector change instead of the two schottky diodes just for the sake of placement. I am not understanding how to set it up, or how it works. To me it sounds like it is being used as a transistor to sink the microcontroller pin but I am not sure how all of that is happening from just a diode. Thank you!
Reply
MikeDB 5 years ago
Easiest if you let me just edit the schematic and I'll add in one diode for you to copy.  Also I'll do the crystal area if you want. Fuse and reverse polarity is an excellent idea - you're now treating this as a professional product.   Just a pity some 'professional' products (e.g. my gas boiler control board) are far worse than this PCB was at the beginning !
Reply
Ryan St. John 5 years ago
@MikeDB I added you to the project and granted you edit permissions. PCB V1.3 is the one that I am on as of now so please push the changes to that board. Thanks for taking the time to help me learn, I appreciate it.
Reply
andyfierman 5 years ago
If you look at the Uberclamp project: , [https://easyeda\.com/example/Uberclamp\_Schematic\_PCB\_and\_BoM\-r4YgysK2k](https://easyeda.com/example/Uberclamp_Schematic_PCB_and_BoM-r4YgysK2k) that shows a neat way to use a PMOSFET to do the same job as a diode for reverse input voltage protection but without the associated 0.7V drop of an ordinary diode. Probably not necessary as you're not short of voltage but it's a nice touch. :)
Reply
MikeDB 5 years ago
I've added the ground ring to the PCB and changed the diodes on one channel of the schematic but haven't laid it out on the PCB.  R2 is a 0 Ohm link but once you've created your final design, just short it out on the PCB.
Reply
Ryan St. John 5 years ago
@andyfierman I am actually using the fuse method just to have additional safety for the circuit overall; ![image.png](//image.easyeda.com/pullimage/sDJVrtxRPIyxLVE34BYDQOzsn2HnZvp6JIUazcbt.png) The only issue with this method is that there is still the possibility of damaging the rest of the inner circuit components but there is no voltage drop. Your method wouldn't be an issue for my setup because the battery voltage is usually over 12V from the alternator anyway. This video goes over all of these methods and a transistor method as well as I think you have mentioned above: [https://www.youtube.com/watch?v=7Tk5ghH_U2s](https://www.youtube.com/watch?v=7Tk5ghH_U2s)
Reply
MikeDB 5 years ago
@andyfierman I might be missing something but your active diode presumably depends on having a MOSFET without a reverse body diode, but the DMP4015SK3 datasheet mentions it has one so surely will pass current in both directions.
Reply
Ryan St. John 5 years ago
@MikeDB Do you mean put a trace to short the resistor or solder it? Adding that "0 ohm" resistor makes sense so that you can break up the copper area, thank you for the help. Also, I am still confused about the how the two diodes are regulating the switched input voltages, do you have anything I could read on this or an explanation? I tried playing around with a simulation but it didn't help me understand it any better. ![image.png](//image.easyeda.com/pullimage/tekgTYnHoe5ctZt2H1qwKm2KjKBvHZHtX9vKrtnR.png) The 35K resistor is the internal pullup resistor for the microcontroller, the two voltage supplies from left to right are 5V and 12V, respectively.
Reply
MikeDB 5 years ago
Hi Ryan - the 0R link is just so that the area around the crystal has a different node name and doesn't get merged into the ground plane.  Ground planes contain all sorts of crap and coupling that into a crystal osc is not a good move.  Hence the barrier.  It's not really essential for your circuit but best to get into good habits. The diodes are quite simple - if the voltage at the resistive divider gets above 5V the upper diode starts conducting into the 5V rail so it can't go too much higher, and if the voltage goes negative the lower diode starts conducting so it can't go too much lower.  Effectively it's like this but you have a voltage divider on the input.  Google for input diode protection circuit for more details. ![Image result for input diode protection circuit](https://i.stack.imgur.com/oKptw.png)
Reply
Ryan St. John 5 years ago
@MikeDB - That is extremely simple when you put it like that. It makes clear sense to me now that as the voltage from the divider goes above 5V or below 0V that the potential drives the forward bias diode to dissipate the excess energy. Also for the sake of clarity, do I short 0R with solder or a trace? At this point this is what I have; including the reverse voltage protection, crystal osc. ground area (thanks MikeDB), input over protection, and 80mil traces to carry 2A. The 2A because I found new LED strips that I would like to try and they draw 0.3A from the spec sheet. So 4x them is 1.2A, and if we assume the microcontroller draws a max of 0.3A at any time as well, then we get 1.5A, so the fuse is rated at 2A. ![image.png](//image.easyeda.com/pullimage/meUOs8T2WWGmMPNCRmLxAzJ2j3KwOu4WoqDscmXz.png) ![image.png](//image.easyeda.com/pullimage/UVXkeDbmyGQdfcSVd9GrpQFpytMXKDhaN7Jm7DDa.png)
Reply
andyfierman 5 years ago
@MikeDB, I love this little circuit. With a PMOSFET connected the normal way the body diode blocks current flow from a +ve voltage on the source to a load connected to ground on the drain. The PMOSFET reverse voltage protection works by reversing the source-drain connections. When the drain is connected to a +ve voltage and the source is connected through a load to ground, the body diode conducts. With the gate connected to ground the source is now a diode drop below the input supply and so is positive with respect to the gate. Therefore the PMOSFET is turned on and the drain-source resistance goes to a low value effectively shorting out the body diode. As long as the drain voltage stays +ve with respect to ground, the PMOSFET is either turned on, or at low drain voltages tending to off the but with the body diode still forward biased. If the drain voltage goes -ve with respect to ground, the PMOSFET turns fully off and the body diode blocks. The source voltage then sits at ground, blocking any reverse current flow to the load side. Note that the PMOSFET does not work as an active diode but as a switch, behaving like a forward biased diode for a forward voltage of up to somewhere around the Vgs threshold voltage, hard on for forward voltages a few volts above the Vgs threshold voltage and off for reverse voltages below ground. Connecting the gate to ground through a resistor with a zener across the source-gate pins protects against positive source-gate voltages of greater than Vz and negative voltages of the forward drop of the zener.
Reply
Ryan St. John 5 years ago
@andyfierman - That method seems to definitely be the best way to handle reverse voltage protection from what I have read. I think I am going to stick to my fuse and diode for this board just because you usually want to use a zener or other regulation device to clamp the gate voltage. For my next board I will definitely use this method with a fuse, so thank you for such a great explanation! At this point I think the board is basically done, I can't think of anything else that needs to be done, except for maybe a GND and 5V debugging surface pad. I added a header breakout for the serial of the microcontroller just to make debugging that much easier when things inevitably go wrong. I think my next step is to double check all of my trace connections and then order the board, unless anyone has any other suggestions or advice. I also moved some of the header breakouts away from the mounting holes so that I could print a 3D case for the board and expose only the header breakouts. Thank martin, mikeDB, and andyfierman for all of the help as well, this thread is full of useful tips and tricks I will continue to use! ![image.png](//image.easyeda.com/pullimage/A5yDI5uMqeMgFRBs8N4nxcxbSjQ8NRRy9VhOVUC5.png)
Reply
andyfierman 5 years ago
@ryanstjohn3, Thanks for your appreciation. :) One thing though: now take a step back and go through sections (4) and (6) of: [https://easyeda\.com/andyfierman/Welcome\_to\_EasyEDA\-31e1288f882e49e582699b8eb7fe9b1f](https://easyeda.com/andyfierman/Welcome_to_EasyEDA-31e1288f882e49e582699b8eb7fe9b1f) _before_ you hit the Submit button.
Reply
andyfierman 5 years ago
Before you start your next project, have a read through section 2 in the link above. :)
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice