This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCA9517: ATMega328p - PU I2C communication problem with VL53L0x sensor using TCA9517

Part Number: TCA9517

Hello guys,

I have a problem with I2C communication between ATMega328p - PU, IR sensor VL53L0X for distance measuring and Nextion 3.5'' touch screen. ATMega is powered with 5V and sensor with 2.8V, so I decided to use TCA9517 for logic level translation. I designed my own circuit and pcb. But unfortunately I don't get any response from sensor. From software I call sensor every 1 second. On oscilloscope I see that ATMega sends data to sensor on SCL and SDA lines but I don't receive any measurement from sensor. As soon as I connect sensor 2.8V voltage drops to 1.9V.. Touch screen is used for displaying measured data from sensor and to mute buzzer for 1 minute. Buzzer is turned on when specific distance is measured by sensor. and this part of circuit works fine, I only have problems with I2C. But when I pull out ATMega in insert it to original Arduino UNO board with external logic level shifter builded with BSS138 mosfet's and resistors. I'm not very expirienced with circuit designing and after spending many days trying to solve a problem I really don't have any more idea what could cause this problem. In attachment I send also my schematics and pcb.

Could someone be so kind and try to help me solve this problem, please ?

Regards,

Peterarduino_TCA_sch.pdfarduino_TCA_brd.pdf

  • Hey Peter,

    I've taken a look at the schematic you've uploaded but I don't see any issues with our device.

    The PCB does have a trace that looks a bit worrisome to me (unrelated to our device). There seems to be a trace on the top layer connected to C5 which looks like it runs between the pads of the mcu. This trace is extremely close to the pads.

    Notice: I am not an expert on power devices so I could be wrong in this explanation.

    I actually think the issue is related to your LDO (MIC5307). The output (your case 2.8V) looks like it is tied to a 100nF capacitor however voltage regulators typically use comparators to feedback the voltage on the output in order to regulator their voltage. Because semiconductor devices are not perfect, there are parasitics that come into play and can cause unwanted poles and zeros in the feedback system (reason why op amp gain is not infinite). This affects the overall stability of the comparator (you can kinda think of them as an op amp). The rule of thumb is if the 1/B (usually noise gain) and the open loop gain of the two curves intersect and the rate of closure (RoC) is not less than 20dB then the system is unstable. To compensate for instability you can move these poles and zeros with discrete components on the feedback system or in this case the output.

    By placing a 100nF capacitor on the output, you've unintentionally affected the feedback system's poles and zeros and caused the device's output to be unstable (phase margin has changed). I suggest you place a 2.2uF capacitor on the output and see if the problem goes away. Below is taken from the device's datasheet.

    If you are interested in understanding stability a bit better TI offers free online lecture videos on this topic: (section 10 for op amp stability)

    Thanks,

    -Bobby

  • Hello Bobby,

    thank you for very detailed and well argumented answer. I've replaced both capacitors on MIC5305 but it doesn't help. But fortunately I found that reason for voltage drop is pull up resistor on Vcc+Enable pin on VL53L0X sensor. I throwed it out of circuit and now everything works as it should.

    Thanks again for your help ;)

    Peter