S18: XY-Plotter

From Embedded Systems Learning Academy
Revision as of 05:03, 18 May 2018 by Proj user12 (talk | contribs) (Design & Implementation)

Jump to: navigation, search

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Project Title

XY-Plotter

Abstract

We live in an epoch where the world is driven by technology. In recent decades, there have been so many advances in the field of technology. With this advancement for human upliftment, automation has become a paramount factor. This project aims at building an automatic 2D XY-plotter which can efficiently draw 2D figures. The plotter machine is assembled based on the H-bot mechanism where the two stepper motors are on the main chassis connected to the single belt. Both the motors account for the movement of the chassis in X and Y axis. A servo motor is used to control the pen height which is connected to the main chassis. Gcode interpreter is developed in order to make the SJ one board decode the G-code and control the motors accordingly. Sd-card is used to provide the Gcode to the SJ one board.

Objectives & Introduction

Computer numerical control (CNC) is the automation of machine tools by means of computers executing pre-programmed sequences of machine control commands. These machines find their use in any process that can be described as a series of movements and operations. These include 2D printing, laser cutting, welding, hole-punching etc.

XY plotter is a CNC(Computer Numerical Control) based drawing robot capable of drawing 2D figures. It uses LPC1758 ARM Cortex M3 based microcontroller(SJOne) as a brain of the robot. The SJOne board is interfaced to the motor shield PCB which connects two stepper and one servo motors. SD-card is selected to provide the 2D figures to the SJ one controller in the form of G-codes instructions. A G-code interpreter then decodes the instructions and generate the required movements for the stepper motor and servo motor. The home position for the plotter is specified using the limit switch.

The objectives of the project are:

  • To learn FreeRTOS multitasking and demonstrate it.
  • To acquire knowledge about intertask communication using queues.
  • To become competent in implementing device drivers like GPIO, SPI, PWM.
  • To make use of GPIO external interrupts and timer interrupt to connect with the limit switch.
  • To understand software watchdogs and apply the same to the project.
  • To learn mechanical aspects of rotating a motor through belts and pulleys.

Team Members & Responsibilities

  • Akshay Kurli
  • Gaurav Yadav
  • Pritam Gholap
  • Tanmay Kishore Jambhekar

Schedule

Week# Date Task Actual Problem Encountered
1 03/27
  • Research different mechanism for plotter assembling.
  • Requirement documentation. List out the parts required.
Completed on 03/31
2 04/03
  • Order Components
Completed on 04/08
3 04/10
  • Determine the required software for generating and visualizing the Gcode.
  • Read file from Sd-card and interpret single line G-code.
  • Completed on 04/11
  • Completed on 04/30
4 04/17
  • Test both the stepper motor and servo motor with the SJ one Board.
  • Design the PCB shield for servo and stepper motor.
  • Completed on 04/19
  • Completed on 04/23
5 04/24
  • Assemble the plotter machine.
  • Circuit testing on protoboard.
  • Calculate the relation between G-code values and PWM pulses on both the stepper motors.
  • Completed on 04/25
  • Completed on 04/27
  • Completed on 05/05
6 05/01
  • Develop the motor task to run both the stepper motors and servo.
  • Run the stepper motor according to interpreted G-code.
  • Test the plotter machine for drawing a straight line (Single line Gcode).
  • Completed on 05/01
  • Completed on 05/05
  • Completed on 05/08
7 05/08
  • Interface limit switch for determining plotter initial position.
  • Develop the interpreter task to read multi-line G-codes.
  • Establish communication between interpreter task and motor task.
In progress
8 05/15
  • Send board file for printing
  • Create tasks to plot different characters
  • Write the equation to draw lines at different angles
In progress

Parts List & Cost

Item# Part Desciption Vendor Qty Cost
1 SJOne Boards From Preet 1 $80.00
2 Nema-17 Stepper Motor Amazon 2 $28.00
3 Micro Servo Motor 9G Amazon 1 $2.6
4 GT2 Timing Belt and Pulley wheel Amazon 1 $14.99
5 Allegro’s A4988 DMOS Microstepping Driver Amazon 2 $
6 $
7 $
8 $
9 $
10 $
11 $

Design & Implementation

Following sections provide the implementation of hardware and its design. The software provides the infrastructure to manage and control the hardware.

System Overview and Mechanism

The XY plotter machine is based on H-bot mechanism where the two motors responsible for XY movements are on the main chassis, which keeps the center of gravity closer to the chassis for a better stability. Controlling two linear motions of an object through H-bot mechanism is shown in the below figure.

H-bot Mechanism

Printed Circuit Board (PCB)

Schematic and PCB Layout

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.


Hardware Interface

GT2 Belt and Pulley

A 2mm pitch and 6mm wide GT2 timing belt and pulley are used to transfer rotational motion (from a stepper motor) into linear motion (along with a rail). Figure 1 shows Timing Belt and Pulley alignment. With the H-bot mechanism described above, the two stepper motors on the main chassis are connected together with one GT2 belt with the help of two same-sized pulleys as shown in Figure 2.

Figure 1. GT2 belt and Pulley
  • Calculation

Specification of the pulley used in this project is:

Number of teeth= 16;

Pitch = 2mm.

Therefore,as per the Figure 1 ,Circumference = pitch * number of teeth = 2 * 16 = 32mm.

NEMA 17 Stepper Motor

A stepper motor is one kind of electric motor used in the robotics industry. Unlike a brushless DC motor which rotates continuously when a fixed DC voltage is applied to it, a step motor rotates in discrete step angles. The Stepper Motors therefore are manufactured with steps per revolution of 12, 24, 72, 144, 180, and 200, resulting in stepping angles of 30, 15, 5, 2.5, 2, and 1.8 degrees per step.

NEMA 17 is a common size used in 3D printers and smaller CNC mills. Smaller motors find applications in many robotic and animatronic applications. NEMA [National Electrical Manufacturers Association][1] numbers define standard faceplate dimensions for mounting the motor. They do not define the other characteristics of a motor. NEMA 17-size hybrid bipolar stepping motor has a 1.8° step angle (200 steps/revolution). Each phase draws 1.7 A at 2.8 V, allowing for a holding torque of 3.7 kg-cm.

Properties

Micro Stepping

A stepper motor always has a fixed number of steps. Micro stepping is a way of increasing the number of steps by sending a sine/cosine waveform to the coils inside the stepper motor. In most cases, micro stepping allows stepper motors to run smoother and more accurately. Both the stepper motors work on half step to provide smooth motion.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Testing & Technical Challenges

Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.

Include sub-sections that list out a problem and solution, such as:

<Bug/issue name>

Discuss the issue and resolution.

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Upload a video of your project and post the link here.

Project Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

You can list the references you used.