Choosing the correct Arduino

Hello everyone.

I'd like you to help me to choose an Arduino for:

  • Process data comes from a sensor over serial por (UART), the baudrate of the comming data is 460800. Later I'll save this data.
  • At the same time, the Arduino needs to send information over serial port (UART) BUT using others pins, the data will be sent to another device.

What package of Arduino do I need as minimum for this purpose.

Thanks for your support,
Jaspher.


More information

Data Package: ###.##\CR\LF
(8bytes)
symbol # is a number.

Every second will come up to 1000 packages.
(1000*8bytes = 8000bytes/second)

lopezcjas:
Hello everyone.

I'd like you to help me to choose an Arduino for:

  • Process data comes from a sensor over serial por (UART), the baudrate of the comming data is 460800. Later I'll save this data.
  • At the same time, the Arduino needs to send information over serial port (UART) BUT using others pins, the data will be sent to another device.

What package of Arduino do I need as minimum for this purpose.

Thanks for your support,
Jaspher.

You will need an Arduino that has more than one UART. Therefore you best choice is probably the Arduino MEGA2560 R3 board.

http://arduino.cc/en/Main/ArduinoBoardMega2560

As far as passing digital data between devices, remember that you also have available to you an SPI port, an I2C port (yuch) and of course the serial UARTS.

The Arduino boards all work just fine at 460800 baud (despite what people may tell you to the contrary). In fact, they even work at 921600 baud. When high speed serial comm fails, it's usually because the lousy bloated OS (a.k.a. Windows) can't handle it.

If your sensor sends data at 460800, the Arduino will eat it up just fine and not even break a sweat.

Your first Arduino should be the UNO. It's easy to work with and relatively hard to destroy.

Every Arduino in the range can do what you want. Look into the SoftwareSerial library to give your Arduino an extra serial port for this job.

MorganS:
Your first Arduino should be the UNO. It's easy to work with and relatively hard to destroy.

Every Arduino in the range can do what you want. Look into the SoftwareSerial library to give your Arduino an extra serial port for this job.

SoftwareSerial barely works properly at 38400 baud... I seriously doubt that it will handle 460800.

If the Arduino had a CRYSTAL oscillator instead of that lousy resonator, maybe SoftwareSerial would be better, but alas that's not how things are.

As far as being "easy to work with" and "relatively hard to destroy", how do you think an UNO is any "easier" or any more "rugged" than a MEGA?

Krupski:
SoftwareSerial barely works properly at 38400 baud... I seriously doubt that it will handle 460800.

So use hardware serial to talk to the odd baud rate and software serial for the other devices, which presumably can run on one of the more commonly used speeds.

There's less pins to get confused with on a UNO. So it's easier. (Not by much.) They are really pretty close, for this purpose, except in price.

MorganS:
Your first Arduino should be the UNO. It's easy to work with and relatively hard to destroy.

Every Arduino in the range can do what you want. Look into the SoftwareSerial library to give your Arduino an extra serial port for this job.

Thanks for your answer.

Would the Arduino UNO read data with 460800 of baudrate?

Thanks again.

Krupski:
You will need an Arduino that has more than one UART. Therefore you best choice is probably the Arduino MEGA2560 R3 board.

http://arduino.cc/en/Main/ArduinoBoardMega2560

As far as passing digital data between devices, remember that you also have available to you an SPI port, an I2C port (yuch) and of course the serial UARTS.

The Arduino boards all work just fine at 460800 baud (despite what people may tell you to the contrary). In fact, they even work at 921600 baud. When high speed serial comm fails, it's usually because the lousy bloated OS (a.k.a. Windows) can't handle it.

If your sensor sends data at 460800, the Arduino will eat it up just fine and not even break a sweat.

Hello @Krupski. Thanks for your answer.

I went to read something about Arduino MEGA2560.

And... :slight_smile: it has so many ports. But it's ok.

The data that I need to read comes with 460800 baudrate but the data that I'll send will go with 9600 baudrate (the data I'll send is other kind of data).

But the main focus is to ensure the integrity of the data and have the enough power to save the data in a micro sd card (I have not decided where to save it yet, but I think using a sd card).

Thanks your help.

You have not said where the data is coming from and, more importantly, how many bytes per second come when counted over a few minutes. It is one thing for the Arduino to be able to read20 bytes at a high baud rate. But if thousands of bytes are arriving at a device that has only a few k of Ram. And writing to an SD card is a slow process.

If there is a lot of data is it an option to send it directly to a PC?

SoftwareSerial has no role to play if you need a high baud rate.

...R

Robin2:
You have not said where the data is coming from and, more importantly, how many bytes per second come when counted over a few minutes. It is one thing for the Arduino to be able to read20 bytes at a high baud rate. But if thousands of bytes are arriving at a device that has only a few k of Ram. And writing to an SD card is a slow process.

If there is a lot of data is it an option to send it directly to a PC?

SoftwareSerial has no role to play if you need a high baud rate.

...R

Your are right.

The data bytes are of this carateristic:

###.##\CR\LF
(8bytes)
symbol # is a number.

Every second will come up to 1000 packages.
(1000*8bytes = 8000bytes/second)

It could be aprox 8kB/s

Thanks.

lopezcjas:
I could be aprox 8kB/s

An Arduino Mega has 8k of SRAM memory and you can't use all of that to store incoming data - you need some room for your program to work in.

Let's say you have enough space for a half-seconds worth of data.
What will happen in the next half second?

Maybe an Arduino is not the answer?

...R

Robin2:
An Arduino Mega has 8k of SRAM memory and you can't use all of that to store incoming data - you need some room for your program to work in.

Let's say you have enough space for a half-seconds worth of data.
What will happen in the next half second?

Maybe an Arduino is not the answer?

...R

Hello @Robin2.

Two questions please:

  1. Reading your answer I may suppose that Arduino cant process this data. What other embedded system do you recomend?

  2. Thinking in this situation: "I will save each byte once it arrives". I mean "comes 0x0012" (1 byte), I want to save this byte in a sd card. Could Arduino process this? Of course the data is still comming (sensor data), and sending other kind of data data through other uart-serial port (data output, like 8bytes every 2 seconds).

Thanks.

You may need a '1284P based card with its 16K of SRAM and dual hardware serial ports instead.
I offer cards in several form factors, see my website.
For example, this one shown with on-board FTDI module, off board is also possible, and connecting the 2nd port to a 2nd offboard USB/Serial module is an option also.
http://www.crossroadsfencing.com/BobuinoRev17/

While @Crossroad's board may be a big help I don't know whether an Arduino can write data to an SD card at 8k/sec.

Why not just send the data directly to a PC? If that is all you want to do a Leonardo might be worth considering as it has comms with the PC at full USB speed as well as an unused HardwareSerial.

For how many seconds will the data be arriving at 8k/sec?

...R

Arduino can write to SD card at speeds fast enough to read from a 16-bit ADC and store to SD card at 44,100KHz rate.
fat16lib demo'd that last summer. I am using that to sample drum sounds, make a library of them, and play back from SD card upon drum strike.
(Assuming I can get some free time to actually work on it. The Bobuino2 card started out as the card that would do that, then got completed as is so folks could use it before I had a chance to work out the analog design. I have some nice 16-bit ADC, 16-bit DAC, high precision 4.5V reference, and I think low-noise opamps - just need some free time to move past breadboard stage ...)

CrossRoads:
Arduino can write to SD card at speeds fast enough to read from a 16-bit ADC and store to SD card at 44,100KHz rate.

That's useful to know.
It seems to solve the OP's data collection and storage requirements - as long as he doesn't run out SD card space.
But the question of whether he can process the data on an Arduino still remains.

...R