ECUs Emergency

From ConceptCar
Revision as of 12:41, 21 April 2010 by Stefan (Talk | contribs)

Jump to: navigation, search

The Emergency Break Board gives a chance to remote stop the car. It is mostly independent from the other parts. Also its electric circuit is not connected to the main power supply system, so it will still work, when the other systems don't work any more. The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.

Usage

Pushing any of the 3 Buttons on the emergency remote control sets the car in a stop mode. Changes on the main remote control do not affect the cars state. Only if all 3 Buttons are pushed on the emergency remote control, the car will leave the stop mode and reset to running mode. At

How the Emergency Board works

The Emergency Board sits between the acceleration and the steering control boards, and the active parts (motor and steering). If an emergency signal arrives, the signals that come from the control boards are being replaced with stop signals generated from the emergency board itself. The replacement is done by simply switching a multiplexer.

The signal transmitting part works with a SHR7 decoder board and a fully assembled transmitter unit. The decoder board receives the signal from the transmitter and generates a code that contains information on the sending device and on which buttons on the 3-button-control were pushed.

Electrical Information

Emergency Board

SHR7 Decoder/Transmitter

Software Component

The main task of the software running on the Atmega88 is to decode the signals from the shr7 decoder and decide whether to switch the running/stop state.

The hole process is split into three main parts:

  • Analyze signals arriving from the shr7 decoder
  • Prove signals arrive in correct order and decode signals
  • Switch the state of the car (run - stop)
Analyze signals arriving from the shr7 decoder

The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:

Shr7 decoder timings.png

Synchronization (S)
The signal is lead by a synchronization preamble. Before each signal, there is a high-signal period of at least two long signal-time-periods.
-, +, 0
Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.

The decoding is done by a interrupt service routine, that is called every time, a change of the incoming signal from the shr7 decoder occurs. The service routine measures the time between each call. After measuring enough times (9 or 4), the routine can decide whether a synchronization, a plus, a minus or a zero character has been sent. The received characters are then written to the State Machine input tape (discussed later on).


Prove correct order and validity of received characters through State Machine and decode

Each packet from the shr7 decoder can be split up into 5 parts:

  • One character Start Synchronization
  • Nine characters Identification of the transmitter (8 chars ID + 1 syn)
  • Four characters Middle Synchronization
  • Three characters each representing the
  • Two characters end synchronization

These parts can be represented by states in a state machine:

Shr7 decoder sm.png


Switch the cars running state

In SM state "CHANGE_CAR_STATE" we decide whether to start or stop the car, depending on the number of buttons pushed at the time and on the current state of the car (you don't need to set the car stop mode multiple times). If switching from run to stop mode, the incoming control signal from the control boards, are being replaced by the boards own stop signal (corresponding PWM signal described in earlier section). Therefore the pin, connected to the control signal MUX is set to Vcc (1). If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).