Trouble with I2C and assignment

Hello there,

To begin, I'd like to precise I am quite unexperienced in Arduino and electronics so far, I just want to help a colleague for his graduation project. :slight_smile:

So first, here is the big idea :
My friend want to conceive a kind of a "board" with 6 slots. Each slot would reckonize a signal and these six devices would return a sequence.

To illustrate this quickly :

6 slots : [ A ] --- [ B ] --- [ C ] --- [ D ] --- [ E ] --- [ F ]
|||||_____|
||
Arduino

So we thought we could use NFC tags with NFC receivers as these slots. So in theory, it doesn't seem like a bad idea, since he already bought a ATmega2560, to connect some devices to this master.
But since then, it was becoming really unclear for me...

Since he was running out of time for his project, I thought quickly that NFC Shield (PN532) would do the job perfectly. We took 6 of them and tried to connect them. Then, I studied the Adafruit NFCShield I2C library to make all this stuff work.
And indeed, I was able to read the NFC tag through one shield, but when I used 2 of them, only the value of the first tag was returned.

We found out we had to reassign the "id" of each shield. But what I read in Adafruit FAQ about their shields that is it was not possible to use multiple shields on one Arduino, since it had a fixed address. At this point, I'm really upset about it, since we have to collect the tags in 6 separate devices for the needs of my friend installation !

I feel bad about that, since I was convinced I was able to help my friend. Maybe I missed an important point, and I'm searching for a solution to read 6 tags at the same time, on 6 receivers, even if shields would end up unused (though it would be a pain to restart all from the start now).

Thank you for your solutions, I am very sorry if I was not very clear, I have a few knowledge of electronics... ^^'

There are devices called I2C multiplexers. They can address more than one I2C bus so slave devices with the same address can be on different busses. Adafruit sells this 8-channel unit: Overview | Adafruit TCA9548A 1-to-8 I2C Multiplexer Breakout | Adafruit Learning System

Thank you johnwasser, I was reaching a topic about multiplexer in gammon.com, so it seems to be the solution indeed !

(Edit : I found an answer for this following question by searching )
Just for the advice, do you know if this product would do the job too :
https://hackspark.fr/fr/cd4051be-single-8-channel-analog-multiplexer-demultiplexer-with-logic-level-conversion.html
It's maybe irrelevant, sorry again about that ^^'. It is just that since I am in a hurry, I was looking for shops where I would buy a multiplexer tomorrow in my city.

But anyway, I'm glad that it seems it's still possible to do this installation !

Hi Yoannis
I am having problems with the same setup.
I have six PN532 and one TCA9548A multiplexer

The multiplexer finds the PN532's but cannot read from them. Do you have any code I could see please to help me get started.
Regards
Chazza