4

I have done Arduino for almost two years now, but I'm new to making PCBs. I have a circuit with a lot of wires and buttons and I need some help verifying it's correct.

enter image description here

  • **Comments have been [moved to chat](https://chat.stackexchange.com/rooms/142959/discussion-on-question-by-monde-techno-please-verify-that-i-laid-out-this-pcb-co); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed. – Null Feb 17 '23 at 18:40

3 Answers3

10

Consider using the internal pull-ups as suggested in comments (tutorial), which will save you board space. When drawing circuit diagrams, it's really good practice to make it as uncluttered as possible, without crossing lines unecessarily or having it be confusing. There are good introductions to this here.

Your partial circuit is something like this, which when it's laid out like this is really easy to understand -- a set of switches, each of which pulls a single CPU pin to ground when pressed. enter image description here

Which leads naturally to a board layout somewhat like the following. Note it's usual to show the board from the top side, where the components usually are. The colours vary in different CAD packages, but in KiCAD (which you appear to be using), red is top (not used here) and blue is bottom copper.

The usual way to do a board is

  1. set the size and outline
  2. fix anything with a specific location (LEDs, switches, connectors)
  3. then do the tracking

Note that it's extremely common to move items around from one CPU pin to another just for the convenience of the PCB. Also most switches of these kinds have two pins for each side of the switch, and you only need to connect to one of each pair of pins. Again, this is for convenience in laying out the board.

It's also very common to lay things out, resize the board, move everything around and really try it lots of different ways.

enter image description here

Obviously these are only starting suggestions. Make sure you point your Arduino in a suitable direction so you can get at the USB socket or 6-pin ISP conveniently. Consider putting switches on one side and Arduino on the other -- it all depends on what you're making.

jonathanjo
  • 12,049
  • 3
  • 27
  • 60
  • Thank you so much, you help me a lot. I'll take example of it for my pcb. Imagine if i had ordered my pcb as i thought, it would have been catastrophic. – Monde techno Feb 17 '23 at 14:28
  • 1
    The best advice I can give is learn to use proper tools. The KiCAD ones are pretty good (especially for making sure circuit diagram and PCB agree with each other). And also good design rule checks. You'll find it takes a few days to learn how to use it, but it's time well spent if you do it. For small boards like this, you can do them in an afternoon. – jonathanjo Feb 17 '23 at 14:30
  • 1
    Oh ... if you're new to PCB design, I really recommend starting with through-hole devices, not surface mount! Things are just bigger and you can fix small problems without getting a new board made. – jonathanjo Feb 17 '23 at 14:31
  • Another improvement (especially if you're using routing software) is to add a copper pour zone. For example if you added a ground pour onto the back side all of the ground connected pins would connect automatically, this saves time and can make top side routing much easier.. – Nedd Feb 17 '23 at 17:39
  • Personally, i prefer to use fritzing, because it's more simple. But look at the new picture that i upload, to see if it's better and yes, i will do through-hole pcb. – Monde techno Feb 17 '23 at 17:39
  • I search a way to make that the Arduino nano is on the back side and the button on the front, is it possible? – Monde techno Feb 17 '23 at 17:42
  • Yes, that can be done (thought again using routing software would help verify that all your connections are correct, even when placing inverted parts on the back side). Your newest edit looks much better except for maybe the trace out of pin 11, you may want to give yourself more clearance from the lower pad. – Nedd Feb 17 '23 at 17:53
  • Also, don't rely on the pin to pin internal connection of the switches, add the extra trace if it doesn't create a problem. There may be a time where you change vendors and the switches are not 100% compatible. – Nedd Feb 17 '23 at 18:03
  • And now, is it better? – Monde techno Feb 17 '23 at 18:12
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/142962/discussion-between-monde-techno-and-nedd). – Monde techno Feb 17 '23 at 23:08
  • @Mondetechno I don't see why catastrophic. The one in the question looks okay to me? Apart from it looks like you're using mspaint and not professional software :) this circuit is super basic and super forgiving. The main problem would be if the holes weren't spaced exactly the right distance apart to put in the arduino and the switches. – user253751 Feb 18 '23 at 00:42
  • no, you don't understand, because i delete the first picture. In the initial version, all the button were connected together XD – Monde techno Feb 18 '23 at 02:13
0

Not to detract from the prior answer which is quite good, here is my rendition using the copper ground pour concept, (sometimes referred to as "Filled Zones"). Note that all the ground connections are automatically made by the common pour (in green). You do need to assign the pour (or zone) to a node for that to work properly. To complete your design you may need to add additional traces, (your prior design included a 12 pin connector at the side), so using the ground pour idea may help simplify any other routing requirements. This layout includes the Nano on the opposite side as you mentioned. Finally, on your last routing design you didn't connect the extra ground on the Nano at pin 29.
[Later edit to better show ground to pad connections]

enter image description here

Nedd
  • 7,939
  • 15
  • 19
  • the 12 pin at the side was because i wanted to put a screen : https://phillipjfry.com/products/1-44-red-serial-128x128-spi-color-tft-lcd-display-module?variant=40886888530100 and i didn't find it in fritzing and there were no 8-pin headers, so i put a 12 – Monde techno Feb 17 '23 at 19:26
  • I've uploaded a new picture of what i want without the ground pound. Can you verify if it is good and copy it please with the ground pound or show me how to do it in fritzing? – Monde techno Feb 17 '23 at 20:12
  • @Monde, This should be it for comments, comments above were excessive and moved to the Chat. A few final points: Keep trace angles = or > 90 degrees, (you have a few tight corners). Try to keep traces at least one trace length from other traces or pads (it can be less but 1 trace spacing is good for beginners), for eg. Nano pins 12 & 13. I assume both GND pins on the Nano should be connected, check that. Your trace from pin 29 should go up and over not the long path you have, (this may need to contact pin 4 too). Supposedly Frizing has a "Ground Fill", search a few forums to get info on that. – Nedd Feb 17 '23 at 22:30
0

Comments are apparently not abided, so.

In short, needs more work. To start with, you're leaving a GND pin unused? Don't. While this is passive board with only some switches, better get used to the fact that GND is sacrosanct. Use the ground pour example from Nedds example and expand it with some stitching vias, i.e., add vias that connect ground to ground between top and bottom layer to keep the ground flowing across traces.

You're also positioning the switches in a fairly haphazard manner. OCD or not, arranging switches in rows and columns looks so much tidier and actually saves space and makes it easier to use them, you can use honeycomb pattern if that's preferable, which is often most space efficient.

Don't forget a millimeter is sort of small distance in real life, although it's nice and big on the layout designer. Think about how much space your fingers need to operate the buttons comfortably, maybe print pcb assembly image 1:1 to give something to poke your finger at, as it were.

There's no prize for doing things one - layer, that's challenging for vets and gets into territory of using parts as jumpers. If you're having PCBs made, there's nbig difference between 1 and 2 layer and usually 2-layer is the default for pooled proto boards.

Oh, and tag the switches. Silkscreen if you have it, copper if not. You can use copper for text, just remember to blank solder resist over it.

Barleyman
  • 3,568
  • 14
  • 25
  • First, both of the GND pin are used, one for the screen and the other one for the buttons. Secondly, the buttons are at the places i want them to be. Thirdly, i have placed everything on a breadboard and the size is perfect for me, i just need to place them on the pcb. But thanks for your answer. My initial question wasn't : i want this circuit the samallest and the cheapest and with the best ergonomic, but it is : is it going to work. – Monde techno Feb 17 '23 at 22:47
  • Sorry for being so brutal in my last message. I know you spent a lot of time to analyse my pcb, find things to change, write them all, and i answer you like if you were sh*t. I'm sorry and i really appreciate your help. – Monde techno Feb 17 '23 at 23:03