Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ah - you didn't need robustness, you needed flow control?


Without the flow control the data gets scrambled if you go above about 9600 bps.

The system I am working on is meant to extract graphical data from a persistence of vision display that's hard to test under real conditions because it is supposed to be strapped onto a moving vehicle.

If the probability is 1% that a test isn't giving the right results because a bit got flipped on the serial line that is too much. So I want to know the data is clean and not guess about it.


>Without the flow control the data gets scrambled if you go above about 9600 bps.

That sounds like you have really bad hardware somewhere. You should be able to get vastly more throughput.

>So I want to know the data is clean and not guess about it.

You will never know. You can only bound undetected error probabilities. No checksum, no CRC, no error correction can prove no data loss or bit flips in transmission. This is why understanding channel error types is important to design a protocol that maximizes likelihood of no undetected errors.

I've built many similar sounding systems (even many POV items, I am co-owner of hypnocube.com, and we used to do all sorts of POV experiments, using both COTS hardware and lots of custom boards too). I've found that with even average physical connection we could routinely push 100Mbps into a PC with zero errors over UARTs for literally terabytes of data (I'd create test programs on each end, sender would blast known data patterns and receiver would check them, I'd let them run for days on a test device, looking for errors). This is how I learned a lot about getting good connections - vastly nicer than fighting with flaky hardware connections.

I never needed flow control. Ever.

Have you measured the error rate? Have you looked through forums to see why your Arduino setup is so terribly slow? It sounds like there is a significant other problem than your serial protocol.

If you can use something like a Selae logic probe attached close to your cpu pin out you can also get some good data. I've used these to track down many physical bus errors.


I think something was wrong with your system somewhere - bad usb cable? Overloaded system?

I routinely transfer data on original arduinos at 38400, 57600 or faster. The error rate is pretty low, way smaller than 1%.


It's all about which cable you get. Or, more specifically, the chip inside the cable.

The majority of cheap cables use a super low-cost chip that ruins data at higher baud rates.

If you get a quality cable with a known good chip in it, then you can transmit at crazy speeds.

My TRS-80 is supposed to max out at 300 baud. But I can go to 600 baud with a crap cable, or 57,600 with a good cable.


If we are talking about original arduino uno, as in https://www.pololu.com/product/2191, then cable should not matter - the converter is on the board, the cable is dumb.

The knock-off often use ch340 chip (which is super annoying as it has no serial number of any sort), but even that chip can be pretty fast if placed on the well designed PCB - I regularly upload 1MB firmware files to esp8266 at 230400 using that chip.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: