8
Most read
11
Most read
13
Most read
2D CNC plotter , controlled using Android application
Yuval Yoskovitch
17/9/2018
Arduino based 2D printer, controlled by android app.
We used two scrap CD ROMs, took them apart to get their linear stepper motors.
Those motors used for the XY axis movement.
A servo motor is used for z axis to move the pen up and down.
The whole structure is operating with L293D shield, connected to the Arduino.
The shield outputs 1A for each channel. It is strong enough to drive all 3 motors together
using a 12V 2A supply.
The Arduino's memory contains a CNC reader program, that translates serial data from a
specific program to motors movement according to its coordinates.
We've built a program that reads a G-code file and sends the data to the Arduino.
We have some applications and features such as image processing of a captured photos, a
data base for saving built-in sketches and sharing captured photos. All about it will be
explained later.
Those applications are based android platform that controls the whole machine.
Here are some photos of the prototype, soldering wires to the motor so I can control them
from the Arduino:
First version of the machine was abandoned later for smaller, more accurate one
CNC plotter controlled using Android application
We decided to make things smaller, elegant and precise. Therefore, we neglected out first
prototype and printed all the parts below with a professional 3D machine.
Final product
Some parts had to be printed
CNC plotter controlled using Android application
Android application and user interface
I created an android application, based on Java.
The application is used to control the machine and to create the sketch.
A short explanation about the technologies I have used:
The camera activity:
I created an image processing algorithm that converts the camera photo
into sketch.
The algorithm (shortly) : RGB->grayscale conversion, convolutional
filtering, negative conversion (repmat(255) - A), grayscale->white and
black ( using threshold).
I tested the algorithm using Matlab, and implemented the algorithm
using OpenCV library in Java (which gives us the option to use image
processing directly on the screen of the phone)
The algorithm was made as short (less computations) as possible so we
can use it “live” when taking the image (3X3 filter) .
After taking the image, we re-process the original image again (6 X 6 Filter), to get better
results.
I give the user the ability to process to image only after taking the photos (saves battery).
I give the user the ability to upload the image to my Node.js server so anyone can see it in
the future.
The algorithm was first tested on Matlab, and then implemented in Java
Application Main Activity
We can disable the processing procedure
The drawing activity:
I give the user the ability to draw the sketch on the screen.
The activity was implemented using the Canvas class (and also some OpenCV
for the processing).
I give the user the ability to upload the image to my Node.js server so anyone
can see it in the future.
The image is being processed “live”
Drawing Activity
The “image from server/database” activity:
I have created a Node.js server from scratch.
I created a database of photos and G-codes on my server, so anyone can easily
watch them and sketch them using my machine.
The user also has the option to upload sketches when taking a photo or
drawing on the screen.
The G-codes are stored on the server. The G-code tells the machine how it should move its engines
I have created a Node.js server from scratch (7 Javascript files) to help us control the connection with the Android
application, and also to store the images.
Imaged being selected from the
server.
The Gcode simulation activity:
The last G-code that was created is sent to the phone from my Node.js server.
I created an algorithm that figures the G-code and simulates the last images sketch. The user
can see exactly how my machine will create the sketch.
This activity lets us watch a simulation of the sketch. We can see exactly how the picture is printed step by step.
We create a child thread that reads the G-code file from the server. Then it figures all the
pixels from the code, including when the pen is lifted or being put down.
The child thread informs the UI Thread every certain amount of time to draw a new line on
the screen.
Of course, implementing this procedure on the Main Thread is impossible since using delays
on the UI thread will cause the entire Android operation system not to respond to any user
interface until the simulation ends.
How we create the G-code
The G-code is the code that tells the Arduino exactly how to operate in
order to draw the sketch on paper.
I created from scratch an algorithm ,using Matlab, that takes the “white and
black” image and figures how the Arduino engines should move.
The algorithm is very basic: First we make a list of all the black pixels. Each
iteration we look for the closest black pixel,and figure if the pen should be
lifted or not. Then write it to the G-code file, and the black pixel is painted
white (until the entire image is white).
The Matlab code was compiled to EXE file, uploaded to my Node.js server.
We run the EXE file using my Node.js script (The android application sends
command to the server after the processing of the image is finished).
The user can watch the progress of the G-code generation on his phone
application (using a progress bar). In order to create this progress bar the
Matlab program (on my server) must communicate with the android device
all the time.
The Matlab EXE file takes an image and creates a G-code. The G-code is a code that tells the Arduino device how
to operate.
Implementing a progress bar
requires successive communication
with the server
How the G-code is sent to the Arduino device
After the G-code is finished being written, the file needs to be sent to the Arduino device.
We created a Java program, using Java Processing Library. This program read the G-code file
line by line and sends it to the Arduino device using serial communication.
A program, written with Java Processing, helps to create serial communication with Arduino.
The technologies I have used in this project:
Java and Android Studio
Matlab
Node.js
Java OpenCV (image processing) library
Java Processing Libaray
Arduino IDE
Thanks for Dan Sosking for helping with the hardware design

More Related Content

PPTX
SIXTH SENSE TECHNOLOGY
PPTX
Android-based surveillance Robot
PPTX
E ball technology
DOCX
Seminar report Of Touchless Touchscreen
DOCX
Unit converter using in c
PPT
2D Plotter Presentation
PPTX
CNC Plotter Machine
DOCX
Microsoft Hololens Seminar Report
SIXTH SENSE TECHNOLOGY
Android-based surveillance Robot
E ball technology
Seminar report Of Touchless Touchscreen
Unit converter using in c
2D Plotter Presentation
CNC Plotter Machine
Microsoft Hololens Seminar Report

What's hot (20)

PPTX
Brain Computer Interface ppt
PDF
Mini CNC PLOTTER
PPTX
E ball technology..ppt
PDF
IRJET- Smart Door Security System using Raspberry Pi with Telegram
PPT
PDF
Operating System fo IoT
DOCX
Virtual keyboard abstract
PPTX
Blue eyes- The perfect presentation for a technical seminar
PDF
Display a Character on a 7 Segment Display
DOCX
Home automation with arduino
PPTX
WIFI CONTROLLED SPY ROBOT CAR
PPTX
Mini Cnc Printer
PDF
Bluetooth based home automation system
PPTX
Sixth sense technology
DOCX
Iot liquid level monitoring system
PPT
Brain computer interface
PPTX
E ball seminar
PPTX
Virtual Machines - Virtual Box
DOCX
Bluetooth Controlled Robot Project Report
Brain Computer Interface ppt
Mini CNC PLOTTER
E ball technology..ppt
IRJET- Smart Door Security System using Raspberry Pi with Telegram
Operating System fo IoT
Virtual keyboard abstract
Blue eyes- The perfect presentation for a technical seminar
Display a Character on a 7 Segment Display
Home automation with arduino
WIFI CONTROLLED SPY ROBOT CAR
Mini Cnc Printer
Bluetooth based home automation system
Sixth sense technology
Iot liquid level monitoring system
Brain computer interface
E ball seminar
Virtual Machines - Virtual Box
Bluetooth Controlled Robot Project Report
Ad

Similar to CNC plotter controlled using Android application (20)

DOCX
MAJOR PROJECT
PDF
Mini CNC Plotter and Laser Engraver
PDF
final paper
PDF
Enhanced Human Computer Interaction using hand gesture analysis on GPU
PDF
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
DOCX
An Introduction to Computer Science with Java .docx
PDF
(Js) Export your own WebGL Viewer
PDF
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
PDF
IRJET - An Embedded Approach for Design and Development of the Mini CNC C...
PPTX
The Rang Bot - CNC Rangoli Maker
PDF
Smart Face Recognition System Analysis
PDF
201001162_report
PDF
Implementation of embedded arm9 platform using qt and open cv for human upper...
PDF
Obstacle detection using laser
PDF
IRJET-Automatic Self-Parking Chair using Nissan Technology
PDF
Airplane game management system project report .pdf
PPTX
Android Demonstration Solution (ADS)
PPTX
Selfie booth ppt
PPTX
Presentation on Android application
PDF
Engineering + Programming portfolio
MAJOR PROJECT
Mini CNC Plotter and Laser Engraver
final paper
Enhanced Human Computer Interaction using hand gesture analysis on GPU
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
An Introduction to Computer Science with Java .docx
(Js) Export your own WebGL Viewer
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
IRJET - An Embedded Approach for Design and Development of the Mini CNC C...
The Rang Bot - CNC Rangoli Maker
Smart Face Recognition System Analysis
201001162_report
Implementation of embedded arm9 platform using qt and open cv for human upper...
Obstacle detection using laser
IRJET-Automatic Self-Parking Chair using Nissan Technology
Airplane game management system project report .pdf
Android Demonstration Solution (ADS)
Selfie booth ppt
Presentation on Android application
Engineering + Programming portfolio
Ad

Recently uploaded (20)

PDF
Applications of Equal_Area_Criterion.pdf
PPTX
Petroleum Refining & Petrochemicals.pptx
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PDF
First part_B-Image Processing - 1 of 2).pdf
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
mechattonicsand iotwith sensor and actuator
PPTX
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
Prof. Dr. KAYIHURA A. SILAS MUNYANEZA, PhD..pdf
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PDF
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
PPTX
wireless networks, mobile computing.pptx
PDF
Design Guidelines and solutions for Plastics parts
PPTX
Principal presentation for NAAC (1).pptx
PPTX
Feature types and data preprocessing steps
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
Applications of Equal_Area_Criterion.pdf
Petroleum Refining & Petrochemicals.pptx
August -2025_Top10 Read_Articles_ijait.pdf
First part_B-Image Processing - 1 of 2).pdf
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
MLpara ingenieira CIVIL, meca Y AMBIENTAL
CyberSecurity Mobile and Wireless Devices
mechattonicsand iotwith sensor and actuator
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Prof. Dr. KAYIHURA A. SILAS MUNYANEZA, PhD..pdf
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
wireless networks, mobile computing.pptx
Design Guidelines and solutions for Plastics parts
Principal presentation for NAAC (1).pptx
Feature types and data preprocessing steps
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf

CNC plotter controlled using Android application

  • 1. 2D CNC plotter , controlled using Android application Yuval Yoskovitch 17/9/2018 Arduino based 2D printer, controlled by android app.
  • 2. We used two scrap CD ROMs, took them apart to get their linear stepper motors. Those motors used for the XY axis movement. A servo motor is used for z axis to move the pen up and down. The whole structure is operating with L293D shield, connected to the Arduino. The shield outputs 1A for each channel. It is strong enough to drive all 3 motors together using a 12V 2A supply. The Arduino's memory contains a CNC reader program, that translates serial data from a specific program to motors movement according to its coordinates. We've built a program that reads a G-code file and sends the data to the Arduino. We have some applications and features such as image processing of a captured photos, a data base for saving built-in sketches and sharing captured photos. All about it will be explained later. Those applications are based android platform that controls the whole machine.
  • 3. Here are some photos of the prototype, soldering wires to the motor so I can control them from the Arduino:
  • 4. First version of the machine was abandoned later for smaller, more accurate one
  • 6. We decided to make things smaller, elegant and precise. Therefore, we neglected out first prototype and printed all the parts below with a professional 3D machine. Final product Some parts had to be printed
  • 8. Android application and user interface I created an android application, based on Java. The application is used to control the machine and to create the sketch. A short explanation about the technologies I have used: The camera activity: I created an image processing algorithm that converts the camera photo into sketch. The algorithm (shortly) : RGB->grayscale conversion, convolutional filtering, negative conversion (repmat(255) - A), grayscale->white and black ( using threshold). I tested the algorithm using Matlab, and implemented the algorithm using OpenCV library in Java (which gives us the option to use image processing directly on the screen of the phone) The algorithm was made as short (less computations) as possible so we can use it “live” when taking the image (3X3 filter) . After taking the image, we re-process the original image again (6 X 6 Filter), to get better results. I give the user the ability to process to image only after taking the photos (saves battery). I give the user the ability to upload the image to my Node.js server so anyone can see it in the future. The algorithm was first tested on Matlab, and then implemented in Java Application Main Activity
  • 9. We can disable the processing procedure The drawing activity: I give the user the ability to draw the sketch on the screen. The activity was implemented using the Canvas class (and also some OpenCV for the processing). I give the user the ability to upload the image to my Node.js server so anyone can see it in the future. The image is being processed “live” Drawing Activity
  • 10. The “image from server/database” activity: I have created a Node.js server from scratch. I created a database of photos and G-codes on my server, so anyone can easily watch them and sketch them using my machine. The user also has the option to upload sketches when taking a photo or drawing on the screen. The G-codes are stored on the server. The G-code tells the machine how it should move its engines I have created a Node.js server from scratch (7 Javascript files) to help us control the connection with the Android application, and also to store the images. Imaged being selected from the server.
  • 11. The Gcode simulation activity: The last G-code that was created is sent to the phone from my Node.js server. I created an algorithm that figures the G-code and simulates the last images sketch. The user can see exactly how my machine will create the sketch. This activity lets us watch a simulation of the sketch. We can see exactly how the picture is printed step by step. We create a child thread that reads the G-code file from the server. Then it figures all the pixels from the code, including when the pen is lifted or being put down. The child thread informs the UI Thread every certain amount of time to draw a new line on the screen. Of course, implementing this procedure on the Main Thread is impossible since using delays on the UI thread will cause the entire Android operation system not to respond to any user interface until the simulation ends.
  • 12. How we create the G-code The G-code is the code that tells the Arduino exactly how to operate in order to draw the sketch on paper. I created from scratch an algorithm ,using Matlab, that takes the “white and black” image and figures how the Arduino engines should move. The algorithm is very basic: First we make a list of all the black pixels. Each iteration we look for the closest black pixel,and figure if the pen should be lifted or not. Then write it to the G-code file, and the black pixel is painted white (until the entire image is white). The Matlab code was compiled to EXE file, uploaded to my Node.js server. We run the EXE file using my Node.js script (The android application sends command to the server after the processing of the image is finished). The user can watch the progress of the G-code generation on his phone application (using a progress bar). In order to create this progress bar the Matlab program (on my server) must communicate with the android device all the time. The Matlab EXE file takes an image and creates a G-code. The G-code is a code that tells the Arduino device how to operate. Implementing a progress bar requires successive communication with the server
  • 13. How the G-code is sent to the Arduino device After the G-code is finished being written, the file needs to be sent to the Arduino device. We created a Java program, using Java Processing Library. This program read the G-code file line by line and sends it to the Arduino device using serial communication. A program, written with Java Processing, helps to create serial communication with Arduino. The technologies I have used in this project: Java and Android Studio Matlab Node.js Java OpenCV (image processing) library Java Processing Libaray Arduino IDE Thanks for Dan Sosking for helping with the hardware design