This week was a challenge for me to work with the new accelerometer/gyroscope breakout board and the force sensors. Despite acquiring data using another breakout board two weeks ago, this new board has been difficult to establish an I2C communication. I have been checking my circuitry and scanning for I2C address of the MPU6050 breakout board. So far, the I2C scanner has not been providing the address that I expect, which I found in the breakout board datasheet. I am planning to fix this issue tomorrow by meeting up with Harry, who has more experience with I2C protocol. After searching online, I found that this is a common challenge to those who work with MPU6050 sensors and this will be the step that I will need to overcome in order to acquire acceleration/gyroscope data. A picture of the current schematic and the I2C scanner code is presented below.

In terms of the pressure sensor, I am planning to solder wires onto the sensors so that I can create a simple application setup. As mentioned in the design review report, I will be using a 10K resistor as a measuring resistor to achieve the widest range of sensitivity. I understand that the acquisition of data from the pressure sensors are a little behind schedule. However, I decided to spend more time fixing the issues regarding the accelerometer/gyroscope breakout board because the breakout board requires a I2C communication whereas the pressure sensors provide analog voltage signal. Measuring the voltage level can be easily read in an Arduino Micro and I will be starting the process of working with pressure sensors as soon as I overcome the challenges of working with the breakout board.

My plan next week is to come up with a method of post-processing sensor data. Considering that I acquire data from the breakout board and the pressure sensor by tomorrow, I will develop a method of making the data useable in our setup. In regards to the pressure sensor data, it would be coming up with a threshold voltage to determine the binary value of the sensor being touched or not. I plan to follow the testing protocol that I proposed in order to find the right threshold voltage. In the case of the breakout board, I will need to find a method to translate acceleration data into either a velocity or positional data. I understand how this works theoretically based on fundamentals of physics, but I believe having a meeting with Janet, our TA, will be very helpful for developing an algorithm to detect transitional movement of an object.

 

// ————————————–
// i2c_scanner
// ————————————–

#include <Wire.h>

#define WIRE Wire

void setup() {
WIRE.begin();

Serial.begin(9600);
while (!Serial)
delay(10);
Serial.println(“\nI2C Scanner”);
}

void loop() {
byte error, address;
int nDevices;

Serial.println(“Scanning…”);

nDevices = 0;
for(address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
WIRE.beginTransmission(address);
error = WIRE.endTransmission();

if (error == 0)
{
Serial.print(“I2C device found at address 0x”);
if (address<16)
Serial.print(“0″);
Serial.print(address,HEX);
Serial.println(” !”);

nDevices++;
}
else if (error==4)
{
Serial.print(“Unknown error at address 0x”);
if (address<16)
Serial.print(“0”);
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println(“No I2C devices found\n”);
else
Serial.println(“done\n”);

delay(5000); // wait 5 seconds for next scan
}

 

 

Min Gun’s Status Report for 3/19/22
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *