MCPInstall
VCU_BHL_MCP2518FD logo

VCU_BHL_MCP2518FD

by AkeJakkrapong 2 stars AkeJakkrapong/VCU_BHL_MCP2518FD

VCUBHL(ESP32+MCP2518FD)+E650 Dashboard

READMEmain

VCU_BHL Board Communication Protocol

  • Pinout (ESP32)
    • 02 : LED Built-in
    • 05 : CS (SPI)
    • 25 : Digital Input1
    • 25 : Digital Input2
    • 27 : Relay1
    • 04 : Relay2
    • 22 : Buzzer
    • 32 : Analog Input1
    • 33 : Analog Input2
    • 34 : Acceletor Input
    • 13 : PWM1
    • 14 : PWM2
  • baud rate 500kbps
  • Intel format
  • Extended

data input

  • ID: 0x1500A150
ByteDescription
0BIT-4 : Relay1 , BIT-0 : Relay2
1error code
2Freq PWM1 (LOW Byte)
3Freq PWM1 HIGH Byte
4Duty PWM1
5Freq PWM2 LOW Byte
6Freq PWM2 HIGH Byte
7Duty PWM2

data output

  • ID: 0x150050A1
ByteDescription
0BIT-4 : Relay1 , BIT-0 : Relay2
1error code
2Freq PWM1 (LOW Byte)
3Freq PWM1 HIGH Byte
4Duty PWM1
5Freq PWM2 LOW Byte
6Freq PWM2 HIGH Byte
7Duty PWM2

  • ID: 0x150050A2
ByteDescription
0BIT-4 : D_INPUT1 , BIT-0 : D_INPUT2
1error code
2Volt Acceletor (LOW Byte)
3Volt Acceletor (HIGH Byte)
4Volt AnalogInput1 (LOW Byte)
5Volt AnalogInput1 (HIGH Byte)
6Volt AnalogInput2 (LOW Byte)
7Volt AnalogInput2 (HIGH Byte)

Function

  • control Relay
Relay(channel, state);
  • Read Voltage
readVolt(analogPin);
  • PWM
pwm(channel, frequency, duty_cycle);
  • Error code
error_code = 0;

E650 Dashboard Communication Protocol

  • Pinout
    • A03 : The seat belt is not fastened with the indication (12V-)
    • A08 : CAN-H
    • A09 : CAN-L
    • A10 : GND
    • A11 : BATT(12V+)
    • A12 : TGN (12V+)
    • A20 : Braking fault indication (12V-)
  • baud rate 500kbps
  • Motorola format
  • Standard

data input

  • ID: 0x101
ByteDescriptionOffsetresolutionUnit
0RPM (HIGH Byte)-15,0001rpm
1RPM (LOW Byte)
5Power%POWER
  • ID: 0x112
ByteDescription
6[BIT-3] --> Motor overheating indication
6[BIT-4] --> Motor fault indication
  • ID: 0x251
ByteDescriptionOffsetresolutionUnit
0Voltage gauge (HIGH Byte)0.01V
1Voltage gauge (LOW Byte)
2Current meter (HIGH Byte)-5000.1A
3Current meter (LOW Byte)
4Fuel gauge%
  • ID: 0x226
ByteDescriptionOffsetresolutionUnit
0[BIT-1] --> ABS indication
1Speed (HIGH Byte)0.05625km/h
2Speed (LOW Byte)
  • ID: 0x302
ByteDescription
0[BIT-4] ----------> Right turn
0[BIT-5] ----------> Left turn
0[BIT-7] ----------> Rear fog lights
1[BIT-4, 5, 6, 7] --> Door alarm indications
5[BIT-5] ----------> Position lights
5[BIT-7] ----------> High beam
  • ID: 0x390
ByteDescriptionOffsetresolutionUnit
3[BIT-6] --> System failure
4Range (HIGH Byte)km
5Range (LOW Byte)
  • ID: 0x3C0
ByteDescription
0[BIT-0] --> Run preparation (Ready)
1[BIT-0] --> Power reduction
5[BIT-7] --> Park brake
6rd gear --> (0x00:R, 0x01:N, 0x02:D, 0x03:S)
  • ID: 0x3C3
ByteDescription
3Charge status indicatoin --> ((0x10:Flashing, 0x20:Solid on)
5[BIT-0] -------------------> Charging cable
5[BIT-1] -------------------> Power battery failure
5[BIT-2] -------------------> Indication of insulation failure
5[BIT-3] -------------------> Battery cut-off
6[BIT-0] -------------------> Power battery heating indication
  • ID: 0x3C6
ByteDescription
0[BIT-0] --> EPS indications
  • ID: 0x5B3
ByteDescription
5Auxiliary battery charge indication (DCDC_Fault)--> 0x07:Light up
  • ID: 0x228
ByteDescription
0[BIT-2] --> Tire pressure monitoring status 1
0[BIT-3] --> Tire pressure monitoring status 2
  • ID: 0x345
ByteDescription
0[BIT-0] --> Tire pressure monitoring status 3
0[BIT-3] --> Tire pressure monitoring status 4

data input (Cycle 1000 ms)

  • ID: 0x623
ByteDescription
0Accrued miles (HIGH Byte)
1Accrued miles .......^..........
2Accrued miles (LOW Byte)
4[BIT-6] --> safety belt (0:Close, 1:Open)
4[BIT-7] --> Brake failure (0:Normal, 1:Fault)
  • ID: 0x624
ByteDescription
0Product code (HIGH Byte)
1Product code .......^..........
2Product code .......^..........
3Product code (LOW Byte)
4Hardware version (HIGH Byte)
5Hardware version (LOW Byte)
6Software version (HIGH Byte)
7Software version (LOW Byte)

Function

  • Gauge
set_E650_Dashboard_Gauge(Speed, RPM, Fuel, Voltage, Current, Range, Power);

  • Gear
set_E650_Dashboard_Gear(Gear('R', 'N', 'D', 'S'), Gear_effective_position, Run_Preparation);

  • Turn Signal
set_E650_Dashboard_TurnSignal(turnLeft, turnRight);

  • Light
set_E650_Dashboard_Light(position_light, high_beam, rear_fog);

  • Door alarm
set_E650_Dashboard_Door_alarm(Door1, Door2, Door3, Door4);

  • Alarm
set_E650_Dashboard_Alarm(Park brake, ESP, Power reduction, Battery cut-off, ABS, Charging cable, Charge_status(0:Off, 1:Flashing, 2:Solid On));

  • Failure
set_E650_Dashboard_Failure(System failure, Battery failure, Motor_fault, Motor_overheating, Auxiliary battery, Insulation failure);

  • Tire_pressure
set_E650_Dashboard_Tire_pressure(Wheel1, Wheel2, Wheel3, Wheel4);

  • Send data
send_E650_Dashboard();

Original source

​ This library is possible thanks to original Longan Labs CAN FD Library library. Thank you, Longan Labs.

License

MIT

Overview

Repositories