Sgw32 / BMSCtl

ANT BMS (antBMS) control panel on C# with UART capability. I hacked protocol and reverse-engineered it.
MIT License
21 stars 5 forks source link

How to Connect UART to ANT BMS #1

Closed zaziki23 closed 3 years ago

zaziki23 commented 4 years ago

Hey,

I have a ANT BMS S16, but i have no Idea where i can Connect UART ?

Can you Help me please ?

Sgw32 commented 4 years ago

Hi,

Please post a photo of a PCB board with a bluetooth adapter so I can help and draw the connectons.

Best regards, Fedor.

zaziki23 commented 4 years ago

IMG_20191013_130707 Thanks for your help.

Sgw32 commented 4 years ago

Take a look at http://fab.cba.mit.edu/classes/863.15/doc/tutorials/programming/bluetooth/bluetooth40_en.pdf

You should solder pins to RX/TX instead of Bluetooth module. I had a slightly different module, but still изображение It should be that signals are on these contacts. You may not desolder these contacts from Bluetooth module, but you should send requests via your smartphone in this case. In this case you need only TX from MCU on BMS board, just connect it to your receiver. Otherwise you should send them via UART. For the connection to the PC I used cheap converters like CH340 from Aliexpress.

zaziki23 commented 4 years ago

So the two Pins in the left Side? Thats what i extract from the Datasheet.

I tried to get Data via Bluetooth but the BMS ist disconnecting every few Seconds If i Connect from Other device than my phone - which ist working fine.

Sgw32 commented 4 years ago

You should try to extract signals from RX pin and replicate them. This project only sends one command(a query for all data), but it may depend on hardware you use. I've used a slightly similar, more powerful BMS for 24S, but seems, they all have the same manufacturer. And, likely, the firmware.

zaziki23 commented 4 years ago

I have the command, they published the protocol. It is the same which you send. found also the exact board:

https://de.aliexpress.com/i/33041042106.html?spm=a2g0x.12057483.0.0.1dc06a0boam541

What do you think are the GPIO 12 and 13 for ?

Sgw32 commented 4 years ago

Most likely, they are not used. The pads are soldered on an opposite side to achieve a good mechanical connection.

ElecK77 commented 4 years ago

Hi Sgw32

I've got the 24S Ant BMS which I would like to integrate with the Sparkfun CAN485 (Arduino Pro Mini based board) and I am new at this.

I extracted the messages from the Rx UART pin. I managed to get messages using Realterm software. I am struggling to interpret it. My goal is to have an Arduino reader for ANTbms.

Any tips to guide me in the right direction? Thanks.

Sgw32 commented 4 years ago

Hi Sgw32

I've got the 24S Ant BMS which I would like to integrate with the Sparkfun CAN485 (Arduino Pro Mini based board) and I am new at this.

I extracted the messages from the Rx UART pin. I managed to get messages using Realterm software. I am struggling to interpret it. My goal is to have an Arduino reader for ANTbms.

Any tips to guide me in the right direction? Thanks.

I am sorry for a late reply :) According to C# code in repository you can read the state of BMS, also the protocol is described by the link listed before. Implementing this code on Arduino should not be a trouble, but you should connect it to UART channel of BMS.

ElecK77 commented 4 years ago

Thanks. Much appreciated.