My pcb did not work and i don't know why

I was playing with electronic for long time and build even complicated devices like device for setting the speed of electronic watches (receiver of very weak 32768Hz signal, 1MHz thermostatic generator (I build one from discrete elements + styrofoam) and several TTL counters). Each time I had a problem with something not working I dreamed of oscilloscope till I have build one myself. Nowadays it is much simpler - you can buy oscilloscope relatively cheap.
If you plan to do anything more with electronic the first ‘must have’ is oscilloscope.
You can of course try help yourself with multimeter as others suggest and in many cases it could be enough. But generally nothing can replace an oscilloscope.

I don’t like tracks at your PCB being 5 mils wide. I use 10 mils and in some places 8 mils. If I had THT elements with such big pads I would probably get out of pad with 20 (30) mils track and than change to 10 mils (just to have a solid track at the place where you solder).
You can check (with multimeter) if everything what is expected to be connected is connected (to check if any track isn’t broken) then you should understand your circuit so you should know what voltage (what signal if tested by oscilloscope) should be at each point and check if it is there.

All I am asking is that you are certain that the cable providing power is configured to have a positive tip polarity; many tips can be swapped to make them negative.

Next up, I think you have a real mess on your hands. I am unable to read the intent of the circuit from your schematic.

diplwmatikh.sch (30.0 KB)

To start, look at the changes I made by removing many of the ground wires and replacing them with the GND symbol. You should continue to remove all the ground wires and replace them with the GND symbol.

Next, tell me what your intent was with P6 pins 3,4, and 5. Are these pins to be set as Input or Output?

Just took a quick peek at the board. Unless I am mistaken, your traces (all of them) are only 5 mils thick. You might find that the board did not etch properly or that some tracks might be broken.

Your ground pour is connected to the ground pins of the arduino by a thin sliver of a track (5mil). You might find the you get issues if you try to power the board from the top DC jack.

While probably not neccessary, you did not connect the ground pin of header P5 (The ground next to the AREF pin)

Is the arduino going to be powered by a separate supply than the DC jack on the shield? You have not connected any power pins on header P2 to the supply on your board. So the arduino would have to be powered by a second supply (Which may have its own issues, reverse feeding from IO pins etc)

EDIT: I cannot see from the picture but make sure the metal solder joints of resistor RDiv1 are not touching the metal case of the USB jack on the arduino when you push the hat onto the arduino board.

EDIT: Not sure if I understand the circuit but it appears you are attempting to mux 1 of 8 sensor inputs into an opamp circuit. The arduino selects the “channel” and reads back the result from the opamps? Would need the datasheet of the sensor to understand more.

EDIT: What is the intended purpose of the 4 x 100p capacitors? Noise filtering?

EDIT: On a side note. You have a push-pull (totem-pole) output opamp driving one of the arduino I/O lines. If there is a bug in your code, you could potentially drive an output with an output and damage either your opamp, arduino or both. Consider adding a small resistor in the line to prevent damage if this does occur.

EDIT: Your 100n deoupling capacitors must be as close to the chip they are decoupling as possible. The caps on the board are miles away.

EDIT: It can happen, check that the chips have been soldered the correct way around and make sure the pins are not bridged/shorted with solder.

EDIT: Can you post some more pictures of the actual board. The board does not look like it is seated properly on the Mega, the pins of the header are exposed.

Post the information about your operating system and KiCad version.

Its a center positive

I wish i never started this project. Unforunately i had to because it is a part of my thesis. The other two parts are programming though

Thank you. I got a multimeter. How do i use it for this cause? The ohm-meter doesn’t it measure resistance? Why not the beeper function?

How did i ended up using these tracks? I am using jlcpcb and each board house has their won rules. Since this is my first project, i didn’t know what value to place. Forum members said about a guy that has templates for all the big board houses. I downloaded the file from github and imported his values.

Thank you very much for you schematic!
The intent of the circuit is this
 All the circuit does is measure resistance. But because you can hook up , up to eight resistances the two chips below are MUX/DEMUX to select the proper one.
Actually the upper chip uses an analog circuit (i can send you if you want) that will output a square pulse in relation to the resistance. The higher the resistance, the different width of the pulse.
The pulse is fed to an arduino which uses timer interrupts to measure the width of the square pulse, in order to determine the resistance.

These pins are used by the arduino to set the MUX/DEMUX. So i guess output (from the arduino point of reference)

Thank you!
I got the traces size from a template for jlcpcb
 I don’t know if this is a problem.

The arduino was supposed to be powered by the USB cable but the circuit from a barrel jack.
But since the arduino has a 5V output, i can power the board from there, this is what i will do in my next revision.

EDIT1: Ha, you are commpletely right on this one. Unfortuantely this board is big. I thought it would fit perfectly. But i used tape to insulate the resistor to make sure it does not touch.

EDIT2: This is absolutely correct! Please see my previous post for more info. The sensor is a common resistance.

EDIT3: It should be one 400pf cap, but since i couldn’t find one, i placed four in parallel. It is part of the analog circuit that will produce the square pulse analogous to the resistance of the resistor. If you want the schematic, i can post.

EDIT4: My code works fine. I already have this circuit in perfboard and breadboard. I tried to cleanse the mess with a shield. It is part of my thesis.

EDIT5: You are right on this one. I removed them completely. I routed them wrong. More info here:
https://forum.kicad.info/t/pcb-with-kicad-possible-error-in-routing-decoupling-capacitors/

EDIT6: I made sure the pins are mounted in the correct way. But that’s not to blame, because not even the RESET button is working (which is just pull GND to arduino pin)

EDIT7: My next post after this will contain a picture

Thank you!

Ubuntu 20.05
KiCAD 5.1.5

It is not hard to guess that those templates contain minimums houses can manufacture. I use board house in my city. Their minimum is 4 mils but I never tried it. Working at border of possibilities is asking for problems.

Do you know that real capacitors have their tolerances?
You should ask yourself how accurate that value have to be. If you can correct something with software than you probably could use 390pF (typically 5% so 370-410). Or if you need to believe that you have 400 you could use 390+10.

“Thank you. I got a multimeter. How do i use it for this cause?”
What do you expect @Piotr ?

Someone doing their thesis in electronics should either be able to do basic troubleshooting, or go back to the books / lectures.

I assume this is first and foremost a computer science/software engineering thesis and this Pi hat is just a side show.

Edit: Oops, Arduino shield.

Yes you are right! they have minimums. If that is the case what should i change? Only the trace width? From 5 to 10?

Yeah i know about tolerances. I have taken care about that. They are 1% and they work fine for my purpose. Thank you for mentioning it.

All right. Things got even weirder.

I hooked up the multimeter

Everything in the button is ok. Used the beeper and two legs of the button are hooked to GND and when i press the button all the buttons are hooked to GND. It even gets transfered to the arduino pin.

About the voltages now.

The voltage at the barrel jack is 4.53V, at the op-amp chip is 4.32, at the one MUX chip is 4.48 and at the other MUX is 3.92.

Is this normal? Since it is the same channel


Anyway, since the button at least it’s working, things are getting weird. Why it’s not “talking” with the arduino?

I can’t even read the sensors, nor does the RESET button work.

One theory could be that because the board is long it doesnt fit well and the pins do not touch the female header pins of the arduino. But i don’t think this is the case, since i pressed it firmly with my hands when testing



What do you guys think?

Disconnect power supply and measure resistance between power and gnd.
With that much voltage sag it is likely you have a short somewhere. Or a blown micro.

Its mainly a software thing, but i also had to make this pcb.

I measured the resistance with the multimeter setting at 20KΩ and i got -> 9.71 kΩ
Then i turned the multimeter setting at 200KΩ and i got -> 62.3ΚΩ.

But then all the other times i measure i consistently got 0Ω 

I cannot understand what is going on


If the button on the board appears to be working then the pins are probably not seating properly even though you are pushing down on the board.

The board might be pushed too far up by the Jack and USB connector. Try and “extend” the pins by plugging in a plain SIL connector strip into the arduino pins then plugging the board into the strip.

EDIT: You say the sensor is a “common resistance”. Is it just plain resistor? Or does the sensor look like a resistance?