I started building a drink mixing machine with an Arduino Uno, some solenoid valves and two pumps. I started from scratch with absolutely no knowledge on microcontrollers or electronics. I really learned a lot in the last few months thanks to this forum.
I already have a working prototype on a breadboard and want to transform this setup to a PCB and 3D print a case for the drink mixer. I used KiCad to draw the schematics and already did the layout for the PCB. Now I have two questions left before finalizing the project.
When a drink is selected, the Arduino will trigger some transistors (2N2222A) which cause multiple valves to open. Across each valve there will be a flyback diode (1N4007) to protect the transistor from reverse voltages. (See attached image 01). Since the PCB will be 4-layers and there is a power- and a GND-plane, I’m not sure, if the planned PCB layout is correct.
Same question for the pumps: The Arduino will trigger a transistor and when the pump is running, a LED should be lighting up at the same time (See attached image 02 - Please assume that the LED will be protected by a fitting resistor). Is it correct to put the LED around the flyback diode and will this setup work for the planned PCB layout?
I hope the provided information is sufficient to describe the scenario. Please let me know if anything is unclear.
Thanks + Cheers!