AX-12数字舵机工作原理

上传人:鲁** 文档编号:480305063 上传时间:2023-05-22 格式:DOC 页数:6 大小:217.50KB
返回 下载 相关 举报
AX-12数字舵机工作原理_第1页
第1页 / 共6页
AX-12数字舵机工作原理_第2页
第2页 / 共6页
AX-12数字舵机工作原理_第3页
第3页 / 共6页
AX-12数字舵机工作原理_第4页
第4页 / 共6页
AX-12数字舵机工作原理_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《AX-12数字舵机工作原理》由会员分享,可在线阅读,更多相关《AX-12数字舵机工作原理(6页珍藏版)》请在金锄头文库上搜索。

1、 整理的AX-12 资料 控制原理 程序 : 时间仓促。弄的不是很整齐,有什么问题,请直接联系我 !概述:Dynamixel系列机器人驱动器是一个很流行模块化的驱动器,其由齿轮减速器、精密直流电机和具有串联功能的电路板分别单一封装组成。尽管它体积小巧紧凑,但它可以产生很大扭矩,加上高品质材料制造并具有一定的强度,可以抵御一定外部冲击。它具有检测内部温度功能,例如改变内部温度和供电电压。AX-12+数字伺服电机不像一般的R/C微伺服电机(舵机)使用PWM(脉冲宽度调制)控制,其需要使用CM-5 Dynamixel AX12+伺服电机专用控制器控制。当用做关节电机时,可以旋转0300;当用作轮子驱

2、动时,可以选择360连续旋转模式。更重要的是AX-12+提供了高达16kgcm的扭矩,是一般数字舵机的2倍。下面是AX-12舵机的主要技术参数:AX-12+规格参数:1.重量:55g2.齿轮减速比:1/2543.扭矩:12kgcm(7V);16.5kgcm(10V)4.速度:0.269秒/60度(7V);0.196秒/60度(10V)5.最小分辨率:0.356.最大运行角度:300(有位置控制);360连续旋转(无位置控制)7.电压:7V10V (推荐供电:9.6V)8.最大电流:900mA9.工作温度:-5 +8510.控制信号:数字信号11.通讯协议:半双工异步串行通信12.通讯设置:(数

3、据位8、停止位1、无奇偶效验)13.Link 方式:TTLDaisy总线14.ID数:254ID (0253)15.通讯速率:7343bps 1 Mbps16.反馈:位置、温度、负载、电压17.材质:工业塑料18.报警功能:当内部温度、扭矩、供电电压超过额定范围时,电机主动反馈实时情况。此种紧急状况,电机会闪动LED指示灯或停止输出扭矩。二工作原理:(1) 硬件电路:要使舵机运行,主控制器必须具备合适TTL电平的半双工异步串行通道。 推荐使用Dynamixel(就是舵机生产商的名字)控制器CM-5. 在这里,我们不使用CM-5 ,而用ARM处理器直接控制AX-12。所以我们需要知道它的内部协议

4、。(2) 软件: 从DATASHEET中得知:AX-12 的指令总表如下 翻译下:指令功能代码参数个数PING获取舵机状态数据包0x010READ DATA读取舵机RAM的信息0x022WRITE DATA写ROM或RAM的一个字节0x032REG WRITEACTION激活下同上0x042ACTION引起REG WRITE触发命令0x050RESET复位0x060SYNC WRITE控制舵机舵机同时转动0x834 在这里,我们只用RESET 和 SYNC WRITE 这2个指令!下面分别介绍着2个指令:(1) 复位(RESET)Function Changes the control tab

5、le values of the Dynamixel actuator to the Factory Default Value settings Length 0X02 Instruction 0X06 Parameter NONE Example 4 Resetting the Dynamixel actuator with an ID of 0 Instruction Packet : 0XFF 0XFF 0X00 0X02 0X06 0XF7函数功能:将所有舵机RAM ,ROM的内容恢复到出厂状态长度: 0x02指令值: 0x06参数: 无处理器发送指令 :0XFF 0XFF 0X00

6、 0X02 0X06 0XF70XFF 0XFF 为起始标志 0x00为ID号 0x02 为指令长度0x06 为指令代码 0xF7 为校验码( Check_Sum=(ID+2+6)(2) 控制舵机移动Function Used for controlling many Dynamixel actuators at the same time. The communication time decreases by the Synch Write instruction since many instructions can be transmitted by a single instruct

7、ion. However, you can use this instruction only when the lengths and addresses of the control table to be written to are the same. Also, the broadcasting ID needs to be used for transmitting. ID 0XFE Length (L + 1) * N + 4 (L: Data length for each Dynamixel actuator, N: The number of Dynamixel actua

8、tors) Instruction 0X83 Parameter1 Starting address of the location where the data is to be written Parameter2 The length of the data to be written (L) Parameter3 The ID of the 1st Dynamixel actuator Parameter4 The 1st data for the 1st Dynamixel actuator Parameter5 The 2nd data for the 1st Dynamixel

9、actuator Parameter L+3 The Lth data for the 1st Dynamixel actuator Parameter L+Data for the 1st Dynamixel actuatorParameter L+4 The ID of the 2nd Dynamixel actuator Parameter L+5 The 1st data for the 2nd Dynamixel actuator Parameter L+6 The 2nd data for the 2nd Dynamixel actuator Parameter 2L+4 The

10、Lth data for the 2nd Dynamixel actuator . Example 5 Setting the following positions and velocities for 4 Dynamixel actuators Dynamixel actuator with an ID of 0: to position 0X010 with a speed of 0X150 Dynamixel actuator with an ID of 1: to position 0X220 with a speed of 0X360 Data for the 2nd Dynami

11、xel actuator函数功能:主要功能是控制所有AX-12舵机同时移动,当然,这条指令也可以控制一个舵机移动。我们用就是用这条指令来使舵机动作!长度: (L + 1) * N + 4 (L: 每个舵机的控制信息长度, N: 控制舵机数) 指令值: 0xFE下面我们用这条指令编写一个控制一个舵机的子程序:void Move_One(unsigned int Postion,unsigned int Speed,unsigned char ID ) unsigned int Check_Sum; if(Postion=0x3ff) Postion =0x3ff; /位置值不能超过0x3ff i

12、f(Speed=0x3ff) Speed =0x3ff; /位置值不能超过0x3ff / Check_Sum=(0xfe+0x09+0x83+0x1e+0x04+ID+Postion%256+Postion/256+Speed%256+Speed/256); /校验码计算 Check_Sum=(0xac+ID+Postion%256+Postion/256+Speed%256+Speed/256); if(Check_Sum0xff) Check_Sum=Check_Sum%256; uart_t(0xff); uart_t(0xff); /发送起始码 uart_t(0xfe); /指令代码

13、uart_t(0x09); /移动一个舵机的参数长度 uart_t(0x83); /指令: SYNC_WRITE uart_t(0x1e); /目标位置在舵机RAM的地址 uart_t(0x04); / 控制信息的长度: 两个字节速度,两个字节位置 uart_t(ID); /舵机ID号 uart_t(Postion%256); /目标位置低字节 uart_t(Postion/256); /目标位置高字节 uart_t(Speed%256); /目标速度低字节 uart_t(Speed/256); /目标速度高字节 uart_t(Check_Sum); /发送校验码 程序流程图:程序开始程序初始化 设串口波特率:1Mbps 所有舵机ID是否正确?N复位重设ID发送舵机转动命令 程序结束Y

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 机械/制造/汽车 > 工业自动化

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号