RDDRONE-MBS772 SMBus Address not found Hi Team, I have been first trying to communicate to RDDRONE-BMS772 via SMBus using J18 header. I am connecting ESP32 and RDDRONE-BMS 772 board via the SMBUS header, I am connecting SDA, SCL and GND. I am using the below code, I have tested the code with a I2C display and I am able to find the slave address with the below code. I have enabled the SMBus using the CLI using "bms set smbus-enable 1" command and verified using bms get smbus-enable. I have tested UAVCAN it works fine and I am able to fetch the data using PixHawk. #include
#define SDA_PIN 6
#define SCL_PIN 7
void setup() {
Serial.begin(115200);
Serial.println("\nI2C Scanner starting...");
Wire.begin(SDA_PIN, SCL_PIN, 100000); // SDA, SCL, 100kHz
Serial.println("\nI2C Scanner starting...");
}
void loop() {
byte error, address;
int count = 0;
for (address = 1; address < 127; address++) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.print("I2C device found at 0x");
Serial.println(address, HEX);
count++;
}
}
if (count == 0) {
Serial.println("No I2C devices found.");
}
delay(2000);
} Please suggest me what I could be doing wrong? my intention is to fetch the data like Voltage, Current, etc. using SMBus. Re: RDDRONE-MBS772 SMBus Address not found Hi @abhishekBLD ,
To make the Arduino work with this HW configuration, you could download this SMBus PackProbe.ino file at https://github.com/PowerCartel/PackProbe/tree/master and you could do the following changes: Change SCL_PIN to 0 to be able to use Digital pin 7 and 8 of the Arduino Uno. Change deviceAddress to 11. And then make it work with the serial monitor instead of the console bridge:
Follow instructions to convert the console/bridge to serial: https://github.com/PowerCartel/PackProbe/blob/master/PackProbe/PackProbe.ino#L74-L77
This should work with the mentioned HW.
I hope this helps!
Kind regards,
Cis
Re: RDDRONE-MBS772 SMBus Address not found Hi @abhishekBLD ,
I can see that SMBus is also working with BMS6.0 from the RDDRONE-BMS772. I programmed the nuttx.bin at RDDRONE-BMS772/Binary at main · NXPHoverGames/RDDRONE-BMS772 · GitHub. However I did notice that there is a bug in version 6.0 that is fixed in version 7.2. The cell voltage is only showing the full integer voltages in mv notation (4000mV or 3000mV) and this does not correspond to actual cell voltages on my RDDRONE-BMS772 (e.g. 4123mV or 3978mV).
To get the BMS7.2 for the RDDRONE-BMS772, you can follow the instruction to build and make the .bin, but just configure it for the RDDRONE-BMS772. Please follow: GitHub - NXPHoverGames/MR-BMS771. When you are at the step to configure and make the binary (GitHub - NXPHoverGames/MR-BMS771), make sure to configure for the RDDRONE-BMS772, for example:
tools/configure.sh -e rddrone-bms772:bms
But if you did not get any messages via SMBus, I doubt that this will fix that problem. Meaning that it is either a HW issue or a SW issue.
In the attached picture you can see the pinning that I use.
Unfortunately I'm not allowed to share the code that I'm using on the Arduino. Maybe I will still find a way to share an example or a link. For the BMS code, you should have the same code as I tested with.
Pinout of the SMBus connection between RDDRONE-BMS772 and an Arduino Uno board:
I hope this information and picture helps debugging the problem!
Kind regards,
Cis
Re: RDDRONE-MBS772 SMBus Address not found Hi @cisvmierlo, I am using BMS version 6.0 which I have cloned from the latest github repo https://github.com/NXPHoverGames/RDDRONE-BMS772/tree/main?tab=readme-ov-file can you please test SMBUS communication from the above given repo? I am using RDDRONE-BMS772, that's why I am using above link instead of what you provided (BMS771). can you confirm if both has the same firmware, because as I can see BMS771 is used for 7S-14S? bms set smbus-enable 1 bms save I have done above two commands earlier as well and I could see it when I do bms get-all. Also I have check continuity and everything is fine. Please look into it and suggest solutions. Re: RDDRONE-MBS772 SMBus Address not found Hi @abhishekBLD ,
Thank you for your interest in the RDDRONE-BMS772 small all-in-one BMS for mobile robotics! I'm sorry that you've run into this issue. Which SW version are you using on the RDDRONE-BMS772? You can see the BMS version when the SW is started on the CLI or when issuing a "reboot" (command).
Currently the latest version (7.2) can be found at the git repository of the MR-BMS771: https://github.com/NXPHoverGames/MR-BMS771, this SW can be used by the RDDRONE-BMS772 as well when configured correctly I've just tested SMBus with an Arduino Uno on the following RDDRONE-BMS SW version: BMS version: BMS7.2-11.0-RDDRONE-BMS772. SDA port Dpin7 and SCL port Dpin8. I can see that you are using the correct SMBus connector J18 and correctly enabling SMBus with the command "bms set smbus-enable 1".
Did you also save the parameters with the "bms save" command? otherwise a repower or reset could reset the smbus-enable parameter to 0. I cannot see your actual setup, but I would advise to keep the wires short and maybe lowering the I2C speed to the I2C slow mode ( e.g. 25kHz) when using I2C for board to board communication.
If you can share your BMS version number, I can test the SMBus on that as well. Kind regards,
Cis
查看全文