Hello everyone,
I was working on a menu interface using a rotary encoder (Enc A, Enc B, Push) and all was good until the Push button stopped working after about 2 days. I moved from Pin 30 to Pin 31 and it was all working fine, didn't put too much thought into it. Next day Enc A pin failed (pin 28).
After a quick look into the voltages with a scope I think I've damaged the PullUP resistors. Not sure how, but I did it.
Idle voltages on the idle pins are approx. 400mV (8bit oscilloscope). Working PINs have PullUp of 2.8V.
Initial test circuit (used for push button) might not be right, I've soldered the capacitor in the wrong location, but should still be ok.
The second one should be ok (Enc A), but still damaged the pullup resistor. Are series resistors needed for using the pin pulled to GND?
Code I use for test.
Do you think the pullup's are damaged? How did I manage to do that?
Thank you!
I was working on a menu interface using a rotary encoder (Enc A, Enc B, Push) and all was good until the Push button stopped working after about 2 days. I moved from Pin 30 to Pin 31 and it was all working fine, didn't put too much thought into it. Next day Enc A pin failed (pin 28).
After a quick look into the voltages with a scope I think I've damaged the PullUP resistors. Not sure how, but I did it.
Idle voltages on the idle pins are approx. 400mV (8bit oscilloscope). Working PINs have PullUp of 2.8V.
Initial test circuit (used for push button) might not be right, I've soldered the capacitor in the wrong location, but should still be ok.
The second one should be ok (Enc A), but still damaged the pullup resistor. Are series resistors needed for using the pin pulled to GND?
Code I use for test.
Code:
const byte interruptPin = 30; // Pin 28 - Nok Pin 29 - Ok Pin 30 - Nok Pin 31 - Ok
volatile byte numberofpressed=0;
void setup() {
Serial.begin(9600);
Serial.println("Basic Interrupt Test:");
pinMode(interruptPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(interruptPin), PressedButton, CHANGE);
}
void loop() {
//Serial.println(numberofpressed);
}
void PressedButton() {
numberofpressed ++;
Serial.print (numberofpressed/2); Serial.print (" ");
Serial.println (digitalRead (interruptPin));
}
Do you think the pullup's are damaged? How did I manage to do that?
Thank you!