Notifications
Clear all

Need guidance regarding MY PROJECT

6 Posts
2 Users
0 Likes
672 Views
(@cybertooth)
Member
Joined: 3 years ago
Posts: 3
Topic starter  

Hi everyone

I am a newbie to Arduino and have a project for which I need guidance .

The project

Aim: -

To record the relative orientation of two objects connected at an angle to each other.

Objective: -

I need to be able to record the orientation of and object (A) in X, Y, Z axis in degrees when the Object(B) is in horizontal position i.e., X=1800, Y=1800.  The objects A & B are part of the same body but their relationship (angulation to each other) is not constant. The Body is connected to a vertical stand on a pivot joint and is thus not stationary and free to move in all directions. I need to record the orientation of object B when during the body is  in such a position that the orientation of Object A in X and Y axis is 1800 .

My Idea:-

  1. Use two MPU (either 6050 or 9250) connected to an arduino nano and an OLED screen.
  2. MPU om object B acts as a switch for pausing the display on the OLED screen connected to MPU (A) when MPU (B) reads X&Y =180

 

image

Need Advice On:-

  1. Which MPU to use 6050/9250
  2. Can I use two MPU simultaneously with the same arduino board? ( what ever I have read suggests that although 6050 has 2 IP addresses but the Arduino can not read both the addresses simultaneously)
  3. I have a space constraint at Object B. ( max. w=10mm,L=40mm,H=8mm). Looking at the space constraint and need for a separate MPU would a ATTINY 85 or other microcontroller work. ( not much work is required of the MPU except sending a high signal when X&Y=180.)
  4. What syntax to use to pause the display on OLED screen or to pause the loop.
  5. I have made a spirit level using. MPU 9250+ Arduino nano + OLED. But I get a drift even when the compass is stable on the desk. How can I remove this or minimize it.

 

 

Any advice would be appreciated.


   
Quote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
Posted by: @cybertooth

Can I use two MPU simultaneously with the same arduino board? ( what ever I have read suggests that although 6050 has 2 IP addresses but the Arduino can not read both the addresses simultaneously)

You would be polling one then the other in short order. If this is not fast enough for you then an ESP32 might be better since you have 2 cores and each can be set to communicate to a different I2C device at close to the same time. You might have to shop around to find the one that's the right size with the right number of pins but there are many options now. I guess there is an Arduino Pro Portenta that has 2 slightly different core but different architectures. You can load 2 different sketches for each core. Expensive though.

 

But for small Arduino then Seeeduino XIAO is very small, is on a board that you can work with and can be used with Arduino IDE

Posted by: @cybertooth

What syntax to use to pause the display on OLED screen or to pause the loop.

Possibly use switch case and/or not update your values. Or just an IF statement that if that value is < then update and else pass.


   
ReplyQuote
(@cybertooth)
Member
Joined: 3 years ago
Posts: 3
Topic starter  

@madmisha

Thanks MadMisha. Will look into Seeeduino XIAO. So I need to use 2 Seeduino XIAO for each MPU separately and use the output from one(B) as an input for the second (A) ?


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@cybertooth

You should be able to use one and have both MPUs on the same bus with different addresses. But if you really do need to have two for timing, then yes. But remember that one of the Arduinos will be alternating between listening to the other and its MPU. I would think that would take about the same amount of time anyways. You might as well try it with one. The alternative is to go to an Arduino with 2 cores like the ESP but it will be bigger.

 

Also, as a note, if you plan on going the XIAO route, they are cheaper on their website over Amazon. Not sure what they charge for shipping and it will come from china so it will take extra time. 


   
ReplyQuote
(@cybertooth)
Member
Joined: 3 years ago
Posts: 3
Topic starter  

@madmisha Thanks madmisha. Although I am not sure how much time lapse there will be between the two readings ( i am guessing it would be in milli seconds) will definitely try it. Another thing I would like to know is :

Is it possible to use a 6050 IC independently ( as they have a very small form factor) and build my own module in a more slimmer shape as per my requirement using over the counter components like resistors etc.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
Posted by: @cybertooth

Is it possible to use a 6050 IC independently ( as they have a very small form factor) and build my own module in a more slimmer shape as per my requirement using over the counter components like resistors etc.

Yes but you might find that the package it comes in might be a little hard to work with. Here is the datasheet that will help. MPU-6000 Datasheet For something like this you would probably want to design your own PCB. I have doubts that you could build it much smaller than the modules that are online.


   
ReplyQuote