EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: johnk on March 02, 2014, 07:06:00 pm
-
Hey Folks,
today I finished my first circuit diagram and PCB-layout in Eagle. It is a simple plant-watering machine :)
-The µC shall be ISP-programmable via SV1.
-A soil moisture-sensor will be connected to J1 (it gives a PWM, where its frequency correlates to the soil moisture).
-Two push-buttons will be connected to JP1 and JP2.
- A water pump will be connected to X1-1 and X1-2.
-The power will come from a wall power supply.
Could someone with more experience please take a look at it?
Does the PCB look acceptable? (I'm quite happy that I managed to do it without having airwires left :)) - I do know that the mounting-holes are missing, I will add them later.
Also: Are the four square-vias used correctly? Why haven't they got such a cross? (I use them for jumper-wires - to spread GND more evenly)
-
One thing I noticed is that you have your N-ch MOSFET on the high-side of your pump connection. Your microcontroller won't be able to turn this on correctly in that configuration. You'll want to put the FET on the low side of the pump. Also you might want a pull-down on the gate to be sure the default state is off.
Also you might want to re-organize you silkscreen labels for readability.
Cool first board! Goodluck :)
-
This is a great start, especially for a first board!
A few points:
1. What is the purpose of R1? That 10k will guarantee that no more than 0.6mA get through to your circuit, which is probably not what you want.
2. Why did you choose a 7806? Are you sure that micro runs on 6v?
-
Oh, my bad, that 10k is just to the rest pin, and you pulled a label off that net before the 10k and labelled it 5v.
-
@granz: Thank you, that's really a point if I think about it - but luckily easy to change. But the silkscreen doesn't matter to me, because I will not order it ;)
@cellularmitosis: R1 is not between the voltage-regulator and Vcc, but between Vcc and Reset. And you're right, of course I will use the 7805, thanks for the hint!
-
Not sure, but it seems that clearance between tracks, pads and polygon pour is too small. Professional PCB manufactures recommend that a minimum clearance should be no less than 6 mils. If you're doing it home by toner transfer method or using a presensitized positive photoresist printed circuit board, then the clearance should be no less than 8 mils or even higher, 12 mils. This is important cuz too close tracks to polygons might cause short spots. :)
-
why do you have such a large diode you could save space if you used a smaller one
-
None of my tracks or spacings are smaller than 16mil on this board, I think.
I used the big diode, because the pump can take up to 2A, so (to be on the save side) I use 3A diode. (I read that the same current that flows through the motor will flow through the diode when the transistor closes)
-
2A is not going to be passing through the diode its just for flyback protection.
-
None of my tracks or spacings are smaller than 16mil on this board, I think.
Then it's ok . :-+
-
@granz: Thank you, that's really a point if I think about it - but luckily easy to change. But the silkscreen doesn't matter to me, because I will not order it ;)
What country? In the US OSHPark will give you 2 layers + top silkscreen for a great price and you don't need to deal with gerber files.
Also, a few suggestions
* Why the capacitor on the reset signal?
* You may want to put lower pullup resistors on the two switches (the internal pullups are 'weak').
* Have some revision indication on the board (in case you will have to spin a new revision).
* It's hard to follow how well the ground is connected. Highlight the ground net in eagle layout and verify that it is reasonable (post here layout screenshorts with ground and +5v highlighted if you want more feedback).
* You can use a resonator with built in caps, e.g. http://www.digikey.com/product-detail/en/CSTLS16M0X55Z-A0/490-6001-1-ND/3845201 (http://www.digikey.com/product-detail/en/CSTLS16M0X55Z-A0/490-6001-1-ND/3845201)
* Do you plan to mount it somehow? Add mounting holes?
* If you are not using silkscreen, have some indication of pin 1 of the headers, for example, buy having that pad square.
* C3 looks small. What capacitor voltage are you using?
* Add additional larger capacitor on the +5V? (I see only a single 0.1u).
* If you light only one led at a time you can use a shared resistor.
Congratulations for your first PCB!
-
None of my tracks or spacings are smaller than 16mil on this board, I think.
I used the big diode, because the pump can take up to 2A, so (to be on the save side) I use 3A diode. (I read that the same current that flows through the motor will flow through the diode when the transistor closes)
If the pump has large current spike on start, consider to add a small diode between the 12V and c3/c4. This will isolate your logic.
-
A question to the experts, does Q1 require a series gate resistor to protect the MCU from the capacitive load?
-
AND just like the very first PCB I ever did, no SCREW holes, how are you going to mount it.
-
AND just like the very first PCB I ever did, no SCREW holes, how are you going to mount it.
I do know that the mounting-holes are missing, I will add them later.
-
Ok than. I will keep it in mind for future projects, where the space really matters. Thanks!
Congrats too you 300th post btw. :D
@zapta: Wow, thanks for you efforts! I live in Germany and I found the silkscreen to be quite expensive (15€ or so).
* I just used the set-up from a tutorial - I guess it should stabilise the signal to avoid an accidental reset.
* Does that really matter? As long as it gets pulled up it should work?! (I was planning to use the internal pullups)
* Good hint.
* I haven't thought about that feature and checked it the hard way ;) , but I'll try it out now.
* -
* I haven't yet chosen the case.
* Good idea! But how do I do it? I cant plant a via on an existing pad...
* You've got a sharp eye ;)! Actually I was looking at a 10µF capacitor when I took the measurement.
* Yeah that's right. I thought the big one on the input-side would may do it.
* I also haven't thought about that, but I will eventually use them at the same time to indicate an accepted button-push or something like that.
-
* Good idea! But how do I do it? I cant plant a via on an existing pad...
Create an empty library of your own, copy the component from the stock library to your library, modify that pad and use the 'change' tool to change the part to come from your own library.
Alternatively, run this eagle ULP orogram while your schema is open, select the last option, select the checkbox and run. It will create a library with all the parts used in your schema. You can then modify the parts in the library and use them using the 'change' tool.
https://github.com/zapta/linbus/blob/master/tools/eagle/exp-lbrs-filter.ulp (https://github.com/zapta/linbus/blob/master/tools/eagle/exp-lbrs-filter.ulp)
As for PCB fab, OShpark ships free internationally. It costs 5$ per three boards 1 square inch each, double layer, double solder mask and silkscreen on the top layer.
http://support.oshpark.com/support/solutions/articles/123330-shipping-information-and-turnaround (http://support.oshpark.com/support/solutions/articles/123330-shipping-information-and-turnaround)
Even if you don't use it, upload your file there and it will show you how your board looks, I found more than one 'aesthetic' error this way.
Also, Dave have this directory in case it helps.
http://www.eevblog.com/wiki/index.php?title=PCB_Manufacturers (http://www.eevblog.com/wiki/index.php?title=PCB_Manufacturers)
-
Thanks again!
I'll definitely take a closer look at OShpark.
[EDIT:] Just for fun I've uploaded my layout to OSHpark (seems to be an amazing website/project btw.) and the copper-layer looks weird. Should I take this as a real problem?
-
This is how one of my boards with ground plane looks on OSHPark
(http://i.imgur.com/8diERk3.png)
Also, the text looks mirrored, is it intentional? (or is it a view from the bottom?)
-
if you move r1 closer to the connector you can get rid of the square jumper via's to connect your ground.
rotate r1 horizontal , move close to the icd connector
-
Only about the OSH park doubt, in all my bigger boards yes, the cooper render always looks like that, its a limitation or simplification of the code that generates the render and displays as that, but the output is perfect and solid ground.
-
Thanks senso. One problem less to be worried about.
I've now slept a night over it, dreaming about OSHpark and decided to tweak the design (2-copperlayers + 1 siliconlayer) for OSHpark. The prices are too good to not try them :D
[EDIT:] All right now I've spend a few hours to tweak the board (I also managed to make it a little smaller=cheaper :-+)
I think it should be ready to go to OSHpark now.
There's only one little problem left: The values of the components are not on the silkscreen, but that's not really important anyway.
-
Speaking of which, OSHpark doesn't mention anything about the soldermask they are using. What type, what color, can you choose a different color. :-//
-
What type, what color, can you choose a different color. :-//
OSHpark always use their special purple soldermask.
-
Only purple? Hm, not my favorite color for PCB's. Let's say green should be the default color. Thanks Frost. :)
-
Speaking of which, OSHpark doesn't mention anything about the soldermask they are using. What type, what color, can you choose a different color. :-//
Any color that you want as long as it's dark purple ;-)
Everything about OSHPark is deep purple, the website, the boards, the envelopes they ship the products, and probably the music they play at the office. Very effective branding IMO. Should be renamed to OSHPurple.
Dave and Chris interviewed the proprietor on the Amp Hour, you can hear it here http://www.theamphour.com/the-amp-hour-149-purple-pcb-philosophy/ (http://www.theamphour.com/the-amp-hour-149-purple-pcb-philosophy/)
A small OSHPark trick, if you place text on the solder layer you get beautiful golden letters on dark background, like the bottom of this one:
(http://uploads.oshpark.com/uploads/project/bottom_image/skoN2gf1/i.png)
-
Thanks zapta for those purple infos. :D
-
Someone already mentioned it, but the diode really doesn't have to be that big. Because it is used only as protection when switching, it will not have current through it most of the time. Your 3 amp diode is rated for 3A continuous current. What you want is a diode that can handle a quick surge current of 2 or 3 amps. Check some data sheets, but you should be able to use a diode that is rated for much less than 1 amp of continuous current.
Out of curiosity, I checked the data sheet for a 1N4148. http://www.fairchildsemi.com/ds/1N/1N4148.pdf (http://www.fairchildsemi.com/ds/1N/1N4148.pdf) It is rated for a continuous current of 200 mA, but can handle a surge of 1 amp for one second, or 4 amps for one microsecond. You probably want something a little bit bigger than that, but you can do the calculations or estimate to figure out how long your surge current lasts.