Hello all, Hoping that someone can help here because my internet searches on this topic have left me more confused than I was when i started.
I'm working on a project that uses the following components (not all are shown in the picture):
5V Components:
Arduino Nano
Limit Switch
Micro Servo
Photoelectric sensor
20x4 LCD Display with i2C
12V Components:
uLN2003 Stepper Motor Driver
28BYJ-48 Stepper Motor
Other Components:
5 Button Membrane Keypad
LM2596 Buck Converter (Step Down)
Power Supply:
12v 2A Wall Plug
My question is about how to wire the grounds and if ceramic capacitors are needed. When I first wired everything using the breadboard, it all was working fine. Then I went to assemble the permanent version soldering to a prototype board and whenever the limit switch was activated, it reset the arduino. This was not the intended function. When trying to understand what went wrong, the likely culprit was either a ground loop or noise in the wiring since all of the wires were close together and overlapping in a small design. I will eventually share the details of the entire project and hopefully be able to share a final build soon for others who might be interested in building it.
Anyway, back on topic, my understanding was that it is best practice for all of the components to share the a common ground regardless of some being 5v and some being 12v. My question is how to properly connect the grounds? Do i use the OUT ground from the buck converter to connect to the Arduino GND and then all component GNDs to the arduino GND? (like in the picture above? )
Or
Do I connect all the component GNDs, including the Arduino GND to the breadboard GND rail? And if this is the correct way, do I use the GND coming out of the 5v end of the buck converter? Or do I use the ground directly from the 12V wall plug?
Or
Are neither of those options correct and there is another way it is supposed to be wired?
Second question is... Where (if anywhere) do I need to use 100nf ceramic capacitors?
Thank you in advance to anyone who offers assistance.
Once I get this part sorted out, i will post the fritzing diagram for the entire build.