MPU6050 Accelerometer and Gyroscope with SCADA Slave

Discuss PC Developer and Web Developer projects and features here.
BenR
Matrix Staff
Posts: 1912
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by BenR »

Here we showcase an MPU6050 3 axis accelerometer and gyroscope being used with Flowcode. Flowcode contains a library to read the MPU6050 device and combining this library with the SCADA slave and injector libraries allows us to pull the sensor data into the PC and allow us to use the value in real time to monitor and use the sensor data. Once we have made sense of the data and know how to handle it then we can move the created algorithms onto the embedded device safe in the knowledge of how the system is going to react.



MPU6050_Demo.zip
(94.04 KiB) Downloaded 835 times

stefan.erni
Valued Contributor
Posts: 909
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 181 times
Been thanked: 208 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by stefan.erni »

Hi Ben

Thank you for the nice video.
The App Developer has ingenious 3D possibilities!
Did you use an Arduino template for the App Developer?
Is this also possible for the ESP32? For the ESP32 there should already be a client software

Component: SCADA (ESP32) (SCADA Slaves) - Flowcode Help
https://www.flowcode.co.uk/wiki/index.p ... DA_Slaves)
Does it work via Wi-Fi or Bluetooth?

The MPU6050 is already older:
Production (Not Recommended for New Design)
Recommended Alternate Part No. : ICM-20602 (Interchangeability is not guaranteed.)

How about a new component for the MPU6886?
This MPU is already mounted on many ESP32 boards or available as a low-cost sensor
6-Axis IMU Unit(MPU6886) | m5stack-store (myshopify.com)
https://m5stack-store.myshopify.com/pro ... nitmpu6886

M5-Schematic/MPU-6886-000193+v1.1_GHIC. PDF.pdf at master m5stack/M5-Schematic Github
https://github.com/m5stack/M5-Schematic ... IC.PDF.pdf

But the XY Chart looks weird, as if the data is being compressed more and more,
The XY Chart needs a real scrolling. :)

regards


Stefan

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by BenR »

Hi Stefan,

Ys the ESP32 should work just as well and works via WIFI. We've been playing with the ESP32 SCADA Slave this week and we have some fixes to roll out for it as there are currently some bugs with the comms.

Bluetooth would be a nice addition for the future.

Thanks for the suggestion on the new sensor I'll have a look into that and try and get it added for you.

Yes the XY chart is being compressed, a scrolling chart would indeed be very nice and I beleive it's on our list but a tricky one to implement as I don't think it's currently part of the underlying library framework we're using.

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by BenR »

I've now looked at the new accelerometer and yes it looks easy to implement so will have a go at this next week.

I've also ordered a couple of those M5 ESP32 modules from AliExpress as they look nice and fairly low cost.

stefan.erni
Valued Contributor
Posts: 909
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 181 times
Been thanked: 208 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by stefan.erni »

Hi Ben

Now ESP32 works via Bluetooth very good and also with the IMU (MPU6886) it's works very well.
I copied the calculations from your DemoProgram and it already works on some axes.
But I guess something is still missing. Pitch and roll is there but what about yaw?
Variable GZ is not yet used.

regards

Stefan

calculation.
2022-11-24_15-23-23.png
2022-11-24_15-23-23.png (143.3 KiB) Viewed 10204 times
The signals look good
2022-11-24_15-21-56.png
2022-11-24_15-21-56.png (95.57 KiB) Viewed 10204 times

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by BenR »

Hello,

I beleive Yaw requires a 9 degrees of freedom sensor which includes a magnetometer to provide the additional 3 degrees of input.

stefan.erni
Valued Contributor
Posts: 909
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 181 times
Been thanked: 208 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by stefan.erni »

Hi Ben

Ok. FC9 has a 9axis component but it's old
What about Migrating from MPU-9250 to ICM-20948?

There is a demoboard avaible:
SparkFun 9DoF IMU Breakout - ICM-20948
https://www.sparkfun.com/products/15335

regards

Stefan

Infos about:
DS-000189-ICM-20948-v1.5 (1).pdf
(1.5 MiB) Downloaded 569 times

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by BenR »

Ok looks like a nice device.

I've ordered one from coolcomponents in the UK so should arrive soon, ordering direct from sparkfun to the UK can take an age and then you get charged again for import duty.

I'll let you know when it arrives.

stefan.erni
Valued Contributor
Posts: 909
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 181 times
Been thanked: 208 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by stefan.erni »

Hi Ben

The built-in functions are very handy and easy to use, however
I have a question about the "built-in function rotate position To". You have used this in the APP.

Is it possible that the words are swapped and then cPitch and cRoll rotate the wrong axes?

A description of the functions would also be helpful for me
Is there a description about the built-in function position?

regards

Stefan

Just the text Pitch Yaw Roll is (maybe) wrong. the axis X,Y,Z looks correct.
2022-12-22_12-45-28.png
2022-12-22_12-45-28.png (315.58 KiB) Viewed 10044 times

stefan.erni
Valued Contributor
Posts: 909
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 181 times
Been thanked: 208 times

Re: MPU6050 Accelerometer and Gyroscope with SCADA Slave

Post by stefan.erni »

Hi Ben

I've ordered one from coolcomponents in the UK so should arrive soon, ordering direct from sparkfun to the UK can take an age and then you get charged again for import duty.
What about the component for ICM-20948

some news?

regards

Stefan

Post Reply