Start sequence for OEM motor

Post Reply
marlinarnz
Posts: 10
Joined: Fri Dec 29, 2023 9:50 pm
Has thanked: 8 times
Been thanked: 1 time

Start sequence for OEM motor

Post by marlinarnz »

Dear community,

It's been a few years since I purchased a PMSM motor and controller from the Chinese OEM market. Back in 2019, knowledge on using scrapped parts wasn't as developed and the Tesla Model S drive units were too expensive. Since then, the motor is sitting here, and from time to time I try to make it run.

That didn't work so far, sadly, and I assume it's about the start sequence. Does anyone have an idea how MCU start sequences typically look like? I had the MCU CAN matrix checked at least four times for every signal read by the MCU also being sent somewhere on the bus. It is attached below. Also below, I marked in red the steps where the MCU does not react as I hoped.

Here is my test bench setup:
Devices:
  • VCU: ESP32 with CAN capabilities and all the logic
  • MCU: APEV528 motor controller, CAN matrix attached
  • BMS: emulated by Arduino with CAN board
  • ICU: hand brake tightened/released CAN message sent by BMS emulator
  • Observer: RasPie with CAN board
Setup:
  • Battery bank provides ~350V without “own will”
  • HV connection fused with 10A and with old heater element at HV+
  • Contactor and precharge circuit connect HV to MCU, controlled by VCU
  • All devices are connected to the CAN bus at 500kbps, same GND, terminated at MCU and observer
  • Observer runs a program to translate CAN messages into signal names and values
  • VCU reacts to key position (ACC, ON, START), gear lever (only P and D), throttle, brake
  • HV interlock line in and out at MCU is connected directly
DSC00080.JPG
DSC01512.JPG
On power-up (key position ACC):
  • VCU starts sending 0x101: throttle (0), brake (0), gear lever (P), work mode (torque), motor mode (standby), key position (ACC), connectors (open), status signals (all good), counter, checksum
  • BMS starts sending 0x1A0: precharge not finished; no error; rest zeros
  • ICU starts sending 0x431: park brake released; rest zeros
Event sequence:
event_sequence.PNG
MCU CAN matrix
APEV528 CAN MsgList_V3_Excerpt.xlsx
(358.57 KiB) Downloaded 25 times
I'm happy about any idea or hint. Sometimes it's the small things that matter (and sometimes I miss the obvious).
Thanks in advance!
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Start sequence for OEM motor

Post by arber333 »

What is the repetition frequency for your telegrams? Normaly i would expect "drive" and "alive" telegrams to work at 100ms intervals and "BMS" telegram to work at 500ms or so.

Do you have each byte declaration? I.E. byte0 value is start, byte1 and byte2 are voltage value in hex etc... Maybe you are showing incorrect values. What did inverter CAN manual say?


I took a look at your xls file and i see some details.

x105 is telegram for reporting values such as torque rpm and direction. It operates at 10ms interval.
motor RPM is reported in 2 bytes (0xFFFF) conversion is RPM = hex / 0.25
I am not sure which byte this is reportet on. Maybe you can rotate the shaft at known RPM and observe which byte is changing....

x101 telegram is command which is sent at 20ms interval. I assume byte distribution is top down, so VCU_TorqueReq is byte0.
But how are other bytes distributed?

Is it possible inverter requires CAN FD standard which is 64 byte CAN.
Normal CAN bus is 8 byte data... Maybe that is your problem....
https://www.csselectronics.com/pages/ca ... rate-intro
marlinarnz
Posts: 10
Joined: Fri Dec 29, 2023 9:50 pm
Has thanked: 8 times
Been thanked: 1 time

Re: Start sequence for OEM motor

Post by marlinarnz »

I haven't got any experience with CAN FD. Though, communication works in general and I think the CAN matrix makes sense. I can read the motor RPM while rotating the shaft, read the correct HV that the MCU reports, and I also see the errors popping up when I remove the MCU-motor LV cabling.

The only element I haven't implemented in my test setup is cooling. Has anyone heard of an MCU that requires coolant flow to switch on?

I could also hook up to those JTAG lines, but I wouldn't know how to read error flags or anything useful at all.
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Start sequence for OEM motor

Post by arber333 »

marlinarnz wrote: Mon Apr 22, 2024 10:19 pm I haven't got any experience with CAN FD. Though, communication works in general and I think the CAN matrix makes sense. I can read the motor RPM while rotating the shaft, read the correct HV that the MCU reports, and I also see the errors popping up when I remove the MCU-motor LV cabling.

The only element I haven't implemented in my test setup is cooling. Has anyone heard of an MCU that requires coolant flow to switch on?

I could also hook up to those JTAG lines, but I wouldn't know how to read error flags or anything useful at all.
Do you have photo of motor and inverter data plate so i can see if i can get any more info?
marlinarnz
Posts: 10
Joined: Fri Dec 29, 2023 9:50 pm
Has thanked: 8 times
Been thanked: 1 time

Re: Start sequence for OEM motor

Post by marlinarnz »

Thanks, your help is much appreciated!

This is the motor data plate:
motor_data_plate.jpg
And the inverter:
inverter_data_plate.jpg
Both have been manufactured by a small Chinese distributer, called Zhejiang Alpha Electrics, which doesn't exist anymore. The motor is labelled with "KCEC" on its back (hidden by three phase cables), but the fault diagnosis list I received for the inverter implies that the inverter had been programmed by Valeo for GAC (as attached). The motor and inverter model is called "APEV528. I also have a "manual" for the inverter, but it's so useless that I won't waste server capacity uploading it here.
Post Reply