Feedback on PCB Design

Hello, I am looking to get some feedback on a PCB I have designed. I am currently designing a moving light that can be controlled through DMX. Essentially, I am using a Max485 chip to receive the DMX signal and send it to an Atmega328. I have two A4988 stepper motor drives to control two stepper motors and the LED will be made using NeoPixels. I am using a 15V power supply to power the motor drivers and a 5V power supply for everything else. I also have a relay to make sure the 5V is turned on before the 15V. Below is a picture of the schematic I have created.

Schematic.pdf (94.4 KB)

I have tested this circuit using a breadboard and it seems to work, so I created a PCB design using the schematic.

The smaller traces are 0.5mm and the larger traces are 1mm. I have never designed a PCB before, so if anyone could give me some feedback, such as proper trace width and spacing, or if anything looks obviously wrong, it would be much appreciated.

Just the appearance of your board looks quite nice. (I mean sane, functionable, reasonable.) But I do have one other comment:

I have power on the brain. One very good practice is to bypass the power supply pin of each IC, as close as possible to the pin and the IC, with a bypass capacitor. These days I would use something like a 1 uF or 2.2 uF 0603 chip as close as possible to the IC supply pin and make a short connection to a ground plane. Do you have a ground plane?

  1. It looks like you are not using much SMT but I encourage you to do so. Except for hand wiring without a pcb, I can think of no advantages these days of small leaded components over SMT ones. You can use a small-ish 0805 footprint for 0603s to provide easier hand soldering.

  2. I am not going to try to learn about your circuit, and some ICs are less sensitive to bypassing than others. If you wanted to omit capacitors once the board is designed to fit them, omitting them is easy to do. But at maybe $0.03 each for an 0603 ceramic capacitor if you buy a strip of 100, it seems hardly worth the trouble to diagnose what goes wrong if you omit the capacitors.

Reverse C3. What are U1 & U2?

2 Likes

A few cosmetic things on your schematic.

Why are they multiple GND and VCC Symbols? It makes it more difficult to read and troubleshoot.

image
image

When doing a schematic try and keep the Power at the top and GND at the bottom. It makes the schematic much easier to read and spot issues. I initially thought your caps were the wrong way around. (So it should be similar to the circuit connected to J7)

image

I’d also add a bypass cap to U2

Cap values for the MCU change to 22pF which is the recommended value.

On the PCB try and move the Reset/D6, D13 to the edge of the board. It will make it easier to solder wires to the points

The idea of using THT at top and SMD at bottom allows to use space better. Elements at bottom can be at the same locations that elements at top. It looks like you avoid it.
For example when you look at your bottom picture - D1 looks being connected in surprising way. You can place it under relay and its connections will be shorter.
If you have enough room for all at top you can place those SMD also at top but it is your choice. I used to have all THT at top and all SMD at bottom in 90s.

Electrolytic capacitors at bottom are certainly wrong solution.
When you read that the capacitor should be as close to something as possible it is related to small ceramic capacitors that has low ESR (Equivalent Serial Resistance) in a range of 0.01 ohm. Electrolytics have ESR around 1 ohm. You should use small ceramic capacitor (range 100nF) as close to IC as possible and if higher capacitance is needed than electrolytic capacitor can be in some distance from it. As nowadays small ceramics can have uF capacitances in many cases you can avoid electrolytics at all replacing 100nF + electrolytic with one 1206 10uF (or bigger) ceramic capacitor.

You should not left input pins of any IC not connected. Even MAX485 driver is blocked by DE the DI should not be left floating. It seems it has no effect but input buffers tend to consume extra VCC current when input is left floating. Some internal circuits can be switched on and off because such input can receive noise. That switching also consumes current in pick pulses what is then a source of noise at your VCC.

I use 0.25mm tracks for signals, and wider for VCC (1mm is in most cases OK). I don’t have GND tracks as I use whole bottom as GND plane. It is important from EMC (Electromagnetic compatibility) point of view.

Having “never designed a PCB before” you’ve created a very nice looking layout.

Will conductive (metal) standoffs be used to mount this board? If so, the two traces on the bottom side (see image) will eventually make electrical contact with that standoff. In my experience solder mask is not a mechanical insulator.

MOUNTING_HOLE

The same caution applies to the top side. If conductive hardware is used the fastener will break through the solder mask and make electrical contact with the ground plane. This may, or may not, be what is intended.

1 Like

You’re right about C3, I missed that, thank you. And U1 is an ATMega328 and U2 is a MAX485 chip, it receives the DMX signal

I want to be able to access Gnd, 15V, and 5V in case I forgot to add anything, so I added test points so I can add a turret terminal and easily solder wires to them if need be.

I’ll also change the MCU cap and look into adding the bypass cap. Thank you

When researching how to wire the A4988 stepper drivers it always showed an electrolytic cap. With what you’re saying though I should be able to switch it for a ceramic cap?

Initial I believe I had the DI pin on the Max485 tied to ground, but when testing, the chip wasn’t working. So I removed that connection, but also changed a few other things and it worked. I’ll try reconnecting it again though. Should the enable pin of the A4988 stepper driver be connected to something as well?

Yes, metal screws are going to be used. I will definitely change the layout. I did not think about the screws possibly shorting the 2 traces. Thank you!

I have never used stepper driver.
In any modern switching circuit as effect of switching there are high current pulses. It is because modern circuits are able to switch very fast and can have internal keys with high current capabilities.
Even you read in datasheet that something switches in 5ns it is possible that it switches in 1ns (making loading parasitic capacitances currents being 5 times higher). It is because it can be cheaper in production (search ‘Die shrink’).
It is better if such current pulses flow in as short circle as possible. As these are short pulses you need not a big capacitance as current source for it (100nF is enough). But you need a capacitor with as small ESR and ESL as possible. So ceramic is for that much better then electrolytic. It also can be placed closer to the IC taking those current pulses. So the common solution is to give 100nF as close as possible and electrolytic C somewhere else (distance not critical). 100nF works for current spikes and electrolytic for slower pulses. Since some time ceramics with relatively high capacitance started to be available. They can be more expansive than electrolytic with same capacitance and voltage, but they can replace both (100nF and electrolytic). If you need high capacitance for high voltage then you will have to use electrolytic. I didn’t looked into parameters of elements you used. It was just general information how it should be done.
If you want to read more just see articles I have mentioned few years ago (hope links are still valid):

If driver is not enabled shoring DI to GND should have no effect.

I don’t know A4988 but generally all input pins should be set to known state. Some inputs can have build-in pull-ups or pull-downs allowing you to not polarize them externally.

Reading the data sheet, tying pin 4 DI high or low will force pins 6 & 7 and consequently, Pin 1, into permanent states that cannot be changed by signals into DMX 2 & 3.

The result being Pin 2 of the 328, an external counter input will be disabled.

Board won’t work as expected.

That’s why I have two parts in my library: a simple drill (also useful from time to time) and a screw, having a keepout zone to prevent accidently routing a trace over it or beeing filled by a ground plane. In your case, the screws will still connect GND to the chassis. This may be ok but be aware of it.
In fact I have a third part for a screw that has a pad to surely connect it.

I would also suggest to reduce the clearance of the GND fill. Set it to 0.3mm and you will get connections under the IC pins resulting in a much stiffer GND connection.

It seems C5 & C6 are both decoupling capacitors.

Maybe place another one on +ve of U2?
Place it where 5V TP is?
Move 5V TP over near J7?

And another one for A2, between A2 & R3?

Practically at each of my PCBs there is RS485 driver (not MAX485 but something like it). Not reading its data sheet I don’t believe in what you have read there.

https://html.alldatasheet.com/html-pdf/73493/MAXIM/MAX485/1035/8/MAX485.html

Page 7 pin 4.
Page 8 Fig.1

The configuration for that IC is quite different to most others. That is why I went looking after the OP wrote that it wouldn’t work if Pin 4 was grounded.

At alldatasheet there are several datasheets. One I opened had mentioned by you Fig. 1 at page 7.
So here is link to datasheet:
https://www.mouser.pl/datasheet/2/609/MAX1487_MAX491-3129519.pdf

Read about pin 3 and look at Table 1 at page 10.

Thanks for the link to an easily readable data sheet.

A high on pin 3 overrides the output generated by pin 4, so to Gnd. pin 4 the OP needs to alter his PCB so pad 3 is connected to Vcc instead of Gnd.

Because pin 3 is Gnd instead of Vcc

Mouser and Digikey are good sources for datasheets of elements they have. I used alldatasheet only few times to find datasheet of inaccessible (old) elements.

You are wrong. Check it once more.
Pin 3 set to VCC enables the driver but OP needs to have driver disabled so pin 3 should be connected to GND as he did it.
Since 90s we use (in most of our products) ICs that are MAX485 functional equivalents (+ some extra features we need).