Skip to content

TLV493D-A1B6 board with a Adafruit HUZZAH32 not talking #2048

Closed
@tpitman

Description

@tpitman

Hardware:

Board: Adafruit HUZZAH32
IDE name: Arduino IDE

Description:

I am trying to use the TLV493D-A1B6 board with a Adafruit HUZZAH32 Arduino dev board.

I started with the magnetic sensor board pictured at the top of the github readme file associated with the TLV493D source.

I broke away the small sensor board from the main board so I could connect the HUZZAH32 to it. I made a cable that lets me connect it back to your board and that works fine. I have pull up resistors and have tried several different values including 8.7K and 1.2K.

If I use the PC software to get values everything works fine. On the scope I see several bytes of clock and data over and over really fast.

I install the TLV493D github library and it compiles and builds.

I connect it to my HUZZAH32 board and I get nothing.

When I watch the start up on a scope on the i2c lines I see the clock going and data going so I know I have the correct pins.

The problem is that when it tries to read data I get nothing. All of the examples do the same things. They just send an 8 byte worth of clock over and over about every second and nothing else.

During initialization I do see 4 bytes of clock and data, but am not sure what that means.

I did try replacing the files mentioned in other posts for the i2c. It didn't make a difference. I think that is because I have the latest esp32 library already.

I also downloaded a simple i2c scan test and it doesn't find any devices at any address. I can see the traffic on my scope, but nothing responds.

As I said above there is PC software that talks to the dev board that has the chip on it and when I watch that traffic there are responses and it works fine so I know the chip works. I have moved it back and forth between their dev board and it works and the HUZZAH32 and it doesn't.

The verbose debug log shows that nothing is acking and I know that is the case because the SDA never goes low when it is time for the TLV493D to respond.

How do I figure out what is going wrong?

Activity

stickbreaker

stickbreaker commented on Nov 11, 2018

@stickbreaker
Contributor

@tpitman where are you probing with your scope? At the sensor or on the huzza?

I just read the user manual for your, sensor. It says the address should be 0x5E or 0x5F depending on address pin selection.

Try this scanner. Show me the output
I2c scan

Chuck.

tpitman

tpitman commented on Nov 12, 2018

@tpitman
ContributorAuthor

I am probing near the huzza. I am going to check out the analog signal since so far I have just been looking at the digital scope.

That i2c scan is very similar to the one I tried and it doesn't give any devices found.

I will get back to you on what the signal looks like on the scope.

tpitman

tpitman commented on Nov 12, 2018

@tpitman
ContributorAuthor

I have more information. I am able to use the nRF52 Feather from Adafruit and it works fine so there is something going on with the esp32 huzzah32 feather.

I have been interacting with the team from Infineon who make the sensor. Rather than repost everything we have done here I will post a link to that repo and the issue:

Infineon/TLV493D-A1B6-3DMagnetic-Sensor#9

If someone can give some thoughts as to what might be going on with the esp32 huzzah32 that makes it not work with i2c with this sensor I would really appreciate it.

lbernstone

lbernstone commented on Nov 12, 2018

@lbernstone
Contributor

What pins are you using for Wire?

tpitman

tpitman commented on Nov 12, 2018

@tpitman
ContributorAuthor

I am using the SCL and SDA lines that the board calls out on the silk screen. They are the last 2 pins on the shorter connector. They are also labeled pin 22 and 23.

lbernstone

lbernstone commented on Nov 12, 2018

@lbernstone
Contributor

Can you test that those pins are working properly with a LED or something? Maybe a connection/power problem.
What version of the code are you using? @stickbreaker has done a lot of work in the repo since the last release, so pulling from git is highly recommended.

tpitman

tpitman commented on Nov 13, 2018

@tpitman
ContributorAuthor
tpitman

tpitman commented on Nov 16, 2018

@tpitman
ContributorAuthor

Anyone have any ideas on this?

tpitman

tpitman commented on Nov 16, 2018

@tpitman
ContributorAuthor

@tpitman where are you probing with your scope? At the sensor or on the huzza?

I just read the user manual for your, sensor. It says the address should be 0x5E or 0x5F depending on address pin selection.

Try this scanner. Show me the output
I2c scan

Chuck.

The output is all ..

The sensor board doesn't seem to want to ack anything from the huzzah32. The exactly same board acks and works fine with the nrf52 feather.

Any ideas why that would be? Something about the signal, voltage or timing or something?

stickbreaker

stickbreaker commented on Nov 16, 2018

@stickbreaker
Contributor

@tpitman can you try another I2C device? Discover where it is a Hardware fault or software fault. I know the current Wire() driver works.

Take a couple steps back, create a simple circuit to test:

  • just ESP32, Pullup Resistors(~2.4k) and one I2C device.
  • use previously unused pins on the ESP32
    select sdaPin, sclPin from unused pins on the esp32, don't use 0-3,6-11,12,34-39
    Wire.begin(sdaPin,sclPin,100000);
  • connect your pullup resistors to these pins
  • connect your I2C device to these pins
  • use that scanner code, modified to use your pin selections.
  • verify i2c device power

Chuck.

tpitman

tpitman commented on Nov 16, 2018

@tpitman
ContributorAuthor

When you say just esp32 I am not sure what you mean. The esp32 is mounted on the adafruit feather huzzah32 board. I can't image how I would isolate it.

If you are talking about just doing what you say by using the adafruit huzzah32 board, then I can do that.

From what I can tell the SCL and SDA pins on the huzzah32 board are on pins 36 and 37 according to the schematic they have here:

https://learn.adafruit.com/assets/41630

That is if I read that right. If so, those are 2 pins in the 34-39 range you said not to use.

What pins would you suggest and how would I connect to them on this board?

Here is the link to the huzzah32 pinouts page:

https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/pinouts

I am happy to do the experiment you ask if I am able to do so on this board.

Thank you for your time.

tpitman

tpitman commented on Nov 16, 2018

@tpitman
ContributorAuthor

Looks like I might be mapping to the wrong pins in my previous message. I was looking at the physical pin numbers on that schematic I included when I thought the huzzah32 was using 36 and 37. If you meant IO numbers, then it would be fine. It looks like the huzzah32 maps scl and sda to IO22/23.

So can you clarify what pins I should not be using based on your message to me?

stickbreaker

stickbreaker commented on Nov 16, 2018

@stickbreaker
Contributor

The numbers are base on the ESP32 GPIO values. What is the board name you have selected inside the Arduion IDE?

IO22/23 are the standard pins for I2C GPIO22,GPIO23

tpitman

tpitman commented on Nov 16, 2018

@tpitman
ContributorAuthor

image

stickbreaker

stickbreaker commented on Nov 16, 2018

@stickbreaker
Contributor

try Wire.begin(23,22,100000); use the labeled SDA,SCL pins on the PCB.

you need GND, v3.3, SDA, SCL plus the Pullup resistors to connect the sensor.

If 23,22 doesn't work you could use 18,19 (as labeled on pcb)

When I said ESP32 I meant which ever module you were using. I just wanted you to minimize the circuit complexity. Nothing other than the basic I2C necessary parts connected.

Set the "Core Debug Level" to "verbose" this will display any warning to the Serial Monitor.

Chuck.

13 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      TLV493D-A1B6 board with a Adafruit HUZZAH32 not talking · Issue #2048 · espressif/arduino-esp32