Go Down

Topic: Controlling a big stepper motor (Read 4967 times) previous topic - next topic

zeus2kx

Thanks.
Should I add pull up resistor (1000ohms?) to limit switches and remove

Code: [Select]
  pinMode(lmitSwitchRight, INPUT_PULLUP);
  pinMode(lmitSwitchLeft, INPUT_PULLUP);

from the code?

Robin2

Thanks.
Should I add pull up resistor (1000ohms?) to limit switches and remove

Only if you think the internal PULLUP resistor is not working to your satisfaction.

And I doubt if you need a value as low as 1000ohms. 10k or 5k6 should be sufficient.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

zeus2kx

#62
Mar 19, 2018, 09:18 pm Last Edit: Mar 19, 2018, 09:55 pm by zeus2kx
I am not confident that the problem has something to do with PULLUP.
It is strange that the pressing of opposite side limit switch activates the motor.

Don't you think if I flush out the serial upon activation of any limit switch would help?
I tried couple of different ways but didn't succeed.

UPDATE:
I added 15K pullup resistors to both limit switches.
I see no change.  >:(

Robin2

Don't you think if I flush out the serial upon activation of any limit switch would help?

I have been waiting for you to post the updated program following my advice in Reply #60

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

zeus2kx

I have been waiting for you to post the updated program following my advice in Reply #60

...R
Code: [Select]
digitalWrite(lmitSwitchRightPin, HIGH); or similar are LEDs. They light up when their respective limit switches are pressed. Even though I turn them LOW, this would have only effect on LEDs, although they seem to be just fine.



Go Up