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¶
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
Softwares¶
Universal Gcode sender¶
A full featured gcode platform used for interfacing with advanced CNC controllers like GRBL , TinyG, g2core and Smoothieware.
GRBL¶
These instructions were extracted from GRBL documentation here:
- Launch the Arduino IDE
- Make sure you are using the most recent version of the Arduino IDE!
- Load the grbl folder into the Arduino IDE as a Library.
- 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.
- 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.
- IMPORTANT: Select the grbl folder inside the grbl-XXX folder, which only contains the source files and an example directory.
- 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.
- Open the GrblUpload Arduino example.
- Click the File down-down menu, navigate to Examples->Grbl, and select GrblUpload.
- 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.
- Compile and upload Grbl to your Arduino.
- Connect your Arduino Uno to your computer.
- 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)
- 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:
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.
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/
Version 1.0¶
Version 2.0¶
Test a star:
Test a circle and rectangle:
Test a robot: