0

It seems in certain applications, for example signal processing, Arduino and other micro-controllers in general run into the overflow error when they're trying to store even moderate amounts of data. It would seem the obvious answer would be to simply take this data, push it onto the computer, and deal with it there instead, where you have much more available computing power. Is this possible with Arduino, or am I missing something that makes it not feasible?

asked Jun 1, 2016 at 0:18
4
  • 1
    You're missing a reasonable definition of "push". Commented Jun 1, 2016 at 0:26
  • 1
    Sure, if you have a better computer at hand, and a communication channel that can keep up with the data rate, it can indeed be a good idea to hand it off unprocessed. Or processed just enough to reduce the data rate to what the communication channel can handle. Commented Jun 1, 2016 at 1:00
  • In theory yes. In practice, depends on your requirements and implementation. Commented Jun 1, 2016 at 10:46
  • A good example video: youtube.com/watch?v=ruuxn2u3yao (he's using an Teensy LC rather than an Arduino, but yeah, it's a microcontroller). Commented Jun 1, 2016 at 13:52

1 Answer 1

1

One of the "features" of most microcontrollers/microprocessors is that they don't have a whole heap of RAM - this keeps costs down, and lets the manufacturers keep everything on one chip (unlike your PC).

However to "push" data to somewhere that can process it, you need to have a fast communications channel. SPI is quite fast, but you don't generally talk to PCs using SPI. Serial communication is slower, but if it gets converted into a USB interface (such as on a Uno) you can get respectable speeds talking to a PC. Something like 115200 baud is usually reliable, which lets you transmit 11520 bytes per second.

However it depends on what you want to send (ie. how many bytes), how you are going to indicate where one piece of data ends and the next one starts, maybe allow for error detection or correction, and so on.

Say, for example, it takes 5 bytes to send one piece of data (eg. 4 digits plus a delimiter). Now you are down to 11520/5 = 2304 pieces of data per second.

This may or may not be adequate for whatever-it-is you are trying to do.

answered Jun 1, 2016 at 6:04
4
  • I'm wondering if the Arduino's with built-in USB (Atmega32u4?) would be faster than "Uart". Polulu claims: Native full-speed USB (12 Mbps), which is quite fast. Commented Jun 1, 2016 at 10:50
  • Possibly, although I got my Uno to run the ASCII table sketch at 230400 baud. That's only 43.4 µs per byte, and you would probably have trouble acquiring data much faster than that. For example, anything requiring an analog read at default speed takes 104 µs. Commented Jun 1, 2016 at 21:24
  • Cool, if you do ADC with interrupts, you could send the value while waiting for the other to complete :) Commented Jun 2, 2016 at 4:32
  • 1
    That's right, so you won't take 104 + 43.4 µs. However you still have the limitation of the overall time. You can, though, run the ADC clock faster and still get acceptable results. Commented Jun 2, 2016 at 6:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.