real time variable plot

I am scanning my analog inputs at 2KHz rate and would like to plot these variable at run time, without adding serial.print. Can it be done?

What device will make and display the plot?

Serial.write?

Hi

I am using ATmega2560 and interfaced with external ADC. My objective is to scan 2 channels and observe in real time. Serial .print seems to be consuming some time, hindering the process of plotting. I was wondering , if there is light weight serial transmitter routine that could transmit 2 or more float variables when system is running and a decent front end plotter tool to log and analyze the data in run time.

What baud rate are you using? What is the fastest rate that will work reliably with your Arduino/PC/USB cable?

Baud rate: 38400 max

So, 3840 characters per second, to plot 2000 points per second?

Some kind of delta compression?

Hi

I want the serial print 4 variables, 50 Hz sine wave. Is it possible to plot it within arduino or any optimized serial data transmitter available. I need to log these values for analysis. My sampling frequency is 2KHz.

Why do you limit yourself to 38400 bits per second?

(You said earlier two channels, but now it's four?)

ok, tell me the solution

Variable length delta compression may be a solution. I believe I have already mentioned this.
It depends on the data.

Think about it: you've got a 3840 characters to play with and 2000 point sets per second. That's less than sixteen bits per set.

gary36:
Hi

I want the serial print 4 variables, 50 Hz sine wave. Is it possible to plot it within arduino or any optimized serial data transmitter available. I need to log these values for analysis. My sampling frequency is 2KHz.

Rough sizing of serial link using Serial.print():

  1. Premise: One uses Serial.print() to print each of the 2000 samples per second one per line.
  2. 10 bits of ADC data can be represented in 4 ASCII characters plus 2 for carriage return and line feed
  3. Each character takes 11 bit periods on the serial data line

2000 samples/seconds * (4 + 2) characters/sample * 11 bit periods/character = 132000 baud minimum on the serial link.

Conclusion: The application needs to run at 256000 baud on the Arduino side and the plot package needs to support plotting at that rate.

MrMark:
3) Each character takes 11 bit periods on the serial data line

Or, you can be both generous and realistic, and allow ten bits per character (one start, one stop, eight data).

In fact, you could even go to seven bits per character...

Still needs a higher line speed, IMO