How can I program an Arduino Uno or Mega to calculate finger angles using 15 MPU-6050 sensors (2 on the thumb, 12 on the four fingers, and 1 on the wrist), and could you provide guidance on the circuit connectivity? Additionally, I'm new to this, you can suggest cost-effective components also? I really appreciate your help.
THE MPU-6050 uses I2C. I2C is a bus and you can connect multiple devices to the bus. The restriction is that every device needs its own address. It's like a street where each house has its own number (address).
The MPU-6050 can be configured for one of two addresses (house numbers) so you have a problem when using more than two.
The solution is to create multiple "streets". The TCA9548A provide a means to create eight "streets". And in each "street" you can have two MPU-6050 devices each having a different address.
Adafruit sells the TCA9548A on a small board.
So, i need to use a TCA9548A multiplexer together with arduino uno and 15 mpu-6050 right? If so, are there any available references or examples for coding and circuit connections in such a setup? Furthermore, based on my survey findings suggesting potential slowdowns with an Arduino Uno, should I consider changing the microcontroller?
The I2C bus is slow. Reading 15 sensors is 15 times slower. How many samples per seconds do you need ?
The Arduino Uno can read one MPU-6050 sensor at 100 samples per second and do some calculations. It might not have enough memory for 15 sensors.
Plenty of info; e.g.
What are your suggestions for achieving a sampling rate of 30-50 samples per second for each MPU-6050 sensor in a finger movement tracking application?
Can i use a (16 channel) 1CD74HC4067 multiplexer rather than using 2 (8channel) TCA9548A multiplexer? Is the coding will be the same?
I don't think it will work with a 4067. The beuaty of Arduino is that you can easily play with it and test your ideas.
You don't need 2 x TCA9548A, just one. Give 8 of your sensors one address and the other 7 another address. Connect a pair with different addresses to SD0/SC0, another pair to SD1/SC1 etc.
Note:
The Uno and Mega are 5V devices, the MPU is a 3.3V device. It might be easier to use a 3.3V microcontroller like a Pro Mini or a Pro Micro.
A 4067 might be possible. The SCL can be connected to everything without multiplexer. The SDA can be multiplexed with the 4067. There should be pullup resistors before and after the multiplexer for each signal.
The TCA9548 can do level shifting as well.
To get 30-50 samples per second for all 15 sensor, I doubt if that is possible. I think that you need sensors with a SPI bus.
Do you mind to explain the address part for connecting 15 sensors? Arduino Mega does have a 3.3V pin, can't i use that?
It's not only the Vcc, it's also the signal levels. The MPU-6050 module linked in post #5 seems to be capable of using both 5V and 3.3V so when using that module my warning is not relevant.
Also from the above link:
if each of the sensor has 6 axis, will this method still works?
Hi, @kalaishane
Welcome to the forum.
Can I suggest you get some 6050's and experiment with them to see if they will do what you want.
Don't assume they will.
Get some parts and experiment in real life.
Then get a 9548 and experiment connecting and reading more a number of 6050.
You need to investigate and EXPERIMENT as I gather you are learning the basics of Arduino, experimenting will allow you to develop your code and understand how it works.
There are examples in the Arduino IDE on how to use the 6050 library and Adafruit provide some excellent backup to their components.
Tom...
![]()
Could you use a different sensor?
either an I2C one with more address options, or an SPI one? ![]()
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.