Shorting 5v to GND?

I am a total beginner on this, and it would probably have been a better idea to ask for help before printing my PCB :slight_smile:

Anyhow, I have attached an image of my Arduino shield PCB.
I have connected switches to the jumper 1, 2 and 3. My goal is that you must turn on switch 1 then 2 and then 3. For example if switch 2 is off, then switch 3 cant be turned on.

The problem is that the arduino is not starting at all when I have my shield connected. If I connect the arduino with USB to my mac I get: “USB device drawing too much power”.

Am I shorting 5v to ground?
I use 1k resistors for the switches, is that to low? Should I use 10k?
Is there a major issue in my PCB design?

Thanks!

yes 10k-20k pull down resistors are recommended.

better yet would be to remove the jumpers and replace the resistors with your switches.

then use INPUT_PULLUP to enable the built in 20k resistors.

you must then also reverse the logic in your code.

This is a good write up on the subject: Switches tutorial

either way your PCB should be fine.

kenn1, can you please show your corresponding code? And connecting pins together like that is never a good idea. One mistake in code and you have a dead short. (Which is what seems to be happening, by your description.)

While you're just starting out and unsure of what you're doing, you would be better off to buy a breadboard rather than make 'shields' for such simple circuits, too.

If you want switches 2 and 3 to only be able to turn on if switch 1 is on etc, you should do it in code.

Anyway, post that code of your's so we can check it out to see what's going on. (Between code tags of course.)

Is possible the shield under side had shorted to the USB connector on the 5 V line, since on of your jumper was just on top of the USB connector.

BillHo:
Is possible the shield under side had shorted to the USB connector on the 5 V line, since on of your jumper was just on top of the USB connector.

Well spotted Bill.
Still not a good idea to connect pins together like that though. Better if each switch is separate to the others, and use code to handle the logic functions.

Hutkikz: yes 10k-20k pull down resistors are recommended.

No they are not. The size of a pull up resistor depends on what you want it to do. The smaller the value the stronger the pull up is and the more immune to interference it is. But also the stronger it is the more current you have to shunt to make it read a zero.

Just because the Arduino has weak pull up resistors of about 30K does not mean that it is in any way a "recommended" value.

Am I shorting 5v to ground?

Yes, somewhere but not on the PCB pattern.

I have connected switches to the jumper 1, 2 and 3. My goal is that you must turn on switch 1 then 2 and then 3. For example if switch 2 is off, then switch 3 cant be turned on.

That seems silly and is not the right way to wire things up. Simply read all the pins and do the logic with software.

You are much better off using pull up resistors not pull down, see:- http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

Did you etch the PCB yourself? You might find that there are small whiskers of copper that have not been completely etched away. Look particularly at the place where the 5V and GND tracks are closest, i.e. at the pins for 5V and GND.

JohnLincoln: Did you etch the PCB yourself? You might find that there are small whiskers of copper that have not been completely etched away. Look particularly at the place where the 5V and GND tracks are closest, i.e. at the pins for 5V and GND.

On most of the board the tracks are a fair way apart, (but it's still possible of course).

Bill might be onto something with his suggestion that the 5V track is shorting to the USB socket, too, on the left end of jumper 1.

And I thought it might have been a code error - making pin 10, 11 or 12 an output and low, shorting the 5V rail that way.

I hope that kenn1 comes back and lets us know the cause if he finds it.

Grumpy_Mike: No they are not. The size of a pull up resistor depends on what you want it to do. The smaller the value the stronger the pull up is and the more immune to interference it is. But also the stronger it is the more current you have to shunt to make it read a zero.

Just because the Arduino has weak pull up resistors of about 30K does not mean that it is in any way a "recommended" value.

I should be more careful about such cut and dry thinking.

Since my own main project is a power window & door control unit for my car with lots of switches in a noisy environment. I am sure you just saved me some frustration. Thanks

Thanks a lot for all suggestions / feedback. I have not started on the code yet, I just tested to connect the arduino with usb but it did not start. I am away at the moment and I will start troubleshooting as soon I'm home. :)

kenn1: Thanks a lot for all suggestions / feedback. I have not started on the code yet, I just tested to connect the arduino with usb but it did not start. I am away at the moment and I will start troubleshooting as soon I'm home. :)

It's possible, then, that the last sketch that was loaded into the board had one of those three pins set as an output and low, which would have caused a short between that pin and the 5V rail on your shield. Let us know how you go.

Hi, kenn1, what value are you resistors and can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

I have connected switches to the jumper 1, 2 and 3. My goal is that you must turn on switch 1 then 2 and then 3. For example if switch 2 is off, then switch 3 cant be turned on.

You can do all this in software.

What is your electronics, programming, arduino, hardware experience?

Tom..... :)

TomGeorge:
Hi, kenn1, what value are you resistors

He’s using 1K resistors.

Hi, Sorry didn't see it. kenn1, did you breadboard this project before making a PCB.

Tom... :)

BillHo: Is possible the shield under side had shorted to the USB connector on the 5 V line, since on of your jumper was just on top of the USB connector.

You were right! The board had contact with the usb connector. It seems to work fine now.

Thanks!

kenn1: You were right! The board had contact with the usb connector. It seems to work fine now. Thanks!

Well, that was easy.

You still need to think about whether what you're doing is the best way to go about it though. You shouldn't really connect input pins together like that, without 'safety' current-limiting resistors. It could lead to problems.

For instance, if you run another program on the Arduino, one that sets either pin 10, pin 11 or pin 12 to output and low, then plug in that shield and power up or try to upload a different program, you'll have another short-circuit situation on your hands.

The same applies if you make a mistake while writing code for that shield, and accidentally make one of those pins output and low.

That sort of logical operation is much better done in code, with each button wired independently.