12
\$\begingroup\$

To practise designing schematics (and possibly making it too), I have designed a simple AVR based blinker assuming it is already preprogrammed. The schematic is here:

first schematic attempt

I've seen many Atmega/arduino like schematics all quite different, some place the decoupling capacitor separately (as I have tried to see how it looked), brought the crystal down as I have to easier define the capacitors or even separate it in to nets all together.

The batteries here in this case are battery holders and have their own defined pcb size.

My main question would be: What would my schematic look like to a professional in the field? Ignoring maybe subtle things (PE is not GND? however is the only symbol that looks gndish) does it look like a schematic that is publishable?

I have considered putting the decoupling cap right of the battery holders, although was not sure whether to take away from that (4 columns of components!) or just add it in since it is very simple. What is your critique?


Update

I have completed the power supply, and cleaned up much of the text and connections (it is likely a thumbnail, you can view the image directly for larger.)

second revision of schematic attempt I believe I have fixed some simple things such as the pullup resistor.

I am unsure if the text should be anywhere specific (I had put it in the "info" layer as to not be green and made it in an appropriate place) and I believe labelling the power supply is all that is needed, as the mainboard is obvious.

I may need to try setting nets so the power supply is connected to the +5V rail, It may be already however there are quite a few ERC/DRC errors in the PCB view so I will look at that next.

I found as well I can export it as a monochrome image, and it removes all of the position indicators/grid and other noise. I am quite satisfied.

Is there anything that sticks out?

\$\endgroup\$
  • 1
    \$\begingroup\$ I like the second version much better. The current symbol you use for GND looks like this has to be connected to the earth, better use an upside down 'T' symbol. You can also try to arrange the xtal closer to the controller ans save some space, if you do it like this: grzesina.de/avr/fuse/taktung_XTAL.gif \$\endgroup\$ – 0x6d64 Feb 8 '12 at 8:13
  • \$\begingroup\$ @0x6d64 Thank you. I had never considered it to be earth more than ground, that makes perfect sense to me and I will update that. I originally had it like the image you had linked, however with my 1M resistor it seems to veer too much horizontally for my liking. Certainly will do that on a new ATMega project where the flow can allow it a little better. \$\endgroup\$ – Transient Feb 8 '12 at 22:14
  • 1
    \$\begingroup\$ Better! It is unclear how +5V_OUT connects to +5V? Also a minor issue but I would move the V_Batt connection to the top (near the SHDN). Where possible place power up high and GND down low. Orientation of +5V near R2 is preferable, consider changing +5Vout and VBATT. +5V near pin7 is a good exception to the rule, leave it. \$\endgroup\$ – spearson Feb 8 '12 at 22:54
  • \$\begingroup\$ @spearson I have modified +5V_OUT to +5V, was thinking it would be obvious if an "out" would feed the rail as I believe others have done before. \$\endgroup\$ – Transient Feb 11 '12 at 21:25
12
\$\begingroup\$

Schematic:

  1. PE does not belong by the ground symbols. You acknoledged this is a issue, but it still needs to be fixed. Surely you can rename this or make your own ground symbol. This looks like Eagle. This is certainly easy to do with Eagle.

  2. My preference is to show decoupling caps close by the power pins, because that's where they will be. I don't like it over in the corner at all, especially without a note explaining that it should be physically close to the VCC pin of IC2.

  3. Vertical text on vertical parts looks stupid. I make separate devices for each of the common orientations so that each can look nice and neat. For example, for horizontal resistors I put the component designator on top and the value below. For vertical resistors I put both on the right side. If you don't have such devices pre-made (or use free ones from others including from me), then you have to solve this some other way. In Eagle you can "smash" a part to make the text strings separately movable from it. There is no excuse for making a mess.

  4. Text should be clear what it belongs to. Yours is all over the place. You obviously didn't spend any effort cleaning things up when text didn't plunk down in convenient places. Shame on you. There is no excuse for such sloppiness, especially when you ask others to look at your work. If you don't take it seriously enough to present it properly, why should anyone else take it seriously?

  5. That's one convoluted pushbutton symbol! Yucc. Also, I prefer to have pushbuttons always pushed from the top of the schematic.

  6. In general it is good to have high voltages on top, low voltages at bottom, and logical flow left to right. Of course that's not always possible, but at least its something to think about. In that regard you actually did OK. At least all the ground symbols are pointing down. I would prefer the processor symbol to have power on top and ground at bottom, with signals left and right, but what you have is still lots better than a lot of things I see.

    The absolute worst is when people get really lazy and lay out a symbol in physical pin order. Sometimes they'll try to excuse that by saying it helps in debugging. Even if you believe that, it only helps a small part of the time but obscures the circuit all the time. Most of the time in debugging you look at the schematic to see which pin to put the scope probe on, so a nice layout still works fine for that. It's very rare to know the pin you want and then look at the schematic to find its function. That's certainly not a excuse for being lazy and optimizing the schematic for the 1% case while pessimizing it for the 99% case.

  7. R2 and S2 were confusing at first glance. It seems they have something to do with R1 and S1 until you notice that Vcc is connected between them. R2 and S2 should go up to their own Vcc connection to make this more clear.

  8. Some consider dots with two lines crossing bad. This is perhaps less important now that schematics are on a computer, but in the printed world the dot could get lost after several reproductions and then it would look like two lines crossing that are not connected. It's probably best to stay away from that so that two lines crossing are never connected. If you want to make a connection, arrange for it at a T.

  9. Batteries come in lots of different voltages these days. You should show their value.

Circuit:

  1. R2 should be on the other side of S2 pulling up the line. The bottom side of S2 should then go to ground. You might have noticed this for yourself if the schematic weren't obfuscating this. See point 7 above.

  2. The 100nF decouping cap is fine, but you should put something directly accross the battery too. A 10 µF ceramic can be left permanently accross the battery.

\$\endgroup\$
  • \$\begingroup\$ 1, 2, almost 4, 7, 8 ("T" junctions are nice), 9 (SMPS is going to be added), and circuit 1 are completed. I am unsure of how to represent voltages however (as per my comment @David), should I just make it all "VCC" or "V+"? I'll list all the rest as 3.3V or 5V after the regulator, but what should DC in (from battery pack to regulator) be labelled as? Most schematics I see have both batteries "and" nets, not just a "dc in" from a battery pack. \$\endgroup\$ – Transient Feb 7 '12 at 6:56
  • 2
    \$\begingroup\$ You can label nets anything you want as long as it help clarify the function. For example, the raw battery voltage could be called "Vbatt". For power to a microcontroller lots of things could be appropriate, like "Vdd", "V+", "5V", etc. What exactly you name it has to do with what other power nets there are in the rest of the circuit and what point therefore is best to stress to avoid confusion. For example, in a mixed 3.3V and 5V system, it's probably good to label those nets "3.3V" and "5V" to avoid the most obvious confusion. \$\endgroup\$ – Olin Lathrop Feb 7 '12 at 13:33
  • \$\begingroup\$ I'm not completely comfortable in your logic of reshaping pinouts. Personally I prefer to somehow create a disposition that I can mantain in the layout, thus I can understand better how to connect pins like PIO, that I can assign almost freely. I know that this logic can converge with yours, but if not I prefer this. Personally, again. \$\endgroup\$ – clabacchio Feb 7 '12 at 14:38
  • \$\begingroup\$ @clabacchio: It might help a little in layout, but then forever after obfuscate the circuit. The schematic is your presentation to the rest of the world about your circuit, and as such should be as clear, understood with the minimum possible effort, and least likely to be misunderstood by others as possible. \$\endgroup\$ – Olin Lathrop Feb 7 '12 at 16:35
  • 1
    \$\begingroup\$ I think it is a bit over the top to refer to those with different preferences as 'lazy' and don't' think there should be hard rules here. I prefer pin-mapped symbols for simple designs, small parts and those were layout is critical (e.g. switching regulators) but quickly abandon this for larger parts. Schematics are not read nearly as much after release as some would imply. Design review and PCB layout ends up getting a majority of eye attention, and it is easier to review correct pin outs and communicate layout with mapped pins, were appropriate. \$\endgroup\$ – bt2 Feb 8 '12 at 1:29
5
\$\begingroup\$

Aside from the reset pin, which others have pointed out...

Your decoupling cap is connected to a signal with the name of VCC. Your batteries are connected to a pin on the CPU that's named VCC, but not to a signal named VCC.

I would consider a 1 meg ohm resistor in parallel with the crystal. Or at least put a spot on the PCB for one just in case. I have seen issues where a circuit like that will work fine without a resistor except at higher temperatures.

As far as the "look" of the schematics goes, it looks just fine. "Professional" schematics all look different, and yours is no more or less different than those.

\$\endgroup\$
  • \$\begingroup\$ I am a little troubled on how to represent voltages. I've scrapped the battery and am now just using a DC in from a battery pack (possibly to a cheap switching regulator) but don't know whether to label the battery in "V+" with a side note or "VCC" like the others or what. \$\endgroup\$ – Transient Feb 7 '12 at 6:52
  • \$\begingroup\$ @MKju When in doubt, add text notes to the schematics that explains important things like battery size, type, voltage, etc. \$\endgroup\$ – user3624 Feb 7 '12 at 13:28
4
\$\begingroup\$

I like to name all net lines coming out of the microprocessor. Programs assign names like $$N1209 which do not lend well to searching. I also like to place a signal name text box close to the microcontroller pin as well as to any destination headers. This allows quick access to pinout information when setting up the IO in your microcontroller code, as well as header information when connecting other devices to your PCB.

Comment blocks on a schematic can also be used liberally. Link to pdf sections that influenced design decisions. Also note information for layout and manufacturing (how should AGND and GND be connected for instance, or if you need a particular thickness of copper). In most companies schematic design, board layout, purchasing, and debugging will all be done by different people. Leave yourself or others a trail of breadcrumbs through your design.

You should really consider posting a revised schematic for this question underneath trying to incorporate many of these ideas.

\$\endgroup\$
3
\$\begingroup\$

When the "RESET" button is not pressed (open), the reset input on the microcontroller is left floating, which can be bad (unless the chip has its own pulldown). Connect R2 between ground and reset and connect the reset button between Vcc and reset pin.

You can also put C1 near the chip, as it will most likely be near it (usually recommended as close to the power supply pins as possible) in the real board.

\$\endgroup\$
  • \$\begingroup\$ The reset button comment is correct, but it's about the circuit and not the schematic. I disagree with you about the decoupling caps; I feel that they belong in a corner with "Place near IC2" as a text note or attribute. \$\endgroup\$ – Kevin Vermeer Feb 7 '12 at 0:26
3
\$\begingroup\$

A problem I see is that the AVR's reset pin is "active low", that is it needs to be pulled up to the power supply voltage in normal operation and then pulled down to ground to reset the device. In your schematic, if those are normally open pushbuttons, it looks like the pin will be left floating normally and then connected to the batteries when the button is pushed. I don't think that will work properly!

\$\endgroup\$
  • \$\begingroup\$ This is correct, but it's a comment about the circuit and not the schematic. Let's try to stay focused on the question at hand! \$\endgroup\$ – Kevin Vermeer Feb 7 '12 at 0:26
  • 5
    \$\begingroup\$ @KevinVermeer So the circuit won't work as drawn, but that should be ignored because the question is supposed to only be about the aesthetics of the schematic? What good is a pretty schematic of a circuit that won't work? \$\endgroup\$ – Bitrex Feb 7 '12 at 0:41
  • 1
    \$\begingroup\$ +1 Bitrex, even though it was more of a design question this fix will change the design. \$\endgroup\$ – Transient Feb 7 '12 at 5:02
1
\$\begingroup\$

I would emphasize a concept from spearson's answer: in complex schematics, can be useful to label wires for three reasons:

  1. It's easier to find what they are, even if they are lost in a messed web (that shouldn't happen);

  2. You can use short truncated wires with the same label, to connect distant points without creating the aforementioned web; just give the same lable to two distant pieces of line and they are automatically connected, also in the board;

  3. For really big and complex designs, which have to be split in pages, this is the only way to pass a wire between two different pages; in Eagle for instance, you have to specify the name of the net line with a postfix indicating the page and the coordinates in the grid of the connected node.

The drawback is that you don't have a visible connection between the points, but if you know what you are looking at, it becomes a lot cleaner and readable.

\$\endgroup\$
  • 1
    \$\begingroup\$ To go even further, I usually try to use the microcontroller signal names on the schematic as symbolic names in the firmware for those pins. Therefore I keep both these uses in mind when naming the nets (since schematic usually comes first). \$\endgroup\$ – Olin Lathrop Feb 7 '12 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.