No button works on Arduino Pro Mini

Hi!I have an Arduino Mini Board that is used to program the run time of an electric brushless motor, but I have a problem, it doesn't matter where I connect a button, I tried from pins 2 to 6 except 5, the button always reads 0, I tested it with a multimeter and the button works, I tried to set pinmode input or input pullup but it still reads 0 no matter what I do.


It is impossible to see from your 'phots exactly how you have connected the button. Please post a schematic of your circuit. A 'photo of a pencil and paper drawing is good enough

How exactly did you determine that the button did not work ?

We need to see a schematic of what you are trying to make. Photographs alone don't cut it in electronics.

I don t have a schematic but there is an Arduino Pro Mini, 3 header pin with pin1 going to gnd, pin2 to vcc, pin3 to pin10 on the arduino board, here the ESC is connected to provide power and read the signal sent by the pin10, then I have an led connected to pin5 and then to the same gnd using a resistor and a button that needed to be connected to pin2 and to the same gnd.

Then draw one!
It amazes me that you think you can do such a thing.
I have been doing electronics since the early 1960's and I can't do that.

What makes you think you are smarter than me?

It s just a simple schematic....I ll draw one, my bad...

Does the multimeter show the voltage on the input pin switching?

...The most common problem is the lack of a pull-up or pull-down resistor. Most Arduinos have a built-in pull-up that you can enable in software. Then the switch/button is wired to ground so that it "overpowers" the pull-up, pulling the input pin down when the switch/button is on.

I don't have a handy schematic for using a pull-up but the Digital Read Serial Example shows you how to wire an external pull-down resistor.

Doesn't the internal pullup resistor work?On a Nano board this worked.

There's a difference of about 0.64v when pressed or not pressed

This would be caused by the input pin not being pulled up to 5V. Without an external pull-up resistor to VCC, the internal pull-up would need to be used.

But I do not understand...On my Nano board it worked only with the input pull setting from pinmode, plus this switch has only 2 pins, where would I connect the vcc?

One end of the resistor to VCC and the other end to the switch terminal on the Arduino input pin.

Either your sketch is not activating the internal pull-up or the Arduino input pin is shorted to ground.

Momentary button switches are usually only 2 pins.

Why can't the current generation get the simple act of posting in the correct orientation?

Here is your schematic the right way round:-

Not that it makes much sense.

The Arduino should be shown as a rectangle. All the things connected to the Arduino should be shown as wires coming off that rectangle and back into it.

I have no idea what the three pin header is, and the push button wiring is not shown. Normally a push button has four pins but only two connections. It is normal that you only wire these types on two pins across the diagonal of the body. Any diagional is fine but use only one.

My guess is that this is the part you have wrong, because it you connect the button connections only to the sides you have a 50% chance of the push button being permanently switched on, that is always connected.

Your photographs do not even show the push button!

EDIT:-

In which case my guess is wrong.
With a two pin button you connect one end to the ground, and the other end to the input pin. The input pin is also connected through a resistor to the Vcc. A value of 1K to 10K is fine.

The internal pull up resistors do work on a Nano, but they are only weak. Many cheap push buttons have a minimum current draw that perhaps could not be supplied by the internal pull up resistors.

The pushbutton is present in both of the pgotos, altough in one only a part of it may be seen

I think you were right about the short between the input pins and the gnd, I desoldered the wires for the button and the other components and cleared the solder with a solder wick and resoldered with much more caution and now it works, thanks!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.