High-speed via Wi-FI

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
kowapuk
Posts: 3
Joined: Sun Nov 11, 2018 9:37 am

High-speed via Wi-FI

Post by kowapuk » Sun Nov 11, 2018 9:51 am

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

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: High-speed via Wi-FI

Post by Roberthh » Sun Nov 11, 2018 12:00 pm

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.

HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Re: High-speed via Wi-FI

Post by HermannSW » Mon Nov 12, 2018 7:34 am

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
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: High-speed via Wi-FI

Post by Roberthh » Mon Nov 12, 2018 8:20 am

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.

kowapuk
Posts: 3
Joined: Sun Nov 11, 2018 9:37 am

Re: High-speed via Wi-FI

Post by kowapuk » Wed Nov 14, 2018 7:09 am

[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.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: High-speed via Wi-FI

Post by Roberthh » Wed Nov 14, 2018 7:53 am

If one measurement takes 20ms, you can perform 50 measurements per second, which does not match with the 200/s, you already got.

Post Reply