O and an update on project tested it with all four props and it does take off(hovered it before turning off actually ran it into the wall but its fine) , however no stabibility without the gyro so cant fly it to much.
I see the problem... You need a level convertor. I can't beleive i didn't think of this earlier. Sure we can power the ITG-3200 with 3.3v from the EZ-B, but we can't communicate 3.3v. The i2c logic is pulled to 5v. The datasheet defines the ITG Logic must be < VDD
By connecting the ITG to the EZ-B's 5v i2c, you have have ruined it. I'm not sure, but a logic convertor is the only way to tell.
Datasheets man, datasheets. Annoying to read, but necessary.
I have a MMA7455 Digital Accelerometer sitting here.. It's rated at 3.3v also. So i decided to try it... And it works fine with 3.3v VDD and 5v i2c. I am pretty sure the ITG-3200 was made to break my brain.
I already have an accelerometer, ADXL335 and have it programmed for a while now. Need the gyro for rate to recalculate the angle as there is alot of noise on the sensors when the motors run. The default address depends on how VIO is tied from what you have guess you have it tied to ground. How you setup CLK on the ITG3200? If you tie it to ground it uses the internal clock of 400kHz.
I have tried everything with the ITG. I internal clock uses UP to 400Khz. I have the i2c on the EZ-B set for 100khz for compatibility. I tried it with 400khz, just to see and still nothing.
I also shortened the wires to 1 inch. I wrote a for loop that tried every single 7-bit address. I data logged everything. The itg-3200 will not respond and I don't know why.
It might be due to the 3.3v and 5v i2c... Might still be the issue. But I have no idea. The MMA7455 has a gyro level mode, which works exactly how you'd want. That is what i was demonstrating in the video.
O and an update on project tested it with all four props and it does take off(hovered it before turning off actually ran it into the wall but its fine) , however no stabibility without the gyro so cant fly it to much.
Grrr, i'm annoyed with this gyro...
Here is a breakdown of the communication from the EZ-B (i2c Master) and the ITG (i2c Slave)
Datasheet says itg-3200 default address is b1101000 (0x68)
Start bit
Writes 8 bits. MSB 7-bits is address 0x68. LSB is 0 for "Write"
Writes 0x00 (Who am i). Datasheet says device will ACK, there is no ack. 9th LSB is still high
Restart occures
Writes 8 bits. MSB 7-bit address is 0x68. LSB is 1 for "Read"
Clock from i2c master. ITG does nothing and leaves SDA high, which means 255
Stop Bit
So... What does this mean? It means this ITG-3200 is not listening. Why? I have no idea. It doesn't seem to be attempting to pull the SDA logic down.
AH!!!
I see the problem... You need a level convertor. I can't beleive i didn't think of this earlier. Sure we can power the ITG-3200 with 3.3v from the EZ-B, but we can't communicate 3.3v. The i2c logic is pulled to 5v. The datasheet defines the ITG Logic must be < VDD
By connecting the ITG to the EZ-B's 5v i2c, you have have ruined it. I'm not sure, but a logic convertor is the only way to tell.
Datasheets man, datasheets. Annoying to read, but necessary.
I have a MMA7455 Digital Accelerometer sitting here.. It's rated at 3.3v also. So i decided to try it... And it works fine with 3.3v VDD and 5v i2c. I am pretty sure the ITG-3200 was made to break my brain.
EZ-B writes, slave ACK's
EZ-B writes, slave ACK's
EZ-B writes to read address, slave ACK's
Slave responds.. Voila
Just get an MMA7455L and call it a day
I already have an accelerometer, ADXL335 and have it programmed for a while now. Need the gyro for rate to recalculate the angle as there is alot of noise on the sensors when the motors run. The default address depends on how VIO is tied from what you have guess you have it tied to ground. How you setup CLK on the ITG3200? If you tie it to ground it uses the internal clock of 400kHz.
I have tried everything with the ITG. I internal clock uses UP to 400Khz. I have the i2c on the EZ-B set for 100khz for compatibility. I tried it with 400khz, just to see and still nothing.
I also shortened the wires to 1 inch. I wrote a for loop that tried every single 7-bit address. I data logged everything. The itg-3200 will not respond and I don't know why.
It might be due to the 3.3v and 5v i2c... Might still be the issue. But I have no idea. The MMA7455 has a gyro level mode, which works exactly how you'd want. That is what i was demonstrating in the video.
Where you get the breakout board from? I'll overnight it if i can. Either way its something new to play with lol.