Skip to content

12. Machine Design

Todo list

Assignment:

[] design a machine that includes mechanism+actuation+automation+application [] build the mechanical parts and operate it manually [] actuate and automate your machine [] document the group project and your individual contribution

Ideation and design

【figma】

pic.png

pic.png

Board

We use Makeblock at first.

https://www.makeblock.com/cn/project/megapi

http://docs.makeblock.com/diy-platform/zh/electronic-modules/main-control-boards/megapi-pro.html

pic.png

pic.png

Softwares

  1. Arduino IDE
  2. ~~Universal Gcode sender~~
  3. GRBL firmware

pic.png

Universal Gcode sender

A full featured gcode platform used for interfacing with advanced CNC controllers like GRBL , TinyG, g2core and Smoothieware.

pic.png

GRBL

pic.png

These instructions were extracted from GRBL documentation here:

  1. Launch the Arduino IDE
  2. Make sure you are using the most recent version of the Arduino IDE!
  3. Load the grbl folder into the Arduino IDE as a Library.
  4. Click the Sketch drop-down menu, navigate to Include Library and select Add .ZIP Library. The Add .ZIP Library command supports both a .ZIP file or a folder. In our case, there is no .ZIP file.
  5. You can confirm that the library has been added. Click the Sketch drop-down menu again, navigate to Include Library, then scroll to the bottom of the list where you should see grbl.
  6. IMPORTANT: Select the grbl folder inside the grbl-XXX folder, which only contains the source files and an example directory.
  7. If you accidentally select the .zip file or the wrong folder, you will need to navigate to your Arduino library, delete the mistake, and re-do Step 3.
  8. Open the GrblUpload Arduino example.
  9. Click the File down-down menu, navigate to Examples->Grbl, and select GrblUpload.
  10. Do not alter this example in any way! Grbl does not use any Arduino code. Altering this example may cause the Arduino IDE to reference Arduino code and compiling will fail.
  11. Compile and upload Grbl to your Arduino.
  12. Connect your Arduino Uno to your computer.
  13. Make sure your board is set to the Arduino Uno in the Tool->Board menu and the serial port is selected correctly in Tool->Serial Port. (There are some controller boards on ebay that have the Arduino Pro bootloader on it, if you get error messages like “avrdude: stk500_getsync() attempt n of 10: not in sync: resp=0x20” then choose another board, try Arudino Pro/Pro Mini)
  14. Click the Upload, and Grbl should compile and flash to your Arduino! (Flashing with a programmer also works by using the Upload Using Programmer menu command.)

After install grbl:

pic.png

Failed to upload code:

In file included from /Users/tobin/Documents/Arduino/libraries/grbl/config.h:30:0,
from /Users/tobin/Documents/Arduino/sketch_testgrbl/sketch_testgrbl.ino:3:
/Users/tobin/Documents/Arduino/libraries/grbl/grbl.h:68:4: error: #error "Required HOMING_CYCLE_0 not defined."
#error "Required HOMING_CYCLE_0 not defined."
^~~~~
/Users/tobin/Documents/Arduino/libraries/grbl/grbl.h:108:4: error: #error "WCO refresh must be greater than one."
#error "WCO refresh must be greater than one."
^~~~~
/Users/tobin/Documents/Arduino/libraries/grbl/grbl.h:111:4: error: #error "Override refresh must be greater than zero."
#error "Override refresh must be greater than zero."
^~~~~
exit status 1
Error compiling for board Arduino Uno.

pic.png

grblupload Using UNO

In file included from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/nuts_bolts.h:56:0: warning: "max" redefined
 #define max(a,b) (((a) > (b)) ? (a) : (b))

In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:93:0: note: this is the location of the previous definition
 #define max(a,b) ((a)>(b)?(a):(b))

In file included from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/nuts_bolts.h:57:0: warning: "min" redefined
 #define min(a,b) (((a) < (b)) ? (a) : (b))

In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:92:0: note: this is the location of the previous definition
 #define min(a,b) ((a)<(b)?(a):(b))

In file included from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/nuts_bolts.h:61:0: warning: "bit" redefined
 #define bit(n) (1 << n)

In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:124:0: note: this is the location of the previous definition
 #define bit(b) (1UL << (b))

grblupload Using Mega2560

In file included from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/nuts_bolts.h:56:0: warning: "max" redefined
 #define max(a,b) (((a) > (b)) ? (a) : (b))

In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:93:0: note: this is the location of the previous definition
 #define max(a,b) ((a)>(b)?(a):(b))

In file included from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/nuts_bolts.h:57:0: warning: "min" redefined
 #define min(a,b) (((a) < (b)) ? (a) : (b))

In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:92:0: note: this is the location of the previous definition
 #define min(a,b) ((a)<(b)?(a):(b))

In file included from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl/nuts_bolts.h:61:0: warning: "bit" redefined
 #define bit(n) (1 << n)

In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:124:0: note: this is the location of the previous definition
 #define bit(b) (1UL << (b))

In file included from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\grbl.h:31:0,
                 from C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\serial.c:22:
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\serial.c: In function 'USART_UDRE_vect':
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\cpu_map.h:34:25: warning: 'USART_UDRE_vect' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
   #define SERIAL_UDRE   USART_UDRE_vect
                         ^
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\serial.c:107:5: note: in expansion of macro 'SERIAL_UDRE'
 ISR(SERIAL_UDRE)
     ^~~~~~~~~~~
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\serial.c: In function 'USART_RX_vect':
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\cpu_map.h:33:25: warning: 'USART_RX_vect' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
   #define SERIAL_RX     USART_RX_vect
                         ^
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\serial.c:143:5: note: in expansion of macro 'SERIAL_RX'
 ISR(SERIAL_RX)
     ^~~~~~~~~
In function 'USART_RX_vect':
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\serial.c:143:1: warning: 'USART_RX_vect' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
 ISR(SERIAL_RX)
 ^
In function 'USART_UDRE_vect':
C:\Users\ZCBPC10\Documents\Arduino\libraries\grbl\serial.c:107:1: warning: 'USART_UDRE_vect' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
 ISR(SERIAL_UDRE)
 ^
项目使用了 30166 字节占用了 (11%) 程序存储空间最大为 253952 字节
全局变量使用了1633字节(19%)的动态内存余留6559字节局部变量最大为8192字节

EASEL

https://easel.inventables.com/

pic.png

pic.png

Version 1.0

1650252843173235.mp4 (1.42MB)

Version 2.0

pic.png

pic.png

Screen Recording 2022-04-19 at 20.28.04.mov (13.1MB)

pic.png

pic.png

pic.png

pic.png

pic.png

Test a star:

pic.png

pic.png

Test a circle and rectangle:

Test a robot:

pic.png

pic.png

pic.png

Perfect Configuration

pic.png

Final Result

pic.png

pic.png


Last update: June 18, 2023