Errrm what's that..lolThe inputs still should be software debounced ....
Largely not important if done correctly in hardwareErrrm what's that..lol
I am confused. Why do you say sorry. You are helping me.neither the pullups or capacitors are necessary, who ever programs the arduino, simple use the pinmode input_pullup, and simple debounce standard code example , but just do as you like .... sorry
That is a massive sweeping statement that may or may not hold true - it depends on a lot more than just shoving an opto-isolator on the inputs and hoping for the best. Usually ground noise comes from supplies which always cause an issue in CNC setups.There is no „ground noise
Again another sweeping statement, it is probably unnecessary in this particularly situation but often you can not guarantee what state the pin will be in (or necessarily trust it - I have seen plenty of microcontrollers and FPGAs do weird things not according to the datasheet when being programmed and/or initialised), hence why you need an external pull-up / pull-down to keep things in a defined state until this have been initialised appropriately.a stronger pullup instead the internal pullup is total ********
Filtering and snubbing on the switch inputs. Normally there'd be an inline resistor connected to the pin so that you can set-up a low-pass filter.Also the capacitor to to keep the pin stable high?
Interesting viewpoint - in a previous life I worked for a company building a lot of high-performance radio equipment and I'm not sure I came across a single situation where we bothered with software debouncing. It was usually done in hardware, even on the stuff that had circuit boards measured in square mm. Mind you our stuff tended to get installed once and then left behind for decades so you tended to ensure you had the hardware there because you could usually upgrade the software remotely if required but you had to make damn sure the hardware was right.I wouldn't bother debouncing your switches in hardware. It's not usually done on most circuits I've worked on because it's generally cheaper, easier and more reliable to do it in software.
I am happy for the debate. I might learn more about what I am doing.@sako243 It's a subject that causes a lot of debate but it really boils down to what you're trying to achieve. I work in Power Electronics research so most of my inputs are analogue measurements that I then digitize. Any pushbuttons I have tend to be doing a set/reset job so if it bounces it doesn't really matter because the latch has already been tripped. Also, with the nature of research, we're not usually building things to last a long time so we're not too worried about what happens when the switch is old and worn and more prone to bouncing. In another situation, debouncing may be far more critical.
I'm guessing a bit here, but if the OP is using the input to observe a limit switch, chances are he'll use that information to inform the controller that the limit has been reached and the movement needs to be reversed. In which case, it might not be critical if the transition is logged more than once because it will just be setting a latch that's already been set anyway.
Ordered the Boards from China. I always listen to Matth.Either use veroboard/strip board or get the job done professionally in China for pennies. You'd frankly be mad in this day and age to invest money on kit to make your own boards which will turn out a fraction of the quality at far greater cost.
I wouldn't bother debouncing your switches in hardware. It's not usually done on most circuits I've worked on because it's generally cheaper, easier and more reliable to do it in software. You can use a small pullup resistor to hold the input pin at 5V until the switch is pressed, pulling the pin down to 0V. A large value resistor is fine for this, such as 10K, however it really is not critical, anything from 1K to 100K will work fine usually. The microcontroller you're using may even have internal pull-ups you can enable. This will be even better because it will avoid having to mount another resistor on your circuit board.
Feel free to keep posting questions about the circuit design and the PCB layout. I've done a fair bit of this and I'm happy to help.
If you're referring to the 3 X 100nF, you just want bog standard ceramic....select voltage rating that fits the pitch of the PCB holes
I use Farnell more than RS