LCD Display / Thumb Throttle to Controller Wiring

Lissajous

Finding my (electric) wheels
May 4, 2017
7
1
68
Australia
Hi,

Trying to understand the wiring and signals between throttle and controller. I have it working again but think I just got lucky.

First, some background. My son's e-scooter was running rough recently after taking it through flood waters. Probably 100+ mm deep. Water entry seemed obvious but when he opened the battery / controller compartment it was bone dry and well sealed.

The throttle was less well sealed so he bought one that looked the same. Meant for a Speedway 3 scooter. Then his scooter supplier (Lunar Cycle in the US, selling a re-badged scooter from NTE in China) sent him a freebie throttle. The throttles all look the same other than the Speedway one having a Speedway label on the front and a bonus USB phone charging port on the rear. Sheer luxury.

None of these solved his problem so he called me in as his standby electrical engineer. I probed around with a CRO and meter. Things were definitely rough and intermittent. Mostly, his front motor would run but the rear motor was reluctant to kick in. Gradually, things degraded until neither would start. I brought it back to my workshop.

This is where it got interesting. It was clearly a controller issue and there seemed to be a dead CPU in one of the two controllers. Both controllers are built on a common PCB that seems fairly well documented for the KU63. These are higher spec'd variants running 52V and are 25A rated. The throttle has a 6-wire interface. and I sussed out 4 of those. There are 2 more I could not identify but they both carry bursts of 0/5V digital data. I was able to establish that one (a yellow wire) came from the TxD pad on the PCB of the rear controller and transmitted data to the throttle unit. The other (a blue wire) goes to the RxD pad on the PCBs of both controllers. Similar but different data bursts and this time heading south from the throttle. The waveform on this line was distorted with a weird mid-voltage 3rd state occasionally. I was able to isolate this to a loading by the rear wheel CPU.

At this point I bought a couple of new controllers from Passion Gadgets in Singapore. Their "SPEEDWAY3 52V 25A CONTROLLER". It looked identical to the original and the Speedway 3 moniker augured well. And so it was. I got lucky. Dropped them in and we're all good with 2 spare throttles to boot.

This leads me to the main reason for my post. I am curious. Hey, I'm a design engineer. I cannot find any info on what those two signals are. I assume the yellow wire includes speed data. But a couple of hundred bits in each data burst? And the blue wire has a similar volume of data. What is that for? I'd love to hear people's thoughts.

FWIW, none of the FET switches had failed short which is the usual failure mode. I ordered some replacements and will look at the dead controllers in due course. I don't hold much hope for the rear controller where I assume the CPU is dead. But why did it die? Only thing I can think of is the long wires from throttle to controllers go directly to unprotected CPU pins. So they are very exposed to any transients. Not even a buffer chip. Made to a price. Maybe I'll tack some Tranzorbs onto the PCBs.

Sorry for the lengthy post. Happy to hear people's thoughts or to help anyone else with the stuff I have learnt in this project.

Happy scooting,
John
 
D

Deleted member 4366

Guest
Dead controller can hapen when you get a short on the 5v somewher (throttle maybe) and it wipes out the 5v regulator.

Without seeing what you have, the rest is difficult to comment on, but a normal e-bike has a LCD control panel that displays the speed. These displays have their own CPUs that communicate with the controller's cpu -peed signal, pedal assist level, settings, power display, diagnostic codes, etc.
 
  • Informative
Reactions: LeighPing

Lissajous

Finding my (electric) wheels
May 4, 2017
7
1
68
Australia
Thanks Dave,

Here are a couple of stock pics of the hardware. I'll snap a shot of the wiring when I get to the workshop. BTW, do you recognize that JP logo on the controller? Looks like 3 circles in the middle arranged to represent phase wires. I'd like to track them down but 2 letters is pretty cryptic even for Google!Throttle.jpg Controller.jpg
 
D

Deleted member 4366

Guest
That's basically the same as an electric bike. They all work more or less the same. There's a cpu in the LCD. It's powered directly from the battery from a branch inside the controller. There's a power switch on or near it that connects that battery voltage to the LCD and latches it to a return wire that powers the controller's cpu and sensors. In both devices, the battery voltage is immediately cut down and regulated to 5v.

The LCD has a minimum of 5 wires:

Battery voltage supply
Ground
Switched battery voltage back to the controller
Tx
Rx

The throttle works independently with three wires:

5v
Ground
Signal

There's also wires from the brake sensors which can be 2-wires (reed switch) or 3-wires (hall switch).

Sometimes you get extra wires for lights and special functions
 

Lissajous

Finding my (electric) wheels
May 4, 2017
7
1
68
Australia
Thanks. You have confirmed my thinking. A scooter is little different to an e-bike, electrically. This one is a little different inasmuch as their is no +5V wire but there is an analogue throttle line (I measured 0.8 to 3.6 V). The 6 wires from right to left in the photo are:

Red +52V (battery)
Pink +52V (switched battery)
Black 0V (ground)
Green Throttle (analogue)
Blue Data (from throttle)
Yellow Data (to throttle)

Within the throttle is a SMPS chip and inductor to create the local 5V. The throttle signal goes to the SD pad in the "KU63 alike" controller where an Eco/Turbo switch is connected between the XS pad and ground to scale the maximum throttle down as a speed limiter. Pretty crude. As a side-effect it increases the dead range at the low end. I was unsure whether the analogue throttle data was massaged by the throttle CPU. From a design point of view, that would be bad as it would degrade the SNR on the throttle wire. Turns out this is not the case. I measured the analogue throttle range with P8=100% (full throttle available) and P8=5% (very little throttle available). The result was an analogue range from 0.8-3.6 Volts in both cases. This implies the P8 speed limiting may be set in the throttle CPU but is actually applied by the controller's CPU. And now I know why those data lines are needed. The blue one carries P8 settings and the like down to the controller RxD pad while the yellow one comes from the controller TxD pad and includes motor speed info. The throttle CPU then uses its local settings for wheel diameter and magnet count to produce speed and distance displays.

Yes, I am gradually getting my mind around the system aspects. Being the squirrel type engineer, my next question is about the data format in those bursts on the TxD and RxD lines. I can't hoard too much info. Besides, I might like to create a custom throttle. Maybe an Arduino based one? Or a bench test-bed. Has anyone looked at the data format? These days I'm retired and don't have access to a logic analyzer to capture that data so it's a slow slog with a digital oscilloscope and manual decoding if I want to pursue that further.

Many thanks Dave for your help on this!

ThrotRear.jpg
 
D

Deleted member 4366

Guest
That's exactly the same as an E-bike. The throttle is a hall sensor. It has a 5v supply and analogue output of normally between around 1v and 4v depending on the position of the magnet.

All power control and speed control is done by the controller's cpu. You can make settings for them in the LCD control panel, which are translated into data instructions sent down the tx and rx data wires to the controller. The data is normally UART.
 
Last edited by a moderator:

Lissajous

Finding my (electric) wheels
May 4, 2017
7
1
68
Australia
Yes. That's how I concluded it worked. I was just a little mystified that on first look the data did not look to be framed as I expected from a UART as I couldn't see the regular stop / start bit transition although I could see it was a regular bit rate. Thought they may have rolled their own line protocol. Easy to do when they are not using a dedicated UART chip or port.

At the time I was looking for why the scooter wasn't working and the data framing wasn't of prime interest to me. Having gotten the scooter going (with two new controllers) I'm back looking out of curiosity. I won't get a chance to be back to the bench for a few days but I will look more closely for sure.
 

Lissajous

Finding my (electric) wheels
May 4, 2017
7
1
68
Australia
Ok, it took a while but I did get back to looking at that UART data. It's all binary and I presently lack a pressing need to tease it out further. However, knowing that somebody else on this planet will have the same bent as myself, I should summarize what I found here.

All data is at 1200bps in the usual serial format (1 start, 8 data, no parity and one stop bit). It is at TTL levels (0, +5V logic), LSB first and non-inverted. After studying the waveform with a CRO I programmed an Arduino Mega to capture the data.

Data in both directions is assembled into 15-byte frames. These have different formats (obviously, they are for different purposes) and are sent at roughly the same frame repetition rate but not synchronously to each other. For the most part I didn't successfully decode the data. One exception was the throttle maximum set in P8 on the throttle. That is encoded in straight binary as the 8th byte of the frame from the throttle. A few 1-bit flags were also spotted. The frames from the controller must include speed info in some form but I didn't identify it. Both record formats did include an 8-bit packet ID where one byte simply counted from 0x00 to 0xFF.

If anyone has an application and desire to pursue this further, feel free to make contact. FWIW, I did contact the techs at Mini Motors in Singapore as they put the BLDC controller and throttle into their Speedway series. They said this sort of info was beyond their capabilities. Clearly they bought the controller & throttle as a matched pair from elsewhere. I didn't pursue that further as it was only going to end in me having to master Chinese. Hey, the CPU used in the controller only has a data sheet available in Chinese!
 

Lissajous

Finding my (electric) wheels
May 4, 2017
7
1
68
Australia
Thanks Dave,

There are doubtless some similarities but lots of differences too. Like record lengths and bit rates to start with. The two sets of hardware serve different purposes and have different parameters but moth seem to have a similar mind set to the design. Good to have the link you provided but I think it's time for me to close this scooter up and get it back to my son. It's his primary commute and I have other projects to move on too.

Thanks again for that link,
John
 

Advertisers