SlideShare a Scribd company logo
1 of 13
Download to read offline
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
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
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

What's hot

Attendance Management System using Face Recognition
Attendance Management System using Face RecognitionAttendance Management System using Face Recognition
Attendance Management System using Face RecognitionNanditaDutta4
 
5 pen pc technology ppt for seminor
5 pen pc technology ppt for seminor5 pen pc technology ppt for seminor
5 pen pc technology ppt for seminorpriyanka reddy
 
OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]Daffodil International University
 
Presentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCUPresentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCUSouvik Kundu
 
Invisible technology
Invisible technologyInvisible technology
Invisible technologyMarian Martin
 
Neuralink technical seminar
Neuralink technical seminarNeuralink technical seminar
Neuralink technical seminarRahul Agarwal
 
Recent technology in the field of computer science
Recent technology in the field of computer scienceRecent technology in the field of computer science
Recent technology in the field of computer scienceRamya SK
 
Face recognition attendance system
Face recognition attendance systemFace recognition attendance system
Face recognition attendance systemNaomi Kulkarni
 
Attendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan SikdarAttendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan Sikdarraihansikdar
 
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdfCYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdfKumbidiGaming
 
Online examination documentation
Online examination documentationOnline examination documentation
Online examination documentationWakimul Alam
 
3D printer by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...
3D printer  by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...3D printer  by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...
3D printer by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...Mandar Gadkari
 
Touchless Touchscreen Technology
Touchless Touchscreen TechnologyTouchless Touchscreen Technology
Touchless Touchscreen TechnologyAkshay Vasava
 

What's hot (20)

Attendance Management System using Face Recognition
Attendance Management System using Face RecognitionAttendance Management System using Face Recognition
Attendance Management System using Face Recognition
 
Java ring
Java ring   Java ring
Java ring
 
Python Open CV
Python Open CVPython Open CV
Python Open CV
 
5 pen pc technology ppt for seminor
5 pen pc technology ppt for seminor5 pen pc technology ppt for seminor
5 pen pc technology ppt for seminor
 
OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]
 
Presentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCUPresentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCU
 
Invisible technology
Invisible technologyInvisible technology
Invisible technology
 
3D Modeling
3D Modeling3D Modeling
3D Modeling
 
Arduino based 3D printer
Arduino based 3D printerArduino based 3D printer
Arduino based 3D printer
 
Neuralink technical seminar
Neuralink technical seminarNeuralink technical seminar
Neuralink technical seminar
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
Recent technology in the field of computer science
Recent technology in the field of computer scienceRecent technology in the field of computer science
Recent technology in the field of computer science
 
Face recognition attendance system
Face recognition attendance systemFace recognition attendance system
Face recognition attendance system
 
Attendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan SikdarAttendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan Sikdar
 
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdfCYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdf
 
Online examination documentation
Online examination documentationOnline examination documentation
Online examination documentation
 
3D printer by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...
3D printer  by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...3D printer  by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...
3D printer by Mandar Gadkari,3d printer, 3d printing, attractive ppt on 3d p...
 
Touchless Touchscreen Technology
Touchless Touchscreen TechnologyTouchless Touchscreen Technology
Touchless Touchscreen Technology
 
Clockless chips
Clockless chipsClockless chips
Clockless chips
 
Touchless Touch screen technology
Touchless Touch screen technologyTouchless Touch screen technology
Touchless Touch screen technology
 

Similar to CNC plotter controlled using Android application

Mini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser EngraverMini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser Engraverijtsrd
 
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 GPUMahesh 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 .docxdaniahendric
 
(Js) Export your own WebGL Viewer
(Js) Export your own WebGL Viewer(Js) Export your own WebGL Viewer
(Js) Export your own WebGL ViewerJooinK
 
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 Makermrinal mahato
 
Smart Face Recognition System Analysis
Smart Face Recognition System AnalysisSmart Face Recognition System Analysis
Smart Face Recognition System AnalysisVishal 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 laserRohith 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 TechnologyIRJET Journal
 
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 applicationAtibur Rahman
 
Engineering + Programming portfolio
Engineering + Programming portfolioEngineering + Programming portfolio
Engineering + Programming portfolioJosephDonnelly14
 
Video based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusionsVideo based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusionsVenkat Projects
 

Similar to CNC plotter controlled using Android application (20)

MAJOR PROJECT
MAJOR PROJECT MAJOR PROJECT
MAJOR PROJECT
 
Mini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser EngraverMini CNC Plotter and Laser Engraver
Mini CNC Plotter and Laser Engraver
 
final paper
final paperfinal paper
final paper
 
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
 
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...
 
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
 
(Js) Export your own WebGL Viewer
(Js) Export your own WebGL Viewer(Js) Export your own WebGL Viewer
(Js) Export your own WebGL Viewer
 
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...
 
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...
 
The Rang Bot - CNC Rangoli Maker
The Rang Bot - CNC Rangoli MakerThe Rang Bot - CNC Rangoli Maker
The Rang Bot - CNC Rangoli Maker
 
Smart Face Recognition System Analysis
Smart Face Recognition System AnalysisSmart Face Recognition System Analysis
Smart Face Recognition System Analysis
 
201001162_report
201001162_report201001162_report
201001162_report
 
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...
 
Obstacle detection using laser
Obstacle detection using laserObstacle detection using laser
Obstacle detection using laser
 
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
 
Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS) Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS)
 
Selfie booth ppt
Selfie booth pptSelfie booth ppt
Selfie booth ppt
 
Presentation on Android application
Presentation on Android applicationPresentation on Android application
Presentation on Android application
 
Engineering + Programming portfolio
Engineering + Programming portfolioEngineering + Programming portfolio
Engineering + Programming portfolio
 
Video based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusionsVideo based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusions
 

Recently uploaded

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Recently uploaded (20)

Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

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
  • 5.
  • 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
  • 7.
  • 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