-
Hello, I'm a mechanical engineer and due to the lack of professionals in the area I'm working as a scholarships in the development of drivers. I work at PTI, here we have numerous renewable energy projects, and one of them is the development of communication between this BMS and Venus OS. I'm studying your drive, and as I'm not from the area I apologize for the simple questions. 1- Could you show me the way for me to add another BSM to your drive? 1.1 - Start with: battery_template.py (editing SOC, voltage, current, etc)?
1.2 - The BSM document is a bit simple, I believe it still lacks information to develop the driver. 2- I have another drive developed for FIAMM batteries, but I found it more confusing than yours, if you want I can share. 3- I'm more interested in learning how to develop than having the drive ready! Thanks for sharing your great work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @stanhausc Rename the BatteryTemplate class for your BMS and then you need to use the 3 main functions that are implemented to read and populate data for your BMS. (test_connection, get_settings & refresh_data) There is a helper function at the bottem that you can use to write the commands and read your data. There are small differences in each comms protocol and this is where the parameters to read_serial_data needs to be adjusted for your BMS. To start you only need the number of cells, the soc, current and voltage. Once you can read this the driver should already be working for you and you can add the rest of the items. If you populate all the variables in the battery class via your derived BMS class then the rest of the driver will use that to push the data to VenusOS. I do suggest you make a fork of the repo and then create a new branch inside that fork. If you are ready you can then create a pull request of your changes to be included back into the main repo and once it is all ready and tested by a few volenteers we will merge the branch back into the main branch and release. |
Beta Was this translation helpful? Give feedback.
-
PS. Have a look at the other battery bms implementations. Many of them share similar coding pieces and you will see examples of how they are implemented. They are most MODBUS RTU based same as your BMS. You can find a list of the other BMS around lines 42-50 in dbus-serialbattery.py |
Beta Was this translation helpful? Give feedback.
Hi @stanhausc
You should start by making a copy of the battery_template.py and naming it for your BMS. The template is a small example implementation. In theory this is the only file you will need to edit to add your BMS, except when adding this new file as a reference to the main program.
Rename the BatteryTemplate class for your BMS and then you need to use the 3 main functions that are implemented to read and populate data for your BMS. (test_connection, get_settings & refresh_data)
These functions are called at different times.
There is a helper function at the bottem that you can use to write the commands and read your data. There are small differences in each comms protocol and this…