CNC Graphics Tablet
Introduction: CNC Graphics Tablet
This instructable explains how to make a CNC graphics tablet from a 4-wire resistive touchpad and an Arduino UNO R3 microcontroller.
A gcode file is created for each of your drawings. [1]
Construction is simple ... all you need is a steel ruler and a sharp knife.
The tablet supports both freehand and point-to-point drawing.
The touchpad has a resolution of 600 x800 pixels which translates to a 600mm x 800mm drawing if your target resolution is 1mm/pixel.
The estimated cost of construction is less than $25
Images
* The cover photo (photo1)shows the completed tablet.
* Photo 2 shows a magazine cover under the tablet
* Photo 3 is a close up of the tablet
* Photo 4 shows the freehand tracing
* The video shows the tablet in operation
Notes
[1]
The tablet is intended for use with CNC plotters ... 16
not CNC mills.
Step 1: Parts List
Photo one shows all of the parts needed to build this tablet.
The following parts were obtained from https://www.aliexpress.com/
* 1 only 8 inch, 183*141mm (4:3), AT080TN52 V1 4 Wire Resistive Touch Screen Panel
* Resistive Touch Screen Panel
* 1 only Arduino UNO R3 microcontroller with USB cable
* 4 only 100mm male-to-male Arduino jumper wires
The following parts were obtained locally
* 2 only 23cm x 26cm pieces of mat-board from a picture-framer
* 8 only M3 x 5mm bolts
* 4 only 9mm x M3-threaded nylon spacers
* 1 only roll of cloth tape
* 1 only roll of doubled-side tape
* 1 only wooden toothpick
The estimated cost of construction is less than $25
Step 2: Circuit
Place the touchpad face-up and connect the Arduino pins A0, A1, A2, and A3 as shown.
Do not cross the male-to-male jumper wires
Step 3: Theory
The 8 inch 4-wire resistive touch-screen comprises two resistive films that are separated by an 800 x 600 array of microscope insulators.
Each resistive layer has two leads
* The Y-axis has one lead connected to the top-edge and one lead connected to the bottom edge.
* The X-axis has one lead connected to the left- edge and one lead connected to the right-edge.
Pressing on the top surface causes the two films to make contact.
Y-Axis Measurements
For ease of explanation let’s assume that the bottom layer is the Y-axis and that the Y-axis leads are connected to a 5 volt DC supply.
* The resistive film acts like a voltage-divider.
* The voltage at the bottom will measure 0 volts,
* the voltage at the center will measure 2.5 volts,
* and the voltage at the top will measure 5 volts
To measure this voltage we connect a lead from the top film to an analog input such as A0 , then press the top layer with a stylus to make a connection. [1]
When a connection is made the Arduino analog-to-digital (A/D) converter will output a number between 0 and 1023
* 0 volts equates to a reading off 0
* 5 volts equates to a reading off 1023
* 2.5 volts equates to a reading of 2.5/5*1023 = 512 (rounded)
These numbers can be converted to Y-coordinates using the following Arduino code:
Ypos = map(y, 61, 958, 0, 800); ................................................................ (1)
where
* 61 = actual value when the bottom of the screen is touched [2]
* 958 = actual value when the top of the screen is touched [2]
* 0 = the lower screen coordinate.
* 800 = the top screen coordinate.
X-Axis Measurements
Similarly the X-coordinates may be found by applying 5 volts across the X-axis leads (top-layer) and measuring the A/D values with one of the Y-axis leads.
In this case the X-coordinates may be found using the following Arduino code:
Xpos = map(x, 95, 912, 0, 600); ................................................................ (2)
where
* 95 = actual value when the left-side of the screen is touched [2]
* 912 = actual value when the right-side of the screen is touched [2]
* 0 = the left screen coordinate.
* 600 = the right screen coordinate. 611