RepRap的X_STEPS_PER_MM参数

开源技术
2013
01/31
00:11
分享
评论
背景介绍:
参数Steps per mm:这个参数是决定了工作台每运动1mm,步进电机需要多少个脉冲。
计算方法(公式)=(步进电机旋转1圈的标准脉冲数*驱动器细分数)/丝杠导程(导程也就是螺距,如果丝杠不是直接连接电机而是通过减速后连接则计算结果还需要再乘以减速比)
例如:1.8度/脉冲的步进电机旋转1圈需要360/1.8度=200个脉冲。驱动器使用8细分,丝杠导程为2.5mm。
      Steps per=200*8/2.5=640个脉冲
http://reprap.org/wiki/Arduino_GCode_Interpreter
Usage
Firmware Configuration
In order for the firmware to operate properly, you must configure the proper variables in the firmware and then upload the firmware to your Arduino. The values are stored in the file _init.pde. An example version is included in the distribution called _init.pde.dist.
We'll cover each of the variables below:
X_STEPS_PER_INCH
This variable stores how many steps to take to move the X axis 1 inch. You will need to set this as accurately as possible if you want your machine to be accurate. There are two ways to set it:
Move and Measure - slap a pen or marker on as a toolhead and draw a 1000 step line. Measure it and divide 1000 by the length in inches.
Calculate Step Size - this one is the preferred way of doing things. Its rather easy to calculate step size based on your drive mechanism.
For threaded rod drive systems:
Find your TPI (threads per inch). for example, 1/4"-20 threaded rod means that there are 20 threads per inch (aka 20 turns = 1 inch.) Simply take that number and multiply it by the steps in a revolution. With a 400 step motor, it would be 8000 steps per inch.
For belt/pulley systems:
Find the circumference of your drive pulley. (remember circumference = 2*pi*r) (say: 2.75")
Calculate step size (ie: circumference / steps per revolution) (say: 2.75" / 400 = 0.00625")
Divide 1 inch by step size (1" / 0.00625" = 160 steps/inch)
X_STEPS_PER_MM
This variable stores how many steps to take to move the X axis 1mm. You can either calculate it independently, or take the number above and divide by 25.4.
实际设置:
在用雕刻机改装成RepRap的过程中,遇到问题。电脑上面发指令走100mm,机器实际上只走了25mm。查阅资料无数,始终不得要领。
根据上面的知识,理论上X_STEPS_PER_MM的设置应该是160(雕刻机原来是8细分,320 steps per mm,丝杠导程为5mm)。RepRap默认是4细分的。
可是实际上,当设置超过18以后,就走不动了。A3977的电流、细分都调过。始终无法解决。
在“process_g_code.pde”里面,把收到的GCode都加大4倍,可以暂时解决这个问题
  1. //did we get a gcode?
  2. if (gc.seen & GCODE_G)
  3. {
  4. last_gcode_g = gc.G; /* remember this for future instructions */
  5. fp = where_i_am;
  6. if (abs_mode)
  7. {
  8. if (gc.seen & GCODE_X)
  9. fp.x = gc.X;
  10. if (gc.seen & GCODE_Y)
  11. fp.y = gc.Y;
  12. if (gc.seen & GCODE_Z)
  13. fp.z = gc.Z;
  14. if (gc.seen & GCODE_E)
  15. fp.e = gc.E;
  16. }
  17. else
  18. {
  19. if (gc.seen & GCODE_X)
  20. fp.x += gc.X;
  21. if (gc.seen & GCODE_Y)
  22. fp.y += gc.Y;
  23. if (gc.seen & GCODE_Z)
  24. fp.z += gc.Z;
  25. if (gc.seen & GCODE_E)
  26. fp.e += gc.E;
  27. }
复制代码
回复

使用道具 举报

2013-3-3 13:16:53 | 显示全部楼层
这是参数还是比较难懂啊!只是对于我来说啊!
回复 支持 反对

使用道具 举报

推动3D打印

关注南极熊

通知

联系QQ/微信9:00-16:00

392908259

南极熊3D打印网

致力于推动3D打印产业发展

Copyright © 2024 南极熊 By 3D打印 ( 京ICP备14042416号-1 ) 京公网安备11010802043351
快速回复 返回列表 返回顶部