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

0 Members and 1 Guest are viewing this topic.

Offline Soeren

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

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 +,
They do, but you shouldn't care unless you have really small tweezers ;)

It's a huge misunderstanding to discuss electron flow in introductory/beginners texts I think, but sadly, most authors just mimick those before them and it really doesn't matter a bit for a good many years into electronics, so just forget electron flow and go with current flow, which is something you need from the get go and which by definition flows from positive to negative!


[...] 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.
As long as the cap is close to the terminals it will work, as it only needs to filter out fluctuations on the A/D reference.

If you look at C3, current(!) should pass the cap on it's way to the rest of the circuit. If the regulator output was lead directly on and the capacitor connected to that trace by a "side" trace, it would have less effect, as there's a current draw and digital shifts draws current in short peaks.


Capacitors are used for several things. Eg. buffering, which usually takes larger caps, while filtering is usually made with smaller caps.
A common thing for most applications is, that they should have low impedance connections, so long narrow tracks should be avoided.

As a side note, don't run analog and digital lines closely in parallel, as the digital noise would break over to the analog lines. In critical circuits, you make digital and analog ground planes and connect them in a single place only.


A fairly OK set of tutorials can be found at All About Circuits , but skip the part with electron flow ;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 #31 on: December 27, 2012, 05:51:23 AM »
Soren,

Thanks, as usual, very helpful.

I actually have read All about circuits, and I agree that for the most part, it is fantastic.

Unfortunately, I did also read the electron flow vs. conventional flow, and that was the one that really screwed me up.

My brain has a problem with knowing something is actually one way, and pretending it is another way. I am working on that!

I like the idea of current flow, I have never heard of that before, but it is helpful. This is also very helpful for the capacitors, thanks!


Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #32 on: December 27, 2012, 12:27:56 PM »
OK, so I finally finished re-doing the schematic and the board, with a ton of help from Soren!

I tried really hard to apply everything that was recommended.

I learned a ton doing this, and I am truly appreciative of all the help!

I now have the reset button as well, which I THINK is wired correctly on the board, but I am not 100% sure. If I am interpreting the datasheet correctly for the 328P, all I need to do is send a different voltage, between -.5V and 13V, and by connecting the ground to the capacitor, I think the button is acting as a pulldown voltage to the reset pin, causing a reset, but I don't have 100% confidence I am reading it correctly, or that I am executing this properly

For some reason, which I just cannot figure out, I still have a GND net going from Pin 8 (GND) to Pin 21 (AREF).

From what I see, my ground plane is touching both pins clearly, so I am not sure why that is still there.

I know I am asking a lot here, with all you have already helped, but if you could give me a last set of eyes for a review on this before I fabricate this, I would really appreciate it!

Thanks again for all of your help!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Circuit and board review?
« Reply #33 on: December 27, 2012, 01:19:21 PM »
Looking pretty good. I can answer some of your questions.

The Reset button looks correct. The 10k resistor holds the Reset (pin 1) at +5V (logic high) and the switch, when pressed, takes the pin to ground (0V or logic low).

I see a net connection between pins 8 and 22 that are not connected with copper. Also there are two isolated ground pours.

Also, the trace from pin 12 to JP9 does not need to go around the end of the atmega. Just route this direct.

I see that your have a number of Atmega pins unused. I recommend adding some pads for connectors and routing these pins to the connectors. This way if you want to add some thing (sensor input or a control output you have a connect pad into which to solder a wire.


Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #34 on: December 27, 2012, 02:00:23 PM »
Looking pretty good. I can answer some of your questions.

The Reset button looks correct. The 10k resistor holds the Reset (pin 1) at +5V (logic high) and the switch, when pressed, takes the pin to ground (0V or logic low).

Great, thanks!

Quote
I see a net connection between pins 8 and 22 that are not connected with copper. Also there are two isolated ground pours.

I am embarrassed that I did not see the two separate pours! I should have seen that! I am assuming that is the reason for that trace between those two pins, I could not figure that out!

Quote
Also, the trace from pin 12 to JP9 does not need to go around the end of the atmega. Just route this direct.

I know what you mean, I tried to do this originally, but I had to make the wire so thin to get it direct, that I just figured I had the space to go around, so I just did it around rather than thin.

I guess this brings up a question, what is better, shorter thinner trace, or wider longer trace?

Quote
I see that your have a number of Atmega pins unused. I recommend adding some pads for connectors and routing these pins to the connectors. This way if you want to add some thing (sensor input or a control output you have a connect pad into which to solder a wire.

I agree with you, but for this particular board, I only plan on using it on this one line following bot. I plan on giving this to my daughter, and letting her have it and never removing the board, so I just figured less holes to drill since I will never put anything else on it. Any other board, I would have definitely done that.

Thanks for your help! I appreciate it!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Circuit and board review?
« Reply #35 on: December 27, 2012, 03:58:11 PM »
Quote
    Also, the trace from pin 12 to JP9 does not need to go around the end of the atmega. Just route this direct.


I know what you mean, I tried to do this originally, but I had to make the wire so thin to get it direct, that I just figured I had the space to go around, so I just did it around rather than thin.

I guess this brings up a question, what is better, shorter thinner trace, or wider longer trace?

It depends but I prefer shorter traces to longer traces in almost all cases.
If the current through the trace is low then a narrow trace doesn't hurt. Another 'trick' is to make the trace narrower only where the it needs to be. In this case make the traces to pins 11 & 12 about half their width while near the Atmega (so there is enough clearance between them) then the width you used to the connector.

I believe these traces are the control signals to the servos. These would not carry much current so could be narrower.

The recommendation was mainly so that you can route traces from the 'spare' pins to connector pads. If you do not connect to the 'spare' pins then your routing to pin 12 is perfectly fine.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #36 on: December 27, 2012, 04:11:55 PM »
Quote
    Also, the trace from pin 12 to JP9 does not need to go around the end of the atmega. Just route this direct.


I know what you mean, I tried to do this originally, but I had to make the wire so thin to get it direct, that I just figured I had the space to go around, so I just did it around rather than thin.

I guess this brings up a question, what is better, shorter thinner trace, or wider longer trace?

It depends but I prefer shorter traces to longer traces in almost all cases.
If the current through the trace is low then a narrow trace doesn't hurt. Another 'trick' is to make the trace narrower only where the it needs to be. In this case make the traces to pins 11 & 12 about half their width while near the Atmega (so there is enough clearance between them) then the width you used to the connector.

I believe these traces are the control signals to the servos. These would not carry much current so could be narrower.

The recommendation was mainly so that you can route traces from the 'spare' pins to connector pads. If you do not connect to the 'spare' pins then your routing to pin 12 is perfectly fine.

Gotcha, that makes sense, thanks for your help!

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #37 on: December 27, 2012, 04:17:11 PM »
I took another stab at the board, thank God I discovered rip up, I cannot even tell you what I used to do when I needed to modify my board before I discovered rip up, and the F/B annotation would not let me remove wires!

I moved some resistors and re-routed the +5V the way Soren did it, except my cap is not surface mount since I ordered them and it will take a week or so to get them, I will use what I have on hand.

I also moved my wiring from pin 12 based on Waltr's recommendation, I like it better this way.

I now have one ground pour, and no remaining traces!

I probably spent waaaaay too much time on this board, considering it is a simple line following bot that won't do a whole lot, but I feel that I have learned an awful lot in doing so, that will be very helpful as I progress in robotics/electronics.

I had always been somewhat scared of schematics when I saw them, and found reading complicated ones to be greek, but forcing myself to build the schematic first, than the board leaves me feeling much more confident reading schematics.


Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Circuit and board review?
« Reply #38 on: December 28, 2012, 10:31:06 AM »
Looks good now.

Yea, drawing schematics and doing PCB layout can take some time. But it is sure easier to fix the PCB while on your computer screen than after it is made into copper.

The next PCB will not take as much time since you needed to learn how to use the CAD program.

I hope Soeren can take one last look before you etch the board in case the rest of us missed something.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Circuit and board review?
« Reply #39 on: December 28, 2012, 02:48:18 PM »
Waltr,

Thanks for taking the time to help me out and look it over!

 


Get Your Ad Here