<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://conceptcar.iese.de:80/ConceptCar1/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://conceptcar.iese.de:80/ConceptCar1/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stefan</id>
		<title>ConceptCar - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://conceptcar.iese.de:80/ConceptCar1/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stefan"/>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Special:Contributions/Stefan"/>
		<updated>2026-05-04T10:37:03Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.2</generator>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard</id>
		<title>ECUs implementing Sensorboards and Actorboard</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard"/>
				<updated>2010-04-28T14:41:52Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Plotting the logged Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.&lt;br /&gt;
&lt;br /&gt;
In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in the [[Electronic_System|Section Electronic_System]] in the Input and Output Processing levels of the Figure 1.3.&lt;br /&gt;
&lt;br /&gt;
==The AT90CAN128 board==&lt;br /&gt;
&lt;br /&gt;
The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].&lt;br /&gt;
&lt;br /&gt;
In the following, a table is presented for each ECU showing the CAN messages this ECU emits. In those tables, the &amp;quot;CAN-IDs&amp;quot; column presents the integer representing the ID of the message. Column &amp;quot;Semantics&amp;quot; describes the type (or meaning) of the message.  Column &amp;quot;Interval&amp;quot; describes the interval in which the message is sent. Finally, the column &amp;quot;Conversion&amp;quot; holds a formula that is used for converting the message content which is usually a float value to the integer data that is packed into the message.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Steering==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128. &lt;br /&gt;
&lt;br /&gt;
Table 1.2 presents the CAN messages for the Sensorboard steering.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.2: Sensorboard Steering&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00a || Wheel speed (ω) from rear left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x009 || Wheel speed (ω) from the front right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.&lt;br /&gt;
&lt;br /&gt;
Table 1.3 presents the CAN messages for the Sensorboard Throttle.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.3: Sensorboard Throttle&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x008 || Wheel speed (ω) from front left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00b || Wheel speed (ω) from the rear right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].&lt;br /&gt;
&lt;br /&gt;
Table 1.4 presents the CAN message for the Sensorboard Distance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.4: Sensorboard Distance&amp;#039;s CAN message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x030 || Distance (d) to the next obstacle up front. || 65ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_4_eq1.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration &amp;amp; Datalogging==&lt;br /&gt;
&lt;br /&gt;
This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components. [[Image:Inertialboard_sensors.png|right|frame|Sensors for acceleration and yaw rate. Arrows indicate positive values.]]&lt;br /&gt;
&lt;br /&gt;
It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.&lt;br /&gt;
&lt;br /&gt;
Atop of this, since revision 1.2, it features a 8x2 digits LCD display and a 8 Pin DIP switch, intended for selecting the currently displayed information. The display gets updated every 250ms.&lt;br /&gt;
&lt;br /&gt;
Due to a design failure in revision 1.2, the display is mounted at the bottom side of the sensor board. This will be corrected in the next revision.&lt;br /&gt;
&lt;br /&gt;
* If DIP switch 1 is &amp;quot;on&amp;quot;, the display shows the current longitudinal acceleration (acc_x).&lt;br /&gt;
* Else if DIP switch 2 is &amp;quot;on&amp;quot;, the display shows the current lateral acceleration (acc_y).&lt;br /&gt;
* Else if DIP switch 3 is &amp;quot;on&amp;quot;, the display shows the current yaw rate.&lt;br /&gt;
* Else if DIP switch 4 is &amp;quot;on&amp;quot;, the display shows the current supply voltage.&lt;br /&gt;
* Else if DIP switch 5 is &amp;quot;on&amp;quot;, the display shows the filename that the data is logged to (if SD card is present) and the total number of bytes that have been written to this file so far.&lt;br /&gt;
* Independent of the other switches, the DIP 8 switch selects the mode of the display. If it is set to &amp;quot;on&amp;quot;, the current raw value (as transferred over the CAN bus) is shown, if it is set to &amp;quot;off&amp;quot;, the display shows the value converted to its respective physical unit (m/s^2, °/s, V).&lt;br /&gt;
&lt;br /&gt;
Table 1.5 presents the CAN messages for the Sensorboard Acceleration &amp;amp; Datalogging.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.5: Sensorboard Acceleration&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x010 || Longitudinal Acceleration (a&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x011 || Lateral Acceleration (a&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x012 || Rotation (ω) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq3.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00d || Voltage (U) of the electrical system’s battery || 200ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq4.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Data Logging====&lt;br /&gt;
&lt;br /&gt;
The Sensorboard Acceleration &amp;amp; Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.&lt;br /&gt;
&lt;br /&gt;
;LED &amp;quot;LOGGER ON&amp;quot;&lt;br /&gt;
:When this LED is on, the SD card is present, has been detected and the file could be opened for writing.&lt;br /&gt;
;LED &amp;quot;LOGGER WRI&amp;quot;&lt;br /&gt;
:This LED blinks once each time a 512 Byte sector is dumped to the SD card. A good indicator if logging actually works. Every 8 sectors the file size is updated, resulting in an irregularity in the blinking. Thus, the filesize always is a multiple of 512 * 8 = 4096 Bytes. You can configure this number in the Makefile.&lt;br /&gt;
:The Write LED is turned on after the SD card has been initialized. If it stays on and the &amp;quot;LOGGER ON&amp;quot; LED stays off, the file system could not be initialized. Most likely this means that the SD card has the wrong format, but for some reasons even if the format is correct, filesystem initalization always fails on some cards.&lt;br /&gt;
&lt;br /&gt;
* File Naming Scheme&lt;br /&gt;
** The data is stored to a newly created file with the naming scheme LOG&amp;lt;nr&amp;gt;.CAN. The &amp;lt;nr&amp;gt; part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.&lt;br /&gt;
&lt;br /&gt;
* Requirements for the card&lt;br /&gt;
**The SD or MMC card must meet the following conditions:&lt;br /&gt;
*** A partition table exists.&lt;br /&gt;
*** The &amp;quot;DOS compatibility flag&amp;quot; must be set.&lt;br /&gt;
*** There is exactly one primary partition.&lt;br /&gt;
*** The partition&amp;#039;s type is &amp;quot;FAT16&amp;quot; (set partition code to 0x06 with fdisk).&lt;br /&gt;
*** The partition is formatted with FAT16, two fats.&lt;br /&gt;
&lt;br /&gt;
Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mkfs.vfat -F 16 /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
would create a valid FAT 16 partition.&lt;br /&gt;
&lt;br /&gt;
On a Windows XP system, formatting the card with FAT (not FAT32!) works.&lt;br /&gt;
&lt;br /&gt;
Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.&lt;br /&gt;
&lt;br /&gt;
* Log file format&lt;br /&gt;
** The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:&lt;br /&gt;
&lt;br /&gt;
  /----------------------------------------------------------\&lt;br /&gt;
  | Header | Timestamp | CAN ID  | Data Length |     Data    |&lt;br /&gt;
  |  0xca  |  4 Bytes  | 2 Bytes |    1 Byte   | 0 - 8 Bytes |&lt;br /&gt;
  \----------------------------------------------------------------------------------------/&lt;br /&gt;
&lt;br /&gt;
The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message&amp;#039;s id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.&lt;br /&gt;
&lt;br /&gt;
===== Plotting the logged Data =====&lt;br /&gt;
There are several ways to evaluate the logged data graphically. Here is how to do it with Gnuplot, that is available for all common operating systems. The logged Data has the following format: TIMESTAMP:CAN-ID:VALUE.&lt;br /&gt;
In Gnuplot type:&lt;br /&gt;
  &lt;br /&gt;
  # &amp;lt;- Comment, you do not have to write, what comes after #&lt;br /&gt;
  file = &amp;quot;C:\\the\\directory\\LOGxxxx.txt&amp;quot;     # \ has to be escaped with \\&lt;br /&gt;
  show = 10&lt;br /&gt;
  set datafile separator &amp;#039;:&amp;#039;&lt;br /&gt;
  plot file using 1:($2 == show ? $3 : 1/0)&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First we simply save the path to our Log-file to &amp;#039;file&amp;#039;. After that, we save a constant to &amp;#039;show&amp;#039; that says us, which channel we want to plot. The third line says Gnuplot, what separates each data information from another. In our log files, separator is &amp;#039;:&amp;#039;.&lt;br /&gt;
The last line does the plotting: Define x-Axes equals column 1 of our Log file; y-Axes is column 3, but only if column 2 of the same row equals our defined &amp;#039;show&amp;#039;-variable, otherwise y is a number Gnuplot isn&amp;#039;t able to plot.&lt;br /&gt;
&lt;br /&gt;
This will throw a window onto the screen.&lt;br /&gt;
&lt;br /&gt;
If you want to plot more data into one single screen, you can do this by simply typing&lt;br /&gt;
&lt;br /&gt;
  set multiplot&lt;br /&gt;
  unset multiplot&lt;br /&gt;
&lt;br /&gt;
before the first plot and after the last plot.&lt;br /&gt;
&lt;br /&gt;
And here follows a completely self-running version. Simply edit the lines marked and run this script, save it to a text-file and run it with &amp;#039;&amp;#039;&amp;#039;gnuplot filename&amp;#039;&amp;#039;&amp;#039; from any unix-shell. You can also handle files, logged from MiniMon. Simply switch minimon to 1; if normal file, to 0. Here comes the script:&lt;br /&gt;
&lt;br /&gt;
  ######## Type your configuration here ########&lt;br /&gt;
  canid = 8&lt;br /&gt;
  infile = &amp;#039;MiniMonLOG.csv&amp;#039;&lt;br /&gt;
  outfile = &amp;quot;ploop.png&amp;quot;&lt;br /&gt;
  minimon = 1&lt;br /&gt;
  ##############################################&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  # Touch this only if you know, what you are doing!&lt;br /&gt;
  &lt;br /&gt;
  #this line prepares the logfiles&lt;br /&gt;
  #note: theres a difference between data logged on the car and data logged from MiniMon&lt;br /&gt;
  if(minimon) i_string = sprintf(&amp;quot;&amp;lt; gawk -F\\; &amp;#039;{ gsub(/\\\&amp;quot;|:|\\.|[:blank:]/,\&amp;quot;\&amp;quot;, $1); gsub(/\\\&amp;quot;|:|\\.|[:blank:]/,\&amp;quot;\&amp;quot;,$2); s2 = strtonum(sprintf(\&amp;quot;0x%s\&amp;quot;,$2)); gsub(/\\\&amp;quot;|:|\\.|[[:blank:]]/,\&amp;quot;\&amp;quot;,$5); s3 = strtonum(sprintf(\&amp;quot;0x%s\&amp;quot;,$5)); printf \&amp;quot;%s\\n\&amp;quot;,$1,s2,s3 }&amp;#039; %s | sort | grep \&amp;quot;;%d;\&amp;quot;&amp;quot;, &amp;quot;%s&amp;quot;, &amp;quot;%s&amp;quot;, &amp;quot;%s;%s;%s&amp;quot;, infile, canid); else i_string = sprintf(&amp;quot;&amp;lt; grep &amp;#039;;%d;&amp;#039; &amp;#039;%s&amp;#039;&amp;quot;, canid, infile)&lt;br /&gt;
  # The above code has to be in a single line!&lt;br /&gt;
  &lt;br /&gt;
  #initializing output&lt;br /&gt;
  set terminal png large size 1280,1024&lt;br /&gt;
  set output outfile&lt;br /&gt;
  set grid&lt;br /&gt;
  set xlabel &amp;#039;Value&amp;#039;&lt;br /&gt;
  set ylabel &amp;#039;Time&amp;#039;&lt;br /&gt;
  set title &amp;#039;Messages sent via CAN&amp;#039;&lt;br /&gt;
  unset key&lt;br /&gt;
  set datafile separator &amp;#039;;&amp;#039;&lt;br /&gt;
  #and plot data, prepared some lines above&lt;br /&gt;
  plot [:] [:] i_string using 1:3 w lines&lt;br /&gt;
&lt;br /&gt;
This has been tested under Windows XP with Cygwin and Gnuplot version 4. You have to change a bit to get it run in older versions of Gnuplot. But I think you should have no problems, running it on Gnuplot for windows or on a real Linux System.&lt;br /&gt;
&lt;br /&gt;
You can get further information on and download gnuplot here (gnuplot.info)[http://gnuplot.info]&lt;br /&gt;
&lt;br /&gt;
==Actorboard==&lt;br /&gt;
The ActorBoard&amp;#039;s task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.&lt;br /&gt;
&lt;br /&gt;
With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:&lt;br /&gt;
** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus&lt;br /&gt;
** No new values arrive from the CAN bus (lost connectivity)&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.&lt;br /&gt;
&lt;br /&gt;
As described above, the Concept has two actuators, throttle motor and the steering servo.&lt;br /&gt;
&lt;br /&gt;
* Throttle&lt;br /&gt;
**The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.&lt;br /&gt;
* Steering Servo&lt;br /&gt;
**Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.&lt;br /&gt;
&lt;br /&gt;
Table 1.6 presents the CAN messages for the Actorboard.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.6: Actorboard&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_6_eq1.JPG]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard</id>
		<title>ECUs implementing Sensorboards and Actorboard</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard"/>
				<updated>2010-04-28T10:05:09Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Plotting the logged Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.&lt;br /&gt;
&lt;br /&gt;
In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in the [[Electronic_System|Section Electronic_System]] in the Input and Output Processing levels of the Figure 1.3.&lt;br /&gt;
&lt;br /&gt;
==The AT90CAN128 board==&lt;br /&gt;
&lt;br /&gt;
The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].&lt;br /&gt;
&lt;br /&gt;
In the following, a table is presented for each ECU showing the CAN messages this ECU emits. In those tables, the &amp;quot;CAN-IDs&amp;quot; column presents the integer representing the ID of the message. Column &amp;quot;Semantics&amp;quot; describes the type (or meaning) of the message.  Column &amp;quot;Interval&amp;quot; describes the interval in which the message is sent. Finally, the column &amp;quot;Conversion&amp;quot; holds a formula that is used for converting the message content which is usually a float value to the integer data that is packed into the message.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Steering==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128. &lt;br /&gt;
&lt;br /&gt;
Table 1.2 presents the CAN messages for the Sensorboard steering.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.2: Sensorboard Steering&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00a || Wheel speed (ω) from rear left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x009 || Wheel speed (ω) from the front right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.&lt;br /&gt;
&lt;br /&gt;
Table 1.3 presents the CAN messages for the Sensorboard Throttle.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.3: Sensorboard Throttle&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x008 || Wheel speed (ω) from front left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00b || Wheel speed (ω) from the rear right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].&lt;br /&gt;
&lt;br /&gt;
Table 1.4 presents the CAN message for the Sensorboard Distance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.4: Sensorboard Distance&amp;#039;s CAN message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x030 || Distance (d) to the next obstacle up front. || 65ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_4_eq1.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration &amp;amp; Datalogging==&lt;br /&gt;
&lt;br /&gt;
This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components. [[Image:Inertialboard_sensors.png|right|frame|Sensors for acceleration and yaw rate. Arrows indicate positive values.]]&lt;br /&gt;
&lt;br /&gt;
It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.&lt;br /&gt;
&lt;br /&gt;
Atop of this, since revision 1.2, it features a 8x2 digits LCD display and a 8 Pin DIP switch, intended for selecting the currently displayed information. The display gets updated every 250ms.&lt;br /&gt;
&lt;br /&gt;
Due to a design failure in revision 1.2, the display is mounted at the bottom side of the sensor board. This will be corrected in the next revision.&lt;br /&gt;
&lt;br /&gt;
* If DIP switch 1 is &amp;quot;on&amp;quot;, the display shows the current longitudinal acceleration (acc_x).&lt;br /&gt;
* Else if DIP switch 2 is &amp;quot;on&amp;quot;, the display shows the current lateral acceleration (acc_y).&lt;br /&gt;
* Else if DIP switch 3 is &amp;quot;on&amp;quot;, the display shows the current yaw rate.&lt;br /&gt;
* Else if DIP switch 4 is &amp;quot;on&amp;quot;, the display shows the current supply voltage.&lt;br /&gt;
* Else if DIP switch 5 is &amp;quot;on&amp;quot;, the display shows the filename that the data is logged to (if SD card is present) and the total number of bytes that have been written to this file so far.&lt;br /&gt;
* Independent of the other switches, the DIP 8 switch selects the mode of the display. If it is set to &amp;quot;on&amp;quot;, the current raw value (as transferred over the CAN bus) is shown, if it is set to &amp;quot;off&amp;quot;, the display shows the value converted to its respective physical unit (m/s^2, °/s, V).&lt;br /&gt;
&lt;br /&gt;
Table 1.5 presents the CAN messages for the Sensorboard Acceleration &amp;amp; Datalogging.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.5: Sensorboard Acceleration&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x010 || Longitudinal Acceleration (a&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x011 || Lateral Acceleration (a&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x012 || Rotation (ω) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq3.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00d || Voltage (U) of the electrical system’s battery || 200ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq4.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Data Logging====&lt;br /&gt;
&lt;br /&gt;
The Sensorboard Acceleration &amp;amp; Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.&lt;br /&gt;
&lt;br /&gt;
;LED &amp;quot;LOGGER ON&amp;quot;&lt;br /&gt;
:When this LED is on, the SD card is present, has been detected and the file could be opened for writing.&lt;br /&gt;
;LED &amp;quot;LOGGER WRI&amp;quot;&lt;br /&gt;
:This LED blinks once each time a 512 Byte sector is dumped to the SD card. A good indicator if logging actually works. Every 8 sectors the file size is updated, resulting in an irregularity in the blinking. Thus, the filesize always is a multiple of 512 * 8 = 4096 Bytes. You can configure this number in the Makefile.&lt;br /&gt;
:The Write LED is turned on after the SD card has been initialized. If it stays on and the &amp;quot;LOGGER ON&amp;quot; LED stays off, the file system could not be initialized. Most likely this means that the SD card has the wrong format, but for some reasons even if the format is correct, filesystem initalization always fails on some cards.&lt;br /&gt;
&lt;br /&gt;
* File Naming Scheme&lt;br /&gt;
** The data is stored to a newly created file with the naming scheme LOG&amp;lt;nr&amp;gt;.CAN. The &amp;lt;nr&amp;gt; part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.&lt;br /&gt;
&lt;br /&gt;
* Requirements for the card&lt;br /&gt;
**The SD or MMC card must meet the following conditions:&lt;br /&gt;
*** A partition table exists.&lt;br /&gt;
*** The &amp;quot;DOS compatibility flag&amp;quot; must be set.&lt;br /&gt;
*** There is exactly one primary partition.&lt;br /&gt;
*** The partition&amp;#039;s type is &amp;quot;FAT16&amp;quot; (set partition code to 0x06 with fdisk).&lt;br /&gt;
*** The partition is formatted with FAT16, two fats.&lt;br /&gt;
&lt;br /&gt;
Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mkfs.vfat -F 16 /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
would create a valid FAT 16 partition.&lt;br /&gt;
&lt;br /&gt;
On a Windows XP system, formatting the card with FAT (not FAT32!) works.&lt;br /&gt;
&lt;br /&gt;
Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.&lt;br /&gt;
&lt;br /&gt;
* Log file format&lt;br /&gt;
** The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:&lt;br /&gt;
&lt;br /&gt;
  /----------------------------------------------------------\&lt;br /&gt;
  | Header | Timestamp | CAN ID  | Data Length |     Data    |&lt;br /&gt;
  |  0xca  |  4 Bytes  | 2 Bytes |    1 Byte   | 0 - 8 Bytes |&lt;br /&gt;
  \----------------------------------------------------------------------------------------/&lt;br /&gt;
&lt;br /&gt;
The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message&amp;#039;s id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.&lt;br /&gt;
&lt;br /&gt;
===== Plotting the logged Data =====&lt;br /&gt;
There are several ways to evaluate the logged data graphically. Here is how to do it with Gnuplot, that is available for all common operating systems. The logged Data has the following format: TIMESTAMP:CAN-ID:VALUE.&lt;br /&gt;
In Gnuplot type:&lt;br /&gt;
  &lt;br /&gt;
  # &amp;lt;- Comment, you do not have to write, what comes after #&lt;br /&gt;
  file = &amp;quot;C:\\the\\directory\\LOGxxxx.txt&amp;quot;     # \ has to be escaped with \\&lt;br /&gt;
  show = 10&lt;br /&gt;
  set datafile separator &amp;#039;:&amp;#039;&lt;br /&gt;
  plot file using 1:($2 == show ? $3 : 1/0)&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First we simply save the path to our Log-file to &amp;#039;file&amp;#039;. After that, we save a constant to &amp;#039;show&amp;#039; that says us, which channel we want to plot. The third line says Gnuplot, what separates each data information from another. In our log files, separator is &amp;#039;:&amp;#039;.&lt;br /&gt;
The last line does the plotting: Define x-Axes equals column 1 of our Log file; y-Axes is column 3, but only if column 2 of the same row equals our defined &amp;#039;show&amp;#039;-variable, otherwise y is a number Gnuplot isn&amp;#039;t able to plot.&lt;br /&gt;
&lt;br /&gt;
This will throw a window onto the screen.&lt;br /&gt;
&lt;br /&gt;
If you want to plot more data into one single screen, you can do this by simply typing&lt;br /&gt;
&lt;br /&gt;
  set multiplot&lt;br /&gt;
  unset multiplot&lt;br /&gt;
&lt;br /&gt;
before the first plot and after the last plot.&lt;br /&gt;
&lt;br /&gt;
And here follows a completely self-running version. Simply edit the lines marked and run this script, save it to a text-file and run it with &amp;#039;&amp;#039;&amp;#039;gnuplot filename&amp;#039;&amp;#039;&amp;#039; from any unix-shell. Here comes the script:&lt;br /&gt;
&lt;br /&gt;
  ######## Type your configuration here ########&lt;br /&gt;
  canid = 16&lt;br /&gt;
  infile = &amp;#039;LOG0018.csv&amp;#039;&lt;br /&gt;
  outfile = &amp;#039;&amp;#039;&lt;br /&gt;
  ############################################## &lt;br /&gt;
  # Touch the rest only if you know, what you are doing!&lt;br /&gt;
  i_string = sprintf(&amp;quot;&amp;lt; grep &amp;#039;;%d;&amp;#039; &amp;#039;%s&amp;#039;&amp;quot;, canid, infile);&lt;br /&gt;
  if (outfile == &amp;quot;&amp;quot;) outfile = &amp;quot;gplot_out.png&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  set terminal png large size 1280,1024&lt;br /&gt;
  set output outfile&lt;br /&gt;
  set grid&lt;br /&gt;
  set xlabel &amp;#039;Value&amp;#039;&lt;br /&gt;
  set ylabel &amp;#039;Time&amp;#039;&lt;br /&gt;
  set title &amp;#039;Messages sent via CAN&amp;#039;&lt;br /&gt;
  unset key&lt;br /&gt;
  set datafile separator &amp;#039;;&amp;#039;&lt;br /&gt;
  plot [:] [:] i_string using 1:3 w lines&lt;br /&gt;
&lt;br /&gt;
You can get further information on and download gnuplot here (gnuplot.info)[http://gnuplot.info]&lt;br /&gt;
&lt;br /&gt;
==Actorboard==&lt;br /&gt;
The ActorBoard&amp;#039;s task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.&lt;br /&gt;
&lt;br /&gt;
With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:&lt;br /&gt;
** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus&lt;br /&gt;
** No new values arrive from the CAN bus (lost connectivity)&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.&lt;br /&gt;
&lt;br /&gt;
As described above, the Concept has two actuators, throttle motor and the steering servo.&lt;br /&gt;
&lt;br /&gt;
* Throttle&lt;br /&gt;
**The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.&lt;br /&gt;
* Steering Servo&lt;br /&gt;
**Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.&lt;br /&gt;
&lt;br /&gt;
Table 1.6 presents the CAN messages for the Actorboard.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.6: Actorboard&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_6_eq1.JPG]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard</id>
		<title>ECUs implementing Sensorboards and Actorboard</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard"/>
				<updated>2010-04-28T10:04:16Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Plotting the logged Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.&lt;br /&gt;
&lt;br /&gt;
In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in the [[Electronic_System|Section Electronic_System]] in the Input and Output Processing levels of the Figure 1.3.&lt;br /&gt;
&lt;br /&gt;
==The AT90CAN128 board==&lt;br /&gt;
&lt;br /&gt;
The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].&lt;br /&gt;
&lt;br /&gt;
In the following, a table is presented for each ECU showing the CAN messages this ECU emits. In those tables, the &amp;quot;CAN-IDs&amp;quot; column presents the integer representing the ID of the message. Column &amp;quot;Semantics&amp;quot; describes the type (or meaning) of the message.  Column &amp;quot;Interval&amp;quot; describes the interval in which the message is sent. Finally, the column &amp;quot;Conversion&amp;quot; holds a formula that is used for converting the message content which is usually a float value to the integer data that is packed into the message.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Steering==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128. &lt;br /&gt;
&lt;br /&gt;
Table 1.2 presents the CAN messages for the Sensorboard steering.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.2: Sensorboard Steering&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00a || Wheel speed (ω) from rear left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x009 || Wheel speed (ω) from the front right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.&lt;br /&gt;
&lt;br /&gt;
Table 1.3 presents the CAN messages for the Sensorboard Throttle.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.3: Sensorboard Throttle&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x008 || Wheel speed (ω) from front left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00b || Wheel speed (ω) from the rear right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].&lt;br /&gt;
&lt;br /&gt;
Table 1.4 presents the CAN message for the Sensorboard Distance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.4: Sensorboard Distance&amp;#039;s CAN message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x030 || Distance (d) to the next obstacle up front. || 65ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_4_eq1.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration &amp;amp; Datalogging==&lt;br /&gt;
&lt;br /&gt;
This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components. [[Image:Inertialboard_sensors.png|right|frame|Sensors for acceleration and yaw rate. Arrows indicate positive values.]]&lt;br /&gt;
&lt;br /&gt;
It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.&lt;br /&gt;
&lt;br /&gt;
Atop of this, since revision 1.2, it features a 8x2 digits LCD display and a 8 Pin DIP switch, intended for selecting the currently displayed information. The display gets updated every 250ms.&lt;br /&gt;
&lt;br /&gt;
Due to a design failure in revision 1.2, the display is mounted at the bottom side of the sensor board. This will be corrected in the next revision.&lt;br /&gt;
&lt;br /&gt;
* If DIP switch 1 is &amp;quot;on&amp;quot;, the display shows the current longitudinal acceleration (acc_x).&lt;br /&gt;
* Else if DIP switch 2 is &amp;quot;on&amp;quot;, the display shows the current lateral acceleration (acc_y).&lt;br /&gt;
* Else if DIP switch 3 is &amp;quot;on&amp;quot;, the display shows the current yaw rate.&lt;br /&gt;
* Else if DIP switch 4 is &amp;quot;on&amp;quot;, the display shows the current supply voltage.&lt;br /&gt;
* Else if DIP switch 5 is &amp;quot;on&amp;quot;, the display shows the filename that the data is logged to (if SD card is present) and the total number of bytes that have been written to this file so far.&lt;br /&gt;
* Independent of the other switches, the DIP 8 switch selects the mode of the display. If it is set to &amp;quot;on&amp;quot;, the current raw value (as transferred over the CAN bus) is shown, if it is set to &amp;quot;off&amp;quot;, the display shows the value converted to its respective physical unit (m/s^2, °/s, V).&lt;br /&gt;
&lt;br /&gt;
Table 1.5 presents the CAN messages for the Sensorboard Acceleration &amp;amp; Datalogging.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.5: Sensorboard Acceleration&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x010 || Longitudinal Acceleration (a&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x011 || Lateral Acceleration (a&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x012 || Rotation (ω) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq3.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00d || Voltage (U) of the electrical system’s battery || 200ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq4.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Data Logging====&lt;br /&gt;
&lt;br /&gt;
The Sensorboard Acceleration &amp;amp; Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.&lt;br /&gt;
&lt;br /&gt;
;LED &amp;quot;LOGGER ON&amp;quot;&lt;br /&gt;
:When this LED is on, the SD card is present, has been detected and the file could be opened for writing.&lt;br /&gt;
;LED &amp;quot;LOGGER WRI&amp;quot;&lt;br /&gt;
:This LED blinks once each time a 512 Byte sector is dumped to the SD card. A good indicator if logging actually works. Every 8 sectors the file size is updated, resulting in an irregularity in the blinking. Thus, the filesize always is a multiple of 512 * 8 = 4096 Bytes. You can configure this number in the Makefile.&lt;br /&gt;
:The Write LED is turned on after the SD card has been initialized. If it stays on and the &amp;quot;LOGGER ON&amp;quot; LED stays off, the file system could not be initialized. Most likely this means that the SD card has the wrong format, but for some reasons even if the format is correct, filesystem initalization always fails on some cards.&lt;br /&gt;
&lt;br /&gt;
* File Naming Scheme&lt;br /&gt;
** The data is stored to a newly created file with the naming scheme LOG&amp;lt;nr&amp;gt;.CAN. The &amp;lt;nr&amp;gt; part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.&lt;br /&gt;
&lt;br /&gt;
* Requirements for the card&lt;br /&gt;
**The SD or MMC card must meet the following conditions:&lt;br /&gt;
*** A partition table exists.&lt;br /&gt;
*** The &amp;quot;DOS compatibility flag&amp;quot; must be set.&lt;br /&gt;
*** There is exactly one primary partition.&lt;br /&gt;
*** The partition&amp;#039;s type is &amp;quot;FAT16&amp;quot; (set partition code to 0x06 with fdisk).&lt;br /&gt;
*** The partition is formatted with FAT16, two fats.&lt;br /&gt;
&lt;br /&gt;
Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mkfs.vfat -F 16 /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
would create a valid FAT 16 partition.&lt;br /&gt;
&lt;br /&gt;
On a Windows XP system, formatting the card with FAT (not FAT32!) works.&lt;br /&gt;
&lt;br /&gt;
Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.&lt;br /&gt;
&lt;br /&gt;
* Log file format&lt;br /&gt;
** The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:&lt;br /&gt;
&lt;br /&gt;
  /----------------------------------------------------------\&lt;br /&gt;
  | Header | Timestamp | CAN ID  | Data Length |     Data    |&lt;br /&gt;
  |  0xca  |  4 Bytes  | 2 Bytes |    1 Byte   | 0 - 8 Bytes |&lt;br /&gt;
  \----------------------------------------------------------------------------------------/&lt;br /&gt;
&lt;br /&gt;
The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message&amp;#039;s id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.&lt;br /&gt;
&lt;br /&gt;
===== Plotting the logged Data =====&lt;br /&gt;
There are several ways to evaluate the logged data graphically. Here is how to do it with Gnuplot, that is available for all common operating systems. The logged Data has the following format: TIMESTAMP:CAN-ID:VALUE.&lt;br /&gt;
In Gnuplot type:&lt;br /&gt;
  &lt;br /&gt;
  # &amp;lt;- Comment, you do not have to write, what comes after #&lt;br /&gt;
  file = &amp;quot;C:\\the\\directory\\LOGxxxx.txt&amp;quot;     # \ has to be escaped with \\&lt;br /&gt;
  show = 10&lt;br /&gt;
  set datafile separator &amp;#039;:&amp;#039;&lt;br /&gt;
  plot file using 1:($2 == show ? $3 : 1/0)&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First we simply save the path to our Log-file to &amp;#039;file&amp;#039;. After that, we save a constant to &amp;#039;show&amp;#039; that says us, which channel we want to plot. The third line says Gnuplot, what separates each data information from another. In our log files, separator is &amp;#039;:&amp;#039;.&lt;br /&gt;
The last line does the plotting: Define x-Axes equals column 1 of our Log file; y-Axes is column 3, but only if column 2 of the same row equals our defined &amp;#039;show&amp;#039;-variable, otherwise y is a number Gnuplot isn&amp;#039;t able to plot.&lt;br /&gt;
&lt;br /&gt;
This will throw a window onto the screen.&lt;br /&gt;
&lt;br /&gt;
If you want to plot more data into one single screen, you can do this by simply typing&lt;br /&gt;
&lt;br /&gt;
  set multiplot&lt;br /&gt;
  unset multiplot&lt;br /&gt;
&lt;br /&gt;
before the first plot and after the last plot.&lt;br /&gt;
&lt;br /&gt;
And here follows a completely self-running version. Simply edit the lines marked and run this script, save it to a text-file and run it with &amp;#039;&amp;#039;&amp;#039;gnuplot filename&amp;#039;&amp;#039;&amp;#039; from any unix-shell. Here comes the script:&lt;br /&gt;
&lt;br /&gt;
  ######## Type your configuration here ########&lt;br /&gt;
  canid = 16&lt;br /&gt;
  infile = &amp;#039;LOG0018.csv&amp;#039;&lt;br /&gt;
  outfile = &amp;#039;&amp;#039;&lt;br /&gt;
  ############################################## &lt;br /&gt;
  # Touch the rest only if you know, what you are doing!&lt;br /&gt;
  i_string = sprintf(&amp;quot;&amp;lt; grep &amp;#039;;%d;&amp;#039; &amp;#039;%s&amp;#039;&amp;quot;, canid, infile);&lt;br /&gt;
  if (outfile == &amp;quot;&amp;quot;) outfile = &amp;quot;gplot_out.png&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  set terminal png large size 1280,1024&lt;br /&gt;
  set output outfile&lt;br /&gt;
  set grid&lt;br /&gt;
  set xlabel &amp;#039;Value&amp;#039;&lt;br /&gt;
  set ylabel &amp;#039;Time&amp;#039;&lt;br /&gt;
  set title &amp;#039;Messages sent via CAN&amp;#039;&lt;br /&gt;
  unset key&lt;br /&gt;
  set datafile separator &amp;#039;;&amp;#039;&lt;br /&gt;
  plot [:] [:] i_string using 1:3 w lines&lt;br /&gt;
&lt;br /&gt;
You can get further information on and download gnuplot on gnuplot.info[http://gnuplot.info]&lt;br /&gt;
&lt;br /&gt;
==Actorboard==&lt;br /&gt;
The ActorBoard&amp;#039;s task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.&lt;br /&gt;
&lt;br /&gt;
With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:&lt;br /&gt;
** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus&lt;br /&gt;
** No new values arrive from the CAN bus (lost connectivity)&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.&lt;br /&gt;
&lt;br /&gt;
As described above, the Concept has two actuators, throttle motor and the steering servo.&lt;br /&gt;
&lt;br /&gt;
* Throttle&lt;br /&gt;
**The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.&lt;br /&gt;
* Steering Servo&lt;br /&gt;
**Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.&lt;br /&gt;
&lt;br /&gt;
Table 1.6 presents the CAN messages for the Actorboard.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.6: Actorboard&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_6_eq1.JPG]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard</id>
		<title>ECUs implementing Sensorboards and Actorboard</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard"/>
				<updated>2010-04-27T10:24:33Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Plotting the logged Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.&lt;br /&gt;
&lt;br /&gt;
In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in the [[Electronic_System|Section Electronic_System]] in the Input and Output Processing levels of the Figure 1.3.&lt;br /&gt;
&lt;br /&gt;
==The AT90CAN128 board==&lt;br /&gt;
&lt;br /&gt;
The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].&lt;br /&gt;
&lt;br /&gt;
In the following, a table is presented for each ECU showing the CAN messages this ECU emits. In those tables, the &amp;quot;CAN-IDs&amp;quot; column presents the integer representing the ID of the message. Column &amp;quot;Semantics&amp;quot; describes the type (or meaning) of the message.  Column &amp;quot;Interval&amp;quot; describes the interval in which the message is sent. Finally, the column &amp;quot;Conversion&amp;quot; holds a formula that is used for converting the message content which is usually a float value to the integer data that is packed into the message.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Steering==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128. &lt;br /&gt;
&lt;br /&gt;
Table 1.2 presents the CAN messages for the Sensorboard steering.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.2: Sensorboard Steering&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00a || Wheel speed (ω) from rear left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x009 || Wheel speed (ω) from the front right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.&lt;br /&gt;
&lt;br /&gt;
Table 1.3 presents the CAN messages for the Sensorboard Throttle.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.3: Sensorboard Throttle&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x008 || Wheel speed (ω) from front left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00b || Wheel speed (ω) from the rear right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].&lt;br /&gt;
&lt;br /&gt;
Table 1.4 presents the CAN message for the Sensorboard Distance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.4: Sensorboard Distance&amp;#039;s CAN message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x030 || Distance (d) to the next obstacle up front. || 65ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_4_eq1.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration &amp;amp; Datalogging==&lt;br /&gt;
&lt;br /&gt;
This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components. [[Image:Inertialboard_sensors.png|right|frame|Sensors for acceleration and yaw rate. Arrows indicate positive values.]]&lt;br /&gt;
&lt;br /&gt;
It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.&lt;br /&gt;
&lt;br /&gt;
Atop of this, since revision 1.2, it features a 8x2 digits LCD display and a 8 Pin DIP switch, intended for selecting the currently displayed information. The display gets updated every 250ms.&lt;br /&gt;
&lt;br /&gt;
Due to a design failure in revision 1.2, the display is mounted at the bottom side of the sensor board. This will be corrected in the next revision.&lt;br /&gt;
&lt;br /&gt;
* If DIP switch 1 is &amp;quot;on&amp;quot;, the display shows the current longitudinal acceleration (acc_x).&lt;br /&gt;
* Else if DIP switch 2 is &amp;quot;on&amp;quot;, the display shows the current lateral acceleration (acc_y).&lt;br /&gt;
* Else if DIP switch 3 is &amp;quot;on&amp;quot;, the display shows the current yaw rate.&lt;br /&gt;
* Else if DIP switch 4 is &amp;quot;on&amp;quot;, the display shows the current supply voltage.&lt;br /&gt;
* Else if DIP switch 5 is &amp;quot;on&amp;quot;, the display shows the filename that the data is logged to (if SD card is present) and the total number of bytes that have been written to this file so far.&lt;br /&gt;
* Independent of the other switches, the DIP 8 switch selects the mode of the display. If it is set to &amp;quot;on&amp;quot;, the current raw value (as transferred over the CAN bus) is shown, if it is set to &amp;quot;off&amp;quot;, the display shows the value converted to its respective physical unit (m/s^2, °/s, V).&lt;br /&gt;
&lt;br /&gt;
Table 1.5 presents the CAN messages for the Sensorboard Acceleration &amp;amp; Datalogging.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.5: Sensorboard Acceleration&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x010 || Longitudinal Acceleration (a&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x011 || Lateral Acceleration (a&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x012 || Rotation (ω) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq3.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00d || Voltage (U) of the electrical system’s battery || 200ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq4.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Data Logging====&lt;br /&gt;
&lt;br /&gt;
The Sensorboard Acceleration &amp;amp; Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.&lt;br /&gt;
&lt;br /&gt;
;LED &amp;quot;LOGGER ON&amp;quot;&lt;br /&gt;
:When this LED is on, the SD card is present, has been detected and the file could be opened for writing.&lt;br /&gt;
;LED &amp;quot;LOGGER WRI&amp;quot;&lt;br /&gt;
:This LED blinks once each time a 512 Byte sector is dumped to the SD card. A good indicator if logging actually works. Every 8 sectors the file size is updated, resulting in an irregularity in the blinking. Thus, the filesize always is a multiple of 512 * 8 = 4096 Bytes. You can configure this number in the Makefile.&lt;br /&gt;
:The Write LED is turned on after the SD card has been initialized. If it stays on and the &amp;quot;LOGGER ON&amp;quot; LED stays off, the file system could not be initialized. Most likely this means that the SD card has the wrong format, but for some reasons even if the format is correct, filesystem initalization always fails on some cards.&lt;br /&gt;
&lt;br /&gt;
* File Naming Scheme&lt;br /&gt;
** The data is stored to a newly created file with the naming scheme LOG&amp;lt;nr&amp;gt;.CAN. The &amp;lt;nr&amp;gt; part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.&lt;br /&gt;
&lt;br /&gt;
* Requirements for the card&lt;br /&gt;
**The SD or MMC card must meet the following conditions:&lt;br /&gt;
*** A partition table exists.&lt;br /&gt;
*** The &amp;quot;DOS compatibility flag&amp;quot; must be set.&lt;br /&gt;
*** There is exactly one primary partition.&lt;br /&gt;
*** The partition&amp;#039;s type is &amp;quot;FAT16&amp;quot; (set partition code to 0x06 with fdisk).&lt;br /&gt;
*** The partition is formatted with FAT16, two fats.&lt;br /&gt;
&lt;br /&gt;
Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mkfs.vfat -F 16 /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
would create a valid FAT 16 partition.&lt;br /&gt;
&lt;br /&gt;
On a Windows XP system, formatting the card with FAT (not FAT32!) works.&lt;br /&gt;
&lt;br /&gt;
Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.&lt;br /&gt;
&lt;br /&gt;
* Log file format&lt;br /&gt;
** The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:&lt;br /&gt;
&lt;br /&gt;
  /----------------------------------------------------------\&lt;br /&gt;
  | Header | Timestamp | CAN ID  | Data Length |     Data    |&lt;br /&gt;
  |  0xca  |  4 Bytes  | 2 Bytes |    1 Byte   | 0 - 8 Bytes |&lt;br /&gt;
  \----------------------------------------------------------------------------------------/&lt;br /&gt;
&lt;br /&gt;
The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message&amp;#039;s id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.&lt;br /&gt;
&lt;br /&gt;
===== Plotting the logged Data =====&lt;br /&gt;
There are several ways to evaluate the logged data graphically. Here is how to do it with Gnuplot, that is available for all common operating systems. The logged Data has the following format: TIMESTAMP:CAN-ID:VALUE.&lt;br /&gt;
In Gnuplot type:&lt;br /&gt;
  &lt;br /&gt;
  # &amp;lt;- Comment, you do not have to write, what comes after #&lt;br /&gt;
  file = &amp;quot;C:\\the\\directory\\LOGxxxx.txt&amp;quot;     # \ has to be escaped with \\&lt;br /&gt;
  show = 10&lt;br /&gt;
  set datafile separator &amp;#039;:&amp;#039;&lt;br /&gt;
  plot file using 1:($2 == show ? $3 : 1/0)&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First we simply save the path to our Log-file to &amp;#039;file&amp;#039;. After that, we save a constant to &amp;#039;show&amp;#039; that says us, which channel we want to plot. The third line says Gnuplot, what separates each data information from another. In our log files, separator is &amp;#039;:&amp;#039;.&lt;br /&gt;
The last line does the plotting: Define x-Axes equals column 1 of our Log file; y-Axes is column 3, but only if column 2 of the same row equals our defined &amp;#039;show&amp;#039;-variable, otherwise y is a number Gnuplot isn&amp;#039;t able to plot.&lt;br /&gt;
&lt;br /&gt;
This will throw a window onto the screen.&lt;br /&gt;
&lt;br /&gt;
If you want to plot more data into one single screen, you can do this by simply typing&lt;br /&gt;
&lt;br /&gt;
  set multiplot&lt;br /&gt;
  unset multiplot&lt;br /&gt;
&lt;br /&gt;
before the first plot and after the last plot.&lt;br /&gt;
&lt;br /&gt;
You can get further information on and download gnuplot on gnuplot.info[http://gnuplot.info]&lt;br /&gt;
&lt;br /&gt;
==Actorboard==&lt;br /&gt;
The ActorBoard&amp;#039;s task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.&lt;br /&gt;
&lt;br /&gt;
With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:&lt;br /&gt;
** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus&lt;br /&gt;
** No new values arrive from the CAN bus (lost connectivity)&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.&lt;br /&gt;
&lt;br /&gt;
As described above, the Concept has two actuators, throttle motor and the steering servo.&lt;br /&gt;
&lt;br /&gt;
* Throttle&lt;br /&gt;
**The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.&lt;br /&gt;
* Steering Servo&lt;br /&gt;
**Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.&lt;br /&gt;
&lt;br /&gt;
Table 1.6 presents the CAN messages for the Actorboard.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.6: Actorboard&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_6_eq1.JPG]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard</id>
		<title>ECUs implementing Sensorboards and Actorboard</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard"/>
				<updated>2010-04-27T10:22:48Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Plotting the logged Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.&lt;br /&gt;
&lt;br /&gt;
In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in the [[Electronic_System|Section Electronic_System]] in the Input and Output Processing levels of the Figure 1.3.&lt;br /&gt;
&lt;br /&gt;
==The AT90CAN128 board==&lt;br /&gt;
&lt;br /&gt;
The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].&lt;br /&gt;
&lt;br /&gt;
In the following, a table is presented for each ECU showing the CAN messages this ECU emits. In those tables, the &amp;quot;CAN-IDs&amp;quot; column presents the integer representing the ID of the message. Column &amp;quot;Semantics&amp;quot; describes the type (or meaning) of the message.  Column &amp;quot;Interval&amp;quot; describes the interval in which the message is sent. Finally, the column &amp;quot;Conversion&amp;quot; holds a formula that is used for converting the message content which is usually a float value to the integer data that is packed into the message.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Steering==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128. &lt;br /&gt;
&lt;br /&gt;
Table 1.2 presents the CAN messages for the Sensorboard steering.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.2: Sensorboard Steering&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00a || Wheel speed (ω) from rear left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x009 || Wheel speed (ω) from the front right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.&lt;br /&gt;
&lt;br /&gt;
Table 1.3 presents the CAN messages for the Sensorboard Throttle.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.3: Sensorboard Throttle&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x008 || Wheel speed (ω) from front left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00b || Wheel speed (ω) from the rear right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].&lt;br /&gt;
&lt;br /&gt;
Table 1.4 presents the CAN message for the Sensorboard Distance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.4: Sensorboard Distance&amp;#039;s CAN message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x030 || Distance (d) to the next obstacle up front. || 65ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_4_eq1.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration &amp;amp; Datalogging==&lt;br /&gt;
&lt;br /&gt;
This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components. [[Image:Inertialboard_sensors.png|right|frame|Sensors for acceleration and yaw rate. Arrows indicate positive values.]]&lt;br /&gt;
&lt;br /&gt;
It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.&lt;br /&gt;
&lt;br /&gt;
Atop of this, since revision 1.2, it features a 8x2 digits LCD display and a 8 Pin DIP switch, intended for selecting the currently displayed information. The display gets updated every 250ms.&lt;br /&gt;
&lt;br /&gt;
Due to a design failure in revision 1.2, the display is mounted at the bottom side of the sensor board. This will be corrected in the next revision.&lt;br /&gt;
&lt;br /&gt;
* If DIP switch 1 is &amp;quot;on&amp;quot;, the display shows the current longitudinal acceleration (acc_x).&lt;br /&gt;
* Else if DIP switch 2 is &amp;quot;on&amp;quot;, the display shows the current lateral acceleration (acc_y).&lt;br /&gt;
* Else if DIP switch 3 is &amp;quot;on&amp;quot;, the display shows the current yaw rate.&lt;br /&gt;
* Else if DIP switch 4 is &amp;quot;on&amp;quot;, the display shows the current supply voltage.&lt;br /&gt;
* Else if DIP switch 5 is &amp;quot;on&amp;quot;, the display shows the filename that the data is logged to (if SD card is present) and the total number of bytes that have been written to this file so far.&lt;br /&gt;
* Independent of the other switches, the DIP 8 switch selects the mode of the display. If it is set to &amp;quot;on&amp;quot;, the current raw value (as transferred over the CAN bus) is shown, if it is set to &amp;quot;off&amp;quot;, the display shows the value converted to its respective physical unit (m/s^2, °/s, V).&lt;br /&gt;
&lt;br /&gt;
Table 1.5 presents the CAN messages for the Sensorboard Acceleration &amp;amp; Datalogging.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.5: Sensorboard Acceleration&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x010 || Longitudinal Acceleration (a&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x011 || Lateral Acceleration (a&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x012 || Rotation (ω) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq3.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00d || Voltage (U) of the electrical system’s battery || 200ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq4.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Data Logging====&lt;br /&gt;
&lt;br /&gt;
The Sensorboard Acceleration &amp;amp; Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.&lt;br /&gt;
&lt;br /&gt;
;LED &amp;quot;LOGGER ON&amp;quot;&lt;br /&gt;
:When this LED is on, the SD card is present, has been detected and the file could be opened for writing.&lt;br /&gt;
;LED &amp;quot;LOGGER WRI&amp;quot;&lt;br /&gt;
:This LED blinks once each time a 512 Byte sector is dumped to the SD card. A good indicator if logging actually works. Every 8 sectors the file size is updated, resulting in an irregularity in the blinking. Thus, the filesize always is a multiple of 512 * 8 = 4096 Bytes. You can configure this number in the Makefile.&lt;br /&gt;
:The Write LED is turned on after the SD card has been initialized. If it stays on and the &amp;quot;LOGGER ON&amp;quot; LED stays off, the file system could not be initialized. Most likely this means that the SD card has the wrong format, but for some reasons even if the format is correct, filesystem initalization always fails on some cards.&lt;br /&gt;
&lt;br /&gt;
* File Naming Scheme&lt;br /&gt;
** The data is stored to a newly created file with the naming scheme LOG&amp;lt;nr&amp;gt;.CAN. The &amp;lt;nr&amp;gt; part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.&lt;br /&gt;
&lt;br /&gt;
* Requirements for the card&lt;br /&gt;
**The SD or MMC card must meet the following conditions:&lt;br /&gt;
*** A partition table exists.&lt;br /&gt;
*** The &amp;quot;DOS compatibility flag&amp;quot; must be set.&lt;br /&gt;
*** There is exactly one primary partition.&lt;br /&gt;
*** The partition&amp;#039;s type is &amp;quot;FAT16&amp;quot; (set partition code to 0x06 with fdisk).&lt;br /&gt;
*** The partition is formatted with FAT16, two fats.&lt;br /&gt;
&lt;br /&gt;
Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mkfs.vfat -F 16 /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
would create a valid FAT 16 partition.&lt;br /&gt;
&lt;br /&gt;
On a Windows XP system, formatting the card with FAT (not FAT32!) works.&lt;br /&gt;
&lt;br /&gt;
Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.&lt;br /&gt;
&lt;br /&gt;
* Log file format&lt;br /&gt;
** The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:&lt;br /&gt;
&lt;br /&gt;
  /----------------------------------------------------------\&lt;br /&gt;
  | Header | Timestamp | CAN ID  | Data Length |     Data    |&lt;br /&gt;
  |  0xca  |  4 Bytes  | 2 Bytes |    1 Byte   | 0 - 8 Bytes |&lt;br /&gt;
  \----------------------------------------------------------------------------------------/&lt;br /&gt;
&lt;br /&gt;
The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message&amp;#039;s id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.&lt;br /&gt;
&lt;br /&gt;
===== Plotting the logged Data =====&lt;br /&gt;
There are several ways to evaluate the logged data graphically. Here is how to do it with Gnuplot, that is available for all common operating systems. The logged Data has the following format: TIMESTAMP:CAN-ID:VALUE.&lt;br /&gt;
In Gnuplot type:&lt;br /&gt;
  &lt;br /&gt;
  # &amp;lt;- Comment, you do not have to write, what comes after #&lt;br /&gt;
  file = &amp;quot;C:\\the\\directory\\LOGxxxx.txt&amp;quot;     # \ has to be escaped with \\&lt;br /&gt;
  show = 10&lt;br /&gt;
  set datafile separator &amp;#039;:&amp;#039;&lt;br /&gt;
  plot file using 1:($2 == show ? $3 : 1/0)&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First we simply save the path to our Log-file to &amp;#039;file&amp;#039;. After that, we save a constant to &amp;#039;show&amp;#039; that says us, which channel we want to plot. The third line says Gnuplot, what separates each data information from another. In our log files, separator is &amp;#039;:&amp;#039;.&lt;br /&gt;
The last line does the plotting: Define x-Axes equals column 1 of our Log file; y-Axes is column 3, but only if column 2 of the same row equals our defined &amp;#039;show&amp;#039;-variable, otherwise y is a number Gnuplot isn&amp;#039;t able to plot.&lt;br /&gt;
&lt;br /&gt;
This will throw a window onto the screen.&lt;br /&gt;
&lt;br /&gt;
If you want to plot more data into one single screen, you can do this by simply typing&lt;br /&gt;
&lt;br /&gt;
  set multiplot&lt;br /&gt;
&lt;br /&gt;
before the first plot.&lt;br /&gt;
&lt;br /&gt;
You can get further information on and download gnuplot on gnuplot.info[http://gnuplot.info]&lt;br /&gt;
&lt;br /&gt;
==Actorboard==&lt;br /&gt;
The ActorBoard&amp;#039;s task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.&lt;br /&gt;
&lt;br /&gt;
With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:&lt;br /&gt;
** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus&lt;br /&gt;
** No new values arrive from the CAN bus (lost connectivity)&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.&lt;br /&gt;
&lt;br /&gt;
As described above, the Concept has two actuators, throttle motor and the steering servo.&lt;br /&gt;
&lt;br /&gt;
* Throttle&lt;br /&gt;
**The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.&lt;br /&gt;
* Steering Servo&lt;br /&gt;
**Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.&lt;br /&gt;
&lt;br /&gt;
Table 1.6 presents the CAN messages for the Actorboard.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.6: Actorboard&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_6_eq1.JPG]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard</id>
		<title>ECUs implementing Sensorboards and Actorboard</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard"/>
				<updated>2010-04-27T10:21:07Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Plotting the logged Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.&lt;br /&gt;
&lt;br /&gt;
In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in the [[Electronic_System|Section Electronic_System]] in the Input and Output Processing levels of the Figure 1.3.&lt;br /&gt;
&lt;br /&gt;
==The AT90CAN128 board==&lt;br /&gt;
&lt;br /&gt;
The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].&lt;br /&gt;
&lt;br /&gt;
In the following, a table is presented for each ECU showing the CAN messages this ECU emits. In those tables, the &amp;quot;CAN-IDs&amp;quot; column presents the integer representing the ID of the message. Column &amp;quot;Semantics&amp;quot; describes the type (or meaning) of the message.  Column &amp;quot;Interval&amp;quot; describes the interval in which the message is sent. Finally, the column &amp;quot;Conversion&amp;quot; holds a formula that is used for converting the message content which is usually a float value to the integer data that is packed into the message.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Steering==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128. &lt;br /&gt;
&lt;br /&gt;
Table 1.2 presents the CAN messages for the Sensorboard steering.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.2: Sensorboard Steering&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00a || Wheel speed (ω) from rear left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x009 || Wheel speed (ω) from the front right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.&lt;br /&gt;
&lt;br /&gt;
Table 1.3 presents the CAN messages for the Sensorboard Throttle.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.3: Sensorboard Throttle&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x008 || Wheel speed (ω) from front left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00b || Wheel speed (ω) from the rear right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].&lt;br /&gt;
&lt;br /&gt;
Table 1.4 presents the CAN message for the Sensorboard Distance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.4: Sensorboard Distance&amp;#039;s CAN message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x030 || Distance (d) to the next obstacle up front. || 65ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_4_eq1.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration &amp;amp; Datalogging==&lt;br /&gt;
&lt;br /&gt;
This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components. [[Image:Inertialboard_sensors.png|right|frame|Sensors for acceleration and yaw rate. Arrows indicate positive values.]]&lt;br /&gt;
&lt;br /&gt;
It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.&lt;br /&gt;
&lt;br /&gt;
Atop of this, since revision 1.2, it features a 8x2 digits LCD display and a 8 Pin DIP switch, intended for selecting the currently displayed information. The display gets updated every 250ms.&lt;br /&gt;
&lt;br /&gt;
Due to a design failure in revision 1.2, the display is mounted at the bottom side of the sensor board. This will be corrected in the next revision.&lt;br /&gt;
&lt;br /&gt;
* If DIP switch 1 is &amp;quot;on&amp;quot;, the display shows the current longitudinal acceleration (acc_x).&lt;br /&gt;
* Else if DIP switch 2 is &amp;quot;on&amp;quot;, the display shows the current lateral acceleration (acc_y).&lt;br /&gt;
* Else if DIP switch 3 is &amp;quot;on&amp;quot;, the display shows the current yaw rate.&lt;br /&gt;
* Else if DIP switch 4 is &amp;quot;on&amp;quot;, the display shows the current supply voltage.&lt;br /&gt;
* Else if DIP switch 5 is &amp;quot;on&amp;quot;, the display shows the filename that the data is logged to (if SD card is present) and the total number of bytes that have been written to this file so far.&lt;br /&gt;
* Independent of the other switches, the DIP 8 switch selects the mode of the display. If it is set to &amp;quot;on&amp;quot;, the current raw value (as transferred over the CAN bus) is shown, if it is set to &amp;quot;off&amp;quot;, the display shows the value converted to its respective physical unit (m/s^2, °/s, V).&lt;br /&gt;
&lt;br /&gt;
Table 1.5 presents the CAN messages for the Sensorboard Acceleration &amp;amp; Datalogging.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.5: Sensorboard Acceleration&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x010 || Longitudinal Acceleration (a&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x011 || Lateral Acceleration (a&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x012 || Rotation (ω) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq3.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00d || Voltage (U) of the electrical system’s battery || 200ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq4.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Data Logging====&lt;br /&gt;
&lt;br /&gt;
The Sensorboard Acceleration &amp;amp; Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.&lt;br /&gt;
&lt;br /&gt;
;LED &amp;quot;LOGGER ON&amp;quot;&lt;br /&gt;
:When this LED is on, the SD card is present, has been detected and the file could be opened for writing.&lt;br /&gt;
;LED &amp;quot;LOGGER WRI&amp;quot;&lt;br /&gt;
:This LED blinks once each time a 512 Byte sector is dumped to the SD card. A good indicator if logging actually works. Every 8 sectors the file size is updated, resulting in an irregularity in the blinking. Thus, the filesize always is a multiple of 512 * 8 = 4096 Bytes. You can configure this number in the Makefile.&lt;br /&gt;
:The Write LED is turned on after the SD card has been initialized. If it stays on and the &amp;quot;LOGGER ON&amp;quot; LED stays off, the file system could not be initialized. Most likely this means that the SD card has the wrong format, but for some reasons even if the format is correct, filesystem initalization always fails on some cards.&lt;br /&gt;
&lt;br /&gt;
* File Naming Scheme&lt;br /&gt;
** The data is stored to a newly created file with the naming scheme LOG&amp;lt;nr&amp;gt;.CAN. The &amp;lt;nr&amp;gt; part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.&lt;br /&gt;
&lt;br /&gt;
* Requirements for the card&lt;br /&gt;
**The SD or MMC card must meet the following conditions:&lt;br /&gt;
*** A partition table exists.&lt;br /&gt;
*** The &amp;quot;DOS compatibility flag&amp;quot; must be set.&lt;br /&gt;
*** There is exactly one primary partition.&lt;br /&gt;
*** The partition&amp;#039;s type is &amp;quot;FAT16&amp;quot; (set partition code to 0x06 with fdisk).&lt;br /&gt;
*** The partition is formatted with FAT16, two fats.&lt;br /&gt;
&lt;br /&gt;
Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mkfs.vfat -F 16 /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
would create a valid FAT 16 partition.&lt;br /&gt;
&lt;br /&gt;
On a Windows XP system, formatting the card with FAT (not FAT32!) works.&lt;br /&gt;
&lt;br /&gt;
Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.&lt;br /&gt;
&lt;br /&gt;
* Log file format&lt;br /&gt;
** The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:&lt;br /&gt;
&lt;br /&gt;
  /----------------------------------------------------------\&lt;br /&gt;
  | Header | Timestamp | CAN ID  | Data Length |     Data    |&lt;br /&gt;
  |  0xca  |  4 Bytes  | 2 Bytes |    1 Byte   | 0 - 8 Bytes |&lt;br /&gt;
  \----------------------------------------------------------------------------------------/&lt;br /&gt;
&lt;br /&gt;
The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message&amp;#039;s id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.&lt;br /&gt;
&lt;br /&gt;
===== Plotting the logged Data =====&lt;br /&gt;
There are several ways to evaluate the logged data graphically. Here is how to do it with Gnuplot, that is available for all common operating systems. The logged Data has the following format: TIMESTAMP:CAN-ID:VALUE.&lt;br /&gt;
In Gnuplot type:&lt;br /&gt;
  &lt;br /&gt;
  # &amp;lt;- Comment, you do not have to write, what comes after #&lt;br /&gt;
  file = &amp;quot;C:\\the\\directory\\LOGxxxx.txt&amp;quot;     # \ has to be escaped with \\&lt;br /&gt;
  show = 10&lt;br /&gt;
  set datafile separator &amp;#039;:&amp;#039;&lt;br /&gt;
  plot file using 1:($2 == show ? $3 : 1/0)&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First we simply save the path to our Log-file to &amp;#039;file&amp;#039;. After that, we save a constant to &amp;#039;show&amp;#039; that says us, which channel we want to plot. The third line says Gnuplot, what separates each data information from another. In our log files, separator is &amp;#039;:&amp;#039;.&lt;br /&gt;
The last line does the plotting: Define x-Axes equals column 1 of our Log file; y-Axes is column 3, but only if column 2 of the same row equals our defined &amp;#039;show&amp;#039;-variable, otherwise y is a number Gnuplot isn&amp;#039;t able to plot.&lt;br /&gt;
&lt;br /&gt;
This will throw a window onto the screen.&lt;br /&gt;
&lt;br /&gt;
If you want to plot more data into one single screen, you can do this by simply typing&lt;br /&gt;
&lt;br /&gt;
  multiplot&lt;br /&gt;
&lt;br /&gt;
before or after the first plot.&lt;br /&gt;
&lt;br /&gt;
You can get further information on and download gnuplot on gnuplot.info[http://gnuplot.info]&lt;br /&gt;
&lt;br /&gt;
==Actorboard==&lt;br /&gt;
The ActorBoard&amp;#039;s task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.&lt;br /&gt;
&lt;br /&gt;
With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:&lt;br /&gt;
** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus&lt;br /&gt;
** No new values arrive from the CAN bus (lost connectivity)&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.&lt;br /&gt;
&lt;br /&gt;
As described above, the Concept has two actuators, throttle motor and the steering servo.&lt;br /&gt;
&lt;br /&gt;
* Throttle&lt;br /&gt;
**The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.&lt;br /&gt;
* Steering Servo&lt;br /&gt;
**Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.&lt;br /&gt;
&lt;br /&gt;
Table 1.6 presents the CAN messages for the Actorboard.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.6: Actorboard&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_6_eq1.JPG]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard</id>
		<title>ECUs implementing Sensorboards and Actorboard</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_implementing_Sensorboards_and_Actorboard"/>
				<updated>2010-04-27T10:13:30Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Data Logging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.&lt;br /&gt;
&lt;br /&gt;
In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in the [[Electronic_System|Section Electronic_System]] in the Input and Output Processing levels of the Figure 1.3.&lt;br /&gt;
&lt;br /&gt;
==The AT90CAN128 board==&lt;br /&gt;
&lt;br /&gt;
The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].&lt;br /&gt;
&lt;br /&gt;
In the following, a table is presented for each ECU showing the CAN messages this ECU emits. In those tables, the &amp;quot;CAN-IDs&amp;quot; column presents the integer representing the ID of the message. Column &amp;quot;Semantics&amp;quot; describes the type (or meaning) of the message.  Column &amp;quot;Interval&amp;quot; describes the interval in which the message is sent. Finally, the column &amp;quot;Conversion&amp;quot; holds a formula that is used for converting the message content which is usually a float value to the integer data that is packed into the message.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Steering==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128. &lt;br /&gt;
&lt;br /&gt;
Table 1.2 presents the CAN messages for the Sensorboard steering.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.2: Sensorboard Steering&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00a || Wheel speed (ω) from rear left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x009 || Wheel speed (ω) from the front right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_2_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.&lt;br /&gt;
&lt;br /&gt;
Table 1.3 presents the CAN messages for the Sensorboard Throttle.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.3: Sensorboard Throttle&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x008 || Wheel speed (ω) from front left wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00b || Wheel speed (ω) from the rear right wheel || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_3_eq3.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].&lt;br /&gt;
&lt;br /&gt;
Table 1.4 presents the CAN message for the Sensorboard Distance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.4: Sensorboard Distance&amp;#039;s CAN message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x030 || Distance (d) to the next obstacle up front. || 65ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_4_eq1.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration &amp;amp; Datalogging==&lt;br /&gt;
&lt;br /&gt;
This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components. [[Image:Inertialboard_sensors.png|right|frame|Sensors for acceleration and yaw rate. Arrows indicate positive values.]]&lt;br /&gt;
&lt;br /&gt;
It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.&lt;br /&gt;
&lt;br /&gt;
Atop of this, since revision 1.2, it features a 8x2 digits LCD display and a 8 Pin DIP switch, intended for selecting the currently displayed information. The display gets updated every 250ms.&lt;br /&gt;
&lt;br /&gt;
Due to a design failure in revision 1.2, the display is mounted at the bottom side of the sensor board. This will be corrected in the next revision.&lt;br /&gt;
&lt;br /&gt;
* If DIP switch 1 is &amp;quot;on&amp;quot;, the display shows the current longitudinal acceleration (acc_x).&lt;br /&gt;
* Else if DIP switch 2 is &amp;quot;on&amp;quot;, the display shows the current lateral acceleration (acc_y).&lt;br /&gt;
* Else if DIP switch 3 is &amp;quot;on&amp;quot;, the display shows the current yaw rate.&lt;br /&gt;
* Else if DIP switch 4 is &amp;quot;on&amp;quot;, the display shows the current supply voltage.&lt;br /&gt;
* Else if DIP switch 5 is &amp;quot;on&amp;quot;, the display shows the filename that the data is logged to (if SD card is present) and the total number of bytes that have been written to this file so far.&lt;br /&gt;
* Independent of the other switches, the DIP 8 switch selects the mode of the display. If it is set to &amp;quot;on&amp;quot;, the current raw value (as transferred over the CAN bus) is shown, if it is set to &amp;quot;off&amp;quot;, the display shows the value converted to its respective physical unit (m/s^2, °/s, V).&lt;br /&gt;
&lt;br /&gt;
Table 1.5 presents the CAN messages for the Sensorboard Acceleration &amp;amp; Datalogging.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.5: Sensorboard Acceleration&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x010 || Longitudinal Acceleration (a&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq1.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x011 || Lateral Acceleration (a&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq2.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x012 || Rotation (ω) || 50ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq3.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00d || Voltage (U) of the electrical system’s battery || 200ms || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_5_eq4.JPG]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Data Logging====&lt;br /&gt;
&lt;br /&gt;
The Sensorboard Acceleration &amp;amp; Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.&lt;br /&gt;
&lt;br /&gt;
;LED &amp;quot;LOGGER ON&amp;quot;&lt;br /&gt;
:When this LED is on, the SD card is present, has been detected and the file could be opened for writing.&lt;br /&gt;
;LED &amp;quot;LOGGER WRI&amp;quot;&lt;br /&gt;
:This LED blinks once each time a 512 Byte sector is dumped to the SD card. A good indicator if logging actually works. Every 8 sectors the file size is updated, resulting in an irregularity in the blinking. Thus, the filesize always is a multiple of 512 * 8 = 4096 Bytes. You can configure this number in the Makefile.&lt;br /&gt;
:The Write LED is turned on after the SD card has been initialized. If it stays on and the &amp;quot;LOGGER ON&amp;quot; LED stays off, the file system could not be initialized. Most likely this means that the SD card has the wrong format, but for some reasons even if the format is correct, filesystem initalization always fails on some cards.&lt;br /&gt;
&lt;br /&gt;
* File Naming Scheme&lt;br /&gt;
** The data is stored to a newly created file with the naming scheme LOG&amp;lt;nr&amp;gt;.CAN. The &amp;lt;nr&amp;gt; part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.&lt;br /&gt;
&lt;br /&gt;
* Requirements for the card&lt;br /&gt;
**The SD or MMC card must meet the following conditions:&lt;br /&gt;
*** A partition table exists.&lt;br /&gt;
*** The &amp;quot;DOS compatibility flag&amp;quot; must be set.&lt;br /&gt;
*** There is exactly one primary partition.&lt;br /&gt;
*** The partition&amp;#039;s type is &amp;quot;FAT16&amp;quot; (set partition code to 0x06 with fdisk).&lt;br /&gt;
*** The partition is formatted with FAT16, two fats.&lt;br /&gt;
&lt;br /&gt;
Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mkfs.vfat -F 16 /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
would create a valid FAT 16 partition.&lt;br /&gt;
&lt;br /&gt;
On a Windows XP system, formatting the card with FAT (not FAT32!) works.&lt;br /&gt;
&lt;br /&gt;
Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.&lt;br /&gt;
&lt;br /&gt;
* Log file format&lt;br /&gt;
** The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:&lt;br /&gt;
&lt;br /&gt;
  /----------------------------------------------------------\&lt;br /&gt;
  | Header | Timestamp | CAN ID  | Data Length |     Data    |&lt;br /&gt;
  |  0xca  |  4 Bytes  | 2 Bytes |    1 Byte   | 0 - 8 Bytes |&lt;br /&gt;
  \----------------------------------------------------------------------------------------/&lt;br /&gt;
&lt;br /&gt;
The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message&amp;#039;s id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.&lt;br /&gt;
&lt;br /&gt;
===== Plotting the logged Data =====&lt;br /&gt;
There are several ways to evaluate the logged data graphically. Here is how to do it with Gnuplot, that is available for all common operating systems. The logged Data has the following format: TIMESTAMP:CAN-ID:VALUE.&lt;br /&gt;
In Gnuplot type:&lt;br /&gt;
  &lt;br /&gt;
  # &amp;lt;- Comment, you do not have to write, what comes after #&lt;br /&gt;
  file = &amp;quot;C:\\the\\directory\\LOGxxxx.txt&amp;quot;     # \ has to be escaped with \\&lt;br /&gt;
  show = 10&lt;br /&gt;
  set datafile separator &amp;#039;:&amp;#039;&lt;br /&gt;
  plot file using 1:($2 == show ? $3 : 1/0)&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First we simply save the path to our Log-file to &amp;#039;file&amp;#039;. After that, we save a constant to &amp;#039;show&amp;#039; that says us, which channel we want to plot. The third line says Gnuplot, what separates each data information from another. In our log files, separator is &amp;#039;:&amp;#039;.&lt;br /&gt;
The last line does the plotting: Define x-Axes equals column 1 of our Log file; y-Axes is column 3, but only if column 2 of the same row equals our defined &amp;#039;show&amp;#039;-variable, otherwise y is a number Gnuplot isn&amp;#039;t able to plot.&lt;br /&gt;
&lt;br /&gt;
This will throw a window onto the screen.&lt;br /&gt;
&lt;br /&gt;
You can get further information on and download gnuplot on gnuplot.info[http://gnuplot.info]&lt;br /&gt;
&lt;br /&gt;
==Actorboard==&lt;br /&gt;
The ActorBoard&amp;#039;s task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.&lt;br /&gt;
&lt;br /&gt;
With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:&lt;br /&gt;
** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus&lt;br /&gt;
** No new values arrive from the CAN bus (lost connectivity)&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.&lt;br /&gt;
&lt;br /&gt;
As described above, the Concept has two actuators, throttle motor and the steering servo.&lt;br /&gt;
&lt;br /&gt;
* Throttle&lt;br /&gt;
**The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.&lt;br /&gt;
* Steering Servo&lt;br /&gt;
**Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.&lt;br /&gt;
&lt;br /&gt;
Table 1.6 presents the CAN messages for the Actorboard.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.6: Actorboard&amp;#039;s CAN messages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! CAN ID !! Semantics !! Interval !! Conversion&lt;br /&gt;
|-&lt;br /&gt;
| 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s || align=&amp;quot;center&amp;quot; width=&amp;quot;150px&amp;quot; | [[Image:Table2_6_eq1.JPG]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T09:21:12Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The current mode is shown on the EmergencyLED which is switched on when in stop mode, and off when in running mode.&lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
The SHR-7 Decoder receives signals via the 433,920 MHz band and decodes them to a digital signal (shown in the next section).&lt;br /&gt;
&lt;br /&gt;
Technical Data:&lt;br /&gt;
* Sending via 433,920 MHz&lt;br /&gt;
* Bandwidth: 20 Hz to 2kHz&lt;br /&gt;
* Current: 7 to 14 V DC&lt;br /&gt;
* Power consumption: 6,4mA&lt;br /&gt;
&lt;br /&gt;
For more Information read [[Image:Shr7.pdf|this documentation (PDF)]]&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T09:16:44Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* SHR7 Decoder/Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
The SHR-7 Decoder receives signals via the 433,920 MHz band and decodes them to a digital signal (shown in the next section).&lt;br /&gt;
&lt;br /&gt;
Technical Data:&lt;br /&gt;
* Sending via 433,920 MHz&lt;br /&gt;
* Bandwidth: 20 Hz to 2kHz&lt;br /&gt;
* Current: 7 to 14 V DC&lt;br /&gt;
* Power consumption: 6,4mA&lt;br /&gt;
&lt;br /&gt;
For more Information read [[Image:Shr7.pdf|this documentation (PDF)]]&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T09:12:12Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* SHR7 Decoder/Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
The SHR-7 Decoder receives signals via the 433,920 MHz band and decodes them to a digital signal.&lt;br /&gt;
&lt;br /&gt;
Technical Data:&lt;br /&gt;
* Sending via 433,920 MHz&lt;br /&gt;
* Bandwidth: 20 Hz to 2kHz&lt;br /&gt;
* Current: 7 to 14 V DC&lt;br /&gt;
* Power consumption: 6,4mA&lt;br /&gt;
&lt;br /&gt;
For more Information read [[Image:Shr7.pdf|this documentation (PDF)]]&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T09:11:55Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* SHR7 Decoder/Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
The SHR-7 Decoder receives signals via the 433,920 MHz band and decodes them to a digital signal.&lt;br /&gt;
&lt;br /&gt;
Technical Data:&lt;br /&gt;
* Sending via 433,920 MHz&lt;br /&gt;
* Bandwidth: 20 Hz to 2kHz&lt;br /&gt;
* Current: 7 to 14 V DC&lt;br /&gt;
* Power consumption: 6,4mA&lt;br /&gt;
&lt;br /&gt;
For more Information read [[Shr7.pdf|this documentation (PDF)]]&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T09:11:19Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* SHR7 Decoder/Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
The SHR-7 Decoder receives signals via the 433,920 MHz band and decodes them to a digital signal.&lt;br /&gt;
&lt;br /&gt;
Technical Data:&lt;br /&gt;
* Sending via 433,920 MHz&lt;br /&gt;
* Bandwidth: 20 Hz to 2kHz&lt;br /&gt;
* Current: 7 to 14 V DC&lt;br /&gt;
* Power consumption: 6,4mA&lt;br /&gt;
&lt;br /&gt;
For more Information read [[Image:Shr7.pdf|this documentation (PDF)]]&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T09:10:53Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* SHR7 Decoder/Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
The SHR-7 Decoder receives signals via the 433,920 MHz band and decodes them to a digital signal.&lt;br /&gt;
&lt;br /&gt;
Technical Data:&lt;br /&gt;
* Sending via 433,920 MHz&lt;br /&gt;
* Bandwidth: 20 Hz to 2kHz&lt;br /&gt;
* Current: 7 to 14 V DC&lt;br /&gt;
* Power consumption: 6,4mA&lt;br /&gt;
&lt;br /&gt;
For more Information read [[File:Shr7.pdf|this documentation (PDF)]]&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7.pdf</id>
		<title>File:Shr7.pdf</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7.pdf"/>
				<updated>2010-04-23T09:10:33Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T09:10:03Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* SHR7 Decoder/Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
The SHR-7 Decoder receives signals via the 433,920 MHz band and decodes them to a digital signal.&lt;br /&gt;
&lt;br /&gt;
Technical Data:&lt;br /&gt;
* Sending via 433,920 MHz&lt;br /&gt;
* Bandwidth: 20 Hz to 2kHz&lt;br /&gt;
* Current: 7 to 14 V DC&lt;br /&gt;
* Power consumption: 6,4mA&lt;br /&gt;
&lt;br /&gt;
For more Information read [[File:shr7.pdf|this documentation (PDF)]]&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7_decoder_sm.png</id>
		<title>File:Shr7 decoder sm.png</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7_decoder_sm.png"/>
				<updated>2010-04-23T08:46:22Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: uploaded a new version of &amp;quot;Image:Shr7 decoder sm.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:45:26Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Prove correct order and validity of received characters through State Machine and decode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small. But you must be sure, to never get stuck in a state, that does no reading from the buffer.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:43:55Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Prove correct order and validity of received characters through State Machine and decode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
In the source code, the input tape is represented by a ring buffer &amp;quot;inputTape&amp;quot;. Due to the definite higher frequency of the main loop, this buffer can be very small.&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:36:36Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Switch the cars running state */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;br /&gt;
The mode switching is done via two self describing functions setStartMode() and setStopMode().&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:35:35Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: CHANGE_CAR_STATE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. This is further described in the next section.&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:34:59Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: ERROR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. But we don&amp;#039;t have to switch mode, if there is nothing to change. So two events lead to a change of mode: Car is in stop mode and three buttons have been pushed; or car is in start mode an any buttons have been pushed (the variable with informations about the buttons, has been set in GETBFLAG).&lt;br /&gt;
The functions for starting and stopping the car are setStartMode() and setStopMode().&lt;br /&gt;
&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
In this state errors and invalid inputs can be catched. At the moment, this state simply gives a short signal to the EmergencyLED.&lt;br /&gt;
After that, state is again switched to INIT.&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:25:49Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: CHANGE_CAR_STATE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
In this state, we decide whether to set the car to start, or to stop mode. But we don&amp;#039;t have to switch mode, if there is nothing to change. So two events lead to a change of mode: Car is in stop mode and three buttons have been pushed; or car is in start mode an any buttons have been pushed (the variable with informations about the buttons, has been set in GETBFLAG).&lt;br /&gt;
The functions for starting and stopping the car are setStartMode() and setStopMode().&lt;br /&gt;
&lt;br /&gt;
This states only transition is to INIT with no input.&lt;br /&gt;
&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:09:10Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: ENDSYNC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
The last receiving state waits until &amp;quot;00&amp;quot; is sent via the tape. If successfull, switch to CHANGE_CAR_STATE, otherwise switch to ERROR.&lt;br /&gt;
&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:08:02Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: GETBFLAG */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
This State waits until three characters &amp;#039;0&amp;#039;,&amp;#039;+&amp;#039; or &amp;#039;-&amp;#039; are received. These three characters represent the buttons that are pushed on the transmitter. These characters are saved to a variable, because they are needed in state CHANGE_CAR_STATE.&lt;br /&gt;
&lt;br /&gt;
State is switched to ENDSYNC if nothing bad happened; or to ERROR if so.&lt;br /&gt;
&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T08:05:20Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: MIDSYNC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
MIDSYNC State awaits for signals for middle synchronization. Three times &amp;#039;0&amp;#039; and the last character is &amp;#039;-&amp;#039;. If an error occurs, in the case of an invalid character, state will switch to ERROR; else to the next State GETBFLAG.&lt;br /&gt;
&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T07:58:41Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: STARTSYNC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape. After receiving &amp;#039;S&amp;#039;, state will be changed to GETID.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T07:58:07Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: GETID */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
After Synchronization was sent, GETID awaits 9 characters to be sent. For characters 1 to 5 and 7 to 9 values &amp;#039;+&amp;#039;,&amp;#039;-&amp;#039; and &amp;#039;0&amp;#039; are valid, for character 6 only &amp;#039;-&amp;#039; will lead to success. If this State was passed successfully, the state will switch to MIDSYNC. If an error occured, state will switch to ERROR State.&lt;br /&gt;
&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T07:54:50Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: STARTSYNC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
The Startsynchronization State waits (no active waiting) until the character &amp;#039;S&amp;#039; (for Synchronization) was sent to the tape.&lt;br /&gt;
&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-23T07:53:16Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* State: INIT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
Initialization State resets all values. Its only transition is to the STARTSYNC State via an empty input (eps).&lt;br /&gt;
&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Main_Page"/>
				<updated>2010-04-23T07:51:19Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* WELCOME */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==WELCOME==&lt;br /&gt;
&lt;br /&gt;
So here it is established, the Concept Car&amp;#039;s wiki.&lt;br /&gt;
&lt;br /&gt;
The Concept Car, presented in Figure 1.1, is an experimental embedded system. It is a research platform based on a remote control car and several resources allowing deployment of different classes of applications. The Car is a 1:5 scale radio controlled remote control car that is - depending on the ground conditions - capable of driving at a speed of up to 50 km/h.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:[[image:ConceptCarside.jpg|800px|Figure 1.1. Board Dimensions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This wiki describes the Concept Car, its structure, components, software and hardware architecture and functionalities and presents in a detailed way how to develop and deploy applications for the car.&lt;br /&gt;
&lt;br /&gt;
  The corresponding SVN can be accessed in [[Svn|this way]]. This should be a gathering point for all documentation.&lt;br /&gt;
&lt;br /&gt;
*[[CCar_Architecture|1 - Concept Car Architecture]]&lt;br /&gt;
**[[Mechanical_System|1.1 - Mechanical System]]&lt;br /&gt;
***[[Mechanical_System#Engine|1.1.1 - Engine]]&lt;br /&gt;
***[[Mechanical_System#Radio_Control|1.1.2 - Radio Control]]&lt;br /&gt;
***[[Mechanical_System#Steering_System|1.1.3 - Steering System]]&lt;br /&gt;
**[[Power_Supply|1.2. Power Supply]]&lt;br /&gt;
**[[Electronic_System|1.3 - Electronic System]]&lt;br /&gt;
***[[CAN_Bus|1.3.1 - CAN Bus]]&lt;br /&gt;
***[[Sensors|1.3.2 - Sensors]]&lt;br /&gt;
***[[Electronic Control Units|1.3.3 - Electronic Control Units]]&lt;br /&gt;
****[[ECUs implementing Sensorboards and Actorboard|1.3.3.1 - ECUs implementing Sensorboards and Actorboard]]&lt;br /&gt;
****[[ECU implementing Controlboard|1.3.3.2 - ECU implementing Controlboard]]&lt;br /&gt;
****[[ECUs Emergency|1.3.3.3 - ECUs implementing Emergencyboard]]&lt;br /&gt;
&lt;br /&gt;
*[[Application Development and Deployment|2 - Application development and deployment]]&lt;br /&gt;
**[[Platform Independent Application Development|2.1 - Platform Independent Application Development]]&lt;br /&gt;
***[[Platform Independent Application Development#2.1.1. Simulink_Models|2.1.1 - Simulink models]]&lt;br /&gt;
****[[Platform Independent Application Development#Software Application Code Generation|2.1.1.1 - Software Application Code Generation]]&lt;br /&gt;
**[[Platform Specific Code Generation|2.2 - Platform Specific Code Generation]]&lt;br /&gt;
**[[Application Deployment|2.3 - Application Deployment]]&lt;br /&gt;
***[[Flashing_the_ARM7_board|2.3.1 - Flashing the ARM7 board]]&lt;br /&gt;
***[[Deployment|2.3.2 - Deployment]]&lt;br /&gt;
***[[The_Cortex_M3_board|2.3.2 - About the newer Cortex M3 board]]&lt;br /&gt;
&lt;br /&gt;
*[[Adding Resources to the Concept Car|3 - Adding Resources to the Concept Car]]&lt;br /&gt;
&lt;br /&gt;
*[[Bibliography|4 - Bibliography]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-21T12:47:17Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
==== Analyze signals arriving from the shr7 decoder ====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Prove correct order and validity of received characters through State Machine and decode ====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
===== State: INIT =====&lt;br /&gt;
===== State: STARTSYNC =====&lt;br /&gt;
===== State: GETID =====&lt;br /&gt;
===== State: MIDSYNC =====&lt;br /&gt;
===== State: GETBFLAG =====&lt;br /&gt;
===== State: ENDSYNC =====&lt;br /&gt;
===== State: CHANGE_CAR_STATE =====&lt;br /&gt;
===== State: ERROR =====&lt;br /&gt;
&lt;br /&gt;
==== Switch the cars running state ====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-21T12:41:38Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
===== Analyze signals arriving from the shr7 decoder =====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Prove correct order and validity of received characters through State Machine and decode =====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Switch the cars running state =====&lt;br /&gt;
In SM state &amp;quot;CHANGE_CAR_STATE&amp;quot; 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&amp;#039;t need to set the car stop mode multiple times).&lt;br /&gt;
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).&lt;br /&gt;
If switching from stop to run mode, this procedure is simply repeated reverse (Set MUX pin to Gnd (0)).&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-21T12:16:57Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Prove correct order and validity of received characters through State Machine and decode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
===== Analyze signals arriving from the shr7 decoder =====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Prove correct order and validity of received characters through State Machine and decode =====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_sm.png]]&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7_decoder_sm.png</id>
		<title>File:Shr7 decoder sm.png</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7_decoder_sm.png"/>
				<updated>2010-04-21T12:16:04Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-21T12:02:51Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Software Component */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The hole process is split into three main parts:&lt;br /&gt;
* Analyze signals arriving from the shr7 decoder&lt;br /&gt;
* Prove signals arrive in correct order and decode signals&lt;br /&gt;
* Switch the state of the car (run - stop)&lt;br /&gt;
&lt;br /&gt;
===== Analyze signals arriving from the shr7 decoder =====&lt;br /&gt;
The signals arriving from the shr7 decoder can be split to 4 different codes, as shown in the next Figure:&lt;br /&gt;
&lt;br /&gt;
[[Image:Shr7_decoder_timings.png]]&lt;br /&gt;
;Synchronization (S)&lt;br /&gt;
: 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.&lt;br /&gt;
;-, +, 0&lt;br /&gt;
: Each of the other signals - in the further text, referred to as characters - are represented by the times between 4 signal rise and falls.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The received characters are then written to the State Machine input tape (discussed later on).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Prove correct order and validity of received characters through State Machine and decode =====&lt;br /&gt;
Each packet from the shr7 decoder can be split up into 5 parts:&lt;br /&gt;
* One character Start Synchronization&lt;br /&gt;
* Nine characters Identification of the transmitter (8 chars ID + 1 syn)&lt;br /&gt;
* Four characters Middle Synchronization&lt;br /&gt;
* Three characters each representing the&lt;br /&gt;
* Two characters end synchronization&lt;br /&gt;
These parts can be represented by states in a state machine:&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7_decoder_timings.png</id>
		<title>File:Shr7 decoder timings.png</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Shr7_decoder_timings.png"/>
				<updated>2010-04-21T11:21:09Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-21T09:07:19Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
== How the Emergency Board works ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Information ===&lt;br /&gt;
==== Emergency Board ====&lt;br /&gt;
==== SHR7 Decoder/Transmitter ====&lt;br /&gt;
&lt;br /&gt;
=== Software Component ===&lt;br /&gt;
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.&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency</id>
		<title>ECUs Emergency</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=ECUs_Emergency"/>
				<updated>2010-04-21T08:59:03Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: New page: 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, ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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&amp;#039;t work any more.&lt;br /&gt;
The Emergency Signal is given by an extra radio transmitter, sending on a frequency other then the main control unit.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
=== How the Emergency Board works ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Electrical Information ==&lt;br /&gt;
Don&amp;#039;t know yet...&lt;br /&gt;
&lt;br /&gt;
==&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	</feed>