Pages: [1]   Go Down
Author Topic: What is the delay in traseferring data between arduino and pc?  (Read 1548 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone  smiley,

I want your help. I have an issue and i want to take some informations before Ι buy an arduino. I want to know how is the delay(latency ), if exists, in trasnfering data from arduino to pc. Which are the factors that determine the delay. I want to know because the accuracy is vey important for my issue.

Thank you all for your time

Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25848
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It depends on many factors, some of which may not be under your control.
The most obvious factor is bit rate, which is up to you to decide.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How can i define the bit rate, with code?
The other factors that are not under my control, they have to do with hardware like sensors or the same arduino ?
 If yes, these factors are most important for me. If i can not do anything then i need to know how is exactly the latency from these factors!
Is it possible?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25848
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How can i define the bit rate, with code?
http://arduino.cc/en/Serial/Begin
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

California
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the big unknown is on the PC side: once the data has been received (by the serial or USB port , how long does it take to get into the application program which processes the data on the PC? Since there are many processes running on the PC at the same time, the operating system needs some time to pick up the data and wake up the application program. I think you need to run the time critical part of your application entirely on the Arduino, where you have full control over time.
Logged

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1903
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the biggest factors are: The OS you are running on the PC; the hardware of the PC and the software that runs on the PC.
In other words with a Big machine only connected to the USB (no network/ no mouse / no keyboard / ....) with a Real time OS and only the communication software running (no music playing/...) you will have the smallest delay.
Change any of those and the delay will go up.
I'm running windows (which is a bad real time OS), I can't complain about the hardware and I run wait to much software (virus scanners, firewalls ....) but I never had a delay on the serial communication that stroked me as to long.

I think you need to run the time critical part of your application entirely on the Arduino, where you have full control over time.
But then again I always use the same principle as proposed by privatier.

The most time critical communication I had between PC and Arduino was A 3D laser scanner. There the PC send a signal to Arduino who controls a laserline and the PC captures video. As the laser-line position on the camera is at the basis of triangular calculations there is time constraint.
However the actual delay is less important than the repetitive. (For more details on this see this forum post http://www.david-laserscanner.com/forum/viewtopic.php?f=6&t=1216&hilit=arduino )

I hope this helps.
Greetings from the sun in Belgium
Jantje
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Pages: [1]   Go Up
Jump to: