Improving Arduino Uno USB speed connection with a USB module?

Hello, i'm with a question about using arduino on usb.
Right now i'm using it with HardwareSerial and the COM ports on windows and i've got a maximum baud rate of 115200 (which yields 576000 of bits per second), if i use a higher rate it doesn't work properly.
Now the question, can i increase the speed of the communication using usb module that uses an IC like 'cp2102' for example? according to my research, the Arduino Due already have a dedicated USB that enables far higher speeds than the serial port can achieve, but i cannot afford to buy it right now and it is quite overkill for my current project.
So the only limiting factor i'm facing is this USB speed, so again can i improve it using a USB module? if not what should i do?
Thanks in advance for everyone!

The Due is not the only board that has a USB CDC serial port. I'll share some examples:

I doubt that that will improve the situation.

What is the problem that you're trying to solve? Are you sending MegaBytes ( :wink: ) of data and it's slowing down the other processing?

well that can be an alternative, i didn't know that others have this USB CDC serial port i'm going to take a look.
Thank you

i'm using SimpleRpc on Arduino with a custom C++ code on my computer for the software that make the calls, the goal of this project is to create a smart chessboard that can show the movements of the pieces (using leds) to teach newbies how to play the game.

i'm guessing that the bottleneck is the transfer rate because if i send too many rpc calls it slows down the leds that i eventually need to turn on or off. but i'm not really sending too much data.

What i'm reading from the arduino is the input of 64 reed switches that are configured on a matrix (this is also a bottleneck by the way) and then sending it as a uint64_t to the computer, then using that information i can save the board state to do some cool things like predict which piece has been removed from the board to lighten it's path on the board. the leds i'm using are rgb i'm sending a uint32_t as the color i want to display and a uint64_t as the mask of the squares.

So is not too much data but when i send commands to blink some of the squares for example i can see the lag from it.

This is the code that i'm using to read the board on arduino.
Maybe using the registers directly can improve it's performance?

uint64_t ReadBoard()
{
uint64_t v = 0;
for (auto i = 0; i < 8; ++i)
{
auto p1 = columns[i];
pinMode(p1, OUTPUT);
digitalWrite(p1, LOW);
for (auto j = 0; j < 8; ++j)
{
auto p2 = rows[j];
pinMode(p2, INPUT_PULLUP);
v |= uint64_t(digitalRead(p2) ? 0 : 1) << (j + i * 8);
pinMode(p2, INPUT);
}
pinMode(p1, INPUT);
}
return v;
}

Thank you for the response!

If you are willing to forgo the niceties of the Serial.print(), you can try using a simpler UART driver code and get about 1 Mbps (or even 2 Mbps if the USB-serial chip can support it) on your Uno.

Perhaps try to do some reading and blinking on the board itself (without doing any communication). If this is performant, then you might want to keep an internal state that is refreshed every so often instead of doing these calculations on demand.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.