Advice re: capacitor placement

I’m teaching myself schematic design and PCB layout. I have done some basic connector to connector stuff to get used to KiCad interface etc. All is fine with that. So I am now adding an IC to add some complexity. I have read most of the data-sheet on the chip (have two of them in the layout). Below I have attached a screeShot of the project that I can test and use. This part of the design is a two player controller interface to my MiSTer. I’ve not had much success using a 2 player xinMo so I decided to see if I can utilise two seperate single player JoyWorrior chips, JW24GP32, which I found online that do a similar thing. I am still figuring out if it’s the right solution. But for now I’m using this to learn. I have also added a link to the datasheet below. I created the Symbol using a different JW ship symbol and the datasheet as references because it wasn’t in the library. I’m not in need of so many buttons but did ad a couple extra per player just incase thus did not need to use the Button Matrix Mode. I’ll also be expanding the feature set of the design incrementally as it would be good experience.

Apart from probably getting things wrong, not laying out by any standard and not being finished etc. I would like some advice. I specifically (right now) would like to know if I can use a single capacitor instead of two. In my screenshot I have the two highlighted and indicate which arrow where I would think to put just one. I assume this is ok and no value needs to change?

Thanks in advance for advice.

codemercs.com/downloads/joywarrior/JW_Datasheet.pdf

No, it’s not OK to use a single capacitor. Those capacitors are called “decoupling capacitors”, and their value is not very important (33nF or 470nF probably also works just fine) but their location is very important. They must be placed close to the power supply pins of the IC’s. When digital IC’s are switching their outputs, they do this very fast. Somewhere in the nano second region, and the wiring on the PCB is not able to deliver current to the IC’s so fast, and this will result in a (very short) dip in the power supply voltage during such transistions.

2 Likes

No, these are decoupling/bypass capacitors and should be put as close as possible to the power and ground inputs of the ICs. Don’t skimp.

2 Likes

In addition, if I were designing the circuit, I’d be tempted to fit a (single) smoothing capacitor… an electrolytic, something like 10uF or 22uF (10 volts), across the 5 volts, close to the USB connector.

3 Likes

Great thanks to all of you for the input. Make for good learning. Regarding the USB, I’m still figuring out the requirements so that helps. Still reading about them etc.

I am noticing that the KiCad net indicator lines on the PCB editor jumps from foot-print to foot-print when I’m moving them around. So I see I have to be careful where it links me when tracing.

Really enjoying the puzzle of it.

Hmm just thought maybe for the decoupling capacitors, which I do know about, not much about them, didn’t realise that’s what these were. But was thinking if I use a trace for ground from the capacitors back to their IC instead of using the flood plane might help. Or is that as janky as it feels thinking about it? Well I’ll se what it does anyway.

Not sure what you mean but it looks that you thing that GND connection with tracks is better than with filled zone.
If you really think like that (I’m really not sure) than it is wrong. You should use continuous plane to connect GND. Some time ago I have given an example of 2 layer PCB designed with whole bottom layer being GND (all vias you see there are GND vias):

If you want to learn about good PCB design you can read articles I have linked in past:

I just noticed that that thread was about Decoupling capacitors so you can also read it in whole.

I’ve never seen two ICs being connected to one USB socket. If such connection is suggested in datasheet than probably everything is ok, but I am surprised.

There is much more to PCB design then just making some connections. Decoupling capacitors are very near to the beginning of learning to do PCB design, and so is the bigger buffer capacitor that Paul.Blitz mentioned. GND planes are also a very important aspect.

Connecting two IC’s in parallel to an USB bus is also not going to work. No need in trying. (And those joywarrior things do seem like they are real usb devices and the USB is not abused as some generic connector).

Thank you Both for that.

Good point re: the two IC’s on the one USB. I had forgotten to mention and the issue had not occurred to me anyway. But the intension was just to wire up the IC’s to the USB temporarily. Originally I only had the one IC and then duplicated that part of the schematic. When I did that I forgot both have the usb datelines in them. Further down the line I intend to create a small USB hub as part of the design. In which case I was going to have each of these two IC’s utilise a USB dateline each of the USB controller IC. Glad you pointed this out since I probably would have forgotten this and learned the hard way.

My mentioning the ground trace was immediately pointless when I ran an auto trace to see what happened. Not really sure why I thought it might help apart from keeping my connection where I wanted it, but KiCad ignored it and resumed previouse behaviour. Just ignore that if it’s just gibberish.

It might not be my solution as mentioned in my first post. But I am hoping to resolve the two player issue by not using a single 2 player IC. When I use one such as one from XinMo I am unable to configure the second player. I might be wrong about the cause and solution and will test it before committing etc. Need to test these IC’s are going to actually work with the MiSTer anyway. Regardless I do like the separation anyway. Regardless it’s a good project for me to do some learning with, as a hobbyist.

I have been watching a lot of electronic YouTube for years so I have a general idea of what it’s about. Just non of the experience or the nuances etc. Thanks for the reading material links etc. By the way I trained as an industrial designer many years ago and the problem solving skills are very helpful here and the YouTube watch history gives me some scope in knowing what info to look for etc. Should help anyway.