Need help with controlling ebike controller with esp8266 mini

leohkm

10 µW
Joined
Jan 24, 2025
Messages
5
Location
Est
Hello, I have idea to attach esp8266 mini to Rx wire of controller to fast send some commands like set speed limit to controller without getting into settings in display.

Display model is King Meter k5242 and controller is jytcon YCSY.

I found 2 wires that are Tx / Rx, but could not determine which one is display's Tx. Tried to attach them to Rx pin on esp8266 and log data by Serial peeking and sending it via wifi. Received data did not make any sense.
So maybe your help could guide me how to correctly capture speed limit codes to send them manually anytime.
 
you might want to look at the various opensource controller/display threads here on ES. i would guess that they have a lot of useful info for you, if not the direct answers to what you need.
 
Display model is King Meter k5242 and controller is jytcon YCSY.
JYTCon + Kingmeter will use the 5S protocol at 9600 BAUD. The 5s protocol is well known and implemented in several open source projects. But normally on controller side, to emulate the display side, you have to rebuild the right display commands from the controllers Rx processing algorithm....
The Rx wire on controller side is yellow, normally, the Tx wire is green. The pinout of the Higo or JST Display connector can be found in the display manual of the KM5S e.g.

regards
stancecoke
 
Last edited:
The Rx wire on controller side is yellow, normally, the Tx wire is green. The pinout of the Higo or JST Display connector can be found in the display manual of the KM5S e.g.
I have 10pin wire from controller, it has green and yellow, do you mean this wire colors?
 
Also if I send some wrong command to controller will it brake something or just be ignored?
 
I have 10pin wire from controller
Normally you have a 1to4 or 1to5 cable, that splits the 10 pins to the single connectors for the display, brake lever, throttle, headlight near the handlebar.


Also if I send some wrong command to controller will it brake something or just be ignored?
They will be ignored, there is a checksum, that has to be valid for processing the message.

regards
stancecoke
 
you have to rebuild the right display commands from the controllers Rx processing algorithm....
Hello again
Im trying to capture display commands by connecting esp8266 between display and controller.
How do you determine command start and end?
Also not quite understand how to adapt that algorithm from github.

Currently getting these hex value sequences using 0 as command end
Code:
0
1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
32 c c8 1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
32 c c8 1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
32 c c8 1 14 1 2 3 88 1 1 4 3 2 0

and some changed lines after pas level change from 1 to 2 and back
Code:
ff 16 1 86 0
32 c c8 1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
32 c c8 1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
32 c c8 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 6 88 1 1 4 3 2 0
ff 16 1 86 0
32 c cd 1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
32 c c8 1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
32 c c8 1 14 1 2 3 88 1 1 4 3 2 0
ff 16 1 86 0
 
Back
Top