Hey that's pretty neat. What model of rotary encoder did you use? And is that an Arduino or what?
Rotary Quad Encoder + Arduino
Video:
More pictures: Mini Mill DRO Slideshow by WmCnc | Photobucket
Just a proof of concept
Wagner
Similar Threads:
- Need Help!- Super Mini Mill 2 vs Mini Mill Tool Tracking
- Mini tech Machinery 3-axis CNC Mini-Mill 2 CAD/CAM 3d Printing Manufacturing
- Mini tech Machinery Corporation 3-axis CNC Mini-Mill 2 CAD/CAM Manufacturing
- Mini tech Machinery Corporation 3-axis CNC Mini-Mill 2 CAD/CAM Manufacturing
- best way to cut stock for machining on mini lathe/mini mill
Hey that's pretty neat. What model of rotary encoder did you use? And is that an Arduino or what?
James hosts the single best wiki page about motors for CNC hobbyists on the net:
http://techref.massmind.org/techref/io/motors.htm Disagree? Tell him what's missing! ,o)
Hi James, thank you
It is a 600 pulses per rotation encoder; got from eBay
On the code, I count the encoder channels A and B on rise and fall, for a total of 2400 pulses per rotation.
The processor is a Arduino mini-pro (5 V, 16 MHz).
The display is a 4 digit I2c module, I will change it to a 8 digit SPI to show the + or - sign and 0.0005 position.
Wagner
Very interesting project .can you open Arduino code and circuit diagram.
Hy qazplm800,
The code can be found here: Mini Mill DRO
The connections are indicated on the code.
Also, see the full DRO: Mini Mill DRO
Wagner
Last edited by qazplm800; 07-01-2015 at 11:26 AM.
HI Wmcnc
Thank you for your contribution and answer.
my machine screw 4mm pitch / encoder pulse 500.
( Encoder factor (1/((600*4)/(12*0.08))*10000) )
How to calculate change Arduino code.
Best regards.
tk
Hi qazplm800,
On the equation:
600 is the number of pulses per revolution of the encoder
4 if the is the number of interruptions per pulse (The code measures the encoder lines A and B on rising and falling)
12 is the number of teeth on the timing pulley
0.08 if the pitch on the timing belt (in inches)
10000 is the count on the display per inch of displacement
Applying the equation, the factor for my machine is 4.
1 inch of displacement will be 12.5 teeth on the belt (1 / 0.08). This will turn the pulley 1.041666 rotation (12.5 / 12), in a encoder with 600 pulses per revolution, this will generate 625 pulses (1.041666 * 600), times 4 interruptions per pulse, a total of 2500 counts. 2500 counts times factor of 4, gives the value 10000 (one inch, since the code puts a decimal point on the 5th display)
If you need more help, please send more information about your application.
Do you want to measure in inches or mm ?
1/10000 or 1/1000 of a inch ?
1/1000, 1/100 or 1/10 of a mm?
Is your screw connect directly to the encoder ? No reduction ?
Wagner
HI..Wagner
my max7219 number left and right reversion.
can tell me change this question Arduino code.
yes screw connect directly to the encoder no reduction no pulley.
I want to measure 1/100 mm.
Best regards.
tk
IMG_20150702_212012.jpg
Hello qazplm800,
Nice picture.
As I understand, your machine screw is 4 mm pitch, meaning that at one turn of the screw, your setup moves 4 mm and you want the display to show 4.00
I also understand that your encoder generates 500 pulses per rotation.
So, 1 turn = 4.0 mm, 500 pulses * 4 interruptions equal 2000 counts. To convert to 400 units, multiply by 0.2
change the line:
#define SCF 4.000000 // Encoder factor (1/((600*4)/(12*0.08))*10000)
to
#define SCF 0.2 // Encoder factor 4 mm pitch, 500 * 4 pulses/rotation 1/100 mm resolution (400/(500*4))
To revert the display and move the decimal point to the 3rd display, change the display function (this is untested)
change the function ThrDsp(void) to:
void ThrDsp(void) // Display measure
{
long v;
int i,n,m;
n=0;
v=DroMea;
if(v<0)
{
n=1;
v*=-1;
}
for(i=0;i<8;i++)
{
m=v%10;
switch(i)
{
case 0:
case 1:
lc.setDigit(0,7-i,m,false);
break;
case 2:
lc.setDigit(0,7-i,m,true);
break;
case 3:
case 4:
case 5:
case 6:
case 7:
if(m)
lc.setDigit(0,7-i,m,false);
else
{
if(n)
{
n=0;
lc.setChar(0,7-i,'-',false);
}
else
lc.setChar(0,7-i,' ',false);
}
break;
}
v/=10;
}
}
Good luck,
Wagner
PS. The forum messed-up the function text format. Missed the indentation.
Please find attached the plain text of it.
Hi....Wagner
Displays ten position only displays 1-9. not display 0
I try to learning change Mill DRO Arduino code question.
But i was kindergarten Arduino C language.
max7219 number left and right reversion is my wrong PCB
Could you tell me Change two problem.
Once again thank you for your help.
Best regards.
tk
dro_001_1.png
Hi qazplm800,
My mistake.
Please change the code (on the function ThrDsp) from if(m) to if(v), as follows:
case 7:
if(v) // was if(m) before
lc.setDigit(0,7-i,m,false);
else
{
Please let me know if this works.
Wagner
Hello Wmcnc.
Arduino DRO is completed.
Thank for your contribution this DRO. and quick answers my question.
Arduino DRO let me learn a lot. Again have a problem then help me.
Best regards.
tk
Hi the code working for me to, But I want to attach a steppermotor
to the code, can any body help?
Hi..i am a new user here. I think your encoder generates 500 pulses per rotation. 1 turn = 4.0 mm, 500 pulses * 4 interruptions equal 2000 counts. To convert to 400 units, multiply by 0.2. Change the line:
#define SCF 4.000000 // Encoder factor (1/((600*4)/(12*0.08))*10000)
to
#define SCF 0.2 // Encoder factor 4 mm pitch, 500 * 4 pulses/rotation 1/100 mm resolution (400/(500*4))
To revert the display and move the decimal point to the 3rd display, change the display function
china circuit board assembly