I2c communication problem

Hello everyone and sorry for the long post – maybe someone can tell me what I'm doing wrong.

I apologize for the mistakes in English – I used a translation machine, and what doesn't fit the context I corrected manually according to my modest knowledge of English.

I'm getting ready to start my first project using Arduino.
A long long time ago I was writting programs on a PC under DOS, so I'll learn programming using numerous examples on the Internet.

My system is an Arduino UNO R3 controlling devices that make up the audio D/A converter via the i2c bus:

  • WM8805 – SPDIF digital audio signal receiver (manufacturer formerly Wolfsom, currently Cirrus Logic)
  • 2x audio D/A converter in “dual-mono” mode – I want to use PCM1792 (Texas Instruments), I also want to try PCM1795 (Texas Instruments) and WM8742 (Wolfson) and choose the best sounding ones.Both of these modules (receiver, converters) require register reading or writting – this is to be done by Arduino.
  • LCD or OLED display with a simple display of the status (input number, whether there is a signal and its parameters – just a gadget).

For testing and working with software, I assembled the WM8805 circuit and D/A converters on universal boards, I have a temporary power supply - the whole thing mounted on a wooden board (and a temporary audio module on a separate board just to check if there is sound - finally the analog part will be made on electron tubes).

Arduino and displays support i2c with 5V levels, other integrated circuits - 3.3V.
I bought a ready-made i2c level switch module with the PCA9306 circuit, it also has pull-up resistors on both i2c sides.

I can connect different D/A converters to the circuit alternately (1 or 2), I can disconnect other circuits (WM8805, LCD, OLED).

I set the addresses of the circuits on the i2c bus according to their documentation - they do not overlap.
Connections and supply voltages checked.
Arduino board is UNO R3 version.
I connect the i2c bus with Arduino on dedicated SCL, SDA pins (just above the AREF pin).

I downloaded a few i2c scanning programs from the Internet to check if the devices are visible on the i2c bus and at what addresses they report.
Most of these programs work, and the effect is the same:

  • on the 5V i2c side, all elements are detected (LCD, OLED)
  • on the 3.3V i2c side, only the WM8805 chip is detected.

Disconnecting the WM8805 causes it to disappear from the list of devices - i.e. communication on the 3.3V side works, but the D/A chips do not appear on the list (none of them).

Can someone experienced tell me what I am doing wrong - the system is functional, it detects the WM8805 receiver on the 3.3V side, but does not detect other chips. Interestingly, the ones that are not detected are chips from 2 different manufacturers - Wolfson (WM8742) and Texas Instruments (PCM1792, PCM1795).

I'm not including a photo of the test board - if anyone wants I'll include it, but it looks awful.

Regards
Andrzej Stelmach
Poland

Show your wiring diagram. Verify the devices can operate on the bus level (3v3, 5v). Show the results of the bus scans.

  • Then clean it up.
2 Likes

At least I2C wiring should look short, clean and pretty

Both bus levels work OK - 5V sees LCD and OLED, 3,3V sees WM8805.
Wiring diagram is very simple - 5V i2c to LCD, OLED and level shifter, after level shifter 3,3V i2c to WM8805 (which works) and WM8742 (swappable with PCM1792 and PCM1795) which do not work.
OK - I will clean the bus connections - it is made of flat tape wires (used to connect HDD in conputers) mainly with some plugs and sockets, maybe the wires are too long.
BUT when the working WM8805 is disconnected and an D/A chip is connected in it's place to the same socket, D/A chip does not work.

Devices are connected to 5V or 3,3V i2c according to their operating voltage - LCD and OLED works with 5V, WM and PCM chips work on 3,3V.
Bus scan shows:
0x27 - LCD - 5V
0x3c - OLED - 5V
0x3a - WM8805 - 3,3V

Is pin 3 ( MSEL ) on the PCM1792 pulled high to 3.3V to enable I2C and are the two address pins pulled high or low ?

Of course it is - as it is stated in datasheet.

Draw it.

1 Like

We have different views on what wiring diagram means, but here's an example of what @xfpd aiming at:

1 Like

Mine is the same - 2 wires + Vcc and GND.

③ -> 3V3 PCM1792 digital power supply.
What else could I draw???

You have written hundreds of words to explain what one drawing would have explained. Yet you still need to explain and futher clarify that this goes with that, et c. Draw your circuit.

2 Likes

And yet no one here would know that's the case, Just because the datasheet stated it doesn't mean the user actually did it. Hence why I asked. Nothing personal ; Just fault finding.

This is why everyone is asking for a diagram.

I used a PCB design program for my "commercial" projects (see http://stelaudio.pl), but I'm doing this project only for myself and I won't be making printed circuit boards - I'm attaching a hand-drawn sketch I've just made, I hope it helps.

On the 3,3V side of i2c I have now WM8805 and only one PCM1795.
Connections checked, I added ceramoc 100nF to +5V and 3,3V, I cut i2c wites shorter and exchanged some of them.
Nothing changed - WM8805 is visible, PCM1795 NOT.
I tryed co use A4 and A5 ports of Arduino for i2c (without any other change) - nothing happend, PCM is not visible.

1. You should follow what is given below (Fig-1) to connect 3.3V devices with 5V-UNOR3 using suitable 5V <-----> 3.3V level shifter.

2. Check the presence of your 3.3V devices on the I2C bus one-by-one.


Fig-1:

1 Like

As I said in the beginning:
"I bought a ready-made i2c level switch module with the PCA9306 circuit, it also has pull-up resistors on both i2c sides."
3,3V is present everywhere it should be present.

Your level shifter (whatever type it is) should be connected wit 5V-UNR3 and 3.3V-Slave as per FIg-1 of post#18.