User Tools

Site Tools


lego_dynamixel_control_xl320

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lego_dynamixel_control_xl320 [2019/05/16 22:01] – [Running and Analysis] ntorresreyeslego_dynamixel_control_xl320 [2019/06/06 23:03] (current) – [NXC Code] ntorresreyes
Line 143: Line 143:
 **RS485 to TTL** **RS485 to TTL**
 \\ \\
-The XL-320 uses TTL logic levels (0 to 5v) for communication. Since the NXT uses RS485 communication, an RS485-to-TTL converter must be used. This can be done using a MAX485 chip, as seen in **this** tutorial or with an off the shelf converter such as [[https://www.amazon.com/DROK-Adapter-Module-Converter-Indicator/dp/B075V2NMV8/ref=sr_1_3?keywords=rs485+to+ttl&qid=1558067804&s=gateway&sr=8-3|this one]].+The XL-320 uses TTL logic levels (0 to 5v) for communication. Since the NXT uses RS485 communication, an RS485-to-TTL converter must be used. This can be done using a [[https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=7&ved=2ahUKEwip-ILdzdbiAhWQup4KHYefCGwQFjAGegQIBhAC&url=https%3A%2F%2Fdatasheets.maximintegrated.com%2Fen%2Fds%2FMAX1487-MAX491.pdf&usg=AOvVaw3BFaoKg2WHoZayW5LHwFD5|MAX485 chip]], as seen below or with an off the shelf converter such as [[https://www.amazon.com/DROK-Adapter-Module-Converter-Indicator/dp/B075V2NMV8/ref=sr_1_3?keywords=rs485+to+ttl&qid=1558067804&s=gateway&sr=8-3|this one]].
 \\ \\
 \\ \\
 +{{:torres:image6.jpg?300|}}
 +\\
 +\\
 +The MAX485 chip offers some simplicity over using an off the shelf converter although many higher level features are not included. Nevertheless, it is definitely enough for this tutorial at a fraction of the cost and zero extra added components. The pin layout is as follows:
 +\\
 +   *1 - TTL Output
 +   *2 - LOW (GND)
 +   *3 - LOW (GND)
 +   *4 - Not Connected
 +   *5 - GND
 +   *6 - SDA (From NXT)
 +   *7 - SCL (From NXT)
 +   *8 - 5 volts
 **Writing Dynamixel ID's** **Writing Dynamixel ID's**
 \\ \\
Line 216: Line 229:
 The NXC code files as well as the header file is included below in a .zip file: The NXC code files as well as the header file is included below in a .zip file:
 \\ \\
-{{:torres:tutorials:nxt_dynamixel:xl320_code.zip|}}+{{:torres:xl320_codev2.zip|}}
 \\ \\
 **Controlling Multiple Dynamixels** **Controlling Multiple Dynamixels**
Line 226: Line 239:
 </code> </code>
 \\ \\
-Next, each Dynamixel should be initialized with the "SetMode()" function. 
-<code> 
-SetMode(ID1, SERVO, minAngle1, maxAngle1); 
-SetMode(ID2, SERVO, minAngle2, maxAngle2); 
-</code> 
 \\ \\
 Finally, when using the "Servo()" function, make sure the correct ID for the correct Dynamixel is used. Finally, when using the "Servo()" function, make sure the correct ID for the correct Dynamixel is used.
Line 266: Line 274:
   Wait(10);   Wait(10);
  }  }
- SetMode(ID1,SERVO,0,1023);        //servo mode with angle limits of 
- SetMode(ID2,SERVO,0,1023);        //0 to 300(1023). 
  
  while(true){  while(true){
lego_dynamixel_control_xl320.txt · Last modified: 2019/06/06 23:03 by ntorresreyes