Jump to content


  • Content Count

  • Joined

  • Last visited

About ckd

  • Rank

Recent Profile Visitors

904 profile views
  1. Hi ! @Rei Vilo I think something was wrong with the board as when I checked its clock, it didn't look like a clock signal but more as a noise signal. Then I used I2C3 but then I stopped getting outputs. Then I checked the code on the TM4C123GXL, the smaller version, I got the outputs!!! I do not know what was wrong with the board. If someone also experienced similar experience with the board then please tell me how to sort that out.
  2. I am working on TM4C1294XL board and through Energia platform. I am trying to interface HMC5883L of GY-80 with TM4C1294XL board. I am getting static outputs irrespective of whether I initialize all the essential registers or initialize none, the static outputs do not change in both cases. I am pasting the code below, I suspect that something should be wrong with the code as there nothing much to do in connection (only four wires needed). #include "Wire.h" #define cra 0x00 #define crb 0x01 #define modeReg 0x02 #define data_X_MSB 0x03 #define data_X_LSB 0x04 #define data_Y_MSB 0x07 #define data_Y_LSB 0x08 #define data_Z_MSB 0x05 #define data_Z_LSB 0x06 #define statusReg 0x09 #define ID_reg_A 0x10 #define ID_reg_B 0x11 #define ID_reg_C 0x12 int magAddress = 0x1E; int X0,X1,Y0,Y1,Z0,Z1,X_out,Y_out,Z_out; float Xm,Ym,Zm; void setup(){ Wire.setModule(0); Wire.begin(); Serial.begin(115200); delay(100); Wire.beginTransmission(magAddress); Wire.write(modeReg); Wire.write(0x00); Wire.write(cra); Wire.write(0x38); Wire.write(crb); Wire.write(0xA0); Wire.write(data_X_MSB); Wire.write(0x00); Wire.write(data_X_LSB); Wire.write(0x00); Wire.write(data_Y_MSB); Wire.write(0x00); Wire.write(data_Y_LSB); Wire.write(0x00); Wire.write(data_Z_MSB); Wire.write(0x00); Wire.write(data_Z_LSB); Wire.write(0x00); Wire.endTransmission(); } void loop(){ Wire.beginTransmission(magAddress); Wire.write(data_X_LSB); Wire.write(data_X_MSB); Wire.endTransmission(); Wire.requestFrom(magAddress,2); if(Wire.available()<=2) { X0 = Wire.read(); X1 = Wire.read(); X1 = X1<<8; X_out = X0+X1; Xm = (X_out); } Wire.beginTransmission(magAddress); Wire.write(data_Y_LSB); Wire.write(data_Y_MSB); Wire.endTransmission(); Wire.requestFrom(magAddress,2); if(Wire.available()<=2) { Y0 = Wire.read(); Y1 = Wire.read(); Y1 = Y1<<8; Y_out = Y0+Y1; Ym = (Y_out); } Wire.beginTransmission(magAddress); Wire.write(data_Z_LSB); Wire.write(data_Z_MSB); Wire.endTransmission(); Wire.requestFrom(magAddress,2); if(Wire.available()<=2) { Z0 = Wire.read(); Z1 = Wire.read(); Z1 = Z1<<8; Z_out = Z0+Z1; Zm = (Z_out); } Serial.print("Xm = "); Serial.print(Xm); Serial.print("\t"); Serial.print("Ym = "); Serial.print(Ym); Serial.print("\t"); Serial.print("Zm = "); Serial.println(Zm); delay(200); }
  3. @zeke I also hope that we both get it working. But for the time being I have shifted to another sensor as I have mailed to the Bosch with my doubts and waiting for their response.
  4. Hi zeke! I tried by pulling up the SCL and SDA pins of BMG250, it did not work. But point is that I have already pulled up I2C pins (of tm4c1294xl board) that are coming to BMG250. I thought pulling up these pins would not be needed. Moreover, there is no pin defined as SDO on the shuttle board (refer rightmost fig in the schematic) which is used to set the address of the device. I am just relying on the schematic given above and connections written in red (I don't know if they are right).
  5. Thank you, I connected it to pin 4-6 as pin 7 is of no use as it is already connected to the VDDIO. If you see fig. 33 on page 62 of the datasheet, it can be seen that VDDIO is connected to SCL and SDA through resistors. I do not know the value of these resistors. But in table 26, page 51 it is given the value of resistors for VDDIO pull-up to be 100K ohm. But when I connect the resistors I get the value 0 in all three axis. Currently I have connected VDDIO and SDA and SCL without any resistors in between. BMG250-datasheet.pdf
  6. Thank you for your reply. Yes I have gone through the implementation of the BMG160 with arduino. That is why I think the code is not having any fault. The problem is that Bosch has implanted the BMG250 IC on a shuttle board and there is not much information about it on the internet apart from the schematic that I have attached above. There has to be some problem either with the shuttle board connections or I am missing something to initialize. I am checking on the later part.
  7. I am working on TM4C1294XL board and through Energia platform. I am trying to get the outputs from BMG250 shuttle board. I am pasting the code below but I believe the code has no fault. I have doubts about the connections to the shuttle board. I am getting -1 (when dividing outputs by 256) in all the three axis. I am sharing the schematic pdf that has information about the shuttle board connections. I have connected as given in the file but I have the following doubts: 1. How can set the pmu_status to normal gyroscope as it is mentioned in the datasheet as only readable? And when I read the pmu_status to know the current mode, I only get a 0 as the output and no output comes for the three axis. 2. In the schematic pdf, it can be seen that there are multiple SDO, SCL etc. Should I connect them to each other or use only one of them? Somebody help me out. Code :- #include "Wire.h" #define pmu_status 0x03 #define data 0x12 #define gyr_config 0x42 #define gyr_range 0x43 #define offset 0x74 #define dataReadyStatus 0x1B #define X_axis_dataX0 0x12 #define X_axis_dataX1 0x13 #define Y_axis_dataY0 0x14 #define Y_axis_dataY1 0x15 #define Z_axis_dataZ0 0x16 #define Z_axis_dataZ1 0x17 #define command 0x7E int gyrAddress=0x68; long X0,X1,Y0,Y1,Z0,Z1; long X_out,Xg,Y_out,Yg,Z_out,Zg; void setup() { Wire.setModule(0); Wire.begin(); Serial.begin(115200); Wire.beginTransmission(gyrAddress); Wire.write(gyr_config); Wire.write(0x28); Wire.write(command); Wire.write(0x15); Wire.write(gyr_range); Wire.write(0x00); Wire.endTransmission(); } void loop() { Wire.beginTransmission(gyrAddress); Wire.write(X_axis_dataX0); Wire.write(X_axis_dataX1); Wire.endTransmission(); Wire.requestFrom(gyrAddress,2); if(Wire.available()<=2) { X0 = Wire.read(); X1 = Wire.read(); X1 = X1<<8; X_out = X0+X1; Xg = (X_out)/1.0; } Wire.beginTransmission(gyrAddress); Wire.write(Y_axis_dataY0); Wire.write(Y_axis_dataY1); Wire.endTransmission(); Wire.requestFrom(gyrAddress,2); if(Wire.available()<=2) { Y0 = Wire.read(); Y1 = Wire.read(); Y1 = Y1<<8; Y_out = Y0+Y1; Yg = (Y_out)/1.0; } Wire.beginTransmission(gyrAddress); Wire.write(Z_axis_dataZ0); Wire.write(Z_axis_dataZ1); Wire.endTransmission(); Wire.requestFrom(gyrAddress,2); if(Wire.available()<=2) { Z0 = Wire.read(); Z1 = Wire.read(); Z1 = Z1<<8; Z_out = Z0+Z1; Zg = (Z_out)/1.0; } Serial.print("Xg = "); Serial.print(Xg); Serial.print("\t"); Serial.print("Yg = "); Serial.print(Yg); Serial.print("\t"); Serial.print("Zg = "); Serial.println(Zg); delay(200); } SCHEMATIC1 _ BMG250.pdf
  8. Yeah I followed the steps. But I didn't get either 9.8 or 1. There is formula online but that is not for digital output sensors like this. I somehow tried with that formula and I got values close to 1 but its not correct for all the axis. Still trying...
  9. I first posted on Embedded Systems/ Test equipment DEALS without realizing the word DEALS. Later I posted here and tried to delete the previous post but could not. Sorry for that. I calibrated it according to the datasheet where I found offset values for each axis and then subtracted it from the respective outputs. But I want outputs such that the parallel axis (to the ground) shows 0 (zero) g and perpendicular axis shows 9.8 g which I didn't get.
  10. How to calibrate digital output accelerometers like ADXL345 or ADXL345 to obtain the outputs as 'g' values? I have interfaced it with TM4C1294XL and the communication is through I2C protocol. Platform used is Energia.
  11. How to calibrate digital output accelerometers like ADXL345 or ADXL345 to obtain the outputs as 'g' values? I have interfaced it with TM4C1294XL and the communication is through I2C protocol. Platform used is Energia.
  12. Got the outputs. Now just need to calibrate ADXL345. Thanks Rei Vilo.
  13. I am trying to interface GY-80 (only adxl345) to TM4C1294XL board using Energia. But outputs comes out to be 0. And also there comes this error "Failed to load dynamic library: 'ftd2xx.dll' " while uploading but the code gets uploaded successfully. I am pasting the code below, can somebody tell me where i am doing it wrong? #include "Wire.h" #define Power_Register 0x2D #define BW_rate 0x2C #define Int_enable 0x2E #define dataFormat 0x31 #define X_Axis_Register_DATAX0 0x32 #define X_Axis_Register_DATAX1 0x33 #define Y_Axis_Register_DATAY0 0x34 #define Y_Axis_Register_DATAY1 0x35 #define Z_Axis_Register_DATAZ0 0x36 #define Z_Axis_Register_DATAZ1 0x37 #define fifoCntrl 0x38 int ADXAddress = 0x53; int X0,X1,X_out; int Y0,Y1,Y_out; int Z1,Z0,Z_out; float Xa,Ya,Za; void setup() { Wire.setModule(0); Wire.begin(ADXAddress); Serial.begin(115200); delay(100); Wire.beginTransmission(ADXAddress); Wire.write(Power_Register); Wire.write(8); Wire.write(BW_rate); Wire.write(10); Wire.write(dataFormat); Wire.write(11); Wire.write(fifoCntrl); Wire.write(0); Wire.endTransmission(); } void loop() { Wire.beginTransmission(ADXAddress); Wire.write(X_Axis_Register_DATAX0); Wire.write(X_Axis_Register_DATAX1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { X0 = Wire.read(); X1 = Wire.read(); X1=X1<<8; X_out =X0+X1; } Wire.beginTransmission(ADXAddress); Wire.write(Y_Axis_Register_DATAY0); Wire.write(Y_Axis_Register_DATAY1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { Y0 = Wire.read(); Y1 = Wire.read(); Y1=Y1<<8; Y_out =Y0+Y1; } Wire.beginTransmission(ADXAddress); Wire.write(Z_Axis_Register_DATAZ0); Wire.write(Z_Axis_Register_DATAZ1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { Z0 = Wire.read(); Z1 = Wire.read(); Z1=Z1<<8; Z_out =Z0+Z1; } Serial.print("Xa= "); Serial.print(Xa);Serial.print("\t"); Serial.print("Ya= "); Serial.print(Ya);Serial.print("\t"); Serial.print("Za= "); Serial.println(Za); delay(1000); Serial.println(); }
  • Create New...