You are on page 1of 5

AE483 - Introduction to Robotics

Session 5 - Cartesian Robot (Experiment 4)


Ajitha Nishma, Amar Deep Jyoti, Angshuman Bhardwaj,
Ankita Shandilya, Shaifalee Saxena
SC14B001, 002, 003, 004, 051
VIIth Semester
B Tech, Aerospace Engineering
September 23, 2017

Introduction
The present exercise involves experimentation with a 3D cartesian robot. It consist of two
prismatic joints allowing it to move in x and y directions and one more prismatic joint
made using a nut and screw arrangement that moves the end affector in the z-direction.
A schematic diagram of the robot is presented in the next section.

The robot is controlled using an arduino micro-controller running the ’grbl’ software.
It is a popular, light-weight g-code parser. The software architechture is briefly described
in a later section.

In the current exercise, the robot was moved through a variety of paths on a plane
and the error between the commanded path and the executed path was measured.

Schematic Diagram of the Robot


Figrure 1 shows a schematic diagram of the Cartesian Robot. The scriber end affector is
operated by the Arduino micro-controller through the prismatic joints in the x,y direction
and one more in the z-direction.

Software Architecture of the Cartesian Robot


The robot runs on a software platform named ’grbl’. It is an open source, embedded,
high performance g-code-parser and CNC milling controller written in optimized C that
runs on board an Arduino micro-controller with Atmega328p chips. Many open source
3D printers make use of the ’grbl’ software.

1
Figure 1: Schematic Diagram of the Cartesian Robot

Grbl is for three axis machines. Rotation axes have not yet been implemented in the
code. The G-code interpreter implements a subset of the NIST rs274/ngc standard and
is tested with the output of a number of CAM-tools with no issues. Linear, circular and
helical motion are all fully supported. Currently supported G-codes (as of v0.9i) are -

1. G38.3, G38.4, G38.5: Probing

2. G40: Cutter Radius Compensation Modes

3. G61: Path Control Modes

4. G91.1: Arc IJK Distance Modes

5. G38.2: Probing

6. G43.1, G49: Dynamic Tool Length Offsets

7. G0, G1: Linear Motions

8. G2, G3: Arc and Helical Motions

9. G4: Dwell

10. G10 L2, G10 L20: Set Work Coordinate Offsets

11. G17, G18, G19: Plane Selection

12. G20, G21: Units

13. G28, G30: Go to Pre-Defined Position

2
14. G28.1, G30.1: Set Pre-Defined Position

15. G53: Move in Absolute Coordinates

16. G54, G55, G56, G57, G58, G59: Work Coordinate Systems

17. G80: Motion Mode Cancel

18. G90, G91: Distance Modes

19. G92: Coordinate Offset

20. G92.1: Clear Coordinate System Offsets

21. G93, G94: Feedrate Modes

22. M0, M2, M30: Program Pause and End

23. M3, M4, M5: Spindle Control

24. M8, M9: Coolant Control

grbl has comprehensive acceleration management, planning the motions several steps
ahead thus allowing it to move the affector in a jerk-free way.

The code structure is modular in nature. Processing starts from ’main.c’. Here the
system variables are initialized and primary systems resetted. The main loop is then
started.

’grbl.h’ contains the list of all ’include’ commands for incorporating the different mod-
ules.

’config.h’ contains the compile-time configurations for Grbl’s internal system.

The ’defaults.h’ file serves as a central default settings selector for different machine
types, from DIY CNC mills to CNC conversions of off-the-shelf machines.

The many other files like eeprom.h, coolant control.h etc contain function definitions
for the myriad of functionalities provided by grbl.

Calculation of Steps per mm


The steps per mm were calculated as follows. For the stepper motor given,

1step −→ 3.75◦ rotation of the shaf t


The bolt used in the task had a pitch of 1.75 mm. Hence,

360 deg rotation of bolt −→ 1.75 mm

3
⇒ 3.75 deg rotation of bolt −→ 0.018229 mm verticalmovement of scriber

Hence,
1 step −→ 0.018229 mm vertical movement of scriber
1 mm vertical movement of scriber −→ 54.85 steps
Hence, the step per mm of the stepper motor was determined as 54.85.

Precision Checking
Figure 2 shows the path traced by the robot based on the provided commands. Table 1
shows the variation in the actual path traced from the commanded path. The G-codes
executed are listed in the table.

Figure 2: Path traced by the Cartesian Robot

4
Table 1: Error calculation

Code Path Input length (mm) Obtained length (mm) % error


x y x y x y
G01 X-30 Y30 F200 1 to 2 30 30 32 31 6.666667 3.333333
G01 Y30 F150 2 to 3 N/A 30 N/A 32 N/A 6.666667
G01 X-30 Y30 F150 3 to 4 30 30 32 31 6.666667 3.333333
G00 Z2 Pen Up
G01 Y-60 F200 4 to 5 N/A 60 N/A 64 N/A 6.666667
G00 Z2 Pen Down
G01 X45 F150 5 to 6 45 N/A 47 N/A 4.444444 N/A
6 to 7 15 15 16 16 6.666667 6.666667
G02 Y-30 R15 F150
7 to 8 15 15 16 16 6.666667 6.666667
G01 X-45 F150 8 to 9 45 N/A 48 N/A 6.666667 N/A
9 to 10 15 15 17 16 13.33333 6.666667
G02 Y30 R15 F150
10 to 5 15 15 17 16 13.33333 6.666667

You might also like