Seeking help with project - a simple desktop trinket

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,
Randy

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,
Randy

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.

You sir, are correct. My amazon order was a 10 pack of 28-pin dip sockets, an assortment of colored 5mm LEDs, a pack of right angle pin headers, and an assortment of proto boards. The dip sockets are scrap. One had a mangled connector and the one I used, one of pins wanted to push up and out of the plastic socket as I inserted into the pcb. Haven’t looked at the LEDs or the headers. The proto boards are double sided PTH boards and are of good quality. Yes, it is a YMMV case with amazon & ebay.

The next part of the project is building a USB interface board for my home made arduino, so I can program directly from my pc, without using another arduino. Here’s my schematic:

and my PCB:

It’s all SMD because I have to learn to work with it. I have no experience with this stuff, so I choose larger footprint components. All parts for this was ordered from digikey.

I’ve been reading this thread:
https://forum.kicad.info/t/smd-assembly-hot-air-plate-or-oven/30716/16

I don’t have a hot air set up for this type of work, or an oven to use for this type of work. But I do have a clothes iron from another hobby, and a saute pan with sand is easy to do also…

Will update when I get results.

I’m open to any suggestions,
Randy

In my opinion good 2 layer SMD design has as continuous GND at bottom as possible.
For example - you could go with TXD and RXD on top without any vias by going under D2 and R1 (using 0805 case) to point only one.
If you really have to use bottom for tracks they should be as short as possible (Instead of jumping with track to bottom I use 0R in such cases).
And you should add (randomly at PCB) some more vias to connect top GND and bottom GND.

I keep repeating myself. Feels like a parrot.

One thing I notice that revolt_randy used 7805s, today I would use switching variant. Like for instance https://www.digikey.fi/product-detail/en/recom-power/R-78E5-0-0-5/945-1648-5-ND/2834904
They don’t get hot, but they don’t like reverse voltage, and they fit on the original 7805 footprint.
In my experience Arduino CPUs are quite tolerant about how power and those 100nFs are routed. I once forgot one power supply connection of Atmega2560, and board worked normally. But it is better to learn good habits now. One friend built a truly minimal STM32L00 CPU board and could leave out many of those capacitors, STM32L are not Arduinos of course.
If you live in Europe you could use https://www.tme.eu/fi/ too.

Edit: those Switching 7805 can be found on KiCad in DCDC library. But Kicad libraries are not too easy to search.

In my opinion it is possible to solder 0603 and larger SMD parts normally. Take soldering iron with small tip and thin solder. The CPU should be possible also. Look for shorts and unsoldered contacts.
With good tools It is possible to solder 100 pin CPUs.

Hey, thanks for the replies!

I ordered boards and a solder paste stencil from https://aisler.net/, because I’ve used them before, I like their pricing, and their support for FOSS. Parts & solder paste ordered from Digikey. Waiting on stuff to arrive…

I guess this is one area I haven’t thought of yet, routing under small components. Last PCB I had made, before this thread was started, used breakout boards. Sure, I routed traces under those boards, but never thought about under components.

After reading that remark, I read up on decoupling caps, they will be in the next design!

Thanks for pointing those out, I will look into them.

I think the Atmega328p used in Arduino’s will work with 3.3v-5v power, but don’t quote me on that… Very tolerant processor.

I wish I had good tools, or a budget for them. I went with bigger parts because I thought they would be easier to work with. I do need to be able to solder 100 pin CPUs, But I’m starting off small (with larger parts) to get the workflow down.

Anyway, thanks for the replies!

Randy

At your PCB you have track under D3.

By good tools I don’t mean expensive, for small scale work low cost Ebay tools are good enough.

Yes, let’s talk about tools, but first, here’s where I am at on this project.

I got the boards and the parts. Made a jig to hold the PCB and solder stencil and applied solder. I placed all the parts with tweezers and placed the PCB on a upside down clothes iron set to max. I plugged the clothes iron in and it reflowed the solder. I then unplugged the iron and removed the board so it could cool off quickly. I know that doesn’t sound very professional.

Before doing any of that, I decided to get my feet wet with SMD by starting small. I applied a dab of solder paste on 2 holes of a plated proto board. I placed a 0603 resistor between the pads and placed this on the iron. I then plugged the iron in and tried to measure the temperature using a digital thin probe thermometer. Like this one and it’s peak temperature got up to about 230 F. Yet despite that reading, the solder did melt and flow, soldering the resistor to the pads. I checked the resistance across the pads and got the value I was expecting. The data sheet for the solder says it reflows at 281 F. Obviously, I wasn’t getting correct temperature readings from the thermometer. I think it is because I am just touching the probe to the surface of the iron, it would probably be more accurate if the probe was inserted into the iron’s surface.

Anyway, with the board soldered, I plugged it into a usb port, and the power LED came on. Next, I plugged the board into my arduino clone and tried to upload code to the atmega328. This didn’t work, I got an error message from the arduino IDE that the programmer isn’t responding. I have tried some various settings in the IDE (different boards, etc) and still cannot get it to respond.

I want to inspect the solder connections on the board, but I don’t have a good magnifier for something this small. Soooo…

Can anyone point me to a good magnifier? Endless choices out there, but what’s good for electronic work?

I have taken a few pictures with my phone and believe I have solder bridging on the cp2103. My current soldering iron is way too big for this type of work, so recommendations on a good soldering iron is also welcomed. For instance, are the soldering irons with temp controls in the handle any good? Or should I be looking more at a soldering station that has temp controls in the station?

Open to all comments and advice!
Randy

I’ve got an Amscope stereo microscope. Works quite good. :stuck_out_tongue:
I’ve also got a few small loupes from Eschenbach. I got them for free, but they are surprisingly expensive (Over EUR60). A camera with a monitor can work quite good for inspection, but is sub optimal for soldering, as you have no depth of field and there may be lag between hand movements and what you see on the monitor.

For a soldering Iron, I had some interest in the TS100. It’s quite a nifty thing with everything built into the handle but is has some disadvantages too. There are only a handful of tip shapes available for it, and not really the tips I want, and the tips extend quite far from the handle, which reduces the amount of control you have during soldering. I still think it’s a good choice if the small form factor is important for you.

I think that any of the T12 clones are more practical though. There are lots of tips available. Original Hakko tips probably last longer, but you can buy a bunch of the cheap ones to have an assortment, and replace the few sizes you use most with higher quality tips when (or before) they wear out.
The distance between the handle and the tip is also quite small with these, and you can get lots of spare parts. Handles (+ cable), tips, electronics, housing (with or without built-in power supply).

For inspection, I like a watchmakers 's loupe like this
https://www.theloupestore.co.uk/Eye-Glasses--Watchmaker-Loupes/Jewelers-Loupe.html
The ones with plastic lenses are not very expensive but if you want ones with glass lenses they are rather more pricy). They take a bit of getting used to - you sort of screw them into your eye socket - which sounds painful but really isn’t. Easy to carry around and handy for all sorts of close inspection tasks. Useless for trying to solder with though - you need something with more working distance for that. I’ve got a headband magnifier for distance work but you only get limited magnification. I haven’t bought a proper microscope yet but plan on getting an optical one for the reasons mentioned. Using a webcam type microscope is not great. You don’t need anything too powerful though and don’t need to spend Leitz/Leica money…

Ive got both T12 and TS100 irons - the TS100 is very handy to pop in a bag as @paulvdh says - it is very portable and runs off a standard 18V laptop type power supply. The T12 works well and you can customise it - several different handles are available as well as lots of different tips. I would go for the T12 if you have a workbench where you can leave stuff out and the TS100 if you have to pack everything away.

Oh, theloupestore also sells the Eschenbach 3+6 I have:

https://www.theloupestore.co.uk/Hand-Lenses/High-End/Eschenbach-Precision-Folding-Magnifier--3x---6x---9x-.html

I rarely use the 3x lens but always the 6x (and I also never use both of them) 6x is quite impressive.

If you watch video’s from Big Clive, then sometimes he holds a small white magnifier in between his camera and something small and this works surprisingly good. I think his magnifier looks sort of like the picture below, but he has many video’s, and there are many similar, but still different products from China.
image

Since many years I am using such iron:


but I am not using it extensively.

780x linear regulators can oscillate if you don’t have a 100nf close by… 25 plus years ago, at a company I had joined, they had a PCB design (for an electric cooker!), and they were finding that a percentage of the 15 volt regulators weren’t giving 15 volts (as measured on a multimeter).

It didn’t take me long to spot that the decoupling caps were at the other end of the board. So I asked for a “non-working” board, glued a couple of 100nF caps onto the regulator, problem fixed instantly! (When I do anything with a regulator or DC:DC converter, whether that is on stripboard or a PCB, the decoupling capacitors are usually within half an inch! Never had any oscillation issues as a result!)

Which demonstrates nicely that joining the dots on a PCB often isn’t enough, you need to have some level of understanding of “things that need to be done correctly” for it to work. Like why you need a ground plane, what decoupling capacitors are actually for, and so on…

1 Like

Hey, thanks for all the replies!

I didn’t know who Big Clive is, so I searched youtube. One of the first results was this video in which he shows how he made a lightbox setup for his phone to take shots of PCB’s. I purchased a container like he is using, but it was clear, not frosted looking like his. I figured I would use some 80-120 grit sandpaper to rough up the clear plastic so it diffuses the light. This would allow me to take better shots of my board to look for problems with it.

However, I didn’t make that setup. Instead, I used my helping hand’s magnifier to re-examine my board again more closely. Under careful examination, what I thought I saw as solder bridging before wasn’t solder bridging, it was some sort of foreign object. Cleaning the area with a q-tip removed the object. I am a smoker and what I think I was seeing was possibly a cigarette ash, or lint from a q-tip. I don’t know which it was. Anyway, I was now 90% sure I had a good board, but it wouldn’t work as expected. So now I was thinking it was probably a software or configuration problem.

So I posted my problems on the arduino forum here and it turns out I had 2 problems with this.

My first problem was misunderstanding the data sheet for the CP2103. I thought the device would handle 5v logic, but I was wrong, it’s a 3v3 device. I used a breadboard and jumper wires to add in a level shifter between the two. Now I was getting serial data from the clone, but still couldn’t program it.

My second problem was the chip I bought for the clone. I bought an ATMEGA328-PU, arduino UNOs use a ATMEGA328P-PU. Different chips, different device signatures. Using the ATMEGA328P-PU chip in my clone works.

I also had to use Silicon Labs’ Simplicity Studio to configure the CP2103 GPIO pins for TX and RX leds. Now the LEDs indicate activity and I can program my clone just like an UNO.

Thanks to everyone who posted to this thread, I’ve learned from your advice. I will be adding it more de-coupling capacitors closer to devices in the future.

As far as tools go, I see I will need a reflow oven. I’ve looked to makerspaces in my area, but none of them have reflow ovens. I guess I know what my next project will be…

Thanks,
Randy