Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I2C communication problem, stops after 3 seconds com startup

Status
Not open for further replies.

Chaud

New Member
Hello, i am making a two wheel balance robot, and i use 3 devices with I2C communication, ITG3200 Gyroscope, ADXL345 accelerometer, and MD25 motor driver, and i have a problem with I2C Communication
MD25 with ADXL345 only, they work well

But MD25+ITG3200 they dont work together, they run fine for like 2-3seconds and then ITG3200 freezes and stops sending data

My schematic is the following:

**broken link removed**

ITG3200 datasheet: https://www.electro-tech-online.com/custompdfs/2012/05/PS-ITG-3200-00-014.pdf
ADXL345 datasheet: https://www.electro-tech-online.com/custompdfs/2012/05/ADXL345.pdf
MD25 motor driver datasheet: https://www.robot-electronics.co.uk/htm/md25tech.htm (using I2C mode)
 
i think the feed back from the motors is doing the damage here.
 
Have you got some routine in the Arduino to reset the i2c bus? If one of the slave devices is sending a low level signal, it will hold the data bus low until it has received a clock pulse.

You can clear an i2c bus by letting the data line be pulled high and sending enough clock pulses to finish any data word that the slave devices may be sending. By not acknowledging any of the transmission, the slave devices will return to their idle states.

I have experienced microcontroller i2c modules that won't initiate transmission if either line is low. So if the microcontroller thinks that the data is finished and the slave device doesn't, there is no way out. The work-around is to turn off the i2c module, make the clock line an output (preferably open drain) and toggle the clock line 10 times or so. After that, enable the i2c module and start again.

If you want to know exactly what is causing the lock up, post your code and the waveforms that you get just before the lock up.
 
That thing in the middle evidently is a logic level translator. I did notice that they had 10K resistors on it. Could your pull up be 5K? 10K || 10K?

There is no datasheet for the translator. Not even a p/n.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top