Starter Motor Control

What is starter motor? Why is it required? How  it works?

Starter Motor is a DC motor used to start the vehicle.
Starter motor is replacement to hand-crank in old 4 wheelers or alternate to kick start in 2 wheelers.
Generally referred as electric start, since electricity (battery) is used to start the engine.

Starter motor is connected to vehicle’s engine through the flywheel.
When connected to battery, starter motor will rotate the flywheel, and thereby initiating fuel injection and ignition to engine, and starts the vehicle.

Conventional Starter Circuit without ECU (motor connected to battery via key)

 

Starter Operation control by ECU (motor is connected only when key is turned and ECU allows crank)

 

Why controlling the starter motor operation?

  • Component Safety -Starter motor is a high current DC motor. Current through motor coil wounds goes up to 150Amps during starting (to rotate the heavy flywheel). So starter motor should not be ON for longer duration, to avoid heating and damage to motor.
    While engaging starter motor, we should make sure that drivetrain is disengaged from engine. This is to avoid whole mass of the vehicle coming onto starter motor and thereby further increasing the motor load.
  • Passenger / pedestrian safety – Cranking when vehicle is in gear will cause sudden movement of vehicle. This may result in front collision or may cause damage to road crossing pedestrian.
  • Vehicle safety - If the key is not authenticated, then start of the vehicle should not be possible.

What are the conditions to make sure while engaging the starter motor to engine?

  • Driver is cranking : Before engaging the starter, make sure that driver is cranking.
    Because, in some conditions like key circuit is shorted to battery, then start request will be present at ECU even without driver actually trying to start. This may cause un-intended vehicle movement, which may cause damage to vehicle in front or person crossing by.
  • Cranking Duration : Starter motor should not be ON for longer duration (mfr specified max.time)However, during cold temperatures starting the engine will take longer than normal time. So, duration of cranking should be temperature based.
  • Disengaged Drivetrain : Starter motor should not be ON when drivetrain is engaged to engine.So, either Gearbox should be in Neutral or Clutch should be pressed while starting the vehicle. In AT, gearbox should be in Neutral and Brake should be pressed while starting.
  • Engine rpm : While engaging the starter motor to engine, make sure that engine is not running already. This will damage the teeth of the starter motor. Also, once the engine speed crosses idle rpm, then starter motor should be disengaged.
  • Battery Voltage : Engaging the starter motor to battery at battery voltage lower than startable threshold, then it will further discharge the battery without any useful work. So starter motor should not be engaged at low battery (ex. less than 8V-9V in cars)

Other features possible by controlled start :

Apart from above mentioned controls, some of the comfort features are also possible like,
  • Push Button Start : Keep the key in your pocket only. Just press a button on dashboard to start the vehicle. Button will hold the start request from driver until successful start is done.
  • Engine Start-Stop : Engine start-stop functionality is possible by having control over starter relay by ECU. When the vehicle is in stop condition in traffics, just by pressing clutch or brake or accelerator pedal ECU will send start request and vehicle will start automatically without driver actually cranking.
  • Request by other ECUs : Start can be done after recognizing start request from other ECUs like Body Control Module.Features like push button start are normally processed by BCM and will be sent to ECU over CAN.
  • Immobilizer : If key authentication is failed, then ECU will not allow the start.
  • Emergency Start : Even though starter is not allowed to engage if the drivetrain in engaged to engine in normal driving conditions, if driver is panicked and trying to start the vehicle, then using specific patterns of crank, brake, clutch and accelerator pedal emergency situation is detected and start is allowed overriding powertrain conditions or starter time durations or battery conditions.
  • Start request by ECB (Engine Compartment Button) : In commercial vehicles engines are placed under head of the vehicle. While doing engine inspection or repair head is tilted to access engine. A start button is provided in the engine compartment for easier service.
  • Motor warranty calculation : Starter motors come with warranty for certain number of starts (150,000 to 300,000 starts). Counting the number of successful starts happened is possible connecting through ECU.

   Some other possibilities :

  • Disable via vehicle loan/insurance provider : If the driver has not paid the loan amount or timely insurance premium, then providing companies can disable the start of the vehicle remotely, after few initial warnings/remainders. Of course, vehicle should be fitted with communication system.

Controller Area Network (CAN)

Introduction


CAN is a serial communication protocol.

CAN is used in vehicles to communicate between different ECUs (Electronic Control Units) in the vehicle.

For example, 
  • If the vehicle door is open when the driver is trying to start the vehicle, Body Control Unit tells Engine Control Unit "Hey, door is open, do not start the vehicle". It sends the status of the door through CAN to engine control unit. Now, engine control unit understands that door is open and it prevents the start, to avoid unintentional start for passenger safety.
  • If an accident happen, airbag control unit opens the airbag and also tells the engine control unit to cut-off the fuel supply, to avoid fire risk.
  • If the road is icy or muddy and if tire is slipping, drag control module tells engine control module to reduce the torque, to increase the road grip.

CAN is basically invented to reduce the wiring harness in the vehicle with the growing number of electronics used and inter-communication between them in the vehicle. With reduced wiring harness, cost and complexity both are reduced.

This was the wiring required without CAN. (In-fact much much more wires than in picture)
 


With CAN, only 2 wires are enough to each ECU.


A typical car uses 4-5 different ECUs - engine control, transmission control, airbag unit, anti-lock braking system (ABS), body control, infotainment system etc.


Modern day cars contain up to 80 different ECUs, including telematics, brake control, suspension control, sun-roof control, battery management, speed control, climate control, seat control etc.




Layered structure of a CAN node / protocol

 



Physical Layer

Physical layer consists of twisted pair wires, connected between different ECUs. Each ECU is considered as a "Node".


  • Physical layer is responsible for converting digital signals (0 or 1) into electrical voltage levels to transmit on the bus.
  • It also converts analog voltage levels received from bus to digital signal, for further processing in transfer layer.



Transfer Layer & Object Layer

  • Transfer layer does message framing - i.e it constructs message from the bits received.
  • Does arbitration - Resolves conflicts between two messages trying to transmit on the bus at the same time.
  • Message validation - calculates CRC for the received message, and compares with the received CRC. If there is any difference, it raises error flag.
  • Acknowledgment - Indicates whether a message transmission or reception is successful or not.
  • Message filtering - Filters the unwanted messages for the node.
                                  Message Filtering

Application Layer

Application layer or software uses the received messages to take appropriate action in its functions, or it does frequently transmits messages which are required for other ECUs.


The CAN Protocol


There are 4 types of CAN frames.
  1. Data Frame
  2. Remote Frame
  3. Error Frame
  4. Overload Frame

1. DATA FRAME

Data frame is used to transmit the 'data' on the CAN bus.
Below is the structure of the data frame.


SOF - 1 bit
  • A dominant bit (Bit 0) in the field marks the start of frame. 
  • It is also used to synchronize the nodes on the bus.
  • Nodes wishing to transmit message are allowed to send SOF only during bus idle time.
  • Bus idle time is part of IFS (inter frame space(3bits) - time gap between 2 CAN frames on the bus).
Bus idle time is shown below.

Arbitration field - 11-bit or 29-bit
  • Contains message ID to determine which node has access to the bus (message prioritization)
  • If two or more nodes are trying to access the bus at the same time, the conflict will be resolved using the message ID. 
  • Identifiers with small number will win the bus arbitration and transmits the message on the bus.
  • First 7 bits of any message ID should not be all 1.
RTR - 1 bit - If any node in the network wants some message which is transmitted by other node, it will send a Remote Transmission Request, with the message ID which is same as message required by it.
  • RTR field in Remote Frames is 1.
  • RTR field in Data Frames is 0.
IDE - 1 bit - Identifier Extension. It is used to specify the frame format, 0 is for standard frame (11-bit message id) and 1 for extended frame (29-bit message id).
Control Field - 6 bits (1 bit r0 + 1 bit r1 + 4 bits DLC)
  • r0, r1 - Reserved bits.  Kept for future use.
  • DLC - 4 bits - Data Length Code - Indicates number of data bytes present in Data Field. Valid sizes are 0 to 8.
Data Field - 8 bytes - Up to 64 bits of application data can be transmitted in a single CAN frame.
CRC Field - 16 bits (15 bits + 1 bit delimiter) Cyclic Redundancy Check. 
  • It contains the checksum of the preceding application data. 
  • Used for error detection.
  • 1 bit CRC delimiter.

ACK field- 2 bits (1 bit acknowledgment + 1 bit delimiter) - 
  • Acknowledgement field contains ACK slot and ACK delimiter.
  • Transmitting message contains ACK bit = 1. 
  • If the data is received correctly by receivers, they will reply by sending 0 during ACK slot (time during which ACK should be sent)



EOF - 7 recessive bits (1) - Indicates the end of frame.

IFS - 3 recessive bits - Inter Frame Space


  • Contains intermission and bus-idle.
  • If the transmitted message is destroyed due to error flags raised by receivers, then suspended message will be re-transmitted during this time.
  • During INTERMISSION no node is allowed to start transmission.
  • During bus-idle time, nodes are allowed to send SOF and thereby getting the bus.

2. REMOTE FRAME

  • Remote frame is exactly same as data frame except it does not contain data field.
  • A node acting as a RECEIVER for certain data can initiate the transmission of the respective data by its source node by sending a REMOTE FRAME.
  • RTR bit of REMOTE FRAMEs is ’recessive’.
  • DLC can be any value between 0 to 8.
  • The polarity of the RTR bit indicates whether a transmitted frame is a DATA FRAME (RTR bit ’dominant’) or a REMOTE FRAME (RTR bit ’recessive’).

3. ERROR FRAME

The ERROR FRAME consists of two different fields. 
  • The first field is given by the superposition of ERROR FLAGs contributed from different nodes. 
  • The second field is the ERROR DELIMITER.

ERROR FLAG
There are 2 forms of an ERROR FLAG.
  • ACTIVE ERROR FLAG
  • PASSIVE ERROR FLAG - Raised by Error Passive nodes -
An 'error active' node detecting an error condition signals this by transmission of an ACTIVE ERROR FLAG, consisting of six consecutive 'dominant' bits. This violates the law of bit stuffing. As a consequence, all other nodes detect an error condition and on their part start transmission of an ERROR FLAG. So the sequence of 'dominant' bits which actually can be monitored on the bus results from a superposition of different ERROR FLAGs transmitted by individual nodes.

An 'error passive' node detecting an error condition tries to signal this by transmission of a PASSIVE ERROR FLAG, consisting of six consecutive 'recessive' bits (unless it is overwritten by dominant bits from other nodes). This makes error passive node can not destroy the message on the bus, but it can raise error flag.

ERROR DELIMITER
The ERROR DELIMITER consists of eight 'recessive' bits.

After transmission of an ERROR FLAG each node sends 'recessive' bits and monitors the bus until it detects a 'recessive' bit. Afterwards it starts transmitting seven more 'recessive' bits.

4. OVERLOAD FRAME

There are two kinds of OVERLOAD conditions, which both lead to the transmission of an OVERLOAD FLAG.
  1. The internal conditions of a receiver, which requires a delay of the next DATA FRAME or REMOTE FRAME.
  2. Detection of a 'dominant' bit during INTERMISSION.
It is same as error frame, consisting of Overload Flag & Delimiter.


Message Validation

Message is valid for transmitter if there is no error until the end of END-OF-FRAME.
If message is corrupted, then it will be retransmitted automatically once the bus is idle. Once again bus arbitration happens.

Message is valid for receivers if there is no error until last but one bit of EOF.

Error Handling

Error Detection

5 different errors can be detected.

1. BIT ERROR
During transmission of message, node that is sending a bit on the bus also monitors the bus. Bit error is reported when the bit value that is monitored is different from the bit value that is sent.

2. STUFF ERROR
If there are 6 consecutive bits of same polarity is detected in the data field, then stuff error is reported.

3. CRC ERROR -
If CRC caluculated by receiver, and that is sent by trasnsmitter are different, then CRC error is reported.

4. ACK ERROR -
ACK error should be detected by transmitter.
If dominant bit is not available on bus during acknowledgement slot, then ACK error is reported.

5. FORM ERROR -
When a fixed-form bit field contains one or more illegal bits, then form error is reported.

Error Signalling

  • A node detecting an error condition signals this by transmitting an ERROR FLAG.
  • Whenever a BIT ERROR, a STUFF ERROR, a FORM ERROR or an ACKNOWLEDGMENT ERROR is detected by any station, transmission of an ERROR FLAG is started at the respective node at the next bit.
  • Whenever a CRC ERROR is detected, transmission of an ERROR FLAG starts at the bit following the ACK DELIMITER.

Fault Confinement

For fault confinement, two error counters are implemented in each node.
1. Transmit Error Count (TEC) - Number of consecutive messages transmitted incorrectly.
2. Receive Error Count (REC) - Number of consecutive messages received incorrectly.

A CAN node may be in one of the  below 3 states -



  • Error Active - Normal operating mode. Node can transmit message or can receive message or can raise Active Error Flag.
  • Error Passive - For a node, if TEC or REC is more than 127, then node is error passive. Node can take part in bus communication. i.e can transmit or receive message. But can not raise Active Error Flag. Instead, it raises Passive Error Flag, containing 6 consecutive RECESSIVE bits. Error passive node can become error active node when both TEC and REC are less than 128.
  • Bus-off - For a node, if TEC is more than 255, then node is bus-off. A node which is 'bus-off'  is permitted to become 'error active' with its error counters both set to 0 after 128 occurrence of 11 consecutive ’recessive’ bits have been monitored on the bus. 

Bit Timing

A CAN Seminar From ESD Electronics -



J1939 Protocol with 29-bit CAN id

 

Questions

  1. What is CAN ?
  2. Why CAN ? Why not use Ethernet or any other communication protocols ?
  3. How CAN works in physical ? Explain Physical Layer of CAN.
  4. What is the Difference between Message based protocol and Address based protocol ?
  5. What are the functions of CAN transceiver chip ?
  6. Why CAN has 120 ohm resistance at each end ?
  7. What is the maximum speed of CAN network ?
  8. How many nodes can be present in a CAN network ?
  9. What are different standard baud rates used for CAN communication ?
  10. Difference between Standard CAN and Extended CAN ?
  11. Explain CAN frame.
  12. What are the different types of CAN frames ?
  13. How much data can be transmitted in a single CAN frame ?
  14. What if I want to transmit more than 8 bytes of data ?
  15. What is the functionality of Data Link Layer in CAN ?
  16. What is the digital logic used in CAN message transmission ? (Wired AND logic)
  17. What is CAN arbitration ? Why arbitration is required ? How it works ?
  18. Why CRC is required ?
  19. Why Acknowledgement field is require ?
  20. Why is Acknowledgement slot ? What is its significance ?
  21. What is intermission field ? Why is it required ?
  22. What are the different types of errors that might be detected ?
  23. What happens when a receiver detects error in the transmitted message?
  24. Explain Error Frame.
  25. What are transmit and receive error counters ?
  26. Error Active node Vs Error Passive node ?
  27. What is bus-off condition ? When it happens ?
  28. How to recover from bus-off condition ?
  29. What is bit stuffing ? Why it is required ?
  30. How synchronization between different nodes happens in the CAN network ?
  31. Hard synchronization Vs Soft synchronization ?
  32. What are different segments in a bit ? Explain bit timing in CAN.
  33. What happens if two nodes send the message with same ID at the same time?
  34. What happens if until end of arbitration two nodes have same address ?
  35. What if a higher priority message is continuously sent on bus ? What happens to lower priority messages?
  36. What happens if a node is shorted to Ground always sending 0 on bus ?
  37. What happens if only transmitter is there in the network ?













* All image sources - Google.com