A2数字舵机工作原理

上传人:公**** 文档编号:563560475 上传时间:2023-10-03 格式:DOCX 页数:6 大小:161.19KB
返回 下载 相关 举报
A2数字舵机工作原理_第1页
第1页 / 共6页
A2数字舵机工作原理_第2页
第2页 / 共6页
A2数字舵机工作原理_第3页
第3页 / 共6页
A2数字舵机工作原理_第4页
第4页 / 共6页
A2数字舵机工作原理_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《A2数字舵机工作原理》由会员分享,可在线阅读,更多相关《A2数字舵机工作原理(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.扭矩:12kgcm7V;16.5kgcm10V4.速度:0.269 秒/60 度(7V);0.196 秒/60 度(10V)5.最小区分率:0.356.最大运行角度:300有位置把握;360连续旋转无位置把握7.电压:7V10V 推举供电:9.6V8.最大电流: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 处理器直接把握

4、 AX-12。所以我们需要知道它的内部协议。(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) 复位RESE

5、TFunction Changes the control table values of the Dynamixel actuator to the Factory Default Value settingsLength 0X02Instruction 0X06Parameter NONEExample 4 Resetting the Dynamixel actuator with an ID of 0Instruction Packet : 0XFF 0XFF 0X00 0X02 0X06 0XF7函数功能:将全部舵机 RAM ,ROM 的内容恢复到出厂状态长度:0x02指令值: 0x0

6、6参数:无处理器发送指令 :0XFF 0XFF 0X00 0X02 0X06 0XF70XFF0XFF为起始标志0x00 为 ID 号0x02 为指令长度0x06 为指令代码0xF7 为校验码(Check_Sum=(ID+2+6)(2) 把握舵机移动Function Used for controlling many Dynamixel actuators atthe same time. The communication time decreases by the Synch Write instruction since many instructions can be transmit

7、ted by a single instruction. 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 0XFELength (L + 1) * N+ 4 (L: Data length for each Dynamixel actuator,N: The numbe

8、r of Dynamixel actuators)Instruction 0X83Parameter1 Starting address of the location where the data is to be writtenParameter2 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 t

9、he 1st Dynamixel actuatorParameter L+3 The Lth data for the 1st Dynamixel actuatorParameter 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 actuatorParam

10、eter 2L+4 The Lth data for the 2nd Dynamixel actuator.Example 5 Setting the following positions and velocities for 4 Dynamixel actuatorsDynamixel actuator with an ID of 0: to position 0X010 with a speed of 0X150Dynamixel actuator with an ID of 1: to position 0X220 with a speed of 0X360Data for the 2

11、nd Dynamixel 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;/位置值不能超过

12、 0x3ff if(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);/指令代码ua

13、rt_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复位重设IDY发送舵机转动命令程序完毕程序开头

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

当前位置:首页 > 资格认证/考试 > 自考

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