A while ago i've made a custom desktop CNC mill. Since then i was upgrading it with new components. Last time i've added a second Arduino with 4 digit display to control RPM of my spindle using PID loop. I had to connect it with primary Arduino board with 5 wires, so they can communicate. But during my first test i broke a motor controller, so i've bought a new, more powerful one. It also had 5 more wires i had to connect. At this point the +5V pin on main board was split into 4 separate connections and i just didn't feel like splitting the wire again. So i've done something else.
Step 1: Sketching Connections
I've sketched out all of the connections that were needed (excluding motor and endstop wires because they are going straight to GRBL controller and nowhere else). I've also made some changes to already existing connections - the emergency stop now also resets main Arduino and it uses only the normally open contact, where previously it was using both NO and NC to control a relay. With the new motor controller the connection to relays was also simplified.
Step 2: Connections Problems
The previous motor controller i was using was a simple board with optocoupler and a mosfet. It could only spin the spindle in one direction, so there was no need to use the direction pin. New one is a bit more complicated. It has pins called INA and INB, and depending whether i want clockwise or counter-clockwise rotation i have to pull one of them to VCC. It doesn't sound that complicated, the problem is that GRBL has only one pin called SP-DIR (spindle direction pin) which is pulled to VCC for clockwise motion and to GND for counter-clockwise motion. I don't know if this can be changed inside GRBL (it is a bit too complicated program for me) so i've done this with a different methid.
I've just added a NOT logic gate into the schematic which will invert SP-DIR signal and put it to INB. Therefore when DIR pin is high, INA is also high (they are connected together) and INB is inverted to low (CW), and when DIR is low, INA is also low and INB is high (CCW).
Step 3: Smart But Not That Simple Design
Then i've designed a PCB in Eagle that had all of the necessary connections inside. But with that many wires it was not that simple.
Firstly i've made a custom Eagle library for my terminal blocks. It is very simple, it basically is just a normal pin, just larger - 5.08 mm (0.2") spacing.
I would mill it on the CNC and that's why i wanted it to be a single sided board. But with 26 terminal blocks and some internal connections to logic gate it was a hard task to design it. It could be done but with a lot of jumper wires. That is the reason why all of my terminal blocks (in Eagle) are just a single pins. This way i can move them around in the Board workspace and avoid using jumper wires. The drawback is that the location of some connections seems random. For example looking at the bottom there is GND, then SP-EN and then VCC, which is very uncommon. But this way i could reduce the number of jumper wires to just 2 and it is easier for me to fabricate the PCB.
The terminal blocks names are also special. They were grouped, so for example A stands for Arduino, so all screw terminals called A_ should be placed on the bottom of the board because Arduino with GRBL is placed below the PCB.
In the end i've also added a simple LED to indicate Z probe status.
Step 4: Making the Board
As i said before, i've milled the board on my DIY CNC, drilled the holes and solder all of the components. There was nothing special about the process, making PCB like any other.
If you don't have a CNC you can make the PCB using a thermotransfer method or order it from a professional manufacturer.
Also don't forget to check all of the connections with multimeter to find and fix any errors.
Step 5: Connecting Everything Together
One of the last steps was to place the ready PCB in the machine and connect all of the wires. I've printed a little board schematic to help me connect every wire where it should be. After once again checking the connections it was ready for testing!
Step 6: Testing & Done!
Everything worked like a charm the first time! I am really happy with the result, i have a lot less wires now in my CNC, and the ones let look very clean because they are all going only to this PCB and aren't splitting anywhere along the way.
I showed you a design of my PCB and it probably won't work anywhere else, but i hope that now you can make your own one to help you solve cable management problems in your DIY projects!
Leave your thoughts and ideas about my project in the comment section below.
Participated in the