CNC Electronic Control

My CNC uses an Arduino running GRBL along with UGS sending commands to the Arduino. The Arduino then uses step and direction pulses to control the NEMA 23 steppers. The Arduino also controls the spindle, along with the air blast (to clear grindings) through a solenoid actuator.

 

When I first wired my CNC up I just taped two bread boards to a wall and hoped none of the wires would get bumped! After a few months I decided I should make a proper box for it before it falls apart. So over a 2 week period I redesigned all the wiring. I also added drag chains and sleeves on the wires to protect them. I added support for the spindle to be controlled by g-code, and spent a while trouble shooting electrical noise problems. I narrowed down electrical noise problem to the solenoids and relays. The problem was fixed with some capacitors and iron rings around the wires (to increase inductance.)

First wiring setup

My first wiring setup using breadboards!

My first wiring setup with the cables held by ropes and counter weights at head height.

My first wiring setup with the cables held by ropes and counter weights at head banging height.

I rewired my CNC with drag chains as before I had counterweight and wires hanging from the ceiling that made it impossible to move the CNC and I always hit my head on the counterweights.

I rewired my CNC with drag chains to replace the counterweight and wires hanging from the ceiling that made it impossible to move the CNC. I always hit my head on the counterweights.

Some more progress

Some more progress.

Completed control panel

Completed control panel.

Better wiring setup.

Much better wiring setup.

Through this project, I have learned a lot about circuit design, wiring and dealing with electrical noise. Arduinos are more sensitive to noise than PLCs or more traditional and expensive controllers. I have spent a lot of time troubleshooting electronics and almost every problem was caused by electric noise, only once did I have a problem due to a loose cable. In all my subsequent projects I’ve focused a lot of effort on designing circuits to be isolated with optocouplers and isolated DC-DC power supplies. Particularly for my more critical systems and sensitive microcontrollers.

 

Software

I use UGS (an open-source controller that communicates with GRBL another open-source control software) to send my g-code files which tells the CNC what to do in order to make the part.

I use UGS (an open-source controller that communicates with GRBL another open-source control software) to send my g-code files which tells the CNC what to do in order to make a part.

This is a tool paths I programmed In HSMWorks (Fusion 360 CAM except in Solidworks) to make the top bearing block for the rudders

This is a tool paths I programmed In HSMWorks (Fusion 360 CAM except in Solidworks) to make the top bearing block for the rudders.