teensy and TCA9548A pullup resistors

Status
Not open for further replies.

rotabox

Well-known member
hello
im trying to scan a TCA9548A ports but i dont get the right address. the address i find in scan its for another i2c device that connected to my teensy 3.6. this device i2c bus connected to 3v with pullup resistors.
do i need allso to use pull up resistors from 3v to the to TCA9548A i2c bus? i read in adafruit site that its all ready have pullup resistors.
my TCA9548A is connected to 5v. and scl sda to pins 37 38.

im using this test code:
Code:
/**
 * TCA9548 I2CScanner.pde -- I2C bus scanner for Arduino
 *
 * Based on code c. 2009, Tod E. Kurt, http://todbot.com/blog/
 *
 */
 
#include "Wire.h"
extern "C" { 
#include "utility/twi.h"  // from Wire library, so we can do bus scanning
}
 
#define TCAADDR 0x70
 
void tcaselect(uint8_t i) {
  if (i > 7) return;
 
  Wire.beginTransmission(TCAADDR);
  Wire.write(1 << i);
  Wire.endTransmission();  
}
 
 
// standard Arduino setup()
void setup()
{
    while (!Serial);
    delay(1000);
 
    Wire.begin();
    
    Serial.begin(115200);
    Serial.println("\nTCAScanner ready!");
    
    for (uint8_t t=0; t<8; t++) {
      tcaselect(t);
      Serial.print("TCA Port #"); Serial.println(t);
 
      for (uint8_t addr = 0; addr<=127; addr++) {
        if (addr == TCAADDR) continue;
      
        uint8_t data;
        if (! twi_writeTo(addr, &data, 0, 1, 1)) {
           Serial.print("Found I2C 0x");  Serial.println(addr,HEX);
        }
      }
    }
    Serial.println("\ndone");
}
 
void loop() 
{
}
 
Last edited:
Hello Rotabox,

Had the same problem and confusion with the documentation. Try using 4.7KOhm to pull up the Teensy SCL and SDA to Vcc. Someone will confirm but I believe the Teensy needs a stronger pull up than some other boards. I did not need any extra pull ups on the TCA outputs ports.

It sounds like you are using this product from Adafruit?

Also, remember you can select another I2C address for the TCA (using the A0,A1, A2 pins on the breakout board) to avoid conflicts?

I bought a few TCA9548A on breakouts from Ebay (Adafruit clones), they all failed. The Adafruit boards worked fine for me.

HTH,
Mike
 
Last edited:
hi mike tnx for answer i guess my tca is clone its a purple board
i measure the SCL and SDA voltage and i got 3.8v in both. so as far as i know i dont need pullup resistors.
i dont find any reason to change the address of the tca coz its sopsed to be 0x70 and my scan find 0x00 and 0x66 address of my other device.
thats weird.
 
Hi,

The purple boards did not work as expected for me, strange but true. The Adafruit boards have been flawless for me at least.

All I can say is I have to use pull ups on the Teensy SCL and SDA to get the I2C to work reliably. Why not try with pull ups and maybe remove the other I2C devices to simplify troubleshooting?

Good luck,
Mike
 
Hi,

The purple boards did not work as expected for me, strange but true. The Adafruit boards have been flawless for me at least.

All I can say is I have to use pull ups on the Teensy SCL and SDA to get the I2C to work reliably. Why not try with pull ups and maybe remove the other I2C devices to simplify troubleshooting?

Good luck,
Mike

sure my next step is to remove the other device and scan
if ill not find anything ill give it a try with pullup resistor to 3v.
did you try everything with the purple board with out success?
 
Hi,

The purple boards did not work as expected for me, strange but true. The Adafruit boards have been flawless for me at least.

All I can say is I have to use pull ups on the Teensy SCL and SDA to get the I2C to work reliably. Why not try with pull ups and maybe remove the other I2C devices to simplify troubleshooting?

Good luck,
Mike

so i test with out the other device and i get in test 0x00 in all ports i measure the voltage of scl sda of my other device and its 3.3v.
im preaty afraid to add more 3.8 volts to the tca.
 
sure my next step is to remove the other device and scan
if ill not find anything ill give it a try with pullup resistor to 3v.
did you try everything with the purple board with out success?

Just about Yes. One was dead on arrival. The others all developed failed ports after a short time of use. So I did get them to work just not for long. It is still my understanding that external pull ups are needed on Teensy I2C.
 
Just about Yes. One was dead on arrival. The others all developed failed ports after a short time of use. So I did get them to work just not for long. It is still my understanding that external pull ups are needed on Teensy I2C.

i read a bit about the tca now and i tryd go for 2k2 pullup resistors now the voltage on tca SCL SDA is 3.6 volt.
and i still dont see it on any scan i tryd.
 
I would cut to disable the adafruit pullups since they may be fed to 5V, while your attempting to pull it to 3V? 3.6 is pretty high for a teensy pin

all i2c devices should have their (if installed) resistor pullups disabled and only one set should be near the microcontroller. Also be sure that the I2C device doesnt use 5V logic on the i2c lines
 
Seeing 3.6V means the Teensy’s pin protection diode is trying to limit the voltage by clamping it to 3.3V, having itself a forward voltage of 0.3V. You are definitively in the danger zone, here!
 
i found the trace on the adafruit of pullups its have two 2k2 resistors to the 5v.
should i cut them? and should i use external resistors 2k2 to 3v (witch is allredy conected)?
 
you cant pull up to 2 different voltage sources... cut the adafruit board trace to disable them
Make sure the device doesnt toggle the sda/scl lines at 5 volts either

I suggest since your using a 3.3v teensy to apply 3.3V to the VIN of the adafruit board, as suggested by adafruit, and NOT 5V

Vin is connected to 5V (on a 3V logic Arduino/microcontroller, use 3.3V)
 
One day, I’d like to understand why people buy and connect 5V peripherals to 3.3V processors... Nobody would replace their 12V car battery with a 24V pack from a truck...

Friends, the 5V era is almost over! Don’t buy that stuff which is still sold for compatibility with the old asthmatic 8bit AVR processors like the Arduino UNO. 3.3V is the current industry standard, 1.8V is already at the horizon.
 
ok so i cut it and now the pins SCL SDA getss 3.3v
i scan again and all i get is 0x00 and 0x66
0x66 thats my other device still not getting this 0x70 Screen Shot 2019-03-10 at 1.38.30 AM.jpg
 
did you cut the adafruit trace ?

if so, you need pullup resistors near teensy.
if not, you shouldnt use the teensy ones.

as per my last post the VIN on the adafruit board should be connected to 3.3V, NOT 5V. Theres a 3.3V pin 250mA output on teensy you can use for such a board provided it doesnt draw more than ~80% of that power suggestively

you have a connection diagram ?
 
i gets 3.3v now on SDA SCL PINS
i cut the pullups trace on tca board.
i use 2k2 external resistor from SDA SCL to 3.3v on teensy .
and the scan still like the pic above.
im still running 5 v on VIN il chang it now and give it a try
 
Last edited:
i switched to 3.3 v VIN and still nothing on scan.
all SDA SCL on tca ar 3.3 v.
 
Last edited:
Hi,

The purple boards did not work as expected for me, strange but true. The Adafruit boards have been flawless for me at least.

All I can say is I have to use pull ups on the Teensy SCL and SDA to get the I2C to work reliably. Why not try with pull ups and maybe remove the other I2C devices to simplify troubleshooting?

Good luck,
Mike

I orders adafruit original it really more expensive but I must it for my project.
I'm gonna connect it to 3v VIN.
Did u use allso external pullup resistor and allso used the pullup thats comes on bord?
 
Status
Not open for further replies.
Back
Top