1
Project Logs / Re: Electronic Leadscrew for the New Lathe
« Last post by vtsteam on February 22, 2026, 08:13:24 PM »Discovered a little problem today with the Arduino Nano. One of the switches that set the thread pitch wasn't actually working. The six switches I have are labeled A through F. The F switch was the problematic one. I hadn't noticed this earlier since it is mainly used for the last threads in my lookup table -- the coarsest metric threads, and I hadn't tested those yet.
The way things are supposed to work -- pushing any switch to "on" basically grounds it's connected pin in the Arduino. Specifically, my switch F grounds pin D13 on the little computer. But my program wasn't seeing that happening when I flipped the switch.
After doing some electrical testing and not finding anything wrong with the wiring, or the switch, I searched the web for "Pin D13", and sure enough, there were several user issues about a Nano's pin D13 as problematic for input! Apparently, this a known issue.
The reason, it turns out, is that on the nano this pin is attached to a resistor in series with a LED that is connected to ground. The function of that LED is so people can program these boards to run simple programs that flash it as a demonstration -- in fact the most basic program almost everyone starts with when they get one of these boards is called "Blinky" and it blinks that LED.
To do this the Blinky program converts Pin D13 into an output pin. This pin can either be programmed as an input or an output type. I am using it as an input. Unfortunately, the connection to a resistor and LED and then to ground makes it unresponsive as an input, though supposedly you can add a pullup resistor to +5V and get it to work that way. Recommended is a fairly small resistor since the LED is sinking a lot of current (relatively). But no actual value is given.
I tried a 10K and when that din't work, a 4.7K pullup but nothing changed. Finally I got mad at this road blocking #&%! circuitry and applied my soldering iron to the LED's series resistor -- a tiny surface mount speck, and just flicked it off of the board!
SUCCESS! Testing again, switch F now works, and I can select all of the metric pitches that I've programmed in.
The way things are supposed to work -- pushing any switch to "on" basically grounds it's connected pin in the Arduino. Specifically, my switch F grounds pin D13 on the little computer. But my program wasn't seeing that happening when I flipped the switch.
After doing some electrical testing and not finding anything wrong with the wiring, or the switch, I searched the web for "Pin D13", and sure enough, there were several user issues about a Nano's pin D13 as problematic for input! Apparently, this a known issue.

The reason, it turns out, is that on the nano this pin is attached to a resistor in series with a LED that is connected to ground. The function of that LED is so people can program these boards to run simple programs that flash it as a demonstration -- in fact the most basic program almost everyone starts with when they get one of these boards is called "Blinky" and it blinks that LED.
To do this the Blinky program converts Pin D13 into an output pin. This pin can either be programmed as an input or an output type. I am using it as an input. Unfortunately, the connection to a resistor and LED and then to ground makes it unresponsive as an input, though supposedly you can add a pullup resistor to +5V and get it to work that way. Recommended is a fairly small resistor since the LED is sinking a lot of current (relatively). But no actual value is given.
I tried a 10K and when that din't work, a 4.7K pullup but nothing changed. Finally I got mad at this road blocking #&%! circuitry and applied my soldering iron to the LED's series resistor -- a tiny surface mount speck, and just flicked it off of the board!

SUCCESS! Testing again, switch F now works, and I can select all of the metric pitches that I've programmed in.

Recent Posts