6 RS232 Connections Possible?

I'm currently working on a project to build a Stewart-Gough Platform robot using size linear actuators. I'm hoping to use an Arduino to coordinate the movement of the six linear actuators that make up the robot. I can control the actuators with standard servo position 1-2ms pluse commands, but I can get much better resolution and accuracy out of the actuators I am using using an RS232 connection to each one. By default none of the Arduino products have six serial ports. Is there a way to reliably command six serial ports using one or more Arduinos? Does this sound plausible based on the speed of the processor?

You could plausibly control six serial Ines by bit-banging, but I suspect the performance would not meet your unshared expectations.

If you are only sending RS232 data to the devices and each device has their own address to respond to, you might be able to wire OR the TX line to all the RX lines.

More information please?

You could use six Pro Minis with one master.

.

MrKyle:
I'm currently working on a project to build a Stewart-Gough Platform robot using size linear actuators. I'm hoping to use an Arduino to coordinate the movement of the six linear actuators that make up the robot. I can control the actuators with standard servo position 1-2ms pluse commands, but I can get much better resolution and accuracy out of the actuators I am using using an RS232 connection to each one. By default none of the Arduino products have six serial ports. Is there a way to reliably command six serial ports using one or more Arduinos? Does this sound plausible based on the speed of the processor?

Are your devices addressable?

Paul

Unfortunately these actuators are not addressable, and I'd like to avoid bit banging.

Use multiple Pro Minis.

.

It seems odd you can get better resolution via RS232 than using the 1-2mS pulse method.
Do you have any links/references t the actuators you are considering?

lastchancename:
It seems odd you can get better resolution via RS232 than using the 1-2mS pulse method.
Do you have any links/references t the actuators you are considering?

Here is a link to the actuator specs. It's a bit long though.

https://ultramotion.com/servo_cylinder/ultra-motion-servo-cylinder-manual.pdf#page35

My thinking is that if I use a serial connection I have access to a lot more features of the actuator, for instance I can directly command position and have the actuator read off it's position. If I use a servo signal I lose some of that information and also have to deal with error introduced by inaccuracy in translating from a position to pulse length. Also, using serial I can transmit at a fairly high baude rate, but with RC pulses I'm basically limited to 50 hz.

If I used two Mega boards and slaved one to the other and split the serial channels between them, could that work? I was thinking that they wouldn't be able to synchronize actions well using an I2C connection, but maybe I'm wrong about that.

A Teensy 3.6 has 6 Serial ports and can be programmed with the Arduino IDE. Of course you will need 6 RS232 converters. Chips like the MAX561 will do 4 RS232's. I have yet to find any that do 6, but it's easy enough to buy 2 chips.

You can get an I2C interfaced dual UART chip.
Their are a few but one is the SC16IS752.

Or you could use something like the Max399. 8:1 mux. Gives you 4 channels for RS232 per chip. Mouser has it in DIP for $6.89 each. Mouser part number is 700-MAX398CPE.

You are going to have to interface to the RS232 voltage, as the UART on the Arduino is at TTL. The mux will need the +/- supply as well.

I can find a MAX388 which seems to match that description. But muxing a serial input won't work well. (I didn't read the actuator datasheet to see if you need to read its data.)

The MAX232 and its many family members mean you don't need to spend time making the +/-12V power supply.

I haven't read the sheet either, but I am assuming that there is data out.

He will need to mux by some means if there is data coming back. Either on the TTL side, or the RS232 side. He only has 1 UART. He can physically transmit to all of them at once (wired OR on input to transmitters), but the cylinders won't know who is being talked to (no addressing). But the cylinders can't physically transmit back. You don't do a wired OR on RS232.

If he simply uses 6 RS232 drivers, they need to have some kind of enable pin to turn on the transmitters and receivers. That is a simple wired OR on the TTL side. Lots of board space, but simple.

Muxing 1 output to 6 will introduce a lot of skew. Presumably you send at least 4 bytes for each command so the 6th one will get a complete command 20 byte-periods after the first. On 9600 baud, that’s 1/50th of a second delay. That’s going to be noticeable for coordinated movements, which are required for this kind of robot. Plus you never actually know when a byte has left the UART output, so you have to add delays to ensure you don’t switch the mux in the middle of a byte.

To me, a Teensy 3.5 or 3.6 is the obvious solution.

I did read part of the datasheet :slight_smile: The actuator sends an ACK/NACK back.

So two multiplexers can do the job. But it means waiting for the reply before controlling the next actuator.

The point about the SC16IS752 is that each UART contains a 64 byte FIFO buffer so their is plenty of storage to catch data between looking to service each one.

The MAX388 is quite useless in this situation.

MikeLittle:
You are going to have to interface to the RS232 voltage, as the UART on the Arduino is at TTL. The mux will need the +/- supply as well.

No it won't, many RS232 to / from TTL buffers generate their own rails by means of switched capacitor voltage ladders.

Ok, thanks for all the input. It looks like a Teensy 3.6 might be the easiest best solution. For now I'm going to go with that.