SlideShare a Scribd company logo
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
Ad

More Related Content

What's hot (20)

Cad practice drawings 71 80
Cad practice drawings 71 80Cad practice drawings 71 80
Cad practice drawings 71 80
STUDY CADCAM
 
Sensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controllerSensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controller
ArsalanAthar
 
PPT-1 Starting with Hypermesh
PPT-1 Starting with HypermeshPPT-1 Starting with Hypermesh
PPT-1 Starting with Hypermesh
Akshay Mistri
 
Face Recognition System for Door Unlocking
Face Recognition System for Door UnlockingFace Recognition System for Door Unlocking
Face Recognition System for Door Unlocking
Hassan Tariq
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
Vishnu
 
IOTC08 The Arduino Platform
IOTC08 The Arduino PlatformIOTC08 The Arduino Platform
IOTC08 The Arduino Platform
Eoin Brazil
 
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATIONBLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
Varun Divekar
 
Practical Uncertainty Estimation in Load Cell Calibration
Practical Uncertainty Estimation in Load Cell CalibrationPractical Uncertainty Estimation in Load Cell Calibration
Practical Uncertainty Estimation in Load Cell Calibration
Interface Inc.
 
Obstacle Detection Robot
Obstacle Detection RobotObstacle Detection Robot
Obstacle Detection Robot
Manikanta Tammi Raju vaddadi
 
robotic arm 3d printed with microcontroller
robotic arm 3d printed with microcontrollerrobotic arm 3d printed with microcontroller
robotic arm 3d printed with microcontroller
Abhishek Sainkar
 
pick and place robotic arm
pick and place robotic armpick and place robotic arm
pick and place robotic arm
ANJANA ANILKUMAR
 
Arduino course
Arduino courseArduino course
Arduino course
Ahmed Shelbaya
 
Automatic writing in drawing machine
Automatic writing in drawing machineAutomatic writing in drawing machine
Automatic writing in drawing machine
Buddha Institute of Technology, Gkp
 
Industrail training report on website design and development
Industrail training report on website design and developmentIndustrail training report on website design and development
Industrail training report on website design and development
MUSICbegins
 
Denavit Hartenberg Algorithm
Denavit Hartenberg AlgorithmDenavit Hartenberg Algorithm
Denavit Hartenberg Algorithm
Hitesh Mohapatra
 
Cad practice drawings 91 100
Cad practice drawings 91 100Cad practice drawings 91 100
Cad practice drawings 91 100
STUDY CADCAM
 
DrawBot - Android Thing CNC Plotter
DrawBot - Android Thing CNC PlotterDrawBot - Android Thing CNC Plotter
DrawBot - Android Thing CNC Plotter
NadaAbdulNassir1
 
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINOACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
Snehasis Mondal
 
Computer Basic Bangla
Computer Basic BanglaComputer Basic Bangla
Computer Basic Bangla
S.M. Sohag
 
WIRELESS ROBOT PPT
WIRELESS ROBOT PPTWIRELESS ROBOT PPT
WIRELESS ROBOT PPT
AIRTEL
 
Cad practice drawings 71 80
Cad practice drawings 71 80Cad practice drawings 71 80
Cad practice drawings 71 80
STUDY CADCAM
 
Sensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controllerSensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controller
ArsalanAthar
 
PPT-1 Starting with Hypermesh
PPT-1 Starting with HypermeshPPT-1 Starting with Hypermesh
PPT-1 Starting with Hypermesh
Akshay Mistri
 
Face Recognition System for Door Unlocking
Face Recognition System for Door UnlockingFace Recognition System for Door Unlocking
Face Recognition System for Door Unlocking
Hassan Tariq
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
Vishnu
 
IOTC08 The Arduino Platform
IOTC08 The Arduino PlatformIOTC08 The Arduino Platform
IOTC08 The Arduino Platform
Eoin Brazil
 
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATIONBLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
Varun Divekar
 
Practical Uncertainty Estimation in Load Cell Calibration
Practical Uncertainty Estimation in Load Cell CalibrationPractical Uncertainty Estimation in Load Cell Calibration
Practical Uncertainty Estimation in Load Cell Calibration
Interface Inc.
 
robotic arm 3d printed with microcontroller
robotic arm 3d printed with microcontrollerrobotic arm 3d printed with microcontroller
robotic arm 3d printed with microcontroller
Abhishek Sainkar
 
pick and place robotic arm
pick and place robotic armpick and place robotic arm
pick and place robotic arm
ANJANA ANILKUMAR
 
Industrail training report on website design and development
Industrail training report on website design and developmentIndustrail training report on website design and development
Industrail training report on website design and development
MUSICbegins
 
Denavit Hartenberg Algorithm
Denavit Hartenberg AlgorithmDenavit Hartenberg Algorithm
Denavit Hartenberg Algorithm
Hitesh Mohapatra
 
Cad practice drawings 91 100
Cad practice drawings 91 100Cad practice drawings 91 100
Cad practice drawings 91 100
STUDY CADCAM
 
DrawBot - Android Thing CNC Plotter
DrawBot - Android Thing CNC PlotterDrawBot - Android Thing CNC Plotter
DrawBot - Android Thing CNC Plotter
NadaAbdulNassir1
 
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINOACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
Snehasis Mondal
 
Computer Basic Bangla
Computer Basic BanglaComputer Basic Bangla
Computer Basic Bangla
S.M. Sohag
 
WIRELESS ROBOT PPT
WIRELESS ROBOT PPTWIRELESS ROBOT PPT
WIRELESS ROBOT PPT
AIRTEL
 

Similar to CNC plotter controlled using Android application (20)

MAJOR PROJECT
MAJOR PROJECT MAJOR PROJECT
MAJOR PROJECT
sandeep amaravadi
 
Mini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser EngraverMini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser Engraver
ijtsrd
 
final paper
final paperfinal paper
final paper
Indrit Vogli
 
Enhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPUEnhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPU
Mahesh Khadatare
 
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
Panth Shah
 
An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docx
daniahendric
 
(Js) Export your own WebGL Viewer
(Js) Export your own WebGL Viewer(Js) Export your own WebGL Viewer
(Js) Export your own WebGL Viewer
JooinK
 
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
Chiranjit Adhikary
 
IRJET - An Embedded Approach for Design and Development of the Mini CNC C...
IRJET -  	  An Embedded Approach for Design and Development of the Mini CNC C...IRJET -  	  An Embedded Approach for Design and Development of the Mini CNC C...
IRJET - An Embedded Approach for Design and Development of the Mini CNC C...
IRJET Journal
 
The Rang Bot - CNC Rangoli Maker
The Rang Bot - CNC Rangoli MakerThe Rang Bot - CNC Rangoli Maker
The Rang Bot - CNC Rangoli Maker
mrinal mahato
 
Smart Face Recognition System Analysis
Smart Face Recognition System AnalysisSmart Face Recognition System Analysis
Smart Face Recognition System Analysis
Vishal Aditya
 
201001162_report
201001162_report201001162_report
201001162_report
Shirish Jadav
 
Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...
Krunal Patel
 
Obstacle detection using laser
Obstacle detection using laserObstacle detection using laser
Obstacle detection using laser
Rohith R
 
IRJET-Automatic Self-Parking Chair using Nissan Technology
IRJET-Automatic Self-Parking Chair using Nissan TechnologyIRJET-Automatic Self-Parking Chair using Nissan Technology
IRJET-Automatic Self-Parking Chair using Nissan Technology
IRJET Journal
 
Airplane game management system project report .pdf
Airplane game management system project report .pdfAirplane game management system project report .pdf
Airplane game management system project report .pdf
Kamal Acharya
 
Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS) Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS)
Amila Gamanayake
 
Selfie booth ppt
Selfie booth pptSelfie booth ppt
Selfie booth ppt
Nandu Bangari
 
Presentation on Android application
Presentation on Android applicationPresentation on Android application
Presentation on Android application
Atibur Rahman
 
Engineering + Programming portfolio
Engineering + Programming portfolioEngineering + Programming portfolio
Engineering + Programming portfolio
JosephDonnelly14
 
Mini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser EngraverMini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser Engraver
ijtsrd
 
Enhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPUEnhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPU
Mahesh Khadatare
 
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
Panth Shah
 
An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docx
daniahendric
 
(Js) Export your own WebGL Viewer
(Js) Export your own WebGL Viewer(Js) Export your own WebGL Viewer
(Js) Export your own WebGL Viewer
JooinK
 
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
DESIGN AND DEVELOPMENT OF LOW COST COMPUTER NUMERICAL CONTROL PLOTTER WITH AN...
Chiranjit Adhikary
 
IRJET - An Embedded Approach for Design and Development of the Mini CNC C...
IRJET -  	  An Embedded Approach for Design and Development of the Mini CNC C...IRJET -  	  An Embedded Approach for Design and Development of the Mini CNC C...
IRJET - An Embedded Approach for Design and Development of the Mini CNC C...
IRJET Journal
 
The Rang Bot - CNC Rangoli Maker
The Rang Bot - CNC Rangoli MakerThe Rang Bot - CNC Rangoli Maker
The Rang Bot - CNC Rangoli Maker
mrinal mahato
 
Smart Face Recognition System Analysis
Smart Face Recognition System AnalysisSmart Face Recognition System Analysis
Smart Face Recognition System Analysis
Vishal Aditya
 
Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...
Krunal Patel
 
Obstacle detection using laser
Obstacle detection using laserObstacle detection using laser
Obstacle detection using laser
Rohith R
 
IRJET-Automatic Self-Parking Chair using Nissan Technology
IRJET-Automatic Self-Parking Chair using Nissan TechnologyIRJET-Automatic Self-Parking Chair using Nissan Technology
IRJET-Automatic Self-Parking Chair using Nissan Technology
IRJET Journal
 
Airplane game management system project report .pdf
Airplane game management system project report .pdfAirplane game management system project report .pdf
Airplane game management system project report .pdf
Kamal Acharya
 
Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS) Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS)
Amila Gamanayake
 
Presentation on Android application
Presentation on Android applicationPresentation on Android application
Presentation on Android application
Atibur Rahman
 
Engineering + Programming portfolio
Engineering + Programming portfolioEngineering + Programming portfolio
Engineering + Programming portfolio
JosephDonnelly14
 
Ad

Recently uploaded (20)

The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Artificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptxArtificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptx
DrMarwaElsherif
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIHlecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
Abodahab
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Data Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptxData Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptx
RushaliDeshmukh2
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
LECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's usesLECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's uses
CLokeshBehera123
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Artificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptxArtificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptx
DrMarwaElsherif
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIHlecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
Abodahab
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Data Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptxData Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptx
RushaliDeshmukh2
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
LECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's usesLECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's uses
CLokeshBehera123
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
Ad

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