Hey. I am working on self balancing robot. I am having trouble working with PID on MPU6050 and arduino uno. Can you please help me out?
@Arjav Unfortunately we cannot provide sample code, but a quick search online should give you some 2WD balancing, Arduino-based projects where the creator put the sample code online.
@Coleman. I tried searching that online. bt was unssuccessful
Hi, I’m looking to get the position (inclination angle) of the three axes through the gyroscope. It’s posible? or should I use an IMU?
@Nicolas Gonzalez A gyro won’t be able to give you absolute angles, just an estimate on relative angles. You would need an accelerometer.
Hi! Is it possible to connect an acceleration sensor (MMA8452Q) and an atmospheric pressure sensor (BMP180 Barometric Pressure Sensor) to an Arduino Uno via a breadboard simultaneously? If so, how could I go about that?
@asdf Check which pins are required by each sensor and see if there is overlap. Bo the accelerometer and the barometric sensor seem to be I2C; I2C devices are meant to be connected in series, so you would use the same pins for each: https://en.wikipedia.org/wiki/I²C
Thank you! Yes, they are both I2C device. However, I have found that a breadboard is unsuitable for the experiment I have in mind as the connections might be too loose. Is there a way to directly connect both sensors to the same ports on my microcontroller securely?
@asdf If you want a permanent fix, you can solder the connections. If your microcontroller only has pin headers, you might find one which has solder pads instead.
Hi, Mr Benson
Could you please let me know how you determine the number (67.584) when you do the gyro value conversion ? From data sheet ?
Thanks!
Hi, Mr Benson
Thank you for your reply. In the code: Gx=Xread/67.584. I guess that is the gyro scale number. Could you please let me know how you determine the number ?
Thanks !
@Yue That seems like the specs for a particular sensor / product. Yo would really need to understand the sensor in order to know what that value represents. It’s a bit beyond the scope of this article.
hey! i’m working with accelerometer mma 7361 as it’s an analog sensor, i want to know is there anyway i could display my accelerometer output values graphically like GUI apart from IDE serial monitor, and secondly i want to know what is the advantage of I2C and digital accelerometer compared to analog ones?
@Hassaan You will need to connect it to a microcontroller which is then connected to a computer (or LCD). You would need to find or create an application to get the data. You might consider the FlowBotics App for Phidgets 8/8/8 or 2/2/2: https://www.robotshop.com/en/flowbotics-apps.html In regard to I2C vs digital vs analog, it really depends on your setup and what the device is connected to (microcontroller specs). In any situation, you likely want a setup which can handle a very high refresh rate to minimize data loss.
Hi Coleman Benson, I have a question. I have an IMU 9DOF and i want to use it in telling if the object is stationary or moving? how is that possible?
@Hend When you say “want to tell”, can you explain more? Do you want a human to know? A computer? If you can provide a bit more information about your project / application it would help us help you.
Basically my project is about IMU sensor connected with a Arduino, a person must carry the sensor and walk. Then a data will be sent to the computer every 20 ms, the data contains values of accelerometer and gyroscope. I have a matlab code that takes the data from this sensor and plots the motion of the person, the question is now how does the code be able to tell if the person is moving or in stationary status from the sent data?
Thank you very much.
Hi please how I can using gyroscope to control on three servo motor I tried to do that.