I made a circuit in eagle and after patiently waiting for it to come in the mail I found out I screwed up a part of the circuit. I think I have it fixed, however I'm worried I will send it back out... wait 4 more weeks, and get another bad circuit back in the mail. so I was hoping I could get some feedback. I can make this work on a breadboard no problem... but seem to be having trouble in eagle. So here is a pic.
On the bottom right I have vcc going to a pin through a resistor(actually pin 2 on my arduino) the pin is supposed to be set to high, when I push a button that is connected off board to the 2 pin header, the pin should go low.
This is how I had it before, and it is always low... high when I push the button (shorting jp4) is it possible I just put in a resistor of too high value?
The arduino pin is being used as an input, in case I wasnt clear.
This is how I had it before, and it is always low... high when I push the button (shorting jp4) is it possible I just put in a resistor of too high value?
The only way that could happen is if the button is NORMALLY closed, and when you push the button it OPENS the circuit. Either you've got a different switch to what you were thinking, or you've got the wrong legs wired up.
The second schematic is what you want. You could of course change the logic inside your program so that a LOW means not pushed and HIGH means pushed.
It's not so much that it's a BAD switch, it just doesn't operate exactly the way you first thought
If you are using one of those little 4 legged tact switches, you might have picked two of the legs that are normally closed. If you pick two legs that are diagonally opposite, they should be normally open when the button is not pushed and closed when it is pushed
Do you have a multimeter? If so, you should start by testing the switch (with power off, measure Ohms), and then check the voltage on the input pin (power on, measure Volts).
And could you please tell us the value of the resistor?
wow!!! you were right... the switch is closed, and open when I push the button, exactly the opposite of what I wanted. This means the boards I made are correct, yay!!
I have the boards though, so I need to get a new button switch rather than change the circuit. Thanks a bunch guys.