Push buttons causing reboot

Made a lot of progress on my project (a counter using push buttons to increment/decrement leds) but am running into an odd issue with the push buttons. I’ve set them up as pull-up, with a 10K resistor and wire to an Ardruino Nano on the “output” side of the button, so when the push button is open (pushed down), the signal wire carries 4.7v. I’ve tested this with a volt meter and am getting 4.7v on with wire to the Nano when the button is pushed, but when I hook it up to the Nano, it gets reset. I had it working at one point but am lost as to why it’s now not working.

I’m not including the code or layout because most of it is the LEDS, MAX7219s, etc. which are working fine. The only issue is that, whenever I use a push button, the Nano is reset.

Your button either makes a short circuit or is connected to the reset circuitry. Does any onboard LED go black when You press the button?

You are not likely to receive helpful responses without posting your code and schematic. (A pretty Fritzing picture is not a schematic).

Railroader:
Your button either makes a short circuit or is connected to the reset circuitry. Does any onboard LED go black when You press the button?

That's what I suspected, so it's in the wiring and not likely the code.

SteveMann:
You are not likely to receive helpful responses without posting your code and schematic. (A pretty Fritzing picture is not a schematic).

I understand, but 90% of the code and schematic is related to the LED displays and logic, and the push button code, at the point where it reboots, has barely started, so I wanted to see if my suspicion that it's a short is on target. I'm doing something wrong with the pb wiring. Will isolate that into a simpler project to determine the issue.

A close picture of the soldering could help us, and You. I use a lupa to check isolation when soldering.
Try a schematic for the button, to be sure to be sure.

Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

If you haven't got one, then now is the time to draw one.
Reverse engineer your project, you may find the cause of your problem as you go.

Can you post a link or picture of the button please?

Thanks.. Tom... :slight_smile:

You can write a simple program that demonstrates the behaviour. Personally I would go a step further and disconnect everything except the button circuitry and test that separately with a dedicated program; not sure if that is possible in your setup.

That's what I suspected, so it's in the wiring and not likely the code.

In your code, where you have

pinMode(counterButton, OUTPUT);

Please change this to

pinMode(counterButton, INPUT_PULLUP);

I moved the push button circuitry to another, simpler project and verified that the push buttons were operating correctly. Did more testing of the soldering on the main project and by testing continuity on the various pb connections, discovered that a bad soldering connection was creating a short. Fix the soldering connection and all is working as expected.

Small mistakes have huge impacts.