Author Topic: Circuit and board review?  (Read 2163 times)

0 Members and 1 Guest are viewing this topic.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Circuit and board review?
« on: December 21, 2012, 12:49:04 PM »
Hey everyone, I am wondering if anyone would be so helpful as to review my circuit and board for a bot that I am making.

Long story short, I have made a few bots, but all boards have been based on others designs that I just copied.

I wanted to learn to make my own for more complicated projects, this was my first time using eagle where I made my own circuit and then the board from the circuit, where in the past I would just make the board based on someone else's board, like the $50 bot.

Specs:

Line following bot
Pins a0-a4 will be for a IR sensor board which I already made and tested
bot will be driven by 2 modified servo's
All LED's will be attached to bot frame, so they need to be extended, and will have 330ohm resistors on each.

The board itself is not meant to do anything else but serve as the board for this bot, I don't plan to take it out and use it for other bots, which is the reason I only am using the pins I absolutely need, and hence the configuration.

Other thing I should mention is I plan on running both arduino code on this, as well as webbot lib.


I think the rest is self explanatory from the circuit

If anyone would be so kind to review this and give me any feedback, I would greatly appreciate it.
« Last Edit: December 21, 2012, 12:52:29 PM by ErikY »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #1 on: December 21, 2012, 08:15:16 PM »
Hi,

Not bad at all, if it's your first go :)

PCB
I have attached the PCB with some markings.

Red dots where you have acid traps (inward corners <90° have a tendency to pocket some etchant that will react to moisture and degrade the PCB over time.

Yellow dot where you have a flaw because you used the wrong component for IC1 - use the upright one instead.

Connect the outer black pour to ground (in the schematic, rename your ground line to GND and when you have drawn the outline of the pour, rename that to GND too (and when it asks, select GND for the "total" name as well, for good measure).

Purple... Remove any non-grounded pour, it will act as noise antennas.
If you go down to a proper clearance, like 20 mil, there's a good chance that most will be grounded and anything above 32 mil of clearance should be for kindergarten kids anyway  :P

I'd enlargen the pads a bit, plenty of room and it makes it easier to make a good strong solder connection (the coppe foil of a narrow "ring" will lift very easy, if a component can be moved the tiniest bit down)

If you are going to drill the board yourself, run the User Language Program (ULP, they're scripts really) called "Drill-aid" and when it asks for the drill size, set it to 0.5mm and you will get a fine "dot" that helps centering the drill. Don't set it smller, or some won't etch and too big, you loose the drill centering somewhat.

C2 could be a 1206 or 0805 ceramic SMD mounted directly at the pins of the µcontroller on the solder side - then you could avoid the µwave resonant circuit that you have as is and get rid of a lurking potential problem, while getting the effect where it matters the most.


Schematic
If you're using a plain old 7805, C3 is around 1000 times to large (make it 220n to 330n) and C1 is 10 times too large.
These two caps should be mounted closer to the regulator, as close as possible, although C1 shouldn't be too near the heat from IC1 either, so around 5mm or so away.
If you just used the drawing of the 7805 for a switcher, study the datasheet in this regard.

You have a junction where none is needed (nor wanted) right above C2.

When your circuit isn't larger than a single sheet, don't break it up with strange placements like on the left side of your schematic - if it's one circuit, show that it is, it will make it much easier for you to read 6 months from now. The power part can be a separate entity though.

Move the line running through the pin numbers of J1 a couple of notches left.

Don't take the power for the motors from the PCB, take it directly from the battery, to avoid influencing the logics.

I'm not sure I follow the idea with separate connectors for each white and blue LED. Making a single connector and wire both (white or blue) LEDs to that will save you a connector pair - and the less you mount, the less can go wrong.


In general (PCB overlay and schematic alike), "smash all" (ULP) the components and rearrange names and values to same orientation to make it easier to read.


The above may sound as harsh critique, but if this is really your first Eagle attempt, it's very good!
Never the less, there's always room for improvement and heeding the above advice will take you a good few steps further.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #2 on: December 21, 2012, 08:53:45 PM »
Hi,

Not bad at all, if it's your first go :)

PCB
I have attached the PCB with some markings.

Red dots where you have acid traps (inward corners <90° have a tendency to pocket some etchant that will react to moisture and degrade the PCB over time.

Yellow dot where you have a flaw because you used the wrong component for IC1 - use the upright one instead.

Connect the outer black pour to ground (in the schematic, rename your ground line to GND and when you have drawn the outline of the pour, rename that to GND too (and when it asks, select GND for the "total" name as well, for good measure).

Purple... Remove any non-grounded pour, it will act as noise antennas.
If you go down to a proper clearance, like 20 mil, there's a good chance that most will be grounded and anything above 32 mil of clearance should be for kindergarten kids anyway  :P

I'd enlargen the pads a bit, plenty of room and it makes it easier to make a good strong solder connection (the coppe foil of a narrow "ring" will lift very easy, if a component can be moved the tiniest bit down)

If you are going to drill the board yourself, run the User Language Program (ULP, they're scripts really) called "Drill-aid" and when it asks for the drill size, set it to 0.5mm and you will get a fine "dot" that helps centering the drill. Don't set it smller, or some won't etch and too big, you loose the drill centering somewhat.

C2 could be a 1206 or 0805 ceramic SMD mounted directly at the pins of the µcontroller on the solder side - then you could avoid the µwave resonant circuit that you have as is and get rid of a lurking potential problem, while getting the effect where it matters the most.


Schematic
If you're using a plain old 7805, C3 is around 1000 times to large (make it 220n to 330n) and C1 is 10 times too large.
These two caps should be mounted closer to the regulator, as close as possible, although C1 shouldn't be too near the heat from IC1 either, so around 5mm or so away.
If you just used the drawing of the 7805 for a switcher, study the datasheet in this regard.

You have a junction where none is needed (nor wanted) right above C2.

When your circuit isn't larger than a single sheet, don't break it up with strange placements like on the left side of your schematic - if it's one circuit, show that it is, it will make it much easier for you to read 6 months from now. The power part can be a separate entity though.

Move the line running through the pin numbers of J1 a couple of notches left.

Don't take the power for the motors from the PCB, take it directly from the battery, to avoid influencing the logics.

I'm not sure I follow the idea with separate connectors for each white and blue LED. Making a single connector and wire both (white or blue) LEDs to that will save you a connector pair - and the less you mount, the less can go wrong.


In general (PCB overlay and schematic alike), "smash all" (ULP) the components and rearrange names and values to same orientation to make it easier to read.


The above may sound as harsh critique, but if this is really your first Eagle attempt, it's very good!
Never the less, there's always room for improvement and heeding the above advice will take you a good few steps further.

Soeren, thanks very much!

This is extremely helpful, and does not sound harsh at all, this is exactly what I was looking for.

I used Eagle once before for the $50 robot, but I did not do the schematic, only the board, and I was never able to figure out the ground plane before, this was the first time I used the schematic and built the board using F/B Annotation.

I am going to see if I can fix everything up based on your suggestions, again, thanks a lot!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #3 on: December 21, 2012, 09:16:43 PM »
Hi,

If it acts up, just post the Eagle files (.sch and .brd) and I'll give them a bash.
It's bedtime here (actually less than 4 hours until the alarm clock starts) and tomorrow is family-time until late evening, but I should be able to look at it in less than 24 hours.

P.S. Please only quote the specifics that you comment on. The purpose of quoting is to make it easier to see what is answered/commented and eg. in this case, there was no real reason to quote anything at all, as it was right above in verbatim, in case I forgot what I wrote :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #4 on: December 22, 2012, 07:17:34 AM »
Soeren, gotcha on the quote, good point, I will be more careful.

I do have two questions that I cannot quite figure out based on your suggestions.

How do you remove the non grounder pour, the purple area?

I cannot figure that out.

Also, how do I enlarge the pads, I cannot figure that out either.

Thanks!

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #5 on: December 22, 2012, 11:51:18 AM »
OK, so I worked on the schematic file, I want to make sure I get this right before I re-do the board, as that takes me forever to get right.

How does this look? I tried including the actual sch file, but it was above the max size.

I am going to leave in both forward LED's, so that I can make one light when left servo is running, and the other LED for the Right servo.

I modified power to only use 1, modified everything else you suggested, that I can figure out.

I am still not understanding a few things:

I don't quite get what the smash does, or how to use it, I hit the smash tool and then clicked on components, but they did not seem to do anything.

I also am not sure if I got my 5V going correctly to my 328P, I removed the junctions above the cap, but not sure I did this correctly.

I also don't quite know what you mean about not pulling from the PCB, do you mean I should run a battery off my board, directly to those pins, both positive and negative?

Thanks again!
« Last Edit: December 22, 2012, 12:47:17 PM by ErikY »

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: Circuit and board review?
« Reply #6 on: December 22, 2012, 08:37:45 PM »
Quote
I don't quite get what the smash does, or how to use it


It separates the name and component value from the component outline, so that you can move/rotate the name/value texts to be more readable. Good placement of readable text is one sign of a carefully crafted PCB.
(Another is placing all polarized components facing the same direction, to ease assembly and debugging.)

Quote
I also don't quite know what you mean about not pulling from the PCB


I think he means physically de-laminating. The copper doesn't stick to the fiberglass through magic; apply too much heat to too little area and it will come loose. This sometimes means you need to apply super ugly kludges to complete the circuit, and other times means you have to start over with a new PCB.

To avoid this, make each pad and hole that you will mount a component in somewhat bigger. In Eagle, the size of the copper on the pads often comes from the library that defines the part, which may mean you have to copy the part into your own library, open up the outline, and enlarge the pads to get what you want. Or re-draw the component in your own library. I sometimes end up doing this for various reasons; pad copper size is one such reason.

When you go to make your PCB, I would *highly* recommend using a board fabricator of some sort. Here are two recommendations assuming you live in the US:

http://imall.iteadstudio.com/open-pcb/pcb-prototyping.html based in China makes 10 boards of size 50x50mm in less than a week for $10, plus shipping. Shipping takes three weeks for air mail, but three days for DHL ($28) so the total cost for 10 copies of your board is $38. Larger boards are also available -- 100x100mm for $25, for example. (The free version of Eagle can only make boards of max size 100x80mm.) The minimum clearance is 8 mil and I'd suggest 10 mil to be safe. Also, there is a limited set of drills, and you can't have interior slots on the board. They also have 4-layer board options if you need it.

Another option is http://www.oshpark.com/ which is based in the US. The boards are a LOT nicer -- purple solder mask, gold plating (ENIG,) and 6 mil clearance allowed, as well as a fair amount of drill and route options. $5 per square inch for three copies of your board. Takes about two weeks start to end. Again, there's a 4-layer option as well, but it usually takes longer.

If you live in the EU, I have heard that Olimex has given reasonable turn-around times on boards, but I've also heard some bad stories -- probably similar in quality to the Chinese options...

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #7 on: December 23, 2012, 06:41:41 AM »
jwatte, thanks for your suggestions.

I will play around more with the smash, I see the value of it, that makes sense.

Regarding the power pulling, I am thinking maybe Soeren means to solder 22-28 gauge wires from the battery to the servo pins, rather than having the wires on the actual PCB itself, but I am not exactly sure.

I am going to look into having the boards fabricated, that is not as expensive as I would have thought.

I do kind of like the idea of doing it myself, but I can definitely see the advantages.

Thanks for your suggestions.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: Circuit and board review?
« Reply #8 on: December 23, 2012, 10:46:41 AM »
Quote
Regarding the power pulling

Unfortunately, I don't see Soren using "pull" anywhere in his comments. When you said "pull" first I thought you meant the part where he recommends against thin rings because the copper foil may pull off.

Perhaps you mean this part?

Quote
Don't take the power for the motors from the PCB,

If so, yes, you don't want power to the motors to go through this PCB at all. You want short, thick, wires from battery to motor controller to motor. Everything needs to be tied to the same GND in the end, but that GND point should typically be the negative terminal of the battery.

Also: PCB traces when plating 1 oz of copper (typical) for high-amperage circuits need to be ludicrously wide -- 100 mil (2.5 mm) for an outside trace for 10 A, to avoid overheating the trace. And this is allowing the temperature to rise to 85 degrees, which is top of the commercial component temperature range!


Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #9 on: December 23, 2012, 11:23:39 AM »
Yeah, I used the word pull, probably a poor choice of words, sorry for the confusion.

This makes a lot of sense, I will wire directly to the battery for my servos, thanks!

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #10 on: December 23, 2012, 11:59:58 AM »
Another question I just thought of if anyone could help me out, if I do draw directly from the battery, should I use a capacitor as well?

I know that Admin used a 220uF capacitor for his servos in the $50 robot for this purpose.

Thanks.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #11 on: December 23, 2012, 03:30:15 PM »
Hi,

Just starting from the bottom and it may take a while before I get to through, as my head feels like exploding (flu or whatever annoying nastyness it is that I have caught in the big room).

Another question I just thought of if anyone could help me out, if I do draw directly from the battery, should I use a capacitor as well?
Yes, a cap will act as a buffer and dampen noise - place it as close to the servo as possible though, as noise of any kind is best dealt with as close to the source, or the wires will carry the noise and radiate some of it into nearby parallel wires.

To avoid a clumsy wiring, either terminate one set of wires from the battery as close to the servo connectors (to keep the 3 terminal servo connector intact), or make separate wide(-ish) traces from the power connector to the servo connectors and tin them for better current handling, if you dislike a second set of wires to the battery - remember a suitable fuse in any wires from the battery, preferably as close to the battery positive terminal as possible (inline fuse holders are the bast way to make it safe and isolated.
For a single pair of servos I don't think you'll have all that much issues with motor noise on the supply line though, so the traces for servo power may be OK.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #12 on: December 23, 2012, 06:25:08 PM »
Soren,

Thanks, that is helpful.

I hope you feel better.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #13 on: December 23, 2012, 07:08:50 PM »
Hi,

How do you remove the non grounder pour, the purple area?

The best solution is to make them all connect to the ground plane (which is then connected to ground of course).
If you have an area that you just can't ground for some reason (on rera occasions, I use jumpers to connect a floating plane), you can remove it by drawing the shape you want to remove on layer 42 (bRestrict, where the initial "b" means bottom layer). This will restrict a pour, but not any traces going through the area.


Also, how do I enlarge the pads, I cannot figure that out either.
First make a safety copy of the librariy you want to edit (just in case...).
Then:
Library -> Open   select the library in question.
Click Edit package (the symbol resembling an IC).
Select the package you want to edit
Then Change -> Drill, select the size you want and click the centers of the pads. You can use Change -> Shape as well if you want another shape for any pads.

When done, use File -> Save
Back in the PCB editor, make sure to...
Library -> Use and then the library you changed.

You can try if the Restring command (a tab on the DRC/Design Rule Check "pop up") will give you what you need, but personally, I prefer to change the libraries, even if I run two sets of libraries, one for PCB fabbing and one for home produced PCBs.



How does this look? I tried including the actual sch file, but it was above the max size.
Is the limit that low?? Plenty of people have posted both .sch and .pcb files in the past.

Perhaps zip both files into one zip archive and if that don't work, I can PM you an email addy where you can send them.


I am going to leave in both forward LED's, so that I can make one light when left servo is running, and the other LED for the Right servo.
I wasn't trying to get you to limit the amount of LEDs, just the amount of connectors, as the electric signls was the same at each pair.


I modified power to only use 1, modified everything else you suggested, that I can figure out.
OK


I don't quite get what the smash does, or how to use it, I hit the smash tool and then clicked on components, but they did not seem to do anything.
The Smash button only smashes the components you click on after selecting it. You can see the effect as little crosses appears at the component Name and Value, which can then be moved and/or rotated to any place without changing the position/orientation of the resistor.
If you use the "Smash All" ULP instead of the button. I don't know which version of Eagle you use, but you probably need to download the Smash All ULP from their site, as there's only the "smash-all-sch" as standard in most (all?) versions and it's good for the schematics part only.


I also am not sure if I got my 5V going correctly to my 328P, I removed the junctions above the cap, but not sure I did this correctly.
Looks allright to me, but I can't guarantee anything without seeing the .sch and .brd files.
You can see if they're connected when you go to the PCB part though.


I also don't quite know what you mean about not pulling from the PCB, do you mean I should run a battery off my board, directly to those pins, both positive and negative?
Yes, but let me see the two files, then I'll kick them around a bit to show you an example of my way of doing it.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #14 on: December 23, 2012, 07:15:37 PM »
Hi,

I hope you feel better.
Thanks :)
I think it'll be a couple of days more at least, but smoking hot cocoa with a generous shot of whisky every now and then does make it easier to talk and (at least feels like it) helps lowering the fever ;D
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #15 on: December 23, 2012, 07:51:43 PM »
OK, I zipped up the .sch and the .brd files, only thing I can think of is I use a Mac, maybe that makes larger files than windows versions. Either way, the zip file is only 70kb.

The .sch file is more complete than the board, I kind of stopped that until I get the sch right first.

I think I understand how to use the cap close to the servos, but not exactly sure how to do it in the schematic.

I will try what you mention on the pads, makes sense.

Sounds like you have something bad, I live on the east coast of the states, and there are quite a few bad bugs going around like that here. I may have to try the hot cocoa and whiskey trick if get it. Hope you feel better soon!

Thanks again for your help on this. I am pretty new to all of this stuff, and have learned pretty quickly that before I can get too deep into this hobby, I really need to nail down the basics.


Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #16 on: December 24, 2012, 10:17:53 AM »
Hi,

The .sch file is more complete than the board, I kind of stopped that until I get the sch right first.
I remade the PCB from start (by renaming the .sch file)

Your schematic had some wires that wasn't connected (eg. where they had 90° angles), so I think you're using the wire button(?) Use the net button instead, then the junctions is placed automatically and you have better control over your nets (net = anything that connects through a wire or via symbols like +5V and such).

Whenever possible, place inputs left of the controller and outputs to the right. That makes it much easier to read a schematic.

Avoid overdoing the number of power symbols when it's possible to make "clean" wiring - less symbols = less clutter.

Use consistent symbols. An arrow saying 6V with a "+5V circle" doesn't rhime. I've changed it to +UB circles, as I think you just plug the battery in there(?).
Remember that a 6V battery discharges to 3.6V over it's full discharge life.
I changed the lettering to "linear regulator". If you are using a switcher, the caps will likely have to change accordingly - a buck/boost or similar switcher will help getting the batteries discharged properly.

The 7805 needs an input voltage of around 8V to stay in regulation. Worst case, a too low voltage may even make the regulator oscillate, giving a much higher (than 5V) output, destroying the logics it feeds.

There's a text field saying "Reset button", but no button?

I added a resistor for "LED 1 white". You have two LED 1's (white and blue).
I also added ground and supply "bars" for the non committed A/D-C lines. They're easy to remove if you don't need them.

Changed C3 to a 1206, to mount on the solder side, right next to the pins it has to buffer.
C5 (can be a higher value) mounts near the servo pins and buffers both servos.

Consider this an example and nothing more. I made some assumptions about how you are going to use it and your needs may be different.

I ran the Drill-aid ULP, but it had very different results in ver 6.1.0, which is the most reason version I have installed, from how it handles in ver 4.16 which I normally use (they lowered the contrast substantially starting at ver 5).

Why not break out at least some of the 9 remaining I/O pins? There's ample room on the PCB


I think I understand how to use the cap close to the servos, but not exactly sure how to do it in the schematic.
See the attached for one example, but there's always more than one way to shave a goat.


I will try what you mention on the pads, makes sense.
Yes and more important, it will teach you a little of how it all goes together - soon you'll be making your own symbols :)


I may have to try the hot cocoa and whiskey trick if get it. Hope you feel better soon!
Thanks and do try - works wonders even if you're not ill ;)


I am pretty new to all of this stuff, and have learned pretty quickly that before I can get too deep into this hobby, I really need to nail down the basics.
You sure have "grown" since you started here, but you're right, too many people forget that a sound foundation is necessary.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #17 on: December 24, 2012, 10:47:16 AM »
Soren, thanks so much for this, I really appreciate it. I probably won't have time to loo at the schematic until tonight or tomorrow, as i am traveling today,but I am very appreciative of you taking the time to help me out. As soon as I get through this, I will reply, just wanted to say thanks much right away!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #18 on: December 24, 2012, 11:27:14 AM »
Hi,

You're welcome. Happy trails and Merry X-mas (we do the gift swapping tonight here in DK :))
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #19 on: December 24, 2012, 11:57:12 AM »
Hi,

You're welcome. Happy trails and Merry X-mas (we do the gift swapping tonight here in DK :))

Thanks! Same to you. I may need the whiskey tonight too, not for the flu, but traveling with my 3 young kids requires lots of alcohol!

Merry x-mas!

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #20 on: December 24, 2012, 12:14:18 PM »
Soren,

Not sure if I am missing it, but I am not seeing the attachment. Did you attach the file? Thanks!

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: Circuit and board review?
« Reply #21 on: December 24, 2012, 12:58:55 PM »
Quote
f you use the "Smash All" ULP

What is the benefit of this over just doing it in the GUI?

1) frame select everything
2) click smash tool
3) ctrl-right-click any one object in the selection

Now, everything's smashed, and it took 3 seconds.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #22 on: December 24, 2012, 04:51:29 PM »
Hi,

Not sure if I am missing it, but I am not seeing the attachment. Did you attach the file? Thanks!
Sorry about that. Dozed off a couple of times when writing the post and missed to attach the file.
Should be attached to this post.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #23 on: December 24, 2012, 09:52:09 PM »
Soren, No prob, thanks, got it! I am going to play around with this tomorrow and will post back, thanks again!

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #24 on: December 25, 2012, 02:26:56 PM »
Soren,

Wow, I went through this last night and today.

Really incredibly helpful! I cannot tell you how much I appreciate this!

The schematic makes a lot of sense, and the board layout is very elegant.

I plan on completely re-doing the sch and the brd myself, not because this isn't awesome, it is, but because I feel like I need to do it myself before fabricating it, I will use yours as a guide.

Responses to some questions above, and some comments/questions as well.

I originally was planning on a reset button, I had it in the schematic, but I had a very hard time getting it on the board because of wiring, so I removed it, thinking for this bot it was not critical, I would like to include it if I can fit it on the board without any crazy jumpers, I am going to play around more.

I did not have a resistor on my power LED's because I was going to solder a 330ohm resistor to each LED, but this makes much more sense.

I don't see any resistors on the forward LED's, so I am going to include one for each, like you did for the power LED, rather than soldering directly to the LED, I will attempt to arrange it so that I can use the same 330ohm resistor for all 3 LED mounts.

I originally did not include the negative and positive bus to the analog ports (other than for the potentiometer) because my IR board has a power source already connected to it, but I like this idea, gives flexibility if needed, but I don't have to use it if not.

It looks like you are including a surface mount cap for c3 under the ATMega 328P, I never would have thought of this, very interesting and very helpful for creating the board, just have to learn to solder surface mount components now! If I am not so courageous as to solder mount, I am assuming I can just mount this cap outside the chip, and run my +5V around k3, k5 and k11 to get there, this would clearly not be as elegant, but I would think it would work.

I am trying to calculate how big of a capacitor I really need for c5. I am using 2 HS-311's, and they say at no load operating, they drain 180mA each. From what I have read, a standard hobby servo can draw up about 1 amp at startup, so for two that would be 2amps. So, 22uF would be the bottom of the range Admin recommends in his Electronics tutorial, of 1-10uF for every Amp. I am assuming there is some science/art in selecting between 22 and 220uF in this case.

In the schematic, it looks like the +5V that runs through r1 and c4 is connected to Pin 1 (PC6) but on the board it looks like they are almost but not quite touching on the pad of c4 and the pad for r1, was this an oversight or intentional? I think I need to run a wire between the two pads.

With K5, I am curious to why you chose to place the pins the way you did, I would have assumed  that A5 would go in the middle of k5, and ground, and +5V on the outer pins for the potentiometer.This will work just fine, I am just curious as I would have done it a bit different.

For the non-grounder pour, I did not see you restrict anything on your board. I am playing round with layer 42, and I see how it works, it's very cool. My question on this is, what is the rule of thumb for removing? Do I remove as much area where the ground is not needed, as possible? The noise factor makes complete sense, so to me I would think I would want to make sure ground has paths to get wherever it needs to go, but no more than that.

I see on your board you do have a .07 width wire going from the cap to the servo for +UB. Is this how you would recommend it, or should I take this wire off the board, and actually use say 24 gauge wire from the +cap to each servo pin?

I am sorry for so many questions, I am just really trying to understand these things so I can do them myself in the future, and not ask for so much help.

Again, this is incredibly helpful, and I really appreciate your help!


Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #25 on: December 25, 2012, 03:39:06 PM »
Quote
f you use the "Smash All" ULP

What is the benefit of this over just doing it in the GUI?

1) frame select everything
2) click smash tool
3) ctrl-right-click any one object in the selection

Now, everything's smashed, and it took 3 seconds.
Around 1.5 to 2.0s apparently.
Click ULP button -> double click on ULP
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Circuit and board review?
« Reply #26 on: December 25, 2012, 06:30:46 PM »
Hi,

I plan on completely re-doing the sch and the brd myself, not because this isn't awesome, it is, but because I feel like I need to do it myself before fabricating it, I will use yours as a guide.

No sweat, doing it yourself gives you a better understanding and I only meant it as an example, nothing more :)


I originally was planning on a reset button, I had it in the schematic, but I had a very hard time getting it on the board because of wiring, so I removed it, thinking for this bot it was not critical, I would like to include it if I can fit it on the board without any crazy jumpers, I am going to play around more.

If you don't mind a 2 pin connector in a slightly odd place, it should be easy.
Personally, I'd rather include a few jumpers, than having to use double sided PCB on home etched boards, but while I won't recommend homemade double sided PCB for a beginner, with a little experience it's perfectly doable. If you get the PCB made in a PCB fab-house, on the other hand, it's best to go with double sided PCB, even if one side is more or less a ground plane.


I did not have a resistor on my power LED's because I was going to solder a 330ohm resistor to each LED, but this makes much more sense.

Ah OK.


I don't see any resistors on the forward LED's, so I am going to include one for each, like you did for the power LED, rather than soldering directly to the LED, I will attempt to arrange it so that I can use the same 330ohm resistor for all 3 LED mounts.

Yeah, always double check anything coming from a fever ridden brain ;D
I should have put resistors on all LEDs of course.

Not sure whether you mean "use the same resistor" or "use the same value"?
If you have a parallel combination of LEDs, the value should be halved,but it's better to get each a resistor, or any initial unbalance between them will usually widen - in severe cases to an extent where one of them hog all, or most of, the current.

2 pin wire mounted female "headers" are a perfect fit for conventional LEDs btw.


It looks like you are including a surface mount cap for c3 under the ATMega 328P, I never would have thought of this, very interesting and very helpful for creating the board, just have to learn to solder surface mount components now!

The 1206 size is huge and it is very easy to solder

To solder them, tin one of the pads.
Using tweezers, tin one end of the cap lightly.
Position the cap over the pads (tinned end on tinned pad).
Pres down lightly on the middle of it, while you reheat the solder.
Then solder other end adding a very light amount of (rosin core) solder.
Finally redo the first, adding aeither the smallest amount of solder or, even better, some fluss.

Here's a photo of a remote I made for my DSLR, none of the SMD's are as large as a 1206, as I build it into a cigarette lighter that had a white LED originally, so space was a commodity. It ain't exactly pretty and I even pinched off a corner of the microcontroller, but it's hidden inside the lighter anyway and it works aces - covers the same distance as the original remote (which has got no lighter) costing around $30-$40. Cost me the ~$0.35 microcontroller, the rest was recycled from junk :)



If I am not so courageous as to solder mount, I am assuming I can just mount this cap outside the chip, and run my +5V around k3, k5 and k11 to get there, this would clearly not be as elegant, but I would think it would work.

Not sure why you want to change the +5V trace?
If you keep it as is, just mount a regular cap right where the lettering on the PCB says "100n" now, with one hole directly next to pin 22 (gnd) and one next to pin 20 (assuming a 2 unit pin distance).


I am trying to calculate how big of a capacitor I really need for c5. I am using 2 HS-311's, and they say at no load operating, they drain 180mA each. From what I have read, a standard hobby servo can draw up about 1 amp at startup, so for two that would be 2amps. So, 22uF would be the bottom of the range Admin recommends in his Electronics tutorial, of 1-10uF for every Amp. I am assuming there is some science/art in selecting between 22 and 220uF in this case.

Admittedly, I just copied C2 (in the schematic part) to get C5 and left it with its original value.

The science behind selecting a value for the servo buffer-cap is more a matter of experience, coupled with knowing the specifics of a given project, as it depends on things like: Battery used, wiring gauge/trace width and how much voltage sag you'll accept.
A rule of thumb is only as good as the thumbs (or factors) involved. I usually don't skimp on buffer capacitance, but initially select what my gut tells me for a given application and then measure the sag under the most adverse conditions to see if more is needed.

The lower the impedance of battery, wiring and traces, the less capacitance is needed.
Without knowing what's outside the board, I'd go up to 470µF or even 1000µF if space allows.


In the schematic, it looks like the +5V that runs through r1 and c4 is connected to Pin 1 (PC6) but on the board it looks like they are almost but not quite touching on the pad of c4 and the pad for r1, was this an oversight or intentional? I think I need to run a wire between the two pads.

Another oops.
It's hard to see, but if you turn off some of the layers, the "air wire" will be clearly visible. It should have been a 0.5 width trace of course.


With K5, I am curious to why you chose to place the pins the way you did, I would have assumed  that A5 would go in the middle of k5, and ground, and +5V on the outer pins for the potentiometer.This will work just fine, I am just curious as I would have done it a bit different.

That is what gives the best wiring - ground at the outside, +5V in the middle and the I/O at the pin nearest the controller. When wired to the pot via a connector, it doesn't matter which is which, but it's sometimes make or break for a clean PCB layout.
I'll blame it on the fever that I didn't swapped the positions of  K10 and K11 as well, as is, it's inconsistent and with the swap, the +5V would have had a straight trace, rather than the angled one.


For the non-grounder pour, I did not see you restrict anything on your board. I am playing round with layer 42, and I see how it works, it's very cool. My question on this is, what is the rule of thumb for removing? Do I remove as much area where the ground is not needed, as possible? The noise factor makes complete sense, so to me I would think I would want to make sure ground has paths to get wherever it needs to go, but no more than that.

I didn't have to restrict anything, as all of the pour is connected. If you name the pour the same as the net you want it to be (GND here), it will tell you something like "Polygons may be broken", if it cannot connect all of the pour.


I see on your board you do have a .07 width wire going from the cap to the servo for +UB. Is this how you would recommend it, or should I take this wire off the board, and actually use say 24 gauge wire from the +cap to each servo pin?

Either way will work. Traces that carries a certain amount of current should always be tinned and with high currents a copper wire or -braid (eg. the shield braid in antenna cable, or similar) should be soldered onto the trace (watch for shorts) - fluss is a good thing with braid.


I am sorry for so many questions, [...]

Don't be :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #27 on: December 26, 2012, 06:04:43 AM »

If you don't mind a 2 pin connector in a slightly odd place, it should be easy.
Personally, I'd rather include a few jumpers, than having to use double sided PCB on home etched boards, but while I won't recommend homemade double sided PCB for a beginner, with a little experience it's perfectly doable. If you get the PCB made in a PCB fab-house, on the other hand, it's best to go with double sided PCB, even if one side is more or less a ground plane.


Got it, I will give it a whirl again.

Quote
Yeah, always double check anything coming from a fever ridden brain ;D
I should have put resistors on all LEDs of course.


I got it, will do, I am amazed at how well this came out given a high fever, I would love to be able to do this feeling good, let alone feeling like complete hell.

Quote
Not sure whether you mean "use the same resistor" or "use the same value"?
If you have a parallel combination of LEDs, the value should be halved,but it's better to get each a resistor, or any initial unbalance between them will usually widen - in severe cases to an extent where one of them hog all, or most of, the current.


Yeah, I need to put the same resistor value for each.

Quote
2 pin wire mounted female "headers" are a perfect fit for conventional LEDs btw.


Great to know!

Quote
The 1206 size is huge and it is very easy to solder

To solder them, tin one of the pads.
Using tweezers, tin one end of the cap lightly.
Position the cap over the pads (tinned end on tinned pad).
Pres down lightly on the middle of it, while you reheat the solder.
Then solder other end adding a very light amount of (rosin core) solder.
Finally redo the first, adding aeither the smallest amount of solder or, even better, some fluss.


I am definitely going to give it a shot, I will probably buy a few of them, so I can practice on a different board first.

Quote
Here's a photo of a remote I made for my DSLR, none of the SMD's are as large as a 1206, as I build it into a cigarette lighter that had a white LED originally, so space was a commodity. It ain't exactly pretty and I even pinched off a corner of the microcontroller, but it's hidden inside the lighter anyway and it works aces - covers the same distance as the original remote (which has got no lighter) costing around $30-$40. Cost me the ~$0.35 microcontroller, the rest was recycled from junk :)




That is cool!


Quote
Not sure why you want to change the +5V trace?
If you keep it as is, just mount a regular cap right where the lettering on the PCB says "100n" now, with one hole directly next to pin 22 (gnd) and one next to pin 20 (assuming a 2 unit pin distance).


OK, I see what you are saying. This is where my understanding of electron flow screws me up. I understand they flow from GND to +, so I assumed that they had to have gone through the entire cap and out prior to flowing into pin 20 and pin 21, but my understanding of how this actually works is not good, and this is something I really need to get a handle on, but I am struggling with it. I am having a hard time finding any resources that can explain this well.


Quote
Admittedly, I just copied C2 (in the schematic part) to get C5 and left it with its original value.

The science behind selecting a value for the servo buffer-cap is more a matter of experience, coupled with knowing the specifics of a given project, as it depends on things like: Battery used, wiring gauge/trace width and how much voltage sag you'll accept.
A rule of thumb is only as good as the thumbs (or factors) involved. I usually don't skimp on buffer capacitance, but initially select what my gut tells me for a given application and then measure the sag under the most adverse conditions to see if more is needed.

The lower the impedance of battery, wiring and traces, the less capacitance is needed.
Without knowing what's outside the board, I'd go up to 470µF or even 1000µF if space allows.


Got it, I will play around with this.


Quote
That is what gives the best wiring - ground at the outside, +5V in the middle and the I/O at the pin nearest the controller. When wired to the pot via a connector, it doesn't matter which is which, but it's sometimes make or break for a clean PCB layout.
I'll blame it on the fever that I didn't swapped the positions of  K10 and K11 as well, as is, it's inconsistent and with the swap, the +5V would have had a straight trace, rather than the angled one.


Got it.

Quote
I didn't have to restrict anything, as all of the pour is connected. If you name the pour the same as the net you want it to be (GND here), it will tell you something like "Polygons may be broken", if it cannot connect all of the pour.


OK, makes sense.

Quote
Either way will work. Traces that carries a certain amount of current should always be tinned and with high currents a copper wire or -braid (eg. the shield braid in antenna cable, or similar) should be soldered onto the trace (watch for shorts) - fluss is a good thing with braid.


OK, makes sense, I will do this.

Quote
Don't be :)


Thanks again I cannot even tell you how helpful this has been, and I truly appreciate it!
« Last Edit: December 26, 2012, 08:37:21 AM by ErikY »

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: Circuit and board review?
« Reply #28 on: December 26, 2012, 07:03:40 PM »
Quote
I will attempt to arrange it so that I can use the same 330ohm resistor for all 3 LED mounts.

One small detail, depending on how you meant this sentence:

The same kind of 330 ohm resistor will work fine.

The *same* 330 ohm resistor will not work fine, if more than one LED is on at the same time (such as the power and forward, say.) The reason is that the voltage drop across the resistor equals resistance times current. When two LEDs are lit and both currents go through the resistor, it will give you a different voltage drop, and thus, the two LEDs will be dimmer than a single LED would be when using the same resistor.

The reason I say "different" and not "double" is that the voltage/current function of the LEDs is non-linear.

If you want a single component, biasing any number of LEDs appropriately, use a Zener with the appropriate voltage drop, assuming the LEDs all need the same voltage.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #29 on: December 26, 2012, 07:38:08 PM »
Quote
I will attempt to arrange it so that I can use the same 330ohm resistor for all 3 LED mounts.

One small detail, depending on how you meant this sentence:

The same kind of 330 ohm resistor will work fine.

The *same* 330 ohm resistor will not work fine, if more than one LED is on at the same time (such as the power and forward, say.) The reason is that the voltage drop across the resistor equals resistance times current. When two LEDs are lit and both currents go through the resistor, it will give you a different voltage drop, and thus, the two LEDs will be dimmer than a single LED would be when using the same resistor.

The reason I say "different" and not "double" is that the voltage/current function of the LEDs is non-linear.

If you want a single component, biasing any number of LEDs appropriately, use a Zener with the appropriate voltage drop, assuming the LEDs all need the same voltage.

Yeah, sorry for the confusion.

I meant the same value resistor, I will use one for each LED.

Thanks!

 


Get Your Ad Here