10. Mechanical design & machine design
Assignment
Mechanical Design (part 1 of 2)
-
Group assignment:
- Design a machine that includes mechanism + actuation + automation + application
- Build the mechanical parts and operate it manually
- Document the group project
-
Individual assignment:
- Document your individual contribution
Machine Design (part 2 of 2)
-
Group assignment:
- Actuate and automate your machine
- Document the group project
-
Individual assignment:
- Document your individual contribution
Mini CNC machine for PCB
The machine we made is a mini CNC cutter designed spcifically for cutting PCBs. We plan to use it in our course facing middle school students so it's main focus is safety and small in size.
The design and build process is documented in the group documentation page.
Firmware, configuration and workflow
My main role for the development of the machine is to figure out the firmware, control software and workflow for using the machine.
We decided to go with a pre built controller board MKS-DLC32 to save our effort for creating and testing our custom firmware and control. And it'll be a lot of effort to bridge the gap of generating tool path from the design and acturally driving the machine to cut the board.
The DLC32 is a esp32 based 3 axis cnc/laser controller board, and it supports the grbl firmware, which has became a widely used standard protocol for CNC controllers in the open source community. Which means a lot of control software supports the board.
MKS provides the firmware for the board, but unfortunately, the documentation is not very clear and has out dated. So the flashing and configuration involves lots of trial and error, and some of their customer services on Taobao. But I managed to figure out finally.
The firmware can be found here
on their github repo, and I used their latest version for CNC machine.
They have a firmware flashing and configuration tool, I tried it but it requires
installation and had some bugs on my machine. So I went the route of using the
command line utility esptool
to flash the firmware, and it worked fine. Just
download esptool
and
the firmware, connect the board and run the following command:
./esptool write_flash --flash_mode dio 0x0 V2.1.0_H35_20220526_02_N_CNC.bin
And the firmware will be flashed to the board. I packed the files needed to flash the firmware and a script containing the flash command in the Project files section, just download the zip file, connect the board, unpack and run the script, it will flash the firmware to the board.
Now the board is running the grbl firmware, it will accecpt commands and respond from the UART port. Any control software that supports grbl can be used to control the board. We use the OpenBuilds CONTROL, which has a friendly user interface and some usefull functionalities, one of which is adjusting the grbl settings and upload it to the board. We use it to configure the firmware to fit the hardware configuration of our machine, such as the axis directions, jog speed, spindle speed, axis accelerations, etc.
And for toolpath generation, we kept our current workflow of using mods, which turns the PNG images into gcode and can be opened by OpenBuilds CONTROL and output to the machine.
Video
Project files
- Firmware and flashing tool: firmware.zip