I have two BME280 and two MAX31855
The BME280 has the baud rate 115200 and I want to mix it with another temp sensor and amplifier MAX31855 and it says the baud rate is 9600. And I have to use a multiplexer TCA9548A because of the same address on the BME280 and also on the MAX31855. And getting the readings every 5 seconds is ok. Can I lower the baud rate of the BME280 to 9600 or should I do two systems? Or do you have any other suggestions?
I have now tested the MAX31855 with a baud rate 115200 and it seems to work. So then is my question how do I know wich baud rate I can use? It dosen`t tell anyware in the specification what to use.
1 baud = 1 hertz, so 115200 baud rate should not be any problems then when the bus speed is 5Mhz?
I’m not very familiar with this topic.
What baud rate are you referring to? Is that a property of the multiplexer you’re using?
No, it’s the MAX31855. MAX is a “voltmeter or amplifier” for measuring high temperatures (+800C) and you connect a probe to it, to measure the temperature. It has a fixed address so you need to use a multiplexer, as I will have several MAX31855. I have never before thought about the baud rate and what it is. Now after some digging I have learned a bit more. The example from where I bought the MAX31855, they had put in the example to 9600, now I have tested it with 115200 and it works ok. And when I read the specification it says that it works with frequencies up to 5 Mhz. Went to github and checked the library to see if there was anything there, but found nothing. Where can you find, for example, which max baud rate you can use for BME280 or other circuits?And also how do you chose what baud rate to use?
That baud rate has nothing to do with the sensors or peripherals you’re using.
That baud rate is for the serial communication between the microcontroller and the Serial monitor. You don’t need to worry much about that value. For the ESP32, it’s common to use 115200, but you can also use 9600.
So, you’ll be OK with the 115200 value.
I’m sorry for the misunderstanding. I didn’t understand that was what you were talking about.
I hope this is clear.
Thanks Sara! I didn’t understand that! Because the ESP32 must have a conversation to the sensor and then I thought it was the baud rate. So the conversation (speed) between ESP32 and MAX31855 I will find in the library usually written by the company then?
Usually, that is set automatically on the library you’re using and you don’t need to worry about setting that.
Sometimes, some libraries allow you to choose different frequencies for communication. But, the default is the one that should work best (so you don’t need to do anything about that).
Thank`s Sara! I have now learnt how this is working.
So the questions is answered!
Now I have tested with diffrent baud rate and if I chose 9600 so stops the readings after 1 reading. So I change back to 115200 and after a while it stopped. Then I increased to 250000 and then the readings contiuio.But that will be an internal problem. To test I used now 5 BMP280
I don’t think it is a problem with the baud rate. It should be an issue with the code or the hardware set up.
The code is from one of your examples https://randomnerdtutorials.com/tca9548a-i2c-multiplexer-esp32-esp8266-arduino/ and I read somewhere that you should use pull-up resistors to make the gate go high again . There is no problem with getting it to go low, but that it can go to an unspecified position when it goes up, without a pull-up resistor. Will try and see if it helps.