Nano I2C issues with ht16k33

Hi guys,
Random little issue I just can't figure out. I have some HT16K33 backpacks from adafruit, which when connected to a nano via i2c (pins a4 and a5) they do not work and running the i2c scanner just hangs.

If i plug the backpack into an Uno, they work just fine and i2c scanner shows the correct address.

I thought it might be an issue with the nano but if i plug in an i2c display it works just fine and the i2c scanner finds the address of the display no problem.

I have 4 of these backpacks and they all work on the uno but dont on the nano!? i have also tried three other nano's and all have the same result ... they can find and run the display but won't find any of the ht16k33 backpacks???

Any ideas as I've spent hours googling and have come up empty!

Cheers

is this the unit??

page 4 say needs 4.5-5.5 volts, which nano??

That’s the one. I’m running it off of the 5v pin and to confirm it gave out enough power I connected the ht16k33 to the nano 5v and ground then the sda/scl to the uno running the code and the thing works fine…literally just seem to be having trouble with the i2c comms between the nano and the backpack.

Nano v3 and is using ATmega328P.

Does it work if you connect both the HT16K33 and the display to the Nano?

Just to verify, your Nano's are running at 5V / 16MHz, and are not the 3.3V / 8MHz version.

Yea, 5v 16Mhz.

If I connect both the display and the backpack to the nano the scanner runs without hanging and only finds the display address. If (whilst running) I remove the display the scan hangs until I reattach the display after which it stops hanging and finds just the display again.

If I do this on the Uno, the scanner finds both the display and the backpack!?

Are you using the same wires to connect to the Nano and the UNO?

Using breadboard to connect the two to the uno/nano

Edit for clarification

Display is connected to 3v and ground directly, sda and scl are connected to breadboard

Backpack is connected to 5v and ground directly, sda and scl are connected to breadboard

Uno/nano sda and scl pins are connected to breadboard respectively.

Sounds curious - why do you mix 5V and 3V ? give them all a stable 5V - with enough current to drive the LEDs

Are there LEDs connected, or are you just testing the backpacks?

The backpacks have 14 segment displays presoldered on to them.

I don’t need the display hence just connecting it to the 3v to get the scanner to find it. I just can’t understand why the backpacks can be found and work on the Uno but aren’t working at all on the nanos. I’ve even tried other brand nanos too all with the same problem.

Running the sda/scl pin finder comes up with 18&19 on the nanos, which has confused me a little as that doesn’t really work out to be a4&a5 when I count, but it must be as the i2c display works just fine. Just a strange issue with the nano and the backpacks combination.

An Uno has a dedicated 3.3volt regulator that can provide 150mA.
3.3volt of a classic Nano v3 is stolen from the USB chip.
You can't draw much more than 30mA from it before it collapses.
Leo..

I don’t think the power is the issue as I ran the backpack off of the unos sda/scl pins and the nanos 5v and ground and it worked fine. It’s something to do with the backpack and the sda/scl pins on the nano

The Uno and classic Nano are using the same processor, but there are a few differences.

  1. The 3.3volt supply is weaker. 30mA instead of 150mA.

  2. Pin13 has an unbuffered LED attached, so be careful when using that pin as input.

  3. USB backflow protection is simplified (diode instead of mosfet and opamp),
    so VCC is not 5volt, but more like 4.6volt when on USB supply.

  4. Smaller, so less cooling for the 5volt regulator,
    which could mean less current available for sensors when on external supply.

  5. The Nano has two more analogue pins. A6 and A7. Analogue input only!

You pick why your setup is not working.
The SCL and SDA pins are exactly the same.
Leo..

1 Like

Yea as I said, it’s not a power issue. It runs the backpack fine if I use the sda/scl on the uno running the code and run the 5v and ground out of the nano. So it’s obviously not a power issue.

And the only pins I’m using are a4 and a5 as per the pin out diagram for the nano. So it’s not a pin issue.

There’s literally only an issue between these adafruit backpacks sda/scl and the nano’s. I don’t understand what it could be.

To close this up, the issue was there were two VCC pins on the backpack. For it to work with the nano I have to join both of these to the 5v pin. UNO worked fine with just the one, but the nano did not!

Thanks for the help all.

I wish we could actually pin this down. I have the schematic for this backpack plus 7-segments unit, and I don't see more than one Vcc net.

The Nano doesn't have pullup resistors on the I2C lines. Does the Uno? the backpack does have pullups, to 5V.

I wonder if it might be bad jumpers or breadboard contacts. So maybe the second 5V connection is actually the only good one.

An Uno and a classic Nano both only have software pull up, activated with wire.begin().
Leo..

Ok, then it almost has to be some difference in connection quality - the jumpers or something.

Well, the only other difference is that the Uno is probably sending out 5V, and the Nano about 4.7V if he's powering from USB. But it's hard to see that making a difference. And adding a second power connection wouldn't change that.

I have four of these backpacks and they all have two pins for power, ones apparently for the chip and the other for the displays..although you only seem to need one connected from the uno.

I didn’t even run a separate power supply to it, just joined the two with a bit of wire and ran it off the one 5v line from the nano and it worked.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.