DRO 4 wiring the Digital Read Out and uploading sketches.

preview_player
Показать описание
This video is the last video in a 4 part series in which I demonstrate how to wire the DRO and upload my sketches.
I placed a copy of my sketches in the comments. Links to my other videos:

Рекомендации по теме
Комментарии
Автор

The display library that I used in this sketch is NewLiquidChrystal_Lib Version 1.51.

practicemakesbetter
Автор

Thanks, I was going to order a couple encoders.

FilmFactry
Автор

Hi your project help me a lot, I am a hobbyst and a comercial DRO are much expensive and don't make sense for my use, so I decided to implement your DRO, but I have a question, you use the formula (.1 x π )/ 600 afak this must be (2 * π * r)/600 where do you get the value .1? your pulley is 8mm in diameter.

PauloSilva-llvs
Автор

Great project, i would like the arduino to remember the position after a power interruption. Do you have a solution for this?

paulwilson
Автор

Nice Project! my old DRO is dying, so i am in process of locating everything to actually get one of these up and running soon.

Is it possible that the issue with the formula, is that the formula used the wrong pulse count and the OD not the PD of the pulley? The formula used is (.1 x 3.1416 /600) = 0.00052 if you use

Pitch Dia. of Pulley x Pi (3.1415) /2400

I found this info for the gt2 pulleys
PD for the pulleys
# grooves\ Pitch Dia
14 \ .351 Calculation = 0.00046
15 \.376 .00049
16\.401 .00052
17\.426 .00056
18\.451 .00059

Thoughts?
Randy

randyshomeshop
Автор

Interesting project! What is resolution in mm?

metalosia
Автор

I got it to work. The display I got has a couple of minor quirks. Nothing major, but I'd like to try to iron them out.
First, I get a useless 4th & sometimes 5th digit on the inch & a 3rd & sometime 4th on the mm scale.
Did anyone else have that problem?

toddk.
Автор

Now make the Arduinos accept Gcode commands to build a manual CNC lathe.

DeanCording
Автор

what about libary in code can you add link or some tutorial for it. thanks you so much

stir
Автор

Is the encoder quadrature, if so you should get 2400 PPR, 4 times the resolution, or am I wrong.

BigBoyRasp
Автор

Z Axis Sketch
// James Rovere 2019 Z Axis
// A Digital Readout using a quaduture rotary encoder, an IC2 LCD display
// and a GT2-16 pulley, 16 teeth spaced 2 mm apart; .37" outside Diameter.
#include <Encoder.h>// Encoder library.
Encoder myEnc(2, 3);// Connected to Digital pins 2 and 3.
#include <LiquidCrystal_I2C.h> //IC2 LCD library.
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

void setup() {
lcd.begin(20, 4); // My display has 20 Columns, 4 Rows.
}
long oldPosition = -999;
void loop() {
const float Wv = (.1 * PI) / 600; // Math formula for .37" diameter pulley
//and 600 pulse/revolution encoder.

lcd.setCursor(7, 0); // (Column 7, ROW 0) (Column #0-19, Row #0-3)
lcd.print("Z Axis");
lcd.setCursor(2, 1);
lcd.print("inch");
lcd.setCursor(14, 1);
lcd.print("mm");
lcd.setCursor(8, 2);
lcd.print("<->");// Graphic symbols for a Z axis left and right travel.
long newPosition = myEnc.read();
if (newPosition != oldPosition)
lcd.setCursor (0, 0);
lcd.print (newPosition); // Display number of pulses, 1"~=1902.2 pulses.
lcd.setCursor(2, 3);
lcd.print(Wv * newPosition, 3);//Math formula * Encoder reading, 3 decimals.
lcd.setCursor(9, 1);
lcd.print("|");// Graphic symbol to separate imperial and metric display.
lcd.setCursor(9, 3);
lcd.print("|");
lcd.setCursor(11, 3);
lcd.print(Wv * newPosition * 25.4, 2); // Formula to convert imperial
// and metric, 2 decimals.
}

practicemakesbetter
Автор

X Axis Sketch

// James Rovere 2019 Lathe X Axis
// A Digital Readout using a quaduture rotary encoder, an IC2 LCD display
// and a GT2-16 pulley, 16 teeth spaced 2 mm apart; .37 outside Diameter.
#include <Encoder.h>// Encoder library.
Encoder myEnc(2, 3);// Connected to Digital pins 2 and 3.
#include <LiquidCrystal_I2C.h> //IC2 LCD library.
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

void setup() {
lcd.begin(20, 4);// 20 Columns, 4 Rows.
}
long oldPosition= -999;


void loop() {
const float Wv =(.1038 * PI)/600; // Formula to set the linear distance travelled in one pulse.

lcd.setCursor(8, 0); //(Column 8, Row 0)
lcd.print("X Axis");
lcd.setCursor(3, 1);
lcd.print("inch");
lcd.setCursor(14, 1);
lcd.print("mm");
lcd.setCursor(9, 1);
lcd.print(":");
lcd.setCursor(9, 2);
lcd.print("|");
lcd.setCursor(9, 3);
lcd.print(":");
lcd.setCursor(3, 2);
lcd.print("D");
long newPosition = myEnc.read();
if (newPosition != oldPosition)
lcd.setCursor (0, 0);
lcd.print (newPosition);// Display pulse count.
lcd.setCursor(2, 2);
lcd.print(Wv*newPosition*2, 3);//Diameter multiply by 2, 3 decimal places
lcd.setCursor(0, 2);
lcd.print("D");
lcd.setCursor(11, 2);
lcd.print("D");
lcd.setCursor(11, 3);
lcd.print("R");
lcd.setCursor(0, 3 );
lcd.print("R");
lcd.setCursor(13, 2);
lcd.print(Wv*newPosition*25.4*2, 2);// mm Diameter multiply by 2, 2 decimal places.
lcd.setCursor(2, 3);
lcd.print(Wv*newPosition, 3);// inch Raidius of workpiece.
lcd.setCursor(13, 3);
lcd.print(Wv*newPosition*25.4, 2);// mm Raidius of workpiece.

}

practicemakesbetter