Using 3 roboclaw, packet serial, USB

Questions about using encoders with the Roboclaw product line
quentin
Posts: 17
Joined: Mon Apr 13, 2020 11:50 pm
Using 3 roboclaw, packet serial, USB

Post by quentin »

Hi,

I want to connect three roboclaw in packet serial mode.
I am using a USB to connect to the Master roboclaw. Do I still need a pull up resistor for the incoming signal?
If so, how would I properly wire this up?
also in that set up, I set the first claw to 128, the second to 129 and the third to 130?

I am using actuators on my 3rd roboclaw. While setting them up, I am running into issues setting PIV for them. the ION software tries to tune them and then goes unresponsive. Is this a problem to be expected when using actuators? I still get access to the encoder position and everything and maybe I do not need the PIV settings but I was just wondering.

Thanks,

Quentin
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Using 3 roboclaw, packet serial, USB

Post by Basicmicro Support »

The USB connected Roboclaw becomes the master controller. Eg Its S1 connects to S2 on the other 2 roboclaws and its S2 connects to S1 on the other 2 roboclaws. Yes you need a pullup. The line connecting the 2 Roboclaws S2 pins to the master Roboclaw needs a pullup. Those 2 Roboclaws also must have multi-unit mode enabled. The master roboclaw must have Relay mode enabled. All three Roboclaws must have different packet serial addresses.
quentin
Posts: 17
Joined: Mon Apr 13, 2020 11:50 pm
Re: Using 3 roboclaw, packet serial, USB

Post by quentin »

Do the Roboclaws have to run the same version to work with each other?
also, where do I get the 5V to the pull up? from the Claw itself?

Thanks!
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Using 3 roboclaw, packet serial, USB

Post by Basicmicro Support »

1. I would recommend having all Roboclaws on the same firmware version. They don't need to be the same Model of Roboclaw though.
2. You can use the Roboclaws 5v for the pullup source. Really I use whatever is convenient.
quentin
Posts: 17
Joined: Mon Apr 13, 2020 11:50 pm
Re: Using 3 roboclaw, packet serial, USB

Post by quentin »

That's great. I have been getting an error when trying three roboclaws together:
in _sendcommand,
self._port.write(address.to_bytes(1, 'big'))
AttributeError: 'int' object has no attribute 'to_byte'

I don't suppose you have any ideas on what may be triggering this error?

Thanks again!
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Using 3 roboclaw, packet serial, USB

Post by Basicmicro Support »

What version of python are you using? to_bytes is in python3 roboclaw libary, not python2.7. You need to use the appropriate python Roboclaw library for your specific python version, roboclaw.py for python2.7 and roboclaw_3.py for python3+.
quentin
Posts: 17
Joined: Mon Apr 13, 2020 11:50 pm
Re: Using 3 roboclaw, packet serial, USB

Post by quentin »

Yes,
Thank you for that! Just realised there was some incompatibility from my private set up to the one we were working on, that one being set up on 2.7...
it is all good now!
Thanks for the support!!
quentin
Posts: 17
Joined: Mon Apr 13, 2020 11:50 pm
Re: Using 3 roboclaw, packet serial, USB

Post by quentin »

Hi,

I have now been able to use three roboclaw in packet serial. My pull up to 5V solution is a little experimental but it seems to be properly connected. However, I am getting some latencies that render the robotic arm I am working on, volatile.

I have two actuators on the system that failed the auto tuning for reasons that I do not understand and so I use them only to go with Forward and Backward order from their mechanical min to max. Could that be a factor in the latency?

I also do not have a Logic battery hooked up to the system, could that play a role?
Are there any other factors you believe I should be looking at/investigating?

Thanks

Quentin
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Using 3 roboclaw, packet serial, USB

Post by Basicmicro Support »

If your communications are intermittent you will be adding significant latencies retrying failed commands.

You'll need to describe what happens when you try autotuning as well as describe your actuators hardware. The autotuner cant tune every setup. Especially low resolution ones or non-linear ones. Those need to manually tuned. Alternatively you can autotune the motor with no load on it and the attach your load(arm) and then tweak the settings.
quentin
Posts: 17
Joined: Mon Apr 13, 2020 11:50 pm
Re: Using 3 roboclaw, packet serial, USB

Post by quentin »

Hi,

As I have mentinonned before, I am using 3 roboclaws in packet serial. I have the pull up in place and all the addresses. However from the illustration on page 63 of the User Manual, I see that a connection to all grounds is made. Is that true also when using the USB communication? or is it enough to run the S1 S2 cables with the proper pull up to 5V in place?

Thanks

Quentin

Post Reply