9 posts in this topic

Hello,

I have an NX1P2 with a CIF105 (RS485 module) and trying to control motors (Dynmaxil MX106T) that run on UART (TTL). I spent some time researching and came across MAX485, but I don't think that's the best way to do it. To make things more complicated, there's only one data pin on the motors, i.e. runs half duplex so I'll be needing some sort of direction control. 

Has anyone here come across something similar? How is it possible to communicate with a TTL device from the PLC?

Thank you 

 

Share this post


Link to post
Share on other sites

MAX485 is used to interface devices using RS485 and TTL . full or half duplex does not imply hardware handshaking. Neither RS485 not TTL UART use it anyway.

Share this post


Link to post
Share on other sites

Thank you @panic mode. Does that mean shorting the RO and DI pins on the Max485, as the motors require one data line (either transmit or receive)? 

Share this post


Link to post
Share on other sites

actually... i just had to look it up... this not conventional RS485 (or RS232) interface - there is also control line called "DIRECTION".

I doubt you will be able to communicate like that - even if you use one of PLC outputs as direction signal, it will prpbably be very difficult to get the timing right (PLC I/O are updated in scan, communication is in overhead). If i was going to do this, i would have a microcontroller in between servo and PLC.

http://support.robotis.com/en/product/actuator/dynamixel/dxl_mx_main.htm

 

 

Share this post


Link to post
Share on other sites

The MAX485 mentioned in the manual is for MX-106R series which indeed supports RS485 (has 4 pin connectors).

In your case with MX-106T, the Motor side uses UART, so the easiest way to get it converted on the PLC side is by using MAX232 chip instead. It will convert the UART protocol into RS232. There are plenty of circuit example available online for that chip.

Regarding the single pin for both TX and RX on the motor, you can solve the issue pretty easiliy by using a Schottky Diode. Get one with a low forward-bias voltage (0.3 V or less), and use it in a configuration like in the picture below. The diode will ensure that signal goes one way from the MAX232 TX Output into the motors DATA input. When a DATA is sent from the motor, it will only enter the RX Input of the MAX232 since the diode is blocking the TX side.

Dynamixel.JPG.593a306fff39d84647f9f48358

Share this post


Link to post
Share on other sites

Thank you again @panic modeand thank you @innoaloe

I am afraid I can't go with RS232 as I have 4 motors that need to be connected to the same port. 

Share this post


Link to post
Share on other sites

@panic mode Don't I still need some sort of timing between the PLC and the micro-controller if I go with that option? 

Share this post


Link to post
Share on other sites
52 minutes ago, atomic_robo said:

Thank you again @panic modeand thank you @innoaloe

I am afraid I can't go with RS232 as I have 4 motors that need to be connected to the same port. 

The problem is RS485 signals are typically containing some sort of ID which will tell the slave device who is the target of the current communication. IIRC your MX-106T does not have any settable identifier, so you cannot use conversion from RS-485 protocol to UART.

If you want to save number of RS232 port, then you should go with PanicMode's suggestion. Have the PLC talk to the Microcontroller via RS232-to-UART interface, then emulate some digital I/O pins for each motors TX/RX UART signals. Timing should not be critical if you send the data cyclically for every motors.
This of course will take more work rather than buying two units of SCU21-V1 to get 4 RS232 ports.

Share this post


Link to post
Share on other sites

I am not worried about id when converting from rs485 to uart . ID can be set for each motor and then each motor can be addressed in the header of each instruction packet. I don't have any room for four additional You're right @innoaloe, it'll be a lot of work. The easy solution and the more expensive would be to get MX106R instead. Thank you again :D 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now