Seeking help with project - a simple desktop trinket

Hi all!

New to the forum & new to KiCad and I am seeking some help with a project. My first goal is to make an Adafruit Boarduino clone - a basic arduino uno - see here:

I’ve created the schematic, but have a few problems with it. Running the DRC gives me the following warnings:

Those warning tells me the input to the L7805 isn’t connected, 5v isn’t connected to R1, and GND isn’t connected to LED D3. I’ve tried deleting the wires and re-connecting them, but it hasn’t fixed the problem.

Where am I going wrong here?

It appears I can’t post the file here as I am a new user, so a .zip of the project can be found here:

Thanks for any help,

Try reading this post:
ErrType(3): Pin connected to some others pins but no pin to drive it - FAQ - Forums

1 Like

DRC is in Pcbnew not in schematic.

Have you read “getting started” (Using Eeschema point 43.)?

My solution to PWR_FLAG problem is to not run ERC :slight_smile:

I too just ignore these errors all together. Seems a messy way. But it may be vital if you do simulation? Never tried it.

Hey, thanks @Tomas_A and @Piotr for those links. Useful stuff in there!

And thanks for the advice on ERC and PWR_FLAG. I was thinking I could ignore these errors, but I went ahead and added in PWR_FLAGs so it passed the checks.

I find it interesting that my first attempt to add a PWR_FLAG, I did so at the barrel connector. This meant there was a diode between the PWR_FLAG and the L7805. This failed the ERC, so I had to position the PWR_FLAG at the input of the L7805: (notice the wire from the first placement is still there)

I’ve ordered parts for this so I guess I’ll move into footprints and PCB layout.


KiCad analyses nets (one by one) and not understands how diode or choke works.

Got it, makes sense.

I guess I should describe my project. It will be a simple street traffic light using red, green, and yellow LEDs. An ATmega328 will control lighting the LEDs and it will run off a 9v battery… It’s just a simple desktop trinket, while learning KiCad.

As previously mentioned, I’m basically copying an Adafruit design, but adapting it as I see fit. I’ve laid the parts out in Pcbnew, and I have a few questions about this part of the design process.

First is the concept of mounting holes for PCBs. I’ve looked this up and I kinda understand the way KiCad deals with them. I think I have mine defined correctly, but I’m curious as to how to delete the silkscreen label for the mounting hole in Pcbnew. I can move the part label around as desired, but can’t seem to be able to delete the label for a mounting hole. I guess I could move the label so it’s where the hole is, this way the label will be removed when the hole is drilled.

Also, do I need to set the grid origin for the PCB? I’ve generated the gerber files and drill files, looked at them in KiCad’s gerber viewer and also in Gerbv, and the files look good in both cases.

Here’s my current PCB layout:

If anyone notices any problems with my layout, please let me know!

I’m planning on having a PCB made for this and I already have almost all the parts to assemble this.

Thanks for any help,


Put your cursor over the hole. Press ‘E’ for edit, clear the checkmark called ‘Show’ on the layer ‘F.SilkS’. Click OK

One thing I found strange was how KiCad handled the pin headers. When I created the schematic, I added in 4 female connectors, the 2 horizontal ones at the top, and the 2 horizontal ones at the bottom, of the PCB in the previous post. I set those footprints to be 2.54mm pin headers, thinking that will give me female pin headers. When viewing the PCB in the 3d viewer, those ended up being male pin headers. I had to change the footprints from pin headers to pin sockets to get the correct style connector. Likewise, every connector I wanted to be a male pin header, ended up being a female pin socket, and I had to change those too.

Maybe it’s me being stupid, but to me there is 2 types of pin headers, male or female. I didn’t know of pin sockets until now. I found this a little confusing, but I can work with it.

Also, the 2.1mm barrel jack I’m using, or any of the others I looked at, didn’t have a proper 3d object. Viewing them in 3d just shows the copper pads, but not the actual part. I realize actual part dimensions can vary, but something in the 3d view is better than nothing.

Just a couple of random thoughts…

Any model included with KiCad has to meet the KiCad Library Convention (KLC), have a design attribution and be dimensionally accurate to avoid any nasty surprises.

You are free to duplicate any footprints into your own library and add a model. Many manufacturers allow you to download their models - but the manufacturer retains the copyright. The KiCad library maintainers are not permitted to include these in the distributed libraries.
There are plenty of 3d repos like grabCAD that have loads of models that you can use for your own use too.
If you design your own KLC compliant, dimensionally accurate model you can submit it( together with a datasheet) to the librarians for consideration for inclusion.

Samtec exists as long as I remember:

This way I was designing PCBs in the late eighties.
Modern ICs are build with smaller and smaller technology (the smaller semiconductor area used - the cheaper production and competition needs it). The effect is smaller and smaller capacitance in circuit so the faster and faster slopes. Currently each product using digital IC you should consider having hi frequency technology onboard. Because of this it is very beneficial to have GND zone covering the entire bottom layer. Thanks to that each signal has as short return path as possible so the smallest area emitting and receiving disturbances.
So now my designs are 2-layer PCBs with whole bottom being GND (I use SMD elements). I add 47…100 ohm 0603 resistor in really each digital line (reduces current pulses in lines and in supply, costs zero, zero, nothing). Side effect of these resistors is that they help a lot to route all tracks at one layer left for me (top). If I have to cross tracks I prefer to use 0R resistor instead of breaking my GND zone.

As Piotr already mentioned, a PCB is not just a list of connections to make with narrow tracks.

The complete absence of a GND plane is the first thing that spind, but placement of decoupling capacitors is also far from optimal. To keep things simple concerning decoupling. Put a 100nF decoupling capactor physically close to each set of power pins of your microcontroller.

The voltage regulator U1 is also quite vulnerable. The TO220 package is designed to be screwed to a heat sink. In your case a heatsink is not needed, but it should not stick out of the PCB like that. You also have plenty of space to use for example “TO-220-3-Horizontal_TabDown” and then secure it to the PCB with an M3 screw.
Or use a “TabUp” version, then first screw a screw to the PCB with two nuts, then put on the voltage regulator and add a third nut. With “TabUp” you can even add a heatsink, but that is probably not needed for this PCB, unless both the input voltage is very high, and you also use it to feed external circuitry.

Your via’s are also pretty small. Although it’s less important now then it used to be, minimizing the amount of drill sizes still is a thing. Optimimum would be to use the same drill size for your via’s as you already use for THT parts.

I’ve also had problems with the power connection and nearby switching circuitry. Especially with hagogen lights with block transformers and the ballasts of flueroscent lighning. These generate spikes which often do not get filtered by your boards power supply and can cause (seemingly) random resets. The best remedy would be to put a filter in the power supply, but I find that any sort of inductor in the power supply helps to reduce or eliminate this problem.

Some time I interacted with another user and his first design.
You may get some good tips from reading that old thread:

Sorry, I’m a little late to the conversation. I’m still catching up from taking the first week of August off. :wink:

While, yes, you used the PWR_FLAG well enough to pass ERC. But I would argue that you are ignoring a potential documentation aspect of the PWR_FLAG. Using your example of the next paragraph that I didn’t quote, you placed the PWR_FLAG on the input of the regulator because the diode didn’t pass the properties of PWR_FLAG through. (Yes, that is a KiCad limitation, I’m not saying it isn’t.) But if you think of where power is coming from for the circuit, it is coming out of the diode. Thus I would have put that PWR_FLAG on the “output” (i…e. cathode) of the doide to document the source of power for not only the regulator, but also the two caps. This doesn’t change the netlist, but adds a level of documentation to your schematic.

Just IMHO, but something you may want to consider.

In another message:

I wouldn’t call you “stupid”, just inexperienced here. If you look at the end that you solder of pin headers and pin sockets (the pin headers are male, sockets are female, just a terminology thing) you would notice that the formed metal tab of the socket is significantly smaller than the square pin header. Thus it makes sense to actually use a smaller drill hole so you don’t both waste solder filling in the air gap in the THT, but also a closer fitting hole will help with alignment. This usually doesn’t matter, and I forget if the KiCad libraries use smaller drill holes for the pin sockets vs. pin headers.

But there is another type of header that you aren’t thinking about, probably because you just haven’t encountered them. Round, machined headers (and their accompanying machined sockets). (I’m mostly familiar with the Mill-Max brand.) Most hobbiests have likely not encountered them because they are significantly more expensive than the square headers and formed sockets that we all know and love(?). They offer a much more reliable and vibration resistant interconnect, but are way over engineered for most hobby use.

1 Like

Thanks for all the input!! I have read all the replies a few times to absorb all the info posted here.

I value all the advice on how to improve this, but at the end of the day, I just need to turn out a pcb that will work. As I mentioned, this is based on the Adafruit boarduino, which I assumed works. I say that because I bought one, but never assembled it, It’s in a box somewhere…

I could’ve sent this off and had a board made, but the OCD side of me said to add ground plane to it. So what is the workflow for doing this?

Let’s say the bottom of the board will be the ground plane. Do I route everything that isn’t ground on the front of the board, as much as I can, then fill in the ground plane area? Do I need to route ground traces? And is the ground plane created after all non-ground traces are routed? By that, I mean, can I create the ground plane, then define traces that won’t be connected to the ground plane and the ground plane will adjust itself. From what I have seen, the ground plane won’t change, so I’m thinking that is one of the last things I want to define/create.

Thanks for all advice,

In KiCad I add GND plane (at top) as my first step in designing PCB. I make it much bigger then my PCB to cover PCB and all elements that at the beginning are out of PCB.
All planes (including that GND plane) adjust themselves whenever you press hotkey ‘b’.
Thanks to that GND plane most GND connection line disappears and thanks to that I see only connections I have to route (as I plan to have GND at bottom all connections to GND will be just vias near the pad needing be connected to GND. Seeing only connection you need to do is very helpful during placement (I have to press ‘b’ frequently). You can imagine which way (staying only at top) you will route each track. For long connections I sometimes route them temporarily just to hide that line and help to imagine if others will be possible to route.
When I have most placement already done and start to route I add GND plane at bottom. It was not needed before as I use really only SMD elements. With SMD and THT elements I would probably start with placing top and bottom GND planes and with only THT elements I would probably start with only bottom GND plane. So really I use GND planes to hide GND connection lines. In V6 (it will be possible to hide specified nets) I will probably not start design with GND plane.
If you left both GND planes or only the bottom is your decision. I left both. Bottom is 100% plane (without openings) and each small part of my top GND is via-stitched to my bottom GND plane.

Thanks for the explanation on working with ground planes!

I’m glad I started over on the PCB routing! I think I have a much cleaner design now…

A ground plane on the bottom layer, and only 6 via’s needed. I used 1mm x 0.6mm via’s, as I understand it, it’s the most common size via.

I am open to all comments and I am still refining this. Up next, I will be working on silkscreen labels for connectors.

Thanks for all the comments & suggestions,

Does SW1 need to be in its current position? If it were moved to the right side of the board, it would simplify your routing significantly and allow you to have a much more intact ground plane.
You could also move R3 and use the space underneath it to run several tracks.

The “bus” between JD2 and IC1 can probably be moved to the front side if you just push some other tracks further from the way and maybe move some components a bit. That makes a big difference.

Smaller changes: wwap the places of UI and C3. Rotate C1 180 degrees and move R2 downwards.

Reducing the amount of vias isn’t a top priority. You can for example run the leftmost track from C1 in the top layer and change to the bottom layer only when it hits other tracks. Together with the JD2/IC1 connection on the top it gives continous bottom plane.

Thanks for all the replies!

I sent the files to Aisler for fabrication and got 3 boards made. I had all the parts needed to assemble the board, but forgot to get a socket for the ATMEGA328. So I ordered an IC socket and some other stuff from amazon. Once I got the socket, I assembled one board, everything fit and the board worked. I had some problems programming the board, but got that figured out.

While waiting on shipments, I went into KiCad and learned how to create my own symbols & footprints for an LED. I also took the 3d file for the LED into FreeCAD and changed the colors of the 3d object. I then created a schematic and PCB for the stop light portion of this project.

Here’s what I came up with:

12 LEDs, two groups of three giving me a 4 sided traffic light. Here’s a PCB view:

The idea is right hand connectors will make the long PCB stand up vertically from my home brew arduino. The three smaller boards connect with right angle connectors to each other and then to the long PCB, giving me a 4 sided traffic light. I didn’t spend time designing proper PCBs for this because I’m not having any made. Part of my amazon order included a pack of various sized double sided protoboards, I’ll just hardwire it together.

I welcome all thoughts and ideas,

Ehhh… I suppose that’s better than ordering from eBay. I don’t know if I would trust Amazon as a reliable vendor for things electronic. I usually go with the big 3 (DigiKey, Mouser, Newark not necessarily in that order) here in the states, occasionally from smaller electronics vendors (for example Jameco).

The problem I have (for myself, YMMV) with ordering something technical from Amazon is they usually don’t have any of the support documentation available, nor do you necessarily know what vendor you are getting your parts from through Amazon and counterfeit parts are a thing. At a previous job we got some counterfeit chips through DigiKey (or maybe Mouser? I forget the details) and they bent over backwards to remedy the issue and I got the impression (based on the forensic reports that they shared with us) that they were trying to figure out where the counterfeits came from. I doubt Amazon would put that much effort into policing the supply stream.