Page 1 of 1

High-speed via Wi-FI

Posted: Sun Nov 11, 2018 9:51 am
by kowapuk
Hello,

I developing a mobile vibration sensor.
In the first iteration, I was started writing on micropython (NodeMCU platform).
As a vibration sensor, I try used ADXL345 and MPU6050.
My goal is to get real-time information from the accelerometer via Wi-Fi with a frequency of > 800Hz.
But the limit I got now is 200 Hz.
Is it possible to interrogate the sensor with a frequency of 1000 Hz and transmit data via Wi-Fi once a second on ESP8266 or ESP32?

Best regards

Re: High-speed via Wi-FI

Posted: Sun Nov 11, 2018 12:00 pm
by Roberthh
You should check using time,ticks_us(), how long each of the steps:
- reading the ADXL345
- reading the MPU6050, and
- sending the data takes.
Then you will know the fastest rate you can get.

Re: High-speed via Wi-FI

Posted: Mon Nov 12, 2018 7:34 am
by HermannSW
Both are good enough for 800Hz.
Roberthh wrote:
Sun Nov 11, 2018 12:00 pm
You should check using time,ticks_us(), how long each of the steps:
- reading the ADXL345
https://www.sparkfun.com/datasheets/Sen ... DXL345.pdf
OUTPUT DATA RATE AND BANDWIDTH User selectable
Measurement Rate3 6.25(min) 3200(max) Hz
- reading the MPU6050, and
https://store.invensense.com/datasheets ... V3%204.pdf
OUTPUT DATA RATE
Programmable Range 4(min) 1,000(max) Hz

Re: High-speed via Wi-FI

Posted: Mon Nov 12, 2018 8:20 am
by Roberthh
That raw sensor information does not tell much. It is just one of the limits. I suggested to determin the actual time it takes to get a value form the sensor on an ESP8266.

Re: High-speed via Wi-FI

Posted: Wed Nov 14, 2018 7:09 am
by kowapuk
[quote=Roberthh post_id=31794 time=1541937658 user_id=601]
You should check using time,ticks_us(), how long each of the steps:
- reading the ADXL345
- reading the MPU6050, and
- sending the data takes.
Then you will know the fastest rate you can get.
[/quote]
I am reading from MPU6050 with preprocessing data. The duration of the measurement along the 3 axes is 20 ms.
Next, I will try to get values of MPU registers and form packets of 1000 bytes and send via UDP
I think I can get the desired speed.

Re: High-speed via Wi-FI

Posted: Wed Nov 14, 2018 7:53 am
by Roberthh
If one measurement takes 20ms, you can perform 50 measurements per second, which does not match with the 200/s, you already got.