TeensyDigital
Well-known member
I've got a T4.1 on a custom PCB with three sensors on the I2C bus. In previous versions of this board, I've had very intermittent issues with a nearby RF radio signal killing my sensors, so in this version of the board I am using 2k pull-up resistors and ferrites on the I2C lines. Everything on the board is powered by a single 7.4v Lipo battery with a 5v 2.5A switched regulator powering the Teensy and a 3.3v 2.5a switched regulator powering the three sensors on the I2C bus. I am using the standard Wire library at 400K clock speed.
The issue I am having is that eight out of ten times when I power up the board and sensors from the battery the I2C bus does not start up (no clock signal on the oscilloscope), but if I have the USB plugged into the computer and Teensy it works every time. There is a lot going on with the board and all the other I/O works great -- it is just the I2C bus that is not working. In the instances where the bus does start if I transmit a few packets on the radio, the small bit of RF kills the clock (sometimes). That is really easy to see on the scope. But the issue is not radio related, as it happens equally with the radio unplugged. It seems to me like something related to the I2C bus is "fragile".
I have tried 25 things to troubleshoot this issue and isolate it. The one "fix" that corrects the issue 100% (beyond a usb computer connection) was binding the 3.3v output of the Teensy to the 3.3v output of the regulator that powers the sensors. They are both putting out clean 3.3v power within a few hundredths of a volt. In my curiosity to figure out why that worked, I measure the current flow and can see that it registers -14ma of current draw at the Teensy 3.3v pin, so I am assuming the 3.3v bus in the Teensy needs just a bit more power (current) to work properly, but why? I've confirmed the 5v regulator is working correctly and the 3.3v output on the Teensy is clean.
Does anyone have ideas on what might be causing the inconsistencies in the I2C bus? Are the 2K pull-ups to much (I lowered these to try and reduce RFI). It is interesting that it works 100% with the 3.3v lines tied together, but I really don't want to be using that kluged together solution.
I could post a schematic, but there is a lot going on beyond the I2C bus. For reference the three sensors I am using are an ADXL375 accelerometer, MS5607 pressure sensor, and a LSM6DS032 IMU.
Thanks for any ideas.
Mike
The issue I am having is that eight out of ten times when I power up the board and sensors from the battery the I2C bus does not start up (no clock signal on the oscilloscope), but if I have the USB plugged into the computer and Teensy it works every time. There is a lot going on with the board and all the other I/O works great -- it is just the I2C bus that is not working. In the instances where the bus does start if I transmit a few packets on the radio, the small bit of RF kills the clock (sometimes). That is really easy to see on the scope. But the issue is not radio related, as it happens equally with the radio unplugged. It seems to me like something related to the I2C bus is "fragile".
I have tried 25 things to troubleshoot this issue and isolate it. The one "fix" that corrects the issue 100% (beyond a usb computer connection) was binding the 3.3v output of the Teensy to the 3.3v output of the regulator that powers the sensors. They are both putting out clean 3.3v power within a few hundredths of a volt. In my curiosity to figure out why that worked, I measure the current flow and can see that it registers -14ma of current draw at the Teensy 3.3v pin, so I am assuming the 3.3v bus in the Teensy needs just a bit more power (current) to work properly, but why? I've confirmed the 5v regulator is working correctly and the 3.3v output on the Teensy is clean.
Does anyone have ideas on what might be causing the inconsistencies in the I2C bus? Are the 2K pull-ups to much (I lowered these to try and reduce RFI). It is interesting that it works 100% with the 3.3v lines tied together, but I really don't want to be using that kluged together solution.
I could post a schematic, but there is a lot going on beyond the I2C bus. For reference the three sensors I am using are an ADXL375 accelerometer, MS5607 pressure sensor, and a LSM6DS032 IMU.
Thanks for any ideas.
Mike