Dual TLV493D Sensor Help

Announcements

Measure CO2 When It Matters - Infineon’s XENSIV™ PAS CO2 now comes in SparkFun Red. Check it now!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I have dual TLV493D sensors I've been trying to get working. I've used multiple configurations

  • MSP430 + TLV493D on perfboard
  • ATMEGA (3.3V) + TLV493 on custom PCB
  • XMC1100 2go + TLV493 on 2nd custom PCB


In each implementation I can get either of the two sensors to work on either of the two addresses but when I try to run the two concurrently one or the other addresses throw a NAK

2774.attach

My most recent code is attached (using the Arduino IDE 1.0.3 board/libraries front-end provided by Infineon 😞

#include 
#define SECONDARY_PIN 5 // P0.15

void setup() {
Serial.begin(9600);
while(!Serial);

delay(2000);
Serial.println("Initialization...");
delay(500);

pinMode(SECONDARY_PIN, OUTPUT); // Sensor #2 Power Pin
digitalWrite(SECONDARY_PIN, LOW); // Force Sensor #2 off

Serial.println("Starting Sensor #1");
magnetic3dSensor_primary.begin();
delay(100);

Serial.println("Starting Sensor #2");
digitalWrite(SECONDARY_PIN, HIGH);
delay(10);
magnetic3dSensor_secondary.begin();

Serial.println("Setup complete");
}

void loop() {
magnetic3dSensor_primary.updateData();
delay(100);
magnetic3dSensor_secondary.updateData();
delay(100);

}


I assume I have tunnel vision now if you folks can get me out of the tunnel I'd appreciate it.

Thanks much and have a great weekend!
Uily
0 Likes
1 Reply
User13282
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted
You are using dual TLV493D. You have set the ADDR/SDA of both devices on I2C correctly? On power-up the TLV interprets the applied voltage level on ADDR/SDA pin as logical “0” or “1”. This determines one of two possible I2C bus addresses to access the sensor. Check againg the schematics of the custom TLV boards. Compare them to figure 6 Application Circuit with external Power Supply and µC in the datasheet and calculate the levels of SDA and SCL signals.
0 Likes