SparkFun Forums 

Where electronics enthusiasts find answers.

Questions relating to designing PCBs
By thatdude624
#138951
hello! I'm quite new here, but not all to new to electronics.

why I am making a PCB (sorry it's so long, I got carried away. optional read):
I've played around with arduinos, breadboards and veroboard, and I have made some fun circuits, but not all to much.
recently I made a breadboard "knight rider" where the LEDs create a left-right swaying pattern, with 5 LEDs, a 555 and 4017. my dad actually got quite interested in this, and wanted it in his car. one problem: I only have one extra large breadboard that I happened to make the circuit on, and even if I rebuild it on another it is all to easy for those connections to come loose.

I wanted to do it on veroboard, but I didn't for these 2 reasons:
1. I'm...not to good at planning veroboard circuits, and this looks pretty complex.
2. for some reason, on every veroboard project I do there is at least 1 soldering-related thing that goes wrong, leaving me debugging for quite a while. I have heard that PCBs are much easier to solder, and I have soldered headers to those shields without problem. for example, while I had about 3 hard-to-notice bridges on my 2nd veroboard project, a blinking light, I had none on that joystick shield kit witch I soldered months before.

lastly, I wanted to try PCBs. I don't know why, but I always wanted a custom printed board since I started my hobby. they just seems so professional and fancy. and compact!
the actual questions:
the 4017 in eagle seems to not have VCC or GND pins. the 555 does. if I make those VCC and GND components, are they automatically linked to the 4017 GND and VCC? because I think I'm doing something wrong there. those 2 pins are not connected in the PCB view. do I need a specific set of VCC and GND things?

is "tplace" also top silkscreen? I just want to write something on the board. I can't find "tsilk" or something in that list.

is 0.125984 the normal size of a screw for making holes? it's the highest eagle can go, yet it still seems quite small. well it's probably not the highest, but it's the highest in the drop-down menu.

lastly, did I make any "obvious" mistakes here? you can also see the disconnected pins n the 4017.
Image
Image
a few more notes:
the power switch is external from the board and connects to the battery.
I know the resistors and cap do not have a value, I'm still going to play around with the speed I want.
the external LEDs are on a veroboard circut I made. the pins go to a little plug and wire, and at the end are 5 resistors and 5 LEDs, sharing ground.
By stratosfear
#138959
To get the power pins for IC2, use the Invoke command. That's one of my few gripes about Eagle.

Silkscreen shouldn't overlap pads or be covered by screw heads. Group select the board and click Smash. Right click in the work area and select Group:Smash. Now you can move silkscreen items around, or even delete them. You can now edit the sizes and ratios, either individually or by using Group.

.120" is fine for a #4 screw and those will easily be sufficient for your board. I normally use a .086" hole for a #2 screw.

Any extra silkscreen stuff I add, like name, date, and revision, go on the tNames layer.

If you want "ground planes" place polygons on the top and bottom, then name them GND. Ratsnest will show the results.

I'm guessing you used auto-route. Next time, click Edit in the menu bar, then select Net classes... This will let you set parameters for different types of nets. After you do that, auto-route will automatically use the trace widths, clearances, and via drills you set.

I agree with Leon's suggestions. By "join at right angles", he means situations like the trace from IC1.7 joining the trace from R1. The sharp inner angle creates what's called an acid trap. These areas can be easily over-etched and break the junction.

Jon
By langwadt
#138965
[quote="stratosfear"]To get the power pins for IC2, use the Invoke command. That's one of my few gripes about Eagle.

snip

that is not specific to eagle it is just how the schematic symbol was made you can just change it
By thatdude624
#138987
thanks for all the help, I really appreciate it!
stratosfear wrote:To get the power pins for IC2, use the Invoke command. That's one of my few gripes about Eagle.

Silkscreen shouldn't overlap pads or be covered by screw heads. Group select the board and click Smash. Right click in the work area and select Group:Smash. Now you can move silkscreen items around, or even delete them. You can now edit the sizes and ratios, either individually or by using Group.

.120" is fine for a #4 screw and those will easily be sufficient for your board. I normally use a .086" hole for a #2 screw.

Any extra silkscreen stuff I add, like name, date, and revision, go on the tNames layer.

If you want "ground planes" place polygons on the top and bottom, then name them GND. Ratsnest will show the results.

I'm guessing you used auto-route. Next time, click Edit in the menu bar, then select Net classes... This will let you set parameters for different types of nets. After you do that, auto-route will automatically use the trace widths, clearances, and via drills you set.

I agree with Leon's suggestions. By "join at right angles", he means situations like the trace from IC1.7 joining the trace from R1. The sharp inner angle creates what's called an acid trap. These areas can be easily over-etched and break the junction.

Jon
thanks for all the info! a few replies and things:
I did indeed use auto-route. I heard it was bad, though. I don't really see why. I am currently just using auto-route as I am making a lot of changes to the design, I just ripup all and auto-route to see if the wires can still fit. I will probably wire it manually eventually, trying to stay away from the joints. and make the joints 90 degrees.
I don't really "need" ground planes, right? I'm trying to keep this at least a little simple, and I'm not sure, but doesn't a ground plane make it harder to route manually?
tNames, OK!
net classes, I'm not sure if I need that. it's fine if the design rules give no errors, right? sounds handy anyhow.
leon_heller wrote:Supply and ground tracks should be wide. Route them first.
You need decoupling capacitors for the chips.
OK, I will. although I don't think 9 volts and 5 low power LEDs, only 1 of witch is on at any time is enough to sizzle the tracks. no offence, I still see your point, and I'll still do it, seems like good practise.

as for the decoupling caps, I've never needed to use them before. I mean, the circuit works fine on the breadboard. apparently you should also ground unused IC pins, but I'm not sure if that only applies to the logic gates. so do I only need to decouple "con" on the 555, or also the 4017's unused pins? no wait, I think this only applies to inputs. OK, sorry, I know nothing of decoupling!



EDIT:
I've edited the design and added that decoupling cap,and fixed the chip. I also re-routed the whole thing manually, and I'm quite proud of it.
Image
Image
User avatar
By leon_heller
#138996
Supply and ground tracks should be a lot wider, and should be routed first, with care taken over decoupling. Decoupling capacitors should be close to the supply and ground pins of each chip.
By Philba
#139005
Not bad for a first attempt at hand routing.

Some thoughts.
- try using a poly for a ground plane. Not really needed for this board but it's good practice. Draw a polygon on the bottom around the edges of the board then rename it to gnd. all your grounds will connect it automatically.
- to figure out how big your power traces need to be, figure out worst case consumption and use a trace width calculator like this one http://circuitcalculator.com/wordpress/ ... alculator/ (12 mil trace can handle half an amp so you are probably ok)
- play with component placement to minimize complexity. R1, R2 and C1 could be moved around to get a more compact layout and shorter traces, for example.
- I run my traces at 45 degrees so they never make 90 turns. this looks nicer (imo) and allows you to squeeze more traces into a smaller area.
#139011
Schematic:
- Add a 100nF byoass cap from Vcc to Ground at each chip
- IC1p4 should be tied to IC1p8
- You may want to change R2 to a trimpot to allow changing the scan rate
- Try to avoid drawing 4-way junctions (the one between IC1p1 and IC2p13); two 3-way junctions are better. This makes it easier to spot accidental
shorts
- You may want to rewire the power connector to have the positive on pin 2 and the negative on 1 and 3. This way, it will be correct if plugged in either way
- I'd add a current-limiting resistor between sv1p1 and gnd

PCB
- Bypass caps should be placed right next to the Vcc pin of each chip
- Traces should bend at 45 degree angles rather than 90 degrees.
- Make sure you have enough clearance between the screw head, mounting hardware and traces
- Move C2 next to IC1p5
- Vias are usually round; they take up less space that way
- Power and ground need to be routed more directly.

/mike
By thatdude624
#139040
n1ist wrote:Schematic:
- Add a 100nF byoass cap from Vcc to Ground at each chip
- IC1p4 should be tied to IC1p8
- You may want to change R2 to a trimpot to allow changing the scan rate
- Try to avoid drawing 4-way junctions (the one between IC1p1 and IC2p13); two 3-way junctions are better. This makes it easier to spot accidental
shorts
- You may want to rewire the power connector to have the positive on pin 2 and the negative on 1 and 3. This way, it will be correct if plugged in either way
- I'd add a current-limiting resistor between sv1p1 and gnd

PCB
- Bypass caps should be placed right next to the Vcc pin of each chip
- Traces should bend at 45 degree angles rather than 90 degrees.
- Make sure you have enough clearance between the screw head, mounting hardware and traces
- Move C2 next to IC1p5
- Vias are usually round; they take up less space that way
- Power and ground need to be routed more directly.

/mike
do I really need these bypass caps? I'm not to sure what they do. the circuit runs fine on a breadboard, and I've seen many breadboard circuit examples like http://www.kpsec.freeuk.com/projects/heart.htm this hart shaped badge project. it uses the same chips as I do. it only seems to use a 0.1uf cap near the 555. does this make it consume less power or something?
whoops! I don't know how that got disconnected. I mean, it was connected in the previous image...
I only need a solid value, although I think it's a good tip.
um..OK, Ill re-wire that.
I don't really need that. the LED board I have has resistors on every positive pin, as it was intended for re-use in some other projects. is it still required?

PCB:
still don't really see the need, as said in my other comment. sorry for my lack of knowledge and if that was stupid to say.
45 degrees? I thought I was just told to make it 90 degrees! :oops:
yea, the design rule check complained a bit about that too. I tried to move them away while keeping the board compact.
It didn't fit there, so I moved it there. now that I think of it, something of such a low value shuld probably be near to the component. I'll try put it there.
how do I change a via?
"routed more directly"... ?


sorry if I seem a little rude, but this seems like most of these things are quite minor. I just need the board to work. again, I am sorry if I offend anyone.
By thatdude624
#139043
leon_heller wrote:You might as well design it properly. Why ask for advice if you don't take any notice of what you are told?
I am trying to take the advice, in fact I am modifying the board according to most of it. I just want to know why. I will upload more recent images soon.
I'm trying to do my best to communicate, I have a social disability. I really do appreciate all help.
By thatdude624
#139047
OK, this is hopefully close to the final design. I just want to say that I know there are no caps for each IC, I couldn't add them without making the board bigger, and I wanted it to be small. I will try to implement it in my next projects, however! I just hope I can solder PCBs well...
Image
Image
I implemented many of your suggestions, though I might have missed some. things like routing with 45 degree angles I will try and implement in future projects
another small note: I am planning to get this board printed soon. not really important, but I thought I might need to mention it.
I really do appreciate the help, this wouldn't have worked without you guys! I'm just hoping nothing important was missed. I'll see if I can get those caps to fit so long...is to the left of the IC fine?
By evanrich
#139161
Philba wrote:Not bad for a first attempt at hand routing.
(12 mil trace can handle half an amp so you are probably ok)
12 mil can handle more than that. depending on temperature rise allowance, it can handle ~1A. I've got 16mil traces, can handle 1.2A

Also, you should google what a decoupling capacitor is for, so you know why you need them. In short, it helps smooth out the power coming into your IC. While it may run fine on a breadboard, and for your application it may not really matter, when you start getting into more sensitive circuits using micros, having a clean power supply is really important. The cap helps smooth the incoming power out.
By Philba
#139175
evanrich wrote:
Philba wrote:Not bad for a first attempt at hand routing.
(12 mil trace can handle half an amp so you are probably ok)
12 mil can handle more than that. depending on temperature rise allowance, it can handle ~1A. I've got 16mil traces, can handle 1.2A

Also, you should google what a decoupling capacitor is for, so you know why you need them. In short, it helps smooth out the power coming into your IC. While it may run fine on a breadboard, and for your application it may not really matter, when you start getting into more sensitive circuits using micros, having a clean power supply is really important. The cap helps smooth the incoming power out.
Yes, you are right. I was looking at the internal trace limit when when I responded. But, the key point is he's in no danger of smoking his traces.

As to decoupling, it's a good idea but he only has one digital IC run at a pretty low speed. I'd put one more in but I bet he never sees a glitch without it.