USB Multi-Unit Capability

General discussion of using Roboclaw motor controllers
Post Reply
skcolb
Posts: 22
Joined: Mon Oct 19, 2015 5:05 pm
USB Multi-Unit Capability

Post by skcolb »

I saw mention of multi-unit USB capability (passthrough) on this thread. Would this work with more than 2 RoboClaws? I would think so, but wanted to make sure.

I have 4 RoboClaws that I'd like to control from a single USB -- I take it that I'd wire the USB RoboClaw's S2 to all the others' S1, and the USB RoboClaw's S1 to all the others S2 (with a pullup resistor? 3.3V? 5V? Either?) Thanks.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: USB Multi-Unit Capability

Post by Basicmicro Support »

Yes. Upto 8 roboclaws can be controled from a single serial connection.

From USB you can setup a single Roboclaw as a master(eg a relay point) that will then control the other three boards from its S1/S2 pins.

Set the master unit to Relay mode(but not to Multi-unit mode).
Set each of the other three units to Multi-Unit mode and change their addresses to not conflict with each other or the master(master will remain 128 in this example).
Connect S1 on the master to the other three Robcolaws S2 pins.
Connect S2 on the master to the other S1 pins.
Add a pullup resistor from 5v to the line going to the master S1 pin. 1k is recommended.
You also must have at least firmware 4.1.19 installed.

To test, open Ion Motion and connect to the master board. I dont remember off the top of my head be either the other three boards will show up immediately or you will have to connect to the master board first before it scans for the 3 slave boards.

Controlling them from your own program just requires you use the correct address when sending packet serial commands.
skcolb
Posts: 22
Joined: Mon Oct 19, 2015 5:05 pm
Re: USB Multi-Unit Capability

Post by skcolb »

Great, thanks for confirming the setup and wiring!
robof
Posts: 36
Joined: Tue Jun 27, 2017 11:21 pm
Re: USB Multi-Unit Capability

Post by robof »

acidtech wrote:Yes. Upto 8 roboclaws can be controled from a single serial connection.

From USB you can setup a single Roboclaw as a master(eg a relay point) that will then control the other three boards from its S1/S2 pins.

Set the master unit to Relay mode(but not to Multi-unit mode).
Set each of the other three units to Multi-Unit mode and change their addresses to not conflict with each other or the master(master will remain 128 in this example).
Connect S1 on the master to the other three Robcolaws S2 pins.
Connect S2 on the master to the other S1 pins.
Add a pullup resistor from 5v to the line going to the master S1 pin. 1k is recommended.
You also must have at least firmware 4.1.19 installed.

To test, open Ion Motion and connect to the master board. I dont remember off the top of my head be either the other three boards will show up immediately or you will have to connect to the master board first before it scans for the 3 slave boards.

Controlling them from your own program just requires you use the correct address when sending packet serial commands.
Can you provide a wiring diagram for this basic USB controlled setup? I am attempting to do the same thing as OP, but with only 2 RoboClaw driven via USB, with one master RoboClaw and one slave RoboClaw, however, I do not know how you expect the pull-up resistor to be added.

I currently have S1 of RC#1 -> S2 of RC#2 && S2 of RC#1 -> S1 of RC#2.
RC#1 is set to USB TTL Relay mode, address 128
RC#2 is set to multi-unit mode, address 129

I cannot control them currently via a single usb connection (thought I can control each one individual if USB is hooked up directly to it), I'm assuming because the resistor is 100% required, I just am not sure how to wire it up.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: USB Multi-Unit Capability

Post by Basicmicro Support »

When you are using only two Roboclaws(one connected to the PC via USB and one connected to that Roboclaw via S1 and S2 you should NOT set the multi-unit checkbox. Then you will not need a pullup resistor.

For information purposes the pullup would go on the S1 pin of the USB Roboclaw if using multi-unit mode on the slave Roboclaws. S1 of the USB Roboclaw in this case is the receiver(RX) pin so just like if you used multi-unit mode with a arduino or something like that the RX pin of teh controller(eg the USB Roboclaw or the arduino) requires the one pullup resistor(10k to 1k value). Multi-unit mode makes the TX(S2 pins) of the slave Roboclaws Open Drain so they will not conflict with each other. The one pullup on the master controllers RX pin keeps the bus high when none of the Roboclaws are using it.

Everything else you did looks correct.

Post Reply