Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started

ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#1  
Most defiantly ARC and the EZB are compatible with Roboclaw.  Although I haven't used the Roboclaw I was looking into it for my robot.I ended up going with Sabertooth motor controller with a X2 Kangaroo attached for position and speed control. You can control the Roboclaw 4 different ways and is able to receive feedback from limit switches, pots or encoders. Depending on what you want to do with it will depend how you set it up and the feedback device you use. It will defiantly have a learning curve and you'll have to study and find out how to send commands to it to control it. I'd suggest you download and start reading it's manual. That will have all the info you'll need to decide how to set it up and operate it. Good luck and have fun!
PRO
Australia
#2  
I have tried everything I can think of to get my Roboclaw 2.x30 V5E to work but to no avail. I can't get past the onboard error LED flashing 3 or 4 times indicating the Logic Battery is either too high or too low. I have tried 3.3v, 7.2v and 5v connected to the LB-in. I wanted to disable the logic battery but there seems to be no way of doing this with this model. I have used the Sabertooth Control, set the baud rate and simple serial type correctly, so I don't know what the problem is. Any advice appreciated.
roboclaw_datasheet_2x30A.pdf
roboclaw_user_manual.pdf
PRO
Synthiam
#3  
Have you contacted the manufacturer? Sounds like maybe it’s a damaged unit? Or they need to update their manual to provide the features.
PRO
USA
#4  
There is no Roboclaw control in ARC, besides understating how RoboClaw works is also important to familiarize with ARC Custom Movement Control and EZ or JS scripting.

Some points:
1) Did you connect your controller to the PC (usb) and run the vendor software ?
2) Did you read the manual ?
3) Are you trying to use the roboclaw as Sabertooth replacement ?
4) Can you post your setup wiring.
PRO
Synthiam
#5  
Oh - ptp, i assumed based on his question that the roboclaw hbridge used the same protocol as the sabertooth. My bad:)
PRO
Australia
#6  
Yes to all 4 questions. See images for wiring. I doubt the EZB will work until the error is cleared on the Roboclaw.
I have the 24v power supply connected to the Roboclaw main +-.  The motor's brakes are connected directly to the 24v battery.
The left and right motors are connected to M1A, M1B, M2A and M2B on the Roboclaw. 
The EZB has D5 connected to S1 on the Roboclaw. I have also attached an image of the general settings of the vendor's software.
According to the user manual, error light flashing 3 times indicates the logic battery is too high, flashing 4 times and it is too low.
To my mind this is nonsense as I am not using a logic battery and the unit is supposed to automatically set the logic power source.
I have tried connecting 3.3v power from the EZB to the LB-in on the Roboclaw and also 5v power to same. No luck there either.
I may have to contact the vendor unless you have some ideas I can try.
User-inserted image

User-inserted image

User-inserted image

User-inserted image
PRO
USA
#7  
How are you powering the EZB ? Source and voltage.
PRO
USA
#8  
I'll post a solution to your problem.
PRO
Australia
#9  
From the LIPO battery suppied with the JD - 7.5v
PRO
USA
#10   — Edited
You have a wiring problem.
You are lucky RoboClaw is a fine piece of hardware and software and can endure some user damage.
I've damaged a few controllers due to fast browsing the manual, extra confidence or assuming specific behaviors.

you have 2 different power sources:
Main battery Input: 6 to 34 VDC
Logic Battery Input: 6 to 34 VDC

Logic battery is optional it's a nice feature to avoid losing the control when a brownout occurs.  Is optional in your wiring i see you don't have one, you don't need to look for a setting to disable.

Your controller does not have the LB-MB switch so the controller switches automatically between Main & Logic.

The next important detail is Controller Logic Level RoboClaw uses a BEC (DC/DC) to convert the power source (Main or Logic Battery) to 5 volts, 5 volts is TTL level used for input or output pins. The manual says the control supports 5v or 3.3v that means roboclaw will accept 3.3v as High value input when transmitting the TTL voltage is still 5V.
If you connect your Roboclaw TX to a 3.3 controller RX (e.g. Raspberry PI, Arduino DUE) you can damage the other controller.
You don't need to worry EZB4 / IotTiny are 3.3v and 5v tolerant, that means they will communicate 3.3v and will tolerate 5V response.

This is your controller:
User-inserted image

As documented in the manual those pins (red, black) carry 5v and GND.
Your wiring is short-circuiting two different power sources 5v with 7.2v.
You need to connect only the D5 e GND from the EZB

Let's hope the controller is not damaged...
PRO
Australia
#11  
Most of what you have explained I was aware of, so thanks for reinforcing. Your last point though is the key one which I was not aware of, i.e. the short-circuiting of the 2 power sources. But can you clarify "connect only the D5 e GND from the EZB"? Do I not connect the 7.2v wire from the EZB? Just the ground and controlling wires?
PRO
USA
#12   — Edited
Correct only the D5 and GND  remove the middle wire red (EZB VCC 7.2v),
PRO
Australia
#13  
OK. Straight away this has cleared the error message and my Init script spins the motors. That's a great step forward.
Next I will play around with a custom Movement Panel and see if I can control the motors. Thanks for identifying the problem.
PRO
Australia
#14  
I should add this vital information as well...

Quote:
Because the Sabertooth Control (useable for Roboclaw) handles two motors with one 8 byte character, when operating in Simplified Serial mode, each motor has 7 bits of resolution. Sending a character between 1 and 127 will control motor 1. 1 is full reverse, 64 is stop and 127 is full forward. Sending a character between 128 and 255 will control motor 2. 128 is full reverse, 192 is stop and 255 is full forward.
Character 0 (hex 0x00) is a special case. Sending this character will shut down both motors.

Motor 1
Reverse should be set as 1.
Stop should be set as 64.
Forward should be set as 127.

Motor 2
Reverse should be set as 128.
Stop should be set as 192.
Forward should be set as 255.
#15  

Quote:

OK. Straight away this has cleared the error message and my Init script spins the motors. That's a great step forward.
Next I will play around with a custom Movement Panel and see if I can control the motors. Thanks for identifying the problem.
I am pretty sure the simple serial protocol for Roboclaw and Sabertooth are the same.  I think you can use the Sabertooth control built into ARC rather than creating a custom Movement Panel (at least until you start using the position feedback capability).    There is another user who sometimes posts and he uses Roboclaw and I recall him saying they were the same.
PRO
USA
#16  
I agree with Alan.
https://synthiam.com/Community/Questions/Robo-Claw-2x30-8968

@DJ you were correct

both Robotclaw and Sabertooth are rich controllers with a lot of features, I assumed the sabertooth control was specific for Sabertooth.

I just tested the control and checked the output:
User-inserted image

basically is the Simplified Serial mode post #14

Simple and plain, no black magic, nothing specific.

I would add more information about Simple Serial Protocol and i would mention RoboClaw controllers

Sorry guys, I assumed something without checking the control.
PRO
USA
#17   — Edited
@DJ
Can you take look to the outputs:

User-inserted image


Based on @Afcorson input:

Quote:

Motor 1
Reverse should be set as 1.
Stop should be set as 64.
Forward should be set as 127.

Motor 2
Reverse should be set as 128.
Stop should be set as 192.
Forward should be set as 255.
Sabertooth manual:
User-inserted image

At full speed:
User-inserted image


Forward should be 0x7F, 0xFF
Right should be 0x7F, 0x80
Backward should be 0x01, 0x80
Left should be 0x01, 0xFF

The control output is slight off in some cases, if the values are not proportional a 2 wheel robot may turn more to one of the sides.
PRO
Synthiam
#18  
Looks like I’m mapping to those values...

Code:


public void Forward(byte leftSpeed, byte rightSpeed) {

leftSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 64, 127);
rightSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 192, 255);

sendData(new byte[] { leftSpeed, rightSpeed });
}

///
/// Move reverse.
///
public void Reverse(byte leftSpeed, byte rightSpeed) {

leftSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 64, 1);
rightSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 192, 128);

sendData(new byte[] { leftSpeed, rightSpeed });
}

///
/// Right.
///
public void Right(byte leftSpeed, byte rightSpeed) {

leftSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 64, 127);
rightSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 192, 128);

sendData(new byte[] { leftSpeed, rightSpeed });
}

///
/// Left.
///
public void Left(byte leftSpeed, byte rightSpeed) {

leftSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 64, 1);
rightSpeed = (byte)Functions.RemapScalar(leftSpeed, 0, 255, 192, 255);

sendData(new byte[] { leftSpeed, rightSpeed });
}
PRO
Australia
#20  
One more query. As soon as I disconnect the USB connection from the Roboclaw to my laptop, nothing works.
Somehow I need to enable TTL serial mode as I don't want to be tethered to a laptop to use it.
I seem to be missing something here, as I can't find a setting to get it working without the USB connection.
PRO
USA
#22  
@afcorson:
Keep the usb disconnected.
I presume you have the main power source connected, do you see any lights on ? 
Can you measure the voltage between the (+) and (-) ?
PRO
Australia
#23  
Stat2 light is green indicating both motors are active. Voltage is 24.8 to the main battery connection. I'll install the ver3 plugin and see what happens.
PRO
USA
#24   — Edited
Measure the voltage between + and - near the S5 contact.
The idea is to troubleshoot if the controller DC/DC is still operational, you need to have 5v on those pins.
be careful when using the multi-meter probes to avoid a short circuit while trying to measure.

My guess is:
When you connected the S1 (+)  and (-) to the EZB you short-circuit the DC/DC output voltage with EZB Vin, sometimes is enough to damage the 5v regulator.
The reason why it works with an USB cable is because the controller has a switching circuit to switch between the USB power (when you are configuring the controller) and the controller 5v regulator, in absence of DC/DC the switching circuit uses the USB voltage.
PRO
Australia
#25  
S5 reads 5v (no USB connection)
PRO
Australia
#26  
S1  reads just under 5v
PRO
USA
#27  
so the 5v regulator is good !!! 
Still not working ?
PRO
Australia
#28  
No. Like it is stuck in USB mode (mode 15) even though I confirmed by pressing the MODE button that it is on mode 5 (standard serial).
The software also says it is in standard or simple serial mode.
PRO
Australia
#29  
In the manual is says...

RoboClaw includes 3 LEDs to indicate status. Two green status LEDs labeled STAT1 and STAT2
and one red error LED labeled ERR. When the motor controller is first powered on all 3 LEDs
should blink briefly to indicate all LEDs are functional.

STAT1 lights up when connected to USB. Only STAT2 lights up when not connected to USB.
PRO
Australia
#30   — Edited
Forgot to add..,.

The LEDs will behave differently depending on the mode. During normal operation the status 1
LED will remain on continuously or blink when data is received in RC Mode or Serial Modes. The
status 2 LED will light when either drive stage is active.

Now I have STAT1 lit when not connected to USB. It's hard to see the problem.

Further testing. Works without vendor software connection but with USB connected. Disconnect USB, then it doesn't work.
So the only thing it gets from the USB connection is more 5v power. Curious!

What would happen if I connected the Roboclaw's USB to its own S5 5v power supply? Risky or not?
PRO
Australia
#31  
I tried this experiment and it worked. I connected one end of a USB cable to the Roboclaw's USB connector and the other end to its own 5v power on the S5 pin. So why is this necessary is the big question?
#32  

Quote:

I tried this experiment and it worked. I connected one end of a USB cable to the Roboclaw's USB connector and the other end to its own 5v power on the S5 pin. So why is this necessary is the big question?
Honestly, I think something got damaged when you had it mis-wired originally.  From what I have seen in the documentation this should not be needed, but if that is the only problem I would consider myself lucky that there is such a simple solution.

Alan
PRO
Australia
#33  
Perhaps. The vendor's software put me on the wrong track as it kept indicating the logic battery was around 2v. And it never indicated the 5.5v that I expected - even now.