Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stock battery display ant bms #1

Open
katanabladesman opened this issue Sep 27, 2024 · 6 comments
Open

stock battery display ant bms #1

katanabladesman opened this issue Sep 27, 2024 · 6 comments

Comments

@katanabladesman
Copy link

Hello! Awesome work so far! I'm no programmer but I'm trying to understand and learn as I can. Can you give me some insight based on your work so far? My aim is to have the stock display on the battery connected to an aftermarket bms. I bought a pair of used batteries with dead bms. The bms I've seen says it can communicate over rs485. Is this dream possible (realistically) or should I let it go? Any insight is appreciated :) also any work you have done reverse engineering that display? Pinout or board info?

@patagonaa
Copy link
Owner

It's possible but not without programming. The ESC (motor controller), display and BMS share a single RS485 bus and the ESC reads the BMS data and then forwards it to the display.
Because the communication is custom, one would need a microcontroller with two RS485 in/outputs to translate between the Surron BMS protocol and aftermarket BMS protocol (microcontroller gets request from Surron ESC, translates and forwards it to the aftermarket BMS and responds to the ESC in Surron format). But reading/writing the data from the two RS485 buses would need to be programmed, I can't help with that I can only offer the Surron protocol documentation.

I don't have a pinout of the display connector but the pinout of the BMS connector is documented in the main readme (if you need the display pinout you could use a multimeter to see where the wires go).

The custom RS485 protocol (in case you hadn't found it yet) is documented in https://github.com/patagonaa/surron-light-bee/blob/main/bms_comm/README.md.

@katanabladesman
Copy link
Author

katanabladesman commented Sep 27, 2024

Thanks for the reply and thoughtful response. To clarify (I should have in the first place sorry) I am hoping to use the tiny display on the battery it's self not on the bike. My guess is that wasn't clear as I can't imagine the esc is required for that as it functions without being in the bike. I don't even have a surron bike haha, batteries are going to be part of a go kart build. Only thing surron will be the battery casing and cells. Any luck the tiny display will be easier process?

https://surron.com/products/battery-lcd-screen

I asked the bms supplier and it is TTL protocol over rs485. Thanks a million times in advance.

@patagonaa
Copy link
Owner

Ahh I see.
Contrary to what that that page says (at least in my case) the display is definitely an OLED and not an LCD. Also, as I don't see any chips on the replacement display PCB, I assume that it's directly driven by a microcontroller on the BMS board and almost definitely doesn't use RS485, but rather 5V or 3.3V SPI or I²C or something similar.
If you can get a model number of the OLED and figure out the pinout, you could probably use the board + mounting hardware as is, and use the connector on the pcb to hook it up to a microcontroller. If the model of the OLED is unknown, it's probably easier to just get some other off-the-shelf OLED display, hook it up using a breakout board or custom PCB and mount it using some 3D printed parts.

Either way, you'll need a microcontroller, figure out how to wire up the OLED to it and will have to do the programming to draw on the display and read the BMS data.

And at that point, effort-wise, it's probably not far off from getting a larger display, mounting it in the driver's view and building an entire tachometer that includes the BMS data 😅.

@katanabladesman
Copy link
Author

So I am a crazy person who likes stupid challenges. I managed to pull off the OLED from the plastic mount (heat to soften plastic and glue) and I could not find it online, though I may not konw where/how to look. The back of it says "1012557" and "06AN10" and the bottom corners of the front of the display says RIT253 and N10 [backwards for some reason].

I have a pro micro that I am trying to use. I think i found the ground and vcc pins but if you have the ability to double check for me that would be helpful just to eliminate that question. Then the next part is to find the correct rest of the pins.

Screenshot 2024-09-27 233638

@patagonaa
Copy link
Owner

patagonaa commented Sep 28, 2024

One of the pins on the connector will likely just be the button on the front (that turns the oled on originally).

I couldn't really find anything regarding the OLED itself, however the "SSD1306" and "SH1106" controllers are very common, maybe it's compatible with one of those.

Regarding the pins I can't really check, but if you still have the broken BMS board and it's not in too rough shape, you could measure which pins go to the microcontroller.
And if it's using I²C you could use an I²C scanner sketch for your Arduino to go through the pins and see if the display responds (though you'll probably need some pullup resistors and I'd put some low-value (like 100 ohm) resistors in series to not kill anything if you happen to touch something that isn't an input).

If it responds, you could try the Adafruit SSD1306 library to draw something on the display.

@katanabladesman
Copy link
Author

After you mentioned it I checked and the pin 4 is the button, hadn't thought of that. Unfortunately I can't check the bad bms as the kid I bought it from took it out.
This is definitely above my current level of skill. I'm going to unfortunately side line this project for now in favor of other ones. I'll come back here if I get further.

Thanks for your help!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants