TCA9548A i2C multiplexer

  Рет қаралды 7,753

Curious Scientist

Curious Scientist

3 жыл бұрын

In this video I show a nice device that can help us to use multiple i2C circuits with the same i2C address. There are circuits which have fixed i2C addresses, which means that you can only use one of them on a selected i2C bus. If you try to connect several of them, there will be a conflict on the bus and you would not be able to use them. This multiplexer (MUX) resolves this issue and allows you to use 8 devices with the same address at the same time. The way it works is very simple: first we select which channel we want to use by sending a command to the MUX, then we access the i2C device which is connected to the selected channel.
Please don't forget to subscribe!
Schematics and source code: curiousscientist.tech/blog/tc...
If you want to support my work, please consider buying the parts using my affiliate links:
curiousscientist.tech/tools

Пікірлер: 38
@7alfatech860
@7alfatech860 3 жыл бұрын
Its good to learn that the address of the multiplexer is itself selectable. Nice video... like that it is short and to the point.
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Yes, the changeable address is a neat feature! Finally, I could make a shorter video, there was not too much to explain here.
@shecterelectric432
@shecterelectric432 2 жыл бұрын
Before seeing this video, I didnt know how to use multiple steppers/encoder together. Thank you very much!
@CuriousScientist
@CuriousScientist 2 жыл бұрын
You are welcome! I am glad that I could help.
@isidoromaich7226
@isidoromaich7226 3 жыл бұрын
Is a great solution for several inconvenients. I just wonder how fast it, in practice, is handling its child devices. I will look forward your next video to see more about this.
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Yes, it is a very nice circuit! As I mentioned in the video, I will check it with two AS5600 circuits. Since I will need to read them fast, it will be a great test for this circuit.
@ralmslb
@ralmslb 2 жыл бұрын
From TI datasheet, should be plenty fast and not noticeable. In standard mode supports a max I2C clock frequency of 100kHz and in Fast Mode goes all the way up to 400kHz. I don't know the downsides of using the Fast mode to be honest.
@JorgeCaztro
@JorgeCaztro 2 жыл бұрын
@@CuriousScientist Hi friend ... Have you uploaded the video with the mux and the AS5600 yet?
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Hi! Yeah, about a year ago... Maybe you should subscribe to the channel. :)
@JorgeCaztro
@JorgeCaztro 2 жыл бұрын
@@CuriousScientist claro que si estoy suscrito... muy buen contenido!!!
@foldi001
@foldi001 4 ай бұрын
Thank you!
@CuriousScientist
@CuriousScientist 4 ай бұрын
Cheers!
@Kireita
@Kireita 2 жыл бұрын
thank you!
@CuriousScientist
@CuriousScientist 2 жыл бұрын
You're welcome!
@mohamedadam3085
@mohamedadam3085 Жыл бұрын
Do you have a tuturai that shows how to connect multiple AS5600 with multiplexer? Because I tried this your method and didn't work with AS5600 chips, noisy angle reading ect........
@CuriousScientist
@CuriousScientist Жыл бұрын
I don't know what the hell "tuturai" is, but you might find this video interesting: kzfaq.info/get/bejne/f8Bgedyasr-4ZGw.html
@patoromero1229
@patoromero1229 Жыл бұрын
Can use 6 accelerometers with this multiplexor?
@CuriousScientist
@CuriousScientist Жыл бұрын
You can use up to 8 i2c devices with this multiplexer.
@kevinhoublon8630
@kevinhoublon8630 Жыл бұрын
Hello, great video 😁, I'm a beginner and I have a question : Can the TCA9548A multiplexer work with the MCP23017 GPIO Expander? Thank you in advance for your precious support 😄 Cordially.
@CuriousScientist
@CuriousScientist Жыл бұрын
Hi and thanks! Why would you multiplex the MCP23017? You can create 8 different addresses using its A0, A1, A2 pins. Thus, you can chain up 8 of these chips using the same i2c bus. But if you need even more I/O expanders, then yes, you can use this i2c MUX. But as long as you are below 8 chips, I recommend using the MCP23017's address pins. It is much simpler.
@kevinhoublon8630
@kevinhoublon8630 Жыл бұрын
@@CuriousScientist Hello, thank you very much for your feedback. I wanted to control 2 MCP23017 with an arduino board using I2C but since the MCP23017 devices have the same address, I planed to rely upon the TCA9548A multiplexer which can control devices with the same address. -On one hand, the TCA9548A multiplexer would be connected to the arduino board -On the other hand, the TCA9548A multiplexer would be connected to the 2 MCP23017 devices I prefer your solution of using the pins A0, A1, A2 of the MCP23017. Just to be sure : Does it mean I have to connect the pin A0, A1 and A2 of each of my MCP23017 to the pins of my arduino (for example the pin 4,5 and 6 for the first MCP23017 and 7,c8 and 9 for the second ) and send on pin A0 to A2 a byte? Do you have a link explaining how to do so? Thank you in advance for your precious support 😁. Cordially 😊
@CuriousScientist
@CuriousScientist Жыл бұрын
Hi! They do not have the same address unless you give them the same address on purpose (or leave their address pins untouched). There are three pins A0, A1 and A2 on the MCP23017 chip and depending on how you configure these pins (HIGH or LOW), the address will be different. Read the datasheet of the chip about how to configure their address if you are unsure. Just to clarify. You do not need to connect the A0, A1 and A2 pins anywhere on the Arduino. Depending on what board you use for the MCP23017, there will be 3 jumper pins, or DIP switches, or solder tabs. You have to play with those, the Arduino does not have to be involved with the addressing. I recommend you learn this first because working with an i2c multiplexer is much more complicated.
@kevinhoublon8630
@kevinhoublon8630 Жыл бұрын
@@CuriousScientist Hello, thank you very much for your feedback 😁 and your explanation. Ok, I'll check how to set up the address for the 2 MCP23017. I'll come back to you if I have other questions. Have a nice weekend, 😁. Cordially 😊
@mustafaguvenli2733
@mustafaguvenli2733 2 жыл бұрын
Hi, How can I do for multiple SHT20 sensors? I couldn't find multiple examples for these sensors on the internet. I would be glad if you can help with this. Have a nice day.
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Hi! I have never worked with the above mentioned sensors, but you just have to switch between the different channels on the MUX board and then reach the different sensors.
@EricBalcon
@EricBalcon 2 жыл бұрын
It works fine with uno but nothing on DUE...can't figure out what's going on
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Well, "doesn't work" is a very vague description, so I can't figure it out either.
@EricBalcon
@EricBalcon 2 жыл бұрын
Yes, sorry, probably it's a problem with SDA SCL , on the due I don't use A4 or A5 . I tried on A4 and A5 to make sure but nothing works...
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Due uses pin 20 (SDA), and 21 (SCL), you must use those pins.
@EricBalcon
@EricBalcon 2 жыл бұрын
@@CuriousScientist yes , i did
@codebeat4192
@codebeat4192 5 ай бұрын
2:00 It is not true that when two devices of the same type at the same address (like in the video), for example a display, cause a conflict on the I2C bus. When these devices are on the same address, they act and update exactly the same. The problem is (if that is a problem) that you cannot change them individually because they listen to the same address.
@CuriousScientist
@CuriousScientist 5 ай бұрын
Well, that's the problem that you want to update them individually while they hold the same address. The video shows how to solve that issue with the multiplexer.
@codebeat4192
@codebeat4192 5 ай бұрын
@@CuriousScientist You said there is a conflict, there is no conflict. There is only a conflict when there are two devices (or more) at the same address, the same functionality and the MCU asking for data or at a totally different functionality (different devices). The last one with different devices on the same address and asking for data, ruin your I2C communiction completely. You can also make a sniffer, a listener, to any address you want, doesn't matter.
@CuriousScientist
@CuriousScientist 5 ай бұрын
It depends on how you want to interpret the word "conflict". I am not a native English speaker, so let me have a few mistakes. I provided a useful solution for an issue for free, so let's not get stuck with some "misuse" of words. 😉
@danielcristina6748
@danielcristina6748 2 жыл бұрын
Exemple ne fonctionne pas
@CuriousScientist
@CuriousScientist 2 жыл бұрын
English please.
Fast serial communication with Arduino
46:22
Curious Scientist
Рет қаралды 6 М.
Solving I2C Address Conflicts - TCA9548A I2C Multiplexer
24:29
DroneBot Workshop
Рет қаралды 100 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 51 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 39 МЛН
#148 TCA9548A I2C MULTIPLEXER (& Voltage Shifter)
38:00
Ralph S Bacon
Рет қаралды 26 М.
AS5048A 14-bit magnetic position encoder
36:21
Curious Scientist
Рет қаралды 17 М.
How to use two I2C modules that have the same address?
7:14
Brainy-Bits
Рет қаралды 26 М.
Collin's Lab: Soldering
5:09
Adafruit Industries
Рет қаралды 669 М.
MAX31855 - A better thermocouple module
43:15
Curious Scientist
Рет қаралды 5 М.
TCA9548A I2C Multiplexer Module - With Arduino and NodeMCU
9:39
Crazy Couple DIY
Рет қаралды 47 М.
Common use cases of muxes with I2C-specific applications
5:10
Texas Instruments
Рет қаралды 751
Arduino, ADS1115 16-Bit ADC with I2C Bus and Adafruit Library - The Details
41:51
После ввода кода - протирайте панель
0:18
Up Your Brains
Рет қаралды 1,3 МЛН
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 5 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,7 МЛН
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 432 М.
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 351 М.