0
\$\begingroup\$

New to electrical engineering and designed the following circuit board to improve my skill, particularly with an Arduino Micro: PCB The idea is relatively simple: the Arduino Micro drives eight buttons attached through a 5 Pin Molex Picoblade connector at D2 to D9, with 10K (pull up?) resistors to the connections, grounded and energized at 5V. However, I can't seem to get the high signal when simply bridging in the molex the GND line to the pins (thus "pressing" the button, as far as the microcontroller is concerned).

What mistakes did I make? What can I do better next time?

\$\endgroup\$
10
  • 5
    \$\begingroup\$ Your design uses pullup resistors, hence shunting an input to ground is indeed what a switch should do, but that would result in a low signal, vs the high signal that would be present from the pullup resistor when a switch is open. \$\endgroup\$ Feb 9, 2017 at 23:59
  • 8
    \$\begingroup\$ Please post a schematic showing your intent \$\endgroup\$
    – DerStrom8
    Feb 10, 2017 at 0:01
  • 2
    \$\begingroup\$ Where is the whole thing getting power? \$\endgroup\$
    – W5VO
    Feb 10, 2017 at 0:04
  • \$\begingroup\$ The power is coming from a 5V MicroUSB cable, at 2 amps \$\endgroup\$ Feb 10, 2017 at 0:46
  • 1
    \$\begingroup\$ The PCB isn't working, because you didn't do a schematic. [@stark answer.] \$\endgroup\$ Feb 10, 2017 at 17:14

1 Answer 1

1
\$\begingroup\$

What you can do to improve your design is scrap the pull-up resistors from the PCB and use the internal 20k pull-ups of the MCU instead. Then you can get rid of both the 5V trace and the external resistor footprints, reducing possible errors. You need to configure D2..D9 as INPUT_PULLUP instead of INPUT in your setup function, like this:

pinMode (2, INPUT_PULLUP);

As to why it doesn't work (apart from the obvious, that has already been pointed to you by others: when you close the "switch" you are pulling it LOW, not HIGH) it's impossible to tell without looking at your code. Once you simplify you circuit getting rid of the external pull-ups, if you keep not observing a level transition when "operating the switch" then it'll mean that something is failing in the code of your setup and/or loop functions.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.