PacketSerial problem with FW.ver.4.1.10

General discussion of using Roboclaw motor controllers
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: PacketSerial problem with FW.ver.4.1.10

Post by Basicmicro Support »

I cant find any details on starDuino. If it is a Leonardo clone it should run 38400 correclty. However there is a special firmware for 32u4 that runs at 8mhz instead of 16mhz(this allows those special boards to run at 3.3v instead of 5v). Running at the slower rate could cause problems at higher baudrates using software serial. I know my Leonard Arduino works correctly at 38400 with Roboclaws.

I dont understadn what you mean by this. "Latest firmware certainly. With diffent PWM PINs output, drive could be improved." Please be a little more descriptive what you mean and I'll try to help.
dishbot
Posts: 4
Joined: Mon Feb 15, 2016 5:30 pm
Re: PacketSerial problem with FW.ver.4.1.10

Post by dishbot »

RaymondLiu wrote:Hi acidtech, thank you for your reply.
I found a big issue that should be reported to you.
When a MCU communicated to Roboclaw using packet serial, the Roboclaw must connect a USB cable to PC.
Or MCU only received byte of value 255. I test using Read Encoder M1 (command:16)
I inadvertently ran into this myself on my v5 Roboclaw (4.1.13) 2x15A while trying to operate in USB-only mode (its own work in progress). While using an Arduino in various sketches (ReadVersion, EncoderRead, etc), I would have failed serial communication without the microUSB cable plugged in but flawless operation with it plugged in in parallel with the Arduino. I wonder if this is a grounding issue, because I don't have to plug the USB cable fully and engage the data pins to fix the serial stream; I can just barely stick the USB cable into the port, even at odd angles, as long as the grounded case of the USB plug makes contact with my computer's USB port and it resolves the issue.

The next obvious step was to add ground between the Arduino and the Roboclaw (previously I just had the Tx/Rx pins connected), and it fixed it! So it really was just a grounding issue. It may be too late for RaymondLiu, but it might help someone else out in the future.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: PacketSerial problem with FW.ver.4.1.10

Post by Basicmicro Support »

Good to know.

In one other case I had the customer switched to the hardware uarts on the Arduino(pins 0 and 1) and that fixed the problem so I assumed it had been a timing error(a little error from Roboclaw and alittle error from Arduino added up to enough to cause it to fail), but your suggestion about grounding sounds like that others problem may have been that as well.

The uarts would work better than the bit banged software serial(the uart samples the bits 16 times IIRC while the software serial only once) without a proper ground though not necessarily in all cases without a proper ground.
lordjuventus
Posts: 2
Joined: Tue Apr 19, 2016 11:19 pm
Re: PacketSerial problem with FW.ver.4.1.10

Post by lordjuventus »

Hello, I'm using a 2x5A (V4) and apparently I'm having the same problem that this topic is about but my version doesn't have a usb port.

So, what you suggest to do, to fix this.

Thank you
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: PacketSerial problem with FW.ver.4.1.10

Post by Basicmicro Support »

If you have a 2x5A without USB you have a very old version of the board. The only way to use it with the latest software is to send it in and get its firmware updated to the latest version. Otherwise you need to use the old packet serial communications(eg with the simple sumkming checksum instead of the CRC16 checksum) and several new commands are not available in the old firmware.

If you want to send it in to update it send it to:

Ion Motion
33175 Temecula Parkway
Suite A-630
Temecula CA 92592

Include a note with your return address and that you want a firmware update inside the box.

Post Reply