From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Discusiones sobre Productos NI

cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Velocidad de transmision arduino uno

¡Resuelto!
Ir a solución

Buenas noches:

 

Mi pregunta es, ¿Alguien sabe la velocidad de transmision de datos de la tarjeta Arduino Uno?

 

En mi caso estoy ocupando las 6 entradas analogicas para enviar informacion durante 5 minutos, pero cada segundo envia los valores, pero me gustaria hacerlo aun mas rapido...
De antemano muchas gracias!

 

 

 

Saludos!! 

0 kudos
Mensaje 1 de 3
5.659 Vistas
Solución
Aceptado por el autor del tema GabyHolmes

Saludos GabyHolmes,

 

Gracias por utilizar los Foros de Discusión de National Instruments, te comparto un link externo que habla sobre esto:

 

arduino uno - How do I know the sampling frequency?:

http://arduino.stackexchange.com/questions/699/how-do-i-know-the-sampling-frequency

 

The Arduino ADC clock speed is set in ..arduino-1.5.5\hardware\arduino\avr\cores\arduino\wiring.c

Here is the relevant part

#if defined(ADCSRA)
    // Set A/D prescale factor to 128
    // 16 MHz / 128 = 125 KHz, inside the desired 50-200 KHz range.
    // XXX: this will not work properly for other clock speeds, and
    // this code should use F_CPU to determine the prescale factor.
    sbi(ADCSRA, ADPS2);
    sbi(ADCSRA, ADPS1);
    sbi(ADCSRA, ADPS0);

    // Enable A/D conversions
    sbi(ADCSRA, ADEN);
#endif

For a 16 MHz Arduino the ADC clock is set to 16 MHz/128 = 125 KHz. Each conversion in AVR takes 13 ADC clocks so 125 KHz /13 = 9615 Hz.

That is the maximum possible sampling rate, but the actual sampling rate in your application depends on the interval between successive conversions calls.
Since you read the result and send it through the serial port, you are getting a delay that increases as the baud rate decreases. The lower the baud rate the longer it will take to send the same length of data and the longer it will take to call the next ADC conversion.

The actual sampling rate in your application can be determined with the use of a debugger or a simulator, but an easier solution is to toggle a digital pin every time you execute a conversion and measure the frequency that the digital pin toggles at.

De acuerdo a lo anterior, cada conversión toma 104.004 uS, por lo que en tu caso realizar 6 mediciones, tomaría 624.024 uS, es decir, 1602.5 muestras por segundo, sin embargo esa sería la frecuencia de muestreo si el microcontrolador del Arduino no realizara otras operaciones, lo cual no es así, recuerda que el microcontrolador ejecuta otras instrucciones, las cuáles consumen ciclos de reloj y esto reducirá la frecuencia de muestreo.

 

Espero que esta información te sea útil, saludos.

David P.
National Instruments
Applications Engineer
www.ni.com/soporte
0 kudos
Mensaje 2 de 3
5.631 Vistas

Gracias!! 

Si me fue bastante util 😄

Saludos!

0 kudos
Mensaje 3 de 3
5.523 Vistas