Critique my circuit!

Hello everyone,

I’d very much appreciate your feedback on a circuit I designed, which I want to have made into a pcb. I’m not very experienced with this sort of thing, so i’d like to call on the collective knowledge of the sparkfun community to point out my errors - for the good of all pcb design newbies.

The project is a i2c PID motor controller, powered by a PIC18F2431 (originally chosen for the QEI, but not used in this project). Here’s the circuit:

http://www.beerepoot.org/public%20files/shematic.png

http://www.beerepoot.org/public%20files/board.png

Thanks in advance,

Erik

PS: the image comes out huge if I embed it in the post, so instead, you can follow the link.

erik006:
Hello everyone,

I’d very much appreciate your feedback on a circuit I designed, which I want to have made into a pcb. I’m not very experienced with this sort of thing, so i’d like to call on the collective knowledge of the sparkfun community to point out my errors - for the good of all pcb design newbies.

The project is a i2c PID motor controller, powered by a PIC18F2431 (originally chosen for the QEI, but not used in this project). Here’s the circuit:

http://www.beerepoot.org/public%20files/shematic.png

Thanks in advance,

Erik

PS: the image comes out huge if I embed it in the post, so instead, you can follow the link.

Erik,

It might be a good idea to put the values to the components (resistors, capacitors) on the print. Not that you would make a mistake on the values, but if you did, we wouldn’t know until it was too late.

Also, you may want to include a pcb as well. Board layout can be as (or more) important than correct connections.

Just trying to help,

James L

Thanks for the tip; I have added the board & added the values of the caps, etc to the schematics. Thanks again!

Erik

I think you need to connect the ground from the L293 and PIC together. Am pretty sure the L293 ground is shared between the logic and drivers (it is on the 754410 which is a higher current pin-for-pin alternative to the L293).

From a stylistic standpoint, I found the use of arrow symbols for your grounds distracting. I personally use the upside-down-T symbol as you can easily distinguish power and ground at a glance.

You might want to increase the size of the traces related to motor power. While you are not running significant current, its still good practice.

I have been taught to try and avoid hard 90 degree angles when routing wires. Am sure it won’t matter for this kind of design, but probably a good habit to develop.

The four ground pins on the L293 are also heatsinks. I would suggest putting a ground plane around them to dissipate the heat. Its surprising how much heat you can generate in the 754410 and would suspect it applies to the L293.

I actually have a board using the 754410 and will upload the board/schematic later today. Not that my schematic or layout is “the right way”, but it might be helpful to see how someone else has designed a similar circuit.

Your layout looks very untidy, with those tracks at funny angles. It probably doesn’t matter ftom an electrical point of view, but I like my boards to look neat.

Leon

Thanks for the comments so far: it’s very helpful to hear from people with more experience. I’ve updated the schematic & board a little to incorporate the things suggested, although I haven’t added the ground plane yet; I figured I should read up on that some more.

Vraz: I’m using the Eagle CAD autoroute feature, which gives me the right-angled traces. I have manually change some of them, but this is most likely not the way to do it. If you’re familiar with eagle, can you suggest a better way to go about this?

Leon: I realize this layout looks very untidy, but I’m sort of at a loss what to do about it. I suppose I’ll read up on it some more, but in the meantime i’d like to ask you how you handle this? Do you manually “clean up” your layout?

Kind regards,

Erik Beerepoot

erik006:
Thanks for the comments so far: it’s very helpful to hear from people with more experience. I’ve updated the schematic & board a little to incorporate the things suggested, although I haven’t added the ground plane yet; I figured I should read up on that some more.

Vraz: I’m using the Eagle CAD autoroute feature, which gives me the right-angled traces. I have manually change some of them, but this is most likely not the way to do it. If you’re familiar with eagle, can you suggest a better way to go about this?

Leon: I realize this layout looks very untidy, but I’m sort of at a loss what to do about it. I suppose I’ll read up on it some more, but in the meantime i’d like to ask you how you handle this? Do you manually “clean up” your layout?

Kind regards,

Erik Beerepoot

Erik,

One other thing I notice…(it is not important unless something is wrong…but I make it a practice).

I never put via’s under chips. This is my standard rule. I have had a board be bad (through hole plating wasn’t complete) and I had to fix it…it can be hard if a chip is over it.

You do this by drawing a square under the chip on the vrestrict layer.

James L

James,

Thanks for noticing - should be fixed now. How exactly does that affect the circuit, anyway?

Erik

Here are links to a recent design using a 754410 and AVR along with a wireless module.

http://home.comcast.net/~vraz/feed-sch.png

http://home.comcast.net/~vraz/feed-brd.png

Things I did in my design:

The power traces are wider than the logic traces.

I used a ground plane on the entire board and then also used a small topside plane to help with heat on the 754410.

Tried to avoid hard bends and route on an angle.

Interestingly, I violated James suggestion of avoiding vias under components. While this is probably good practice, it seems difficult to avoid especially when using large surface mount components (I have been unable to avoid it in most of my designs).

I did the board in Eagle and routed it by hand. However, I have also let the auto-router do other boards and they all worked (though they never look as nice as my hand routed boards). Offhand, I am not sure why the auto-router is generating hard angles, though I know it does from time to time. Keep in mind that you can manually edit after the auto-router completes to clean up a board. As beginning, I found that the easiest method to use.

Hope this helps.

With most software you simply enable “snap to grid”, or something like it, to get nice straight tracks. The Pulsonix software I use will connect to off-grid pads, if necessary.

The Eagle autorouter is rubbish, you will get much better results using manual routing. Autorouters that do a decent job are quite expensive.

Leon

erik006:
James,

Thanks for noticing - should be fixed now. How exactly does that affect the circuit, anyway?

Erik

Erik,

When you auto route the bot will not place vias under a chip.

If you just now put the v-restrict boxes on your board, you will have to rip up those traces and run the auto router again. Ripup…not delete. They are not the same. Or you could move them by hand…which ever.

If you do not move them…the DRC will give you errors about the v-restrict.

I always do the v-restrict after I put my components on the board. Also there are other restricts to keep traces from running under chips as well. This is useful if you have oscillators on your board. (or maybe a transformer)

I sometimes have to violate the rule myself (via restrict), but I try not to. I have had boards so densely packed, there were lots of vias under chips. If you do have them under chips. Make sure to check the board thoroughly before mounting anything. You don’t want to find out you have a bad via after the chips are mounted. It makes for a long irritating rework.

James L

I usually get my boards tested. Vias under components should then be OK. It costs a bit more, of course.

Leon

leon_heller:
I usually get my boards tested. Vias under components should then be OK. It costs a bit more, of course.

Leon

Leon,

When I start ording direct (Gold Phoenix), which will be real soon. I will get them to do electrical checks.

I really like their service even though they are over seas. Most of my designs really need the big price break.

James L

erik006:
Hello everyone,

I’d very much appreciate your feedback on a circuit I designed, which I want to have made into a pcb. I’m not very experienced with this sort of thing, so i’d like to call on the collective knowledge of the sparkfun community to point out my errors - for the good of all pcb design newbies.

The project is a i2c PID motor controller, powered by a PIC18F2431 (originally chosen for the QEI, but not used in this project). Here’s the circuit:

http://www.beerepoot.org/public%20files/shematic.png

http://www.beerepoot.org/public%20files/board.png

Thanks in advance,

Erik

PS: the image comes out huge if I embed it in the post, so instead, you can follow the link.

Layout is lousy. God awful. Don't use the autorouter - it produces crap. Your board is a great example of that.

Your silkscreen is bad. First of all - you should adopt a standard naming scheme for your ICs. I like IC*, personally. But having a U$1 and an IC1 is just piss poor. Even if you aren’t going to have a silkscreen, it still should be fixed. Furthermore, alot of the silkscreen is overlapping with other stuff, or is completely hidden beneath components. You typically do not place component values on silkscreens, though I suppose that you can if you really want to.

As said before - you need thicker traces, especially for the higher current stuff.

R3 and MOT2-LED should be connected (as shown on the schematic) but are not on the layout. That’s probably a problem, eh? This probably stems from your schematic being completely messed up: you’re supposed to have those little dots where 3 or more components/nets are joined at the same place. Instead, you have them all over the place. This is a problem that I remember Eagle having that you just have to go through and carefully correct.

propellanttech:

erik006:
James,

Thanks for noticing - should be fixed now. How exactly does that affect the circuit, anyway?

Erik

Erik,

When you auto route the bot will not place vias under a chip.

If you just now put the v-restrict boxes on your board, you will have to rip up those traces and run the auto router again. Ripup…not delete. They are not the same. Or you could move them by hand…which ever.

If you do not move them…the DRC will give you errors about the v-restrict.

I always do the v-restrict after I put my components on the board. Also there are other restricts to keep traces from running under chips as well. This is useful if you have oscillators on your board. (or maybe a transformer)

I sometimes have to violate the rule myself (via restrict), but I try not to. I have had boards so densely packed, there were lots of vias under chips. If you do have them under chips. Make sure to check the board thoroughly before mounting anything. You don’t want to find out you have a bad via after the chips are mounted. It makes for a long irritating rework.

James L

I don’t see anything wrong with having vias underneath ICs on PCBs. If you’re fabbing the board at home (ie no plated holes) then sure - you probably don’t want to do that. But otherwise, I see no problem with it.

It’s good practice to avoid having vias touching surface mount pads, as they’ll wick away solder during reflow soldering. However, for most people here that is a non issue.

If you’re worried about having bad vias you should probably be looking for a different PCB fab. I will typically have 4+ layer boards electrically tested, but I see little reason for that with two layer boards.

I think the Eagle autorouter is included for comic effect, not actual use. You have to do a bunch of prep work for it to make traces wider (for things like power/ground, motor current, etc.), it jumps traces around and switches layers for no good reason, and like Leon said, it might not matter electrically but it makes the boards look very unprofessional. The only reason I use it is to get a rough idea of how a complex board could be routed.

Other than that, the PCB looks good. Two words of advice would be to double check the connector sizes and the mounting hole sizes (if you haven’t already). I recently ran into a problem where I designed a tightly packed board without double checking that the silkscreen for the connectors actually reflected the connector footprint. With an exacto knife and some precision cutting it was fixable, but that could have been avoided with some better attention to detail. Double checking that mounting holes are large enough to fit the bolt (or standoff or whatever) means you won’t have to waste time drilling the holes larger.