Project on a PCB doesn't work. Bad layout?

Hi,
Some of @arad2456 pics;

Pity you chose a white PCB, it makes following your tracks difficult.

Tom.... :grinning: :+1: :coffee: :australia:

Hi,

There doesn't appear to be any data on that part number.
Where did you purchase it?
Is it a logic level N-CH MOSFET?

Tom... :grinning: :coffee: :australia:

WattsThat

Please don’t host pictures on an external site. That site tried to push crap VPN software onto my iPad. Very bad :poop: behavior for a website.

I am so sorry for that :frowning: I just wrote in Google "share PDF" and used the first site I saw

wvmarle

Don’t you communicate with the DF Player using Serial?
´

I do, which brings me to my next question. I just measured everything. Pin 8 should go low and take the MOSFET with it which will active the player. I just measured it and the pin stays high independently of the button. This is clearly the problem, when I pull the gate low with a wire all goes well. I uploaded the code 3 times and it stays like that (the IDE wrote "done uploading" and all seemed right. Is it possible that the code is not uploading correctly because of the connection to the Tx pin? I tried to upload the code only after I soldered (which I definitely regret at hindsight).
I thought this pin matters only if I want to make a serial communication with the computer. Apparently not.

No need for that connection. Just use the “secret voltmeter ” trick. Do remember to calibrate as the internal reference has a 10% tolerance.

Thank you for that, I'll use it next time.

Jiggy-Ninja

You have nothing soldered to the Battery terminals. How are you powering this? I don’t seen any other place for power to get onto the board.

I put the wires in the holes and see that all is well through the power led of the Arduino. Those wires need to go through a tunnel later, which is why I am not soldering them yet.

TomGeorge

There doesn’t appear to be any data on that part number.
Where did you purchase it?

Thank you soooo much for posting those pictures here :slight_smile: :slight_smile:
I bought it from this store in Germany. There isn't any official datasheet from the store, I found the datasheet by writing NDP6020p in the internet.

Is it a logic level N-CH MOSFET?

N-Channel? It should a P-Channel no?
It is logic.

Thank you guys so much for your answers, time and help, I really appreciate it :slight_smile:

Hi,
Sorry you are using a P-CH in your circuit.

Yes that will work, if it really is a NDP6020p.

Tom.... :grinning: :+1: :coffee: :australia:

Then check the voltages on the button and the button's pin and see if it changes when you actuate it.

TomGeorge

Yes that will work, if it really is a NDP6020p.

Thank you :slight_smile:

Jiggy-Ninja

Then check the voltages on the button and the button’s pin and see if it changes when you actuate it.

I did and something is very wrong here. I can upload codes and everything is normal beside the fact that pin 8 always stays high, regardless of what I do. I uploaded this code :

void setup() {
  pinMode(8, OUTPUT);
}

void loop() {

  digitalWrite (8, LOW);
  delay (1000) ;
  digitalWrite(8, HIGH) ;
  delay (1000) ;
}

To see what's going to happen and it still stayed high. then I uploaded this :




void setup() {
  pinMode(7, OUTPUT);
}

void loop() {
  digitalWrite (7, LOW);
  delay (1000) ;
  digitalWrite(7, HIGH) ;
  delay (1000) ;
}

And everything was normal and pin 7 alternated between high and low. So it's not a code problem. I tried it with both PCBs I soldered and both of them made exactly the same behavior. In one PCB I checked before I soldered and pin 8 worked very well. Does anyone have any idea what's going on here? Thank you all very much

Check/measure the 10K resistor between VCC and pin 8. If it is a lower value part, say perhaps 10 or even 100 ohms, pulling the pin low will not result in a logic low voltage, it could be several volts. Anything lower than about 150 ohms and you can exceed the maximum current rating of the pin which can result in a device failure - which can manifest itself has a permanently high pin.

A 10k 1% resistor should be brown-black-black-red brown. But, don’t take the colors at face value, measure it with your DMM. Since there are other devices connected to VCC, you may have to lift one end of the resistor to measure the correct value.

It's possible you broke that pin somehow.

Check/measure the 10K resistor between VCC and pin 8. If it is a lower value part, say perhaps 10 or even 100 ohms, pulling the pin low will not result in a logic low voltage, it could be several volts. Anything lower than about 150 ohms and you can exceed the maximum current rating of the pin which can result in a device failure - which can manifest itself has a permanently high pin.

I just did and unfortunately they both have a resistance which is very close to 10 KOhm

It’s possible you broke that pin somehow.

Maybe, but what are the odds that I broke pin 8 (and only pin 8) in both Arduinos? especially when I checked it on one Arduino before soldering and the pin worked perfectly well

Thank you guys for your help :slight_smile:

(Edited. Corrected mistake in voltage measurements)

Your earlier program, with a simple modification:

void setup() {
  pinMode(8, OUTPUT);
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite (8, LOW);
  digitalWrite (13, LOW);
  delay (1000) ;
  digitalWrite(8, HIGH) ;
  digitalWrite (13, HIGH);
  delay (1000) ;
}

Compile, download and run it. Then, with your DMM, measure the voltage between GND and VCC at the Pro Mini pins. Record that voltage.

Move the red meter probe to pin 13 and observe the voltage for 5-6 seconds. Record the high level voltage.

Move the red probe to pin 8 of the micro. Repeat the 5-6 second observation. Record the voltage(s) you see. Note if it changes at the same time as the LED blinks. You may see one or two different voltages which will be very close, it depends upon how many counts your meter resolves.
Please post those readings. It should tell us a few things, mainly if pin 8 is shorted to VCC.

If the pin 8 voltage matches VCC, there is good chance the output transistor is shorted. If thats the case, I’d remove the 10k and 330 ohm resistors connected to the mosfet and test again. With the pin unconnected, it will remain at VCC if the internal output transistors have failed while the program toggles the pin every second.

Hi,

Can I suggest instead of soldering your controller and SD card boards onto your PCB, you fit them with header pins, that I assume they came supplied with and solder header socket strips to your PCB.

Can I suggest power switched OFF you measure the resistance across the 10K in this image please?
RES
Thanks.. Tom... :grinning: :+1: :coffee: :australia:

You obviously missed the point: you can use the hardware Serial interface to communicate with the DF Player. And, if wired correctly, still use that interface to upload software.

Also I saw on your images you are soldering wires directly onto your PCB. It's much better to use connectors for that - my favourite is JST-XH, but there are many others, including screw connectors (Phoenix MSTB is a very nice one) if you don't want to be crimping wires. That makes it much easier to connect and remove wires, and as the connectors are through hole no risk of pulling off a PCB trace.

In reply #21, second image showing the back of the circuit board, it looks to me like all the pads for all the pins down each side of the pro Mini are joined together, shorting out the pins. It might just be the photo or the way I am looking at it. Can you confirm those pins are not all shorted? And apologies if this has been mentioned and I missed it, I've not carefully read every reply.

Corollary: white soldermask looks nice, but it’s opaque enough to make debugging a newly designed board more difficult than it ought to be...

Exactly. Which is why what I said might be wrong.

Just a few observations:

  1. Hand drawn schematic. Didn't you have to produce a schematic to have the board manufactured ?
  2. No FTDI headers. Isn't programming difficult ?
  3. Voltage measurement with pin 8 oscillating at 2Hz (1s on / 1s off). I'd have used 5 seconds to allow the meter to stabilise.
  4. The suggestion of socketting the major components with female headers is definitely good for a future project.

The observations about pin 8 being permanently high, if not caused by a measuring error, are certainly important in the troubleshooting.
I would also have tried shorting the gate of the PMOS to ground to see if that brought some life to it all.

Thank you so much for all of your answers :slight_smile: There's a major development, you can see it in my answer to WattsThat.

WattsThat

If the pin 8 voltage matches VCC, there is good chance the output transistor is shorted. If thats the case, I’d remove the 10k and 330 ohm resistors connected to the and test again. With the pin unconnected, it will remain at VCC if the internal output transistors have failed while the program toggles the pin every second.

I made the measurement and saw that the voltage on pin 8 was constant on 4.93V ( = Vcc ) so I followed your message and desoldered both resistors (10 KOhm und 330 Ohm) and now it works and the output of pin 8 changes. So the problem is clearly there somewhere, yet where? I really have no idea why would such a thing happen.

I still added the measurement for the case they might be of interest.

TomGeorge

Can I suggest instead of soldering your controller and SD card boards onto your PCB, you fit them with header pins, that I assume they came supplied with and solder header socket strips to your PCB.

I would be happy to do that but at the end I plan to put the PCB inside a housing which will be glued. I am afraid that if the housing will somehow fall one pin will get disconnected and it will be a headache to bring it back

Can I suggest power switched OFF you measure the resistance across the 10K in this image please?

I did and it was 10K Ohm on both PCBs.

wvmarle

Also I saw on your images you are soldering wires directly onto your PCB. It’s much better to use connectors for that - my favourite is JST-XH, but there are many others, including screw connectors (Phoenix MSTB is a very nice one) if you don’t want to be crimping wires. That makes it much easier to connect and remove wires, and as the connectors are through hole no risk of pulling off a PCB trace.

Ok screw connectors are actually a good solution for the problem I wrote in my answer to TomGeorge. I will definitely do it in the future :slight_smile:

PerryBebbington

In reply #21, second image showing the back of the circuit board, it looks to me like all the pads for all the pins down each side of the pro Mini are joined together, shorting out the pins. It might just be the photo or the way I am looking at it. Can you confirm those pins are not all shorted? And apologies if this has been mentioned and I missed it, I’ve not carefully read every reply.

No, they are not shorted, it just looks like that.

6v6gt

Hand drawn schematic. Didn’t you have to produce a schematic to have the board manufactured ?

I did but I had a hand written schematic already so I just uploaded it to the forum. It looks exactly the same though.

No FTDI headers. Isn’t programming difficult ?

I just put the headers from the FTDI in the holes. It is a bit annoying but it works well

Voltage measurement with pin 8 oscillating at 2Hz (1s on / 1s off). I’d have used 5 seconds to allow the meter to stabilise.

I will do that next time, the problem was on the layout though. See in my answer to WattsThat

Thank you all very much, it means a lot for me and I am very grateful for your answers and help :slight_smile:

I was thinking the same thing. It makes me wonder if the PCB was done the hard way by hand also.

The problems you are experiencing is exactly why we do a prototype PCB with socketed components.

Breadboard --> Prototype --> Final product

Well, I'm glad you have localized the problem. It would have needed quite a direct short to hold the pin high against a digitalWrite() of LOW so I wonder what it turns out to be.

If the design software generated a schematic which resembled that hand drawn version, then it must be some quite grim software.

SteveMann

The problems you are experiencing is exactly why we do a prototype PCB with socketed components.
Breadboard → Prototype → Final product

Ok yeah it makes sense... next time I'll do it like that

6v6gt

If the design software generated a schematic which resembled that hand drawn version, then it must be some quite grim software.

ahahahahah well hand drawings are like babys... even if it's hideous it's still pretty when it's yours

This is the schematic I have in the software