Pages: [1]   Go Down
Author Topic: Interfacing ardiuno UNO with PC, what's the best way?  (Read 491 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody.   smiley-lol

 I need to interfacing arduino UNO board with PC, to record the data send from a sensor, that can send even 250 pulse per second.

what is the best port i can use, USB or RS-232 ?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46026
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
what is the best port i can use, USB or RS-232 ?
USB doesn't require any additional hardware. That should count for something.

What kind of sensor are you trying to interface with? Pulses per second implies that it is a digital sensor. Sending 0 or 1 to the PC 250 times per second hardly makes sense.

What is the PC to do with this data?
Logged

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

Quote
what is the best port i can use, USB or RS-232 ?
USB doesn't require any additional hardware. That should count for something.

What kind of sensor are you trying to interface with? Pulses per second implies that it is a digital sensor. Sending 0 or 1 to the PC 250 times per second hardly makes sense.

What is the PC to do with this data?



Thanks for your answare.
I have opened another topic in sensor section to get advice on that
But magnetic or infrared sensor is anyway a digital sensor, so this is a problem.... I could set the board so that send a pulse for every 10 laps, so I have "only" 25 pulses per second... or I can't do that?
Programming with the RS-232 port is easier than an USB port?
Logged

Germany
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2734
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Programming with the RS-232 port is easier than an USB port?

If your PC has a RS232 port, be happy and use it.
If it just has USB ports, easiest is to connect that directly to the Arduino. You're doing serial communication anyway, either with a physical port or with a virtual one.

Serial Speed is not limited to 9600 ( about 1000 bytes per second ), BTW.

But sending 0 or 1 500 times per second is not the optimal solution. Arduino can do some of the work you intend to have done.
Every second a number between 0 and 250 is probably better ( and easily doable with default speed ), if you just want to know the pulse rate...
 
Rather check that your loop() cycle length is short enough to catch every state change of your pulse. If 250 pulses per second means every pulse is at least say 1 of 4 msec in either on or off state, you should be on the safe side. 1000 micros in one loop round is a lot for 16 MHz Arduino Uno, no need to go for interrupt handling.
« Last Edit: March 14, 2012, 01:56:37 pm by michael_x » Logged

Pages: [1]   Go Up
Jump to: