<?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=Donald</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=Donald"/>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Special:Contributions/Donald"/>
		<updated>2026-05-05T10:27:34Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.2</generator>

	<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>2011-06-17T12:49:02Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* 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|The Fraunhofer IESE ConceptCar]]&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;
***[[FreeRTOS_CortexM3_HowTo|2.3.3 - Cortex M3 &amp;amp; FreeRTOS]]&lt;br /&gt;
**2.4 - Runtime Platforms&lt;br /&gt;
***[[FreeRTOS CortexM3 HowTo|2.4.1 - FreeRTOS CortexM3 HowTo]]&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>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors</id>
		<title>Sensors</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors"/>
				<updated>2011-06-14T15:14:00Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Wheel speed sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The monitoring of the environment is implemented in the Concept Car using different sensors. In the following, all the sensors are described.&lt;br /&gt;
&lt;br /&gt;
==Wheel speed sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:CNY70-pinout.jpg|thumb|150px|CNY 70 optical sensor]]&lt;br /&gt;
[[image:CCarWheel.JPG|thumb|150px|Black Stripes Marks inside the Concept Car Wheel]]&lt;br /&gt;
&lt;br /&gt;
The rotation speed of the wheels is measured with simple optical sensors, where 26 black stripes in the inside of the wheel are passing a photo sensor. A photo diode (CNY 70) detects the passing of the stripes, and the interval between two stripes passing is measured with a resolution of 0.5µs. Every 20ms the wheel speed of all four sensors is written to the CAN-Bus. Depending on the current wheel speed, one of the following conditions holds:&lt;br /&gt;
&lt;br /&gt;
# The wheel speed is so low that no black stripe has passed within the last 20ms (may happen if speed is lower than 692.3077°/s or 0.725m/s): The value 0xffffffff is sent via CAN.&lt;br /&gt;
# During 20ms exactly one black stripe has passed. In this case the period since the last stripe has passed is sent in the unit of 0.5µs. The last passing of a stripe may be several 20ms intervals ago, internally 24 bits are counted, resulting in a maximum interval of 0xffffff * 0.5µs = 8.39s. Values above that will be truncated.&lt;br /&gt;
# During 20ms multiple stripes pass. In this case the average value is taken.&lt;br /&gt;
&lt;br /&gt;
The sensory data from the wheel speed sensors is to be considered as extremely noisy, and should not be used by any system without applying adequate filtering algorithms, as described in [[Bibliography|[Mit09]]].&lt;br /&gt;
&lt;br /&gt;
==Distance Sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:SRF02_sensor.jpg|thumb|left|100px|SRF02 distance sensor]]&lt;br /&gt;
On the front side of the car there are two ultrasonic distance sensors. They are triggered in alternating order every 65ms to measure the distance to the next obstacle in front of the car. Their range is 15cm to 6m, with a resolution of 1cm. For further details consult the documentation, accessible under [[Bibliography|[RHW09]]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acceleration Sensors==&lt;br /&gt;
&lt;br /&gt;
The acceleration of the Concept Car is measured with the ADIS16006 sensors. The dual-axis accelerometer ADIS16006 is capable of measuring -5g to +5g at a resolution of 1,9mg at 60Hz measurement rate. The maximum measurement range is ±8g. It has a built-in temperature sensor to mask out the temperature drift of the measurement results. For further details consult the documentation [[Bibliography|[Ana07]]].&lt;br /&gt;
&lt;br /&gt;
==Rotation Sensor==&lt;br /&gt;
&lt;br /&gt;
The vehicle rotation along the yaw axis is measured using a rotation sensor of the type ADIS16100. The dynamic range of the yaw rate sensor ADIS16100 is 300°/s at a resolution of 0.244°/s. This sensor also provides temperature information for separating out the temperature drift. Further documentation can be found under [[Bibliography|[Ana09]]].&lt;br /&gt;
&lt;br /&gt;
==Radio Receiver Decoder==&lt;br /&gt;
&lt;br /&gt;
The Radio Receiver outputs a pulse width modulation (PWM) signal. The PWM signal from the radio receiver’s channels must be decoded to be usable inside the system. Therefore the length of the pulses (duty cycle is 5% to 10%) is measured and normalized, with 5% being -100 to 10% being +100. The resolution is 0.01%. Radio receiver signals are sent over the CAN-Bus whenever a PWM-pulse with a valid duty cycle has been measured, so under typical driving conditions every 20ms for each channel.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors</id>
		<title>Sensors</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors"/>
				<updated>2011-06-14T15:10:31Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Wheel speed sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The monitoring of the environment is implemented in the Concept Car using different sensors. In the following, all the sensors are described.&lt;br /&gt;
&lt;br /&gt;
==Wheel speed sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:CCarWheel.JPG|thumb|200px|Black Stripes Marks inside the Concept Car Wheel]]&lt;br /&gt;
&lt;br /&gt;
The rotation speed of the wheels is measured with simple optical sensors, where 26 black stripes in the inside of the wheel are passing a photo sensor.&lt;br /&gt;
&lt;br /&gt;
[[image:CNY70-pinout.jpg|thumb|left|150px|CNY 70 optical sensor]] A photo diode (CNY 70) detects the passing of the stripes, and the interval between two stripes passing is measured with a resolution of 0.5µs. Every 20ms the wheel speed of all four sensors is written to the CAN-Bus. Depending on the current wheel speed, one of the following conditions holds:&lt;br /&gt;
&lt;br /&gt;
# The wheel speed is so low that no black stripe has passed within the last 20ms (may happen if speed is lower than 692.3077°/s or 0.725m/s): The value 0xffffffff is sent via CAN.&lt;br /&gt;
# During 20ms exactly one black stripe has passed. In this case the period since the last stripe has passed is sent in the unit of 0.5µs. The last passing of a stripe may be several 20ms intervals ago, internally 24 bits are counted, resulting in a maximum interval of 0xffffff * 0.5µs = 8.39s. Values above that will be truncated.&lt;br /&gt;
# During 20ms multiple stripes pass. In this case the average value is taken.&lt;br /&gt;
&lt;br /&gt;
The sensory data from the wheel speed sensors is to be considered as extremely noisy, and should not be used by any system without applying adequate filtering algorithms, as described in [[Bibliography|[Mit09]]].&lt;br /&gt;
&lt;br /&gt;
==Distance Sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:SRF02_sensor.jpg|thumb|left|100px|SRF02 distance sensor]]&lt;br /&gt;
On the front side of the car there are two ultrasonic distance sensors. They are triggered in alternating order every 65ms to measure the distance to the next obstacle in front of the car. Their range is 15cm to 6m, with a resolution of 1cm. For further details consult the documentation, accessible under [[Bibliography|[RHW09]]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acceleration Sensors==&lt;br /&gt;
&lt;br /&gt;
The acceleration of the Concept Car is measured with the ADIS16006 sensors. The dual-axis accelerometer ADIS16006 is capable of measuring -5g to +5g at a resolution of 1,9mg at 60Hz measurement rate. The maximum measurement range is ±8g. It has a built-in temperature sensor to mask out the temperature drift of the measurement results. For further details consult the documentation [[Bibliography|[Ana07]]].&lt;br /&gt;
&lt;br /&gt;
==Rotation Sensor==&lt;br /&gt;
&lt;br /&gt;
The vehicle rotation along the yaw axis is measured using a rotation sensor of the type ADIS16100. The dynamic range of the yaw rate sensor ADIS16100 is 300°/s at a resolution of 0.244°/s. This sensor also provides temperature information for separating out the temperature drift. Further documentation can be found under [[Bibliography|[Ana09]]].&lt;br /&gt;
&lt;br /&gt;
==Radio Receiver Decoder==&lt;br /&gt;
&lt;br /&gt;
The Radio Receiver outputs a pulse width modulation (PWM) signal. The PWM signal from the radio receiver’s channels must be decoded to be usable inside the system. Therefore the length of the pulses (duty cycle is 5% to 10%) is measured and normalized, with 5% being -100 to 10% being +100. The resolution is 0.01%. Radio receiver signals are sent over the CAN-Bus whenever a PWM-pulse with a valid duty cycle has been measured, so under typical driving conditions every 20ms for each channel.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors</id>
		<title>Sensors</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors"/>
				<updated>2011-06-14T15:08:18Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Wheel speed sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The monitoring of the environment is implemented in the Concept Car using different sensors. In the following, all the sensors are described.&lt;br /&gt;
&lt;br /&gt;
==Wheel speed sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:CCarWheel.JPG|thumb|200px|Black Stripes Marks inside the Concept Car Wheel]]&lt;br /&gt;
&lt;br /&gt;
The rotation speed of the wheels is measured with simple optical sensors, where 26 black stripes in the inside of the wheel are passing a photo sensor.&lt;br /&gt;
&lt;br /&gt;
[[image:CNY70-pinout.jpg|thumb|left|150px|CNY 70 optical sensor]] A photo diode (CNY 70) detects the passing of the stripes, and from the interval since the last stripe has passed the wheel speed is derived. The resolution of the timers that measure the interval between two stripes is 0.5µs. Every 20ms the wheel speed of all four sensors is written to the CAN-Bus. Depending on the current wheel speed, one of the following conditions holds:&lt;br /&gt;
&lt;br /&gt;
# The wheel speed is so low that no black stripe has passed within the last 20ms (may happen if speed is lower than 692.3077°/s or 0.725m/s): The value 0xffffffff is sent via CAN.&lt;br /&gt;
# During 20ms exactly one black stripe has passed. In this case the period since the last stripe has passed is sent in the unit of 0.5µs. The last passing of a stripe may be several 20ms intervals ago, internally 24 bits are counted, resulting in a maximum interval of 0xffffff * 0.5µs = 8.39s. Values above that will be truncated.&lt;br /&gt;
# During 20ms multiple stripes pass. In this case the average value is taken.&lt;br /&gt;
&lt;br /&gt;
The sensory data from the wheel speed sensors is to be considered as extremely noisy, and should not be used by any system without applying adequate filtering algorithms, as described in [[Bibliography|[Mit09]]].&lt;br /&gt;
&lt;br /&gt;
==Distance Sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:SRF02_sensor.jpg|thumb|left|100px|SRF02 distance sensor]]&lt;br /&gt;
On the front side of the car there are two ultrasonic distance sensors. They are triggered in alternating order every 65ms to measure the distance to the next obstacle in front of the car. Their range is 15cm to 6m, with a resolution of 1cm. For further details consult the documentation, accessible under [[Bibliography|[RHW09]]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acceleration Sensors==&lt;br /&gt;
&lt;br /&gt;
The acceleration of the Concept Car is measured with the ADIS16006 sensors. The dual-axis accelerometer ADIS16006 is capable of measuring -5g to +5g at a resolution of 1,9mg at 60Hz measurement rate. The maximum measurement range is ±8g. It has a built-in temperature sensor to mask out the temperature drift of the measurement results. For further details consult the documentation [[Bibliography|[Ana07]]].&lt;br /&gt;
&lt;br /&gt;
==Rotation Sensor==&lt;br /&gt;
&lt;br /&gt;
The vehicle rotation along the yaw axis is measured using a rotation sensor of the type ADIS16100. The dynamic range of the yaw rate sensor ADIS16100 is 300°/s at a resolution of 0.244°/s. This sensor also provides temperature information for separating out the temperature drift. Further documentation can be found under [[Bibliography|[Ana09]]].&lt;br /&gt;
&lt;br /&gt;
==Radio Receiver Decoder==&lt;br /&gt;
&lt;br /&gt;
The Radio Receiver outputs a pulse width modulation (PWM) signal. The PWM signal from the radio receiver’s channels must be decoded to be usable inside the system. Therefore the length of the pulses (duty cycle is 5% to 10%) is measured and normalized, with 5% being -100 to 10% being +100. The resolution is 0.01%. Radio receiver signals are sent over the CAN-Bus whenever a PWM-pulse with a valid duty cycle has been measured, so under typical driving conditions every 20ms for each channel.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors</id>
		<title>Sensors</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors"/>
				<updated>2011-06-14T15:07:00Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Wheel speed sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The monitoring of the environment is implemented in the Concept Car using different sensors. In the following, all the sensors are described.&lt;br /&gt;
&lt;br /&gt;
==Wheel speed sensors==&lt;br /&gt;
&lt;br /&gt;
The rotation speed of the wheels is measured with simple optical sensors, where 26 black stripes in the inside of the wheel are passing a photo sensor. The Figure 1.5 shows the marks inside of the wheel.&lt;br /&gt;
&lt;br /&gt;
[[image:CCarWheel.JPG|thumb|200px|Figure 1.5. Black Stripes Marks inside the Concept Car Wheel]]&lt;br /&gt;
&lt;br /&gt;
[[image:CNY70-pinout.jpg|thumb|left|150px|CNY 70 optical sensor]] A photo diode (CNY 70) detects the passing of the stripes, and from the interval since the last stripe has passed the wheel speed is derived. The resolution of the timers that measure the interval between two stripes is 0.5µs. Every 20ms the wheel speed of all four sensors is written to the CAN-Bus. Depending on the current wheel speed, one of the following conditions holds:&lt;br /&gt;
&lt;br /&gt;
# The wheel speed is so low that no black stripe has passed within the last 20ms (may happen if speed is lower than 692.3077°/s or 0.725m/s): The value 0xffffffff is sent via CAN.&lt;br /&gt;
# During 20ms exactly one black stripe has passed. In this case the period since the last stripe has passed is sent in the unit of 0.5µs. The last passing of a stripe may be several 20ms intervals ago, internally 24 bits are counted, resulting in a maximum interval of 0xffffff * 0.5µs = 8.39s. Values above that will be truncated.&lt;br /&gt;
# During 20ms multiple stripes pass. In this case the average value is taken.&lt;br /&gt;
&lt;br /&gt;
The sensory data from the wheel speed sensors is to be considered as extremely noisy, and should not be used by any system without applying adequate filtering algorithms, as described in [[Bibliography|[Mit09]]].&lt;br /&gt;
&lt;br /&gt;
==Distance Sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:SRF02_sensor.jpg|thumb|left|100px|SRF02 distance sensor]]&lt;br /&gt;
On the front side of the car there are two ultrasonic distance sensors. They are triggered in alternating order every 65ms to measure the distance to the next obstacle in front of the car. Their range is 15cm to 6m, with a resolution of 1cm. For further details consult the documentation, accessible under [[Bibliography|[RHW09]]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acceleration Sensors==&lt;br /&gt;
&lt;br /&gt;
The acceleration of the Concept Car is measured with the ADIS16006 sensors. The dual-axis accelerometer ADIS16006 is capable of measuring -5g to +5g at a resolution of 1,9mg at 60Hz measurement rate. The maximum measurement range is ±8g. It has a built-in temperature sensor to mask out the temperature drift of the measurement results. For further details consult the documentation [[Bibliography|[Ana07]]].&lt;br /&gt;
&lt;br /&gt;
==Rotation Sensor==&lt;br /&gt;
&lt;br /&gt;
The vehicle rotation along the yaw axis is measured using a rotation sensor of the type ADIS16100. The dynamic range of the yaw rate sensor ADIS16100 is 300°/s at a resolution of 0.244°/s. This sensor also provides temperature information for separating out the temperature drift. Further documentation can be found under [[Bibliography|[Ana09]]].&lt;br /&gt;
&lt;br /&gt;
==Radio Receiver Decoder==&lt;br /&gt;
&lt;br /&gt;
The Radio Receiver outputs a pulse width modulation (PWM) signal. The PWM signal from the radio receiver’s channels must be decoded to be usable inside the system. Therefore the length of the pulses (duty cycle is 5% to 10%) is measured and normalized, with 5% being -100 to 10% being +100. The resolution is 0.01%. Radio receiver signals are sent over the CAN-Bus whenever a PWM-pulse with a valid duty cycle has been measured, so under typical driving conditions every 20ms for each channel.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:CNY70-pinout.jpg</id>
		<title>File:CNY70-pinout.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:CNY70-pinout.jpg"/>
				<updated>2011-06-14T12:42:05Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors</id>
		<title>Sensors</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors"/>
				<updated>2011-06-14T12:41:50Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Wheel speed sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The monitoring of the environment is implemented in the Concept Car using different sensors. In the following, all the sensors are described.&lt;br /&gt;
&lt;br /&gt;
==Wheel speed sensors==&lt;br /&gt;
&lt;br /&gt;
The rotation speed of the wheels is measured with simple optical sensors, where 26 black stripes in the inside of the wheel are passing a photo sensor. The Figure 1.5 shows the marks inside of the wheel.&lt;br /&gt;
&lt;br /&gt;
[[image:CCarWheel.JPG|thumb|200px|Figure 1.5. Black Stripes Marks inside the Concept Car Wheel]]&lt;br /&gt;
&lt;br /&gt;
[[image:CNY70-pinout.jpg|thumb|left|150px|CNY 70 optical sensor]] A photo diode (CNY 70) detects the passing of the stripes, and from the interval since the last stripe has passed the wheel speed is derived. The resolution of the timers that measure the interval between two stripes is 0.25µs. Every 50ms the wheel speed of all four sensors is written to the CAN-Bus. Depending on the current wheel speed, one of the following conditions holds:&lt;br /&gt;
&lt;br /&gt;
*1. The wheel speed is so low that no black stripe has passed within the last 50ms (may happen if speed is lower than 276.92°/s or 0.29m/s): The absence of a black stripe passing is communicated nevertheless&lt;br /&gt;
*2. During 50ms exactly one black stripe has passed. In this case the wheel speed is derived from this single value.&lt;br /&gt;
*3. During 50ms multiple stripes pass. In this case the average value is taken.&lt;br /&gt;
&lt;br /&gt;
Let   be the average interval length between two stripes with the resolution of 0.25µs. In the cases (2) and (3) the wheel speed can be calculated by Equation 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Equation2_1.JPG|thumb|200px|Equation 1.1]]&lt;br /&gt;
&lt;br /&gt;
The sensory data from the wheel speed sensors is to be considered as extremely noisy, and should not be used by any system without applying adequate filtering algorithms, as described in [[Bibliography|[Mit09]]].&lt;br /&gt;
&lt;br /&gt;
==Distance Sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:SRF02_sensor.jpg|thumb|left|100px|SRF02 distance sensor]]&lt;br /&gt;
On the front side of the car there are two ultrasonic distance sensors. They are triggered in alternating order every 65ms to measure the distance to the next obstacle in front of the car. Their range is 15cm to 6m, with a resolution of 1cm. For further details consult the documentation, accessible under [[Bibliography|[RHW09]]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acceleration Sensors==&lt;br /&gt;
&lt;br /&gt;
The acceleration of the Concept Car is measured with the ADIS16006 sensors. The dual-axis accelerometer ADIS16006 is capable of measuring -5g to +5g at a resolution of 1,9mg at 60Hz measurement rate. The maximum measurement range is ±8g. It has a built-in temperature sensor to mask out the temperature drift of the measurement results. For further details consult the documentation [[Bibliography|[Ana07]]].&lt;br /&gt;
&lt;br /&gt;
==Rotation Sensor==&lt;br /&gt;
&lt;br /&gt;
The vehicle rotation along the yaw axis is measured using a rotation sensor of the type ADIS16100. The dynamic range of the yaw rate sensor ADIS16100 is 300°/s at a resolution of 0.244°/s. This sensor also provides temperature information for separating out the temperature drift. Further documentation can be found under [[Bibliography|[Ana09]]].&lt;br /&gt;
&lt;br /&gt;
==Radio Receiver Decoder==&lt;br /&gt;
&lt;br /&gt;
The Radio Receiver outputs a pulse width modulation (PWM) signal. The PWM signal from the radio receiver’s channels must be decoded to be usable inside the system. Therefore the length of the pulses (duty cycle is 5% to 10%) is measured and normalized, with 5% being -100 to 10% being +100. The resolution is 0.01%. Radio receiver signals are sent over the CAN-Bus whenever a PWM-pulse with a valid duty cycle has been measured, so under typical driving conditions every 20ms for each channel.&lt;/div&gt;</summary>
		<author><name>Donald</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>2011-06-14T12:38:28Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Throttle */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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 [[Sensors#Wheel_speed_sensors|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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
===Connectors to external Sensors===&lt;br /&gt;
&lt;br /&gt;
As you can see on the picture, the Sensorboards Steering and Throttle both have 3 Connectors. One is for attaching the measured PWM signal, the other two are reserved for the Rotation Sensors. The Pinout is as follows:&lt;br /&gt;
# PWM Connector: &lt;br /&gt;
## Pin 1 --&amp;gt; PWM Input, digital levels&lt;br /&gt;
## Pin 2 --&amp;gt; Ground&lt;br /&gt;
# Sensor Connector:&lt;br /&gt;
## Pin 1 --&amp;gt; Ground&lt;br /&gt;
## Pin 2 --&amp;gt; (infrared) LED Power Supply, connect to the Anode and Cathode to ground&lt;br /&gt;
## Pin 3 --&amp;gt; Photo transistor Collector, connect Emitter to ground&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU decodes the throttle PWM channel from the radio receiver and the [[Sensors#Wheel_speed_sensors|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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity|PWM decoding and signal validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
* Else if DIP switch 6 is &amp;quot;on&amp;quot;, the display shows the current CAN load in CAN messages per second.&lt;br /&gt;
* Else if DIP switch 7 is &amp;quot;on&amp;quot;, the display shows the input signal for throttle and steering. If a signal is not present, a horizontal bar is shown, if the signal is present, a vertical bar presents its current value.&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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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 &amp;lt;tt&amp;gt;/dev/mmcblk0p1&amp;lt;/tt&amp;gt; is your MMC/SD card device&amp;#039;s primary partition,&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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>2011-06-14T12:38:05Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Steering */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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 [[Sensors#Wheel_speed_sensors|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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
===Connectors to external Sensors===&lt;br /&gt;
&lt;br /&gt;
As you can see on the picture, the Sensorboards Steering and Throttle both have 3 Connectors. One is for attaching the measured PWM signal, the other two are reserved for the Rotation Sensors. The Pinout is as follows:&lt;br /&gt;
# PWM Connector: &lt;br /&gt;
## Pin 1 --&amp;gt; PWM Input, digital levels&lt;br /&gt;
## Pin 2 --&amp;gt; Ground&lt;br /&gt;
# Sensor Connector:&lt;br /&gt;
## Pin 1 --&amp;gt; Ground&lt;br /&gt;
## Pin 2 --&amp;gt; (infrared) LED Power Supply, connect to the Anode and Cathode to ground&lt;br /&gt;
## Pin 3 --&amp;gt; Photo transistor Collector, connect Emitter to ground&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity|PWM decoding and signal validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
* Else if DIP switch 6 is &amp;quot;on&amp;quot;, the display shows the current CAN load in CAN messages per second.&lt;br /&gt;
* Else if DIP switch 7 is &amp;quot;on&amp;quot;, the display shows the input signal for throttle and steering. If a signal is not present, a horizontal bar is shown, if the signal is present, a vertical bar presents its current value.&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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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 &amp;lt;tt&amp;gt;/dev/mmcblk0p1&amp;lt;/tt&amp;gt; is your MMC/SD card device&amp;#039;s primary partition,&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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>2011-06-14T12:35:13Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Throttle */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
===Connectors to external Sensors===&lt;br /&gt;
&lt;br /&gt;
As you can see on the picture, the Sensorboards Steering and Throttle both have 3 Connectors. One is for attaching the measured PWM signal, the other two are reserved for the Rotation Sensors. The Pinout is as follows:&lt;br /&gt;
# PWM Connector: &lt;br /&gt;
## Pin 1 --&amp;gt; PWM Input, digital levels&lt;br /&gt;
## Pin 2 --&amp;gt; Ground&lt;br /&gt;
# Sensor Connector:&lt;br /&gt;
## Pin 1 --&amp;gt; Ground&lt;br /&gt;
## Pin 2 --&amp;gt; (infrared) LED Power Supply, connect to the Anode and Cathode to ground&lt;br /&gt;
## Pin 3 --&amp;gt; Photo transistor Collector, connect Emitter to ground&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity|PWM decoding and signal validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
* Else if DIP switch 6 is &amp;quot;on&amp;quot;, the display shows the current CAN load in CAN messages per second.&lt;br /&gt;
* Else if DIP switch 7 is &amp;quot;on&amp;quot;, the display shows the input signal for throttle and steering. If a signal is not present, a horizontal bar is shown, if the signal is present, a vertical bar presents its current value.&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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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 &amp;lt;tt&amp;gt;/dev/mmcblk0p1&amp;lt;/tt&amp;gt; is your MMC/SD card device&amp;#039;s primary partition,&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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>2011-06-14T12:33:59Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Steering */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
===Connectors to external Sensors===&lt;br /&gt;
&lt;br /&gt;
As you can see on the picture, the Sensorboards Steering and Throttle both have 3 Connectors. One is for attaching the measured PWM signal, the other two are reserved for the Rotation Sensors. The Pinout is as follows:&lt;br /&gt;
# PWM Connector: &lt;br /&gt;
## Pin 1 --&amp;gt; PWM Input, digital levels&lt;br /&gt;
## Pin 2 --&amp;gt; Ground&lt;br /&gt;
# Sensor Connector:&lt;br /&gt;
## Pin 1 --&amp;gt; Ground&lt;br /&gt;
## Pin 2 --&amp;gt; (infrared) LED Power Supply, connect to the Anode and Cathode to ground&lt;br /&gt;
## Pin 3 --&amp;gt; Photo transistor Collector, connect Emitter to ground&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
* Else if DIP switch 6 is &amp;quot;on&amp;quot;, the display shows the current CAN load in CAN messages per second.&lt;br /&gt;
* Else if DIP switch 7 is &amp;quot;on&amp;quot;, the display shows the input signal for throttle and steering. If a signal is not present, a horizontal bar is shown, if the signal is present, a vertical bar presents its current value.&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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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 &amp;lt;tt&amp;gt;/dev/mmcblk0p1&amp;lt;/tt&amp;gt; is your MMC/SD card device&amp;#039;s primary partition,&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Adding_Resources_to_the_Concept_Car</id>
		<title>Adding Resources to the Concept Car</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Adding_Resources_to_the_Concept_Car"/>
				<updated>2010-08-17T11:16:14Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Board Dimensions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Regarding Upgrades of the ConceptCar ==&lt;br /&gt;
&lt;br /&gt;
[[image:ECU_stack.jpg|thumb|right|300px|The ConceptCar&amp;#039;s ECU mount stack]]&lt;br /&gt;
The Concept Car has a modular architecture allowing the addition of resources in a simple way. In order to integrate a new ECU into the ConceptCar, these things are important:&lt;br /&gt;
#It is attached to the [[CAN_Bus|CAN bus]], but does not disturb the regular operation of the car. This means that no already used CAN IDs may be overwritten and that the bus load has to be low enough.&lt;br /&gt;
#It fits the form factor of the ECU stacks on the ConceptCar, so it can be easily and properly mounted.&lt;br /&gt;
#It does not interfere with the [[Power_Supply|ConceptCar&amp;#039;s power train]], especially does not short circuit the galvanic isolation.&lt;br /&gt;
Apart from that, new ECUs may interfere with whichever sensor or actor equipment should be mounted to the car.&lt;br /&gt;
&lt;br /&gt;
This page illustrates the demands regarding the form factor of the small boards so they can fit into the ECU stacks. There they are well mounted and protected against physical damage by the massive metal box next to them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Board Dimensions==&lt;br /&gt;
&lt;br /&gt;
[[image:StackableBoardLayout.png|frame|Figure 4.1. Board Dimensions]]&lt;br /&gt;
&lt;br /&gt;
All boards featuring an AT90CAN128 microcontroller are supposed to fit into any of the 8 spaces at the CAN bus box. Therefore they share the same dimensions, drill holes for mounting and SUB-D jack position. They all have the same dimensions to be interchangeable in place.&lt;br /&gt;
&lt;br /&gt;
This dimensions are precisely the same used for the SensorBoards in the old Hardware Revision 1.0, all Revisions &amp;gt;= 1.2 must comply with these dimensions.&lt;br /&gt;
&lt;br /&gt;
Since the boards can be stacked, it is a good idea to place all connectors, switches and LEDs near the borders. &lt;br /&gt;
&lt;br /&gt;
Figure 4.1 presents the board dimensions.&lt;br /&gt;
&lt;br /&gt;
===Schematic===&lt;br /&gt;
&lt;br /&gt;
First apply this in the schematic:&lt;br /&gt;
* Add the 4 drill holes as parts &amp;#039;&amp;#039;MOUNT-HOLE3.0&amp;#039;&amp;#039;&lt;br /&gt;
* The SUB-D CAN connector must be of type &amp;#039;&amp;#039;F09H&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Board===&lt;br /&gt;
&lt;br /&gt;
To get a proper board, follow these steps in eagle (when starting from scratch):&lt;br /&gt;
# Set the grid to &amp;#039;&amp;#039;1mm&amp;#039;&amp;#039;&lt;br /&gt;
# Move the edges of the dimension polygon so that it&amp;#039;s a square of 73mm x 73mm, with its origin being in the bottom left edge. &lt;br /&gt;
# Move the drill holes to the positions 4mm apart from each edge&lt;br /&gt;
# Rotate the SUB-D CAN connector to face upwards and move it to position 37.506mm/60.88mm. &amp;lt;tt&amp;gt;MOVE CAN_BUS (37.506mm 60.88mm)&amp;lt;/tt&amp;gt; would do this.&lt;br /&gt;
&lt;br /&gt;
==Operational Controls==&lt;br /&gt;
&lt;br /&gt;
[[image:Actorboard_boardDesignIllustration.png|frame|right|350px|Figure 4.2. An example of good placement of the operational controls and of their labeling.]]&lt;br /&gt;
&lt;br /&gt;
These are recommendations on what operational controls to use to supply a uniform look&amp;amp;feel (and in some aspects programming) of the sensor- and actor-boards. The placement is not critical, it just looks better this way.&lt;br /&gt;
&lt;br /&gt;
* The CAN bus driver is designed to signal the bus state with 2 LEDs (a green one for &amp;#039;&amp;#039;error active&amp;#039;&amp;#039; state and a red one for &amp;#039;&amp;#039;bus off&amp;#039;&amp;#039; state). Those LEDs are attached to I/O-Pins PA7 (red LED) and PA6 (green LED), over a resistor of 220 Ohms to ground each. The LEDs (package: &amp;lt;tt&amp;gt;CHIP-LED0805&amp;lt;/tt&amp;gt;) should be placed as in the list below&lt;br /&gt;
* A green power on LED (&amp;lt;tt&amp;gt;CHIP-LED0805&amp;lt;/tt&amp;gt;) that is directly attached to the power supply is recommended.&lt;br /&gt;
* If any additional LEDs are required, they should be placed at the lower border, like the CAN LEDs 200mil away from it or like in the list below.&lt;br /&gt;
* Connectors to peripherals or other boards must be low enough to avoid trouble with other boards in the stack. Recommended type is for example &amp;lt;tt&amp;gt;L02P&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;L03P&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;L05P&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Component placement:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Reset Switch: 550x275;&lt;br /&gt;
C 100n: 865x 415;&lt;br /&gt;
R 10k: 865x335;&lt;br /&gt;
&lt;br /&gt;
LEDS:&lt;br /&gt;
Power: Resistor (220 Ohms): 865x255;&lt;br /&gt;
LED: 65x175&lt;br /&gt;
&lt;br /&gt;
LEDs with Resistors from left to rigt:&lt;br /&gt;
R: 1075x25;&lt;br /&gt;
LED: 1075x175;&lt;br /&gt;
R: 1230x255;&lt;br /&gt;
LED: 1230x175;&lt;br /&gt;
R: 1550x255;&lt;br /&gt;
R: 1800x255;&lt;br /&gt;
R: 2025x255;&lt;br /&gt;
R: 2225x255;&lt;br /&gt;
&lt;br /&gt;
Diode BAS85: 2375x2745&lt;br /&gt;
&lt;br /&gt;
Diode Minimelf: 2440x2430, angle 270° &lt;br /&gt;
&lt;br /&gt;
Coil: 2215x2655, angle: 270°&lt;br /&gt;
&lt;br /&gt;
MAX1837: 2365x2630, angle: 90°&lt;br /&gt;
&lt;br /&gt;
Capacitor: 2285x2435&lt;br /&gt;
&lt;br /&gt;
Capacitor: 2595x2435, angle 270°&lt;br /&gt;
&lt;br /&gt;
AT90CAN128: 1825x840, angle 270° (not forced)&lt;br /&gt;
&lt;br /&gt;
CAN: 1475x2150&lt;br /&gt;
&lt;br /&gt;
JTAG: 2450x800&lt;br /&gt;
&lt;br /&gt;
ISP: 2450x1610&lt;br /&gt;
&lt;br /&gt;
ISP is mandatory, but JTAG can be omitted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;AT90CAN128 Pin Connections&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port A:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1:&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4:&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: CAN_STATUS0&lt;br /&gt;
&lt;br /&gt;
Pin7: CAN_STATUS1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port B:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1: SCK&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4:&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: &lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port C:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1: LED_OK&lt;br /&gt;
&lt;br /&gt;
Pin2: LED_PWM&lt;br /&gt;
&lt;br /&gt;
Pin3: LED_&lt;br /&gt;
&lt;br /&gt;
Pin4: LED_&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: &lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port D:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1:&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4: &lt;br /&gt;
&lt;br /&gt;
Pin5: TXCAN&lt;br /&gt;
&lt;br /&gt;
Pin6: RXCAN&lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port E:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0: PDI&lt;br /&gt;
&lt;br /&gt;
Pin1: PDO&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4:&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: &lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port F:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1:&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4: TCK&lt;br /&gt;
&lt;br /&gt;
Pin5: TMS&lt;br /&gt;
&lt;br /&gt;
Pin6: TDO&lt;br /&gt;
&lt;br /&gt;
Pin7: TDI&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T11:15:25Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* 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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
* Else if DIP switch 6 is &amp;quot;on&amp;quot;, the display shows the current CAN load in CAN messages per second.&lt;br /&gt;
* Else if DIP switch 7 is &amp;quot;on&amp;quot;, the display shows the input signal for throttle and steering. If a signal is not present, a horizontal bar is shown, if the signal is present, a vertical bar presents its current value.&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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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 &amp;lt;tt&amp;gt;/dev/mmcblk0p1&amp;lt;/tt&amp;gt; is your MMC/SD card device&amp;#039;s primary partition,&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T11:14:43Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* 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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
* Else if DIP switch 6 is &amp;quot;on&amp;quot;, the display shows the current CAN load in CAN messages per second.&lt;br /&gt;
* Else if DIP switch 7 is &amp;quot;on&amp;quot;, the display shows the input signal for throttle and steering. If a signal is not present, a horizontal bar is shown, if the signal is present, a vertical bar presents its current value.&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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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 &amp;lt;tt&amp;gt;/dev/mmcblk0&amp;lt;/tt&amp;gt; is your MMC/SD card device&amp;#039;s primary partition,&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T08:03:58Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* LCD Display */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
* Else if DIP switch 6 is &amp;quot;on&amp;quot;, the display shows the current CAN load in CAN messages per second.&lt;br /&gt;
* Else if DIP switch 7 is &amp;quot;on&amp;quot;, the display shows the input signal for throttle and steering. If a signal is not present, a horizontal bar is shown, if the signal is present, a vertical bar presents its current value.&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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:50:47Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* 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|The Fraunhofer IESE ConceptCar]]&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;
**2.4 - Runtime Platforms&lt;br /&gt;
***[[FreeRTOS CortexM3 HowTo|2.4.1 - FreeRTOS CortexM3 HowTo]]&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>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors</id>
		<title>Sensors</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors"/>
				<updated>2010-08-17T07:49:59Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Distance Sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The monitoring of the environment is implemented in the Concept Car using different sensors. In the following, all the sensors are described.&lt;br /&gt;
&lt;br /&gt;
==Wheel speed sensors==&lt;br /&gt;
&lt;br /&gt;
The rotation speed of the wheels is measured with simple optical sensors, where 26 black stripes in the inside of the wheel are passing a photo sensor. The Figure 1.5 shows the marks inside of the wheel.&lt;br /&gt;
&lt;br /&gt;
[[image:CCarWheel.JPG|thumb|200px|Figure 1.5. Black Stripes Marks inside the Concept Car Wheel]]&lt;br /&gt;
&lt;br /&gt;
A photo diode (CNY 70) detects the passing of the stripes, and from the interval since the last stripe has passed the wheel speed is derived. The resolution of the timers that measure the interval between two stripes is 0.25µs. Every 50ms the wheel speed of all four sensors is written to the CAN-Bus. Depending on the current wheel speed, one of the following conditions holds:&lt;br /&gt;
&lt;br /&gt;
*1. The wheel speed is so low that no black stripe has passed within the last 50ms (may happen if speed is lower than 276.92°/s or 0.29m/s): The absence of a black stripe passing is communicated nevertheless&lt;br /&gt;
*2. During 50ms exactly one black stripe has passed. In this case the wheel speed is derived from this single value.&lt;br /&gt;
*3. During 50ms multiple stripes pass. In this case the average value is taken.&lt;br /&gt;
&lt;br /&gt;
Let   be the average interval length between two stripes with the resolution of 0.25µs. In the cases (2) and (3) the wheel speed can be calculated by Equation 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Equation2_1.JPG|thumb|200px|Equation 1.1]]&lt;br /&gt;
&lt;br /&gt;
The sensory data from the wheel speed sensors is to be considered as extremely noisy, and should not be used by any system without applying adequate filtering algorithms, as described in [[Bibliography|[Mit09]]].&lt;br /&gt;
&lt;br /&gt;
==Distance Sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:SRF02_sensor.jpg|thumb|left|100px|SRF02 distance sensor]]&lt;br /&gt;
On the front side of the car there are two ultrasonic distance sensors. They are triggered in alternating order every 65ms to measure the distance to the next obstacle in front of the car. Their range is 15cm to 6m, with a resolution of 1cm. For further details consult the documentation, accessible under [[Bibliography|[RHW09]]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acceleration Sensors==&lt;br /&gt;
&lt;br /&gt;
The acceleration of the Concept Car is measured with the ADIS16006 sensors. The dual-axis accelerometer ADIS16006 is capable of measuring -5g to +5g at a resolution of 1,9mg at 60Hz measurement rate. The maximum measurement range is ±8g. It has a built-in temperature sensor to mask out the temperature drift of the measurement results. For further details consult the documentation [[Bibliography|[Ana07]]].&lt;br /&gt;
&lt;br /&gt;
==Rotation Sensor==&lt;br /&gt;
&lt;br /&gt;
The vehicle rotation along the yaw axis is measured using a rotation sensor of the type ADIS16100. The dynamic range of the yaw rate sensor ADIS16100 is 300°/s at a resolution of 0.244°/s. This sensor also provides temperature information for separating out the temperature drift. Further documentation can be found under [[Bibliography|[Ana09]]].&lt;br /&gt;
&lt;br /&gt;
==Radio Receiver Decoder==&lt;br /&gt;
&lt;br /&gt;
The Radio Receiver outputs a pulse width modulation (PWM) signal. The PWM signal from the radio receiver’s channels must be decoded to be usable inside the system. Therefore the length of the pulses (duty cycle is 5% to 10%) is measured and normalized, with 5% being -100 to 10% being +100. The resolution is 0.01%. Radio receiver signals are sent over the CAN-Bus whenever a PWM-pulse with a valid duty cycle has been measured, so under typical driving conditions every 20ms for each channel.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:SRF02_sensor.jpg</id>
		<title>File:SRF02 sensor.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:SRF02_sensor.jpg"/>
				<updated>2010-08-17T07:49:41Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors</id>
		<title>Sensors</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Sensors"/>
				<updated>2010-08-17T07:49:30Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Distance Sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The monitoring of the environment is implemented in the Concept Car using different sensors. In the following, all the sensors are described.&lt;br /&gt;
&lt;br /&gt;
==Wheel speed sensors==&lt;br /&gt;
&lt;br /&gt;
The rotation speed of the wheels is measured with simple optical sensors, where 26 black stripes in the inside of the wheel are passing a photo sensor. The Figure 1.5 shows the marks inside of the wheel.&lt;br /&gt;
&lt;br /&gt;
[[image:CCarWheel.JPG|thumb|200px|Figure 1.5. Black Stripes Marks inside the Concept Car Wheel]]&lt;br /&gt;
&lt;br /&gt;
A photo diode (CNY 70) detects the passing of the stripes, and from the interval since the last stripe has passed the wheel speed is derived. The resolution of the timers that measure the interval between two stripes is 0.25µs. Every 50ms the wheel speed of all four sensors is written to the CAN-Bus. Depending on the current wheel speed, one of the following conditions holds:&lt;br /&gt;
&lt;br /&gt;
*1. The wheel speed is so low that no black stripe has passed within the last 50ms (may happen if speed is lower than 276.92°/s or 0.29m/s): The absence of a black stripe passing is communicated nevertheless&lt;br /&gt;
*2. During 50ms exactly one black stripe has passed. In this case the wheel speed is derived from this single value.&lt;br /&gt;
*3. During 50ms multiple stripes pass. In this case the average value is taken.&lt;br /&gt;
&lt;br /&gt;
Let   be the average interval length between two stripes with the resolution of 0.25µs. In the cases (2) and (3) the wheel speed can be calculated by Equation 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Equation2_1.JPG|thumb|200px|Equation 1.1]]&lt;br /&gt;
&lt;br /&gt;
The sensory data from the wheel speed sensors is to be considered as extremely noisy, and should not be used by any system without applying adequate filtering algorithms, as described in [[Bibliography|[Mit09]]].&lt;br /&gt;
&lt;br /&gt;
==Distance Sensors==&lt;br /&gt;
&lt;br /&gt;
[[image:SRF02_sensor.jpg|thumb|left|100px|SRF02 distance sensor]]&lt;br /&gt;
On the front side of the car there are two ultrasonic distance sensors. They are triggered in alternating order every 65ms to measure the distance to the next obstacle in front of the car. Their range is 15cm to 6m, with a resolution of 1cm. For further details consult the documentation, accessible under [[Bibliography|[RHW09]]].&lt;br /&gt;
&lt;br /&gt;
==Acceleration Sensors==&lt;br /&gt;
&lt;br /&gt;
The acceleration of the Concept Car is measured with the ADIS16006 sensors. The dual-axis accelerometer ADIS16006 is capable of measuring -5g to +5g at a resolution of 1,9mg at 60Hz measurement rate. The maximum measurement range is ±8g. It has a built-in temperature sensor to mask out the temperature drift of the measurement results. For further details consult the documentation [[Bibliography|[Ana07]]].&lt;br /&gt;
&lt;br /&gt;
==Rotation Sensor==&lt;br /&gt;
&lt;br /&gt;
The vehicle rotation along the yaw axis is measured using a rotation sensor of the type ADIS16100. The dynamic range of the yaw rate sensor ADIS16100 is 300°/s at a resolution of 0.244°/s. This sensor also provides temperature information for separating out the temperature drift. Further documentation can be found under [[Bibliography|[Ana09]]].&lt;br /&gt;
&lt;br /&gt;
==Radio Receiver Decoder==&lt;br /&gt;
&lt;br /&gt;
The Radio Receiver outputs a pulse width modulation (PWM) signal. The PWM signal from the radio receiver’s channels must be decoded to be usable inside the system. Therefore the length of the pulses (duty cycle is 5% to 10%) is measured and normalized, with 5% being -100 to 10% being +100. The resolution is 0.01%. Radio receiver signals are sent over the CAN-Bus whenever a PWM-pulse with a valid duty cycle has been measured, so under typical driving conditions every 20ms for each channel.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:48:08Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Acceleration and Datalogging */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:47:41Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* LCD Display */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display status views&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:47:22Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* LCD Display */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display&amp;quot; widths=&amp;quot;160px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:47:14Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* LCD Display */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:46:59Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* LCD Display */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display&amp;quot; widths=&amp;quot;100px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;6&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
image:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
image:LCD_Display_Accel.jpg&lt;br /&gt;
image:LCD_Display_CANLoad.jpg&lt;br /&gt;
image:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:46:48Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* LCD Display */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display&amp;quot; widths=&amp;quot;100px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;6&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
File:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
File:LCD_Display_Accel.jpg&lt;br /&gt;
File:LCD_Display_CANLoad.jpg&lt;br /&gt;
File:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:46:39Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Acceleration and Datalogging */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display&amp;quot; widths=&amp;quot;100px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;6&amp;quot;&amp;gt;&lt;br /&gt;
File:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
File:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
File:LCD_Display_Accel.jpg&lt;br /&gt;
File:LCD_Display_CANLoad.jpg&lt;br /&gt;
File:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_Remote.jpg</id>
		<title>File:LCD Display Remote.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_Remote.jpg"/>
				<updated>2010-08-17T07:46:23Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_CANLoad.jpg</id>
		<title>File:LCD Display CANLoad.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_CANLoad.jpg"/>
				<updated>2010-08-17T07:46:04Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_Accel.jpg</id>
		<title>File:LCD Display Accel.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_Accel.jpg"/>
				<updated>2010-08-17T07:45:39Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_GYRO_Absolute.jpg</id>
		<title>File:LCD Display GYRO Absolute.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_GYRO_Absolute.jpg"/>
				<updated>2010-08-17T07:45:16Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_GYRO_Raw.jpg</id>
		<title>File:LCD Display GYRO Raw.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:LCD_Display_GYRO_Raw.jpg"/>
				<updated>2010-08-17T07:44:50Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:43:53Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* LCD Display */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display&amp;quot; widths=&amp;quot;100px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;6&amp;quot;&amp;gt;&lt;br /&gt;
image:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
File:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
File:LCD_Display_Accel.jpg&lt;br /&gt;
File:LCD_Display_CANLoad.jpg&lt;br /&gt;
File:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:43:33Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Acceleration and Datalogging */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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.&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;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCD Display===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;LCD Display&amp;quot; widths=&amp;quot;100px&amp;quot; heights=&amp;quot;100px&amp;quot; perrow=&amp;quot;6&amp;quot;&amp;gt;&lt;br /&gt;
File:LCD_Display_GYRO_Raw.jpg&lt;br /&gt;
File:LCD_Display_GYRO_Absolute.jpg&lt;br /&gt;
File:LCD_Display_Accel.jpg&lt;br /&gt;
File:LCD_Display_CANLoad.jpg&lt;br /&gt;
File:LCD_Display_Remote.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:38:34Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Acceleration and Datalogging */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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;
===LCD Display===&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</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-08-17T07:38:16Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Sensorboard Acceleration and Datalogging */&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;
All ECUs described on this page adhere to the [[Adding_Resources_to_the_Concept_Car|form factor for small ECUs on the ConceptCar]]. They all share the same MCU, an AT90CAN128 which is 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;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FR and CANID_WHEELSPEED_RL]] as well as [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
===PWM Decoding and Signal Validity===&lt;br /&gt;
&lt;br /&gt;
The ConceptCar receives the driver&amp;#039;s wishes from the remote control over a radio channel. The radio receiver may show very unpleasant behavior: on signal loss (either through remote control being shut down or too big distance) the receiver produces a random output signal. This can be seen when servos are directly connected to the receiver - when the remote control is off, the servo starts to twitch unpredictably.&lt;br /&gt;
&lt;br /&gt;
When steer by wire is enabled, these bad signals can be filtered, as the &amp;quot;normal&amp;quot; shape of an PWM signal is known: 20ms cycle length with 1ms to 2ms duty cycle. As these are not strict limits and a valid PWM signal may be a bit out of bounds, a valid PWM is assumed if&lt;br /&gt;
# its rising edge is 16ms - 18ms after the last rising edge and&lt;br /&gt;
# its duty cycle is 0.5ms - 2.5ms.&lt;br /&gt;
However, in the random noise, even pulses like these appear quite frequent, so for a better filtering, the signal is only assumed to be present if at least 3 consecutive valid PWM pulses have appeared.&lt;br /&gt;
The Sensorboards only transmit the measured PWM signal width if a valid signal is detected.&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Throttle==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_steering_throttle_rev1.2.jpg|thumb|right|Sensorboard Throttle, Revision 1.2]]&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. The throttle signal creates an acceleration signal (CANID_THROTTLE) for positive values (throttle lever on the remote pulled) and brake signals (CANID_BRAKEFL and CANID_BRAKEFR) for negative values (throttle lever pushed).&lt;br /&gt;
The thoughts in [[#PWM_Decoding_and_Signal_Validity]] hold as well for this board.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_WHEELSPEED|CANID_WHEELSPEED_FL and CANID_WHEELSPEED_RR]] as well as [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]] and [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] for a description of this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Distance==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_distance_rev1.2.jpg|thumb|right|Sensorboard Distance, Revision 1.2]]&lt;br /&gt;
&lt;br /&gt;
This ECU accesses the [[media:SRF02_datasheet.pdf|SRF02 distance sensor]] over an serial UART Bus.&lt;br /&gt;
&lt;br /&gt;
See [[CAN_Bus#CANID_DISTANCE|CANID_DISTANCE]] for more information about this ECU&amp;#039;s output signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sensorboard Acceleration and Datalogging==&lt;br /&gt;
&lt;br /&gt;
[[image:sensorboard_inertial_rev1.3.jpg|thumb|right|Sensorboard Acceleration, Gyro, Datalogging, Revision 1.3]]&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;
===LCD Display===&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;
* 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;
&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;
[[image:sensorboard_inertial_sd_slot.jpg|thumb|left|The SD Card Holder]]&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;
&lt;br /&gt;
[[image:actorboard_rev1.2.jpg|thumb|right|Actorboard, Revision 1.2]]&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. It has four channels, each capable of generating an independent PWM signal:&lt;br /&gt;
# Steering (servo)&lt;br /&gt;
# Throttle (brushless motor controller)&lt;br /&gt;
# Brake Front Left (servo)&lt;br /&gt;
# Brake Front Right (servo)&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 through 0x25) or processed values from the Controlboard (CAN ids 0x122 through 0x125) as inputs. On the CAN bus, it announces the current selection with [[CAN_Bus#CANID_SELECTJUMPER|a periodic message]]. See [[CAN_Bus#CANID_THROTTLE|CANID_THROTTLE]], [[CAN_Bus#CANID_BRAKE|CANID_BRAKEFL and CANID_BRAKEFR]] and [[CAN_Bus#CANID_STEERING|CANID_STEERING]] for more information about this ECU&amp;#039;s input signals.&lt;br /&gt;
&lt;br /&gt;
Based on the value from the CAN bus, the ECU implements the following features:&lt;br /&gt;
* No PWM signals are produced for a fixed period of time (default: 200ms) if a SensorBoard has sent a PWM error message&lt;br /&gt;
* If the last PWM message for one output is outdated (default: &amp;gt;100ms old), the respective channel stops generating a signal. To avoid damage to the Servos by shutting down the output signal too rapidly, it then generates a ramp towards the neutral PWM signal. The &amp;quot;SIGNAL&amp;quot; LED indicates the soundness of the 4 input channels by glowing for 5ms every 20ms if the respective channel is currently generating a PWM output. (Meaning that the LED is off if no channel does anything an completely on if all channels have valid data).&lt;br /&gt;
* A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals and LEDs to indicate that state. The selection is global for all channels.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Adding_Resources_to_the_Concept_Car</id>
		<title>Adding Resources to the Concept Car</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Adding_Resources_to_the_Concept_Car"/>
				<updated>2010-08-17T07:37:02Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Regarding Upgrades of the ConceptCar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Regarding Upgrades of the ConceptCar ==&lt;br /&gt;
&lt;br /&gt;
[[image:ECU_stack.jpg|thumb|right|300px|The ConceptCar&amp;#039;s ECU mount stack]]&lt;br /&gt;
The Concept Car has a modular architecture allowing the addition of resources in a simple way. In order to integrate a new ECU into the ConceptCar, these things are important:&lt;br /&gt;
#It is attached to the [[CAN_Bus|CAN bus]], but does not disturb the regular operation of the car. This means that no already used CAN IDs may be overwritten and that the bus load has to be low enough.&lt;br /&gt;
#It fits the form factor of the ECU stacks on the ConceptCar, so it can be easily and properly mounted.&lt;br /&gt;
#It does not interfere with the [[Power_Supply|ConceptCar&amp;#039;s power train]], especially does not short circuit the galvanic isolation.&lt;br /&gt;
Apart from that, new ECUs may interfere with whichever sensor or actor equipment should be mounted to the car.&lt;br /&gt;
&lt;br /&gt;
This page illustrates the demands regarding the form factor of the small boards so they can fit into the ECU stacks. There they are well mounted and protected against physical damage by the massive metal box next to them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Board Dimensions==&lt;br /&gt;
&lt;br /&gt;
[[image:StackableBoardLayout.png|thumb|200px|Figure 4.1. Board Dimensions]]&lt;br /&gt;
&lt;br /&gt;
All boards featuring an AT90CAN128 microcontroller are supposed to fit into any of the 8 spaces at the CAN bus box. Therefore they share the same dimensions, drill holes for mounting and SUB-D jack position. They all have the same dimensions to be interchangeable in place.&lt;br /&gt;
&lt;br /&gt;
This dimensions are precisely the same used for the SensorBoards in the old Hardware Revision 1.0, all Revisions &amp;gt;= 1.2 must comply with these dimensions.&lt;br /&gt;
&lt;br /&gt;
Since the boards can be stacked, it is a good idea to place all connectors, switches and LEDs near the borders. &lt;br /&gt;
&lt;br /&gt;
Figure 4.1 presents the board dimensions.&lt;br /&gt;
&lt;br /&gt;
===Schematic===&lt;br /&gt;
&lt;br /&gt;
First apply this in the schematic:&lt;br /&gt;
* Add the 4 drill holes as parts &amp;#039;&amp;#039;MOUNT-HOLE3.0&amp;#039;&amp;#039;&lt;br /&gt;
* The SUB-D CAN connector must be of type &amp;#039;&amp;#039;F09H&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Board===&lt;br /&gt;
&lt;br /&gt;
To get a proper board, follow these steps in eagle (when starting from scratch):&lt;br /&gt;
# Set the grid to &amp;#039;&amp;#039;1mm&amp;#039;&amp;#039;&lt;br /&gt;
# Move the edges of the dimension polygon so that it&amp;#039;s a square of 73mm x 73mm, with its origin being in the bottom left edge. &lt;br /&gt;
# Move the drill holes to the positions 4mm apart from each edge&lt;br /&gt;
# Rotate the SUB-D CAN connector to face upwards and move it to position 37.506mm/60.88mm. &amp;lt;tt&amp;gt;MOVE CAN_BUS (37.506mm 60.88mm)&amp;lt;/tt&amp;gt; would do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Operational Controls==&lt;br /&gt;
&lt;br /&gt;
[[image:Actorboard_boardDesignIllustration.png|frame|right|350px|Figure 4.2. An example of good placement of the operational controls and of their labeling.]]&lt;br /&gt;
&lt;br /&gt;
These are recommendations on what operational controls to use to supply a uniform look&amp;amp;feel (and in some aspects programming) of the sensor- and actor-boards. The placement is not critical, it just looks better this way.&lt;br /&gt;
&lt;br /&gt;
* The CAN bus driver is designed to signal the bus state with 2 LEDs (a green one for &amp;#039;&amp;#039;error active&amp;#039;&amp;#039; state and a red one for &amp;#039;&amp;#039;bus off&amp;#039;&amp;#039; state). Those LEDs are attached to I/O-Pins PA7 (red LED) and PA6 (green LED), over a resistor of 220 Ohms to ground each. The LEDs (package: &amp;lt;tt&amp;gt;CHIP-LED0805&amp;lt;/tt&amp;gt;) should be placed as in the list below&lt;br /&gt;
* A green power on LED (&amp;lt;tt&amp;gt;CHIP-LED0805&amp;lt;/tt&amp;gt;) that is directly attached to the power supply is recommended.&lt;br /&gt;
* If any additional LEDs are required, they should be placed at the lower border, like the CAN LEDs 200mil away from it or like in the list below.&lt;br /&gt;
* Connectors to peripherals or other boards must be low enough to avoid trouble with other boards in the stack. Recommended type is for example &amp;lt;tt&amp;gt;L02P&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;L03P&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;L05P&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Component placement:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Reset Switch: 550x275;&lt;br /&gt;
C 100n: 865x 415;&lt;br /&gt;
R 10k: 865x335;&lt;br /&gt;
&lt;br /&gt;
LEDS:&lt;br /&gt;
Power: Resistor (220 Ohms): 865x255;&lt;br /&gt;
LED: 65x175&lt;br /&gt;
&lt;br /&gt;
LEDs with Resistors from left to rigt:&lt;br /&gt;
R: 1075x25;&lt;br /&gt;
LED: 1075x175;&lt;br /&gt;
R: 1230x255;&lt;br /&gt;
LED: 1230x175;&lt;br /&gt;
R: 1550x255;&lt;br /&gt;
R: 1800x255;&lt;br /&gt;
R: 2025x255;&lt;br /&gt;
R: 2225x255;&lt;br /&gt;
&lt;br /&gt;
Diode BAS85: 2375x2745&lt;br /&gt;
&lt;br /&gt;
Diode Minimelf: 2440x2430, angle 270° &lt;br /&gt;
&lt;br /&gt;
Coil: 2215x2655, angle: 270°&lt;br /&gt;
&lt;br /&gt;
MAX1837: 2365x2630, angle: 90°&lt;br /&gt;
&lt;br /&gt;
Capacitor: 2285x2435&lt;br /&gt;
&lt;br /&gt;
Capacitor: 2595x2435, angle 270°&lt;br /&gt;
&lt;br /&gt;
AT90CAN128: 1825x840, angle 270° (not forced)&lt;br /&gt;
&lt;br /&gt;
CAN: 1475x2150&lt;br /&gt;
&lt;br /&gt;
JTAG: 2450x800&lt;br /&gt;
&lt;br /&gt;
ISP: 2450x1610&lt;br /&gt;
&lt;br /&gt;
ISP is mandatory, but JTAG can be omitted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;AT90CAN128 Pin Connections&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port A:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1:&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4:&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: CAN_STATUS0&lt;br /&gt;
&lt;br /&gt;
Pin7: CAN_STATUS1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port B:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1: SCK&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4:&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: &lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port C:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1: LED_OK&lt;br /&gt;
&lt;br /&gt;
Pin2: LED_PWM&lt;br /&gt;
&lt;br /&gt;
Pin3: LED_&lt;br /&gt;
&lt;br /&gt;
Pin4: LED_&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: &lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port D:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1:&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4: &lt;br /&gt;
&lt;br /&gt;
Pin5: TXCAN&lt;br /&gt;
&lt;br /&gt;
Pin6: RXCAN&lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port E:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0: PDI&lt;br /&gt;
&lt;br /&gt;
Pin1: PDO&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4:&lt;br /&gt;
&lt;br /&gt;
Pin5:&lt;br /&gt;
&lt;br /&gt;
Pin6: &lt;br /&gt;
&lt;br /&gt;
Pin7: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port F:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Pin0:&lt;br /&gt;
&lt;br /&gt;
Pin1:&lt;br /&gt;
&lt;br /&gt;
Pin2:&lt;br /&gt;
&lt;br /&gt;
Pin3:&lt;br /&gt;
&lt;br /&gt;
Pin4: TCK&lt;br /&gt;
&lt;br /&gt;
Pin5: TMS&lt;br /&gt;
&lt;br /&gt;
Pin6: TDO&lt;br /&gt;
&lt;br /&gt;
Pin7: TDI&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:ECU_stack.jpg</id>
		<title>File:ECU stack.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:ECU_stack.jpg"/>
				<updated>2010-08-17T07:36:18Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: uploaded a new version of &amp;quot;Image:ECU stack.jpg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:ECU_stack.jpg</id>
		<title>File:ECU stack.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:ECU_stack.jpg"/>
				<updated>2010-08-17T07:34:21Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: uploaded a new version of &amp;quot;Image:ECU stack.jpg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:SAL7-LA2.jpg</id>
		<title>File:SAL7-LA2.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:SAL7-LA2.jpg"/>
				<updated>2010-08-17T07:32:52Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: uploaded a new version of &amp;quot;Image:SAL7-LA2.jpg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:32:01Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|frame|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The battery can be cut off from the engine controller with an emergency switch (200A)&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Motor_control_and_panic_switch.jpg|thumb|right|400px|The engine control and the emergency switch]]&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|frame|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse rotation direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:31:40Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|frame|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The battery can be cut off from the engine controller with an emergency switch (200A)&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Motor_control_and_panic_switch.jpg|thumb|right|250px|The engine control and the emergency switch]]&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|frame|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse rotation direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Motor_control_and_panic_switch.jpg</id>
		<title>File:Motor control and panic switch.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:Motor_control_and_panic_switch.jpg"/>
				<updated>2010-08-17T07:30:35Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:30:23Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|frame|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The battery can be cut off from the engine controller with an emergency switch (200A)&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Motor_control_and_panic_switch.jpg|thumb|right|250px|The engine control and the emergency switch]]&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|frame|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse rotation direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:29:03Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|frame|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The battery can be cut off from the engine controller with an emergency switch (200A)&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Motor_control_and_panic_switch|thumb|right|250px|The engine control and the emergency switch]]&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|frame|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse rotation direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:26:44Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|frame|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|frame|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| x || Reverse rotation direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:24:02Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|frame|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|frame|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! Characteristics (in German) !! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (NiCd/NiMH) || 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (LiPo) || 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| Spannungsbereich (V) || 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| Dauerstrom (A) (2,4AH Akku) || 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| max. Strom (A) (15sec) || 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| Maße (mm) Länge || 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| Breite || 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| Höhe || 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) ohne Kabel || - || Weight (g) without cables&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) mit Kabel || 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| Kabelquerschnitt (mm²) || 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| BEC || / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| BEC Belastbarkeit max. (A) || / || BEC current max. (A)&lt;br /&gt;
|-&lt;br /&gt;
| BEC Kurzschlußfest || / || BEC short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Auto-Programmier-Modus || x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| Modusprogrammierung || / || Mode programming&lt;br /&gt;
|-&lt;br /&gt;
| ProgCARD fähig || x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| Heli Drehzahlregelung || x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| EMK-Bremse abschaltbar || x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| proportionale Bremse || / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| Verpolschutz || x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| Kurzschlußschutz || x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Anlaufschutz || x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| Strombegrenzung || x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| Übertemperaturschutz || x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| Unterspannungsabschaltung || x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| -&amp;quot;- abschaltbar || x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| Abschaltspann./Zelle variabel* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| Abregelung statt Abschaltung* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| aktiver Freilauf || x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| LED Statusanzeige || / || -&lt;br /&gt;
|-&lt;br /&gt;
| Taktfrequenz (kHz) || 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| Gesamte Kupferstärke (mm) || 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| Drehrichtungsumpolung || x || Reverse rotation direction&lt;br /&gt;
|-&lt;br /&gt;
| Bestellnummer || 4991 || Order number&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:23:46Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: /* Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|frame|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|thumb|500px|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! Characteristics (in German) !! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (NiCd/NiMH) || 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (LiPo) || 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| Spannungsbereich (V) || 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| Dauerstrom (A) (2,4AH Akku) || 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| max. Strom (A) (15sec) || 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| Maße (mm) Länge || 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| Breite || 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| Höhe || 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) ohne Kabel || - || Weight (g) without cables&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) mit Kabel || 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| Kabelquerschnitt (mm²) || 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| BEC || / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| BEC Belastbarkeit max. (A) || / || BEC current max. (A)&lt;br /&gt;
|-&lt;br /&gt;
| BEC Kurzschlußfest || / || BEC short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Auto-Programmier-Modus || x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| Modusprogrammierung || / || Mode programming&lt;br /&gt;
|-&lt;br /&gt;
| ProgCARD fähig || x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| Heli Drehzahlregelung || x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| EMK-Bremse abschaltbar || x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| proportionale Bremse || / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| Verpolschutz || x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| Kurzschlußschutz || x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Anlaufschutz || x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| Strombegrenzung || x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| Übertemperaturschutz || x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| Unterspannungsabschaltung || x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| -&amp;quot;- abschaltbar || x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| Abschaltspann./Zelle variabel* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| Abregelung statt Abschaltung* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| aktiver Freilauf || x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| LED Statusanzeige || / || -&lt;br /&gt;
|-&lt;br /&gt;
| Taktfrequenz (kHz) || 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| Gesamte Kupferstärke (mm) || 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| Drehrichtungsumpolung || x || Reverse rotation direction&lt;br /&gt;
|-&lt;br /&gt;
| Bestellnummer || 4991 || Order number&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:23:25Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|400px|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|thumb|500px|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|thumb|500px|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! Characteristics (in German) !! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (NiCd/NiMH) || 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (LiPo) || 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| Spannungsbereich (V) || 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| Dauerstrom (A) (2,4AH Akku) || 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| max. Strom (A) (15sec) || 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| Maße (mm) Länge || 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| Breite || 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| Höhe || 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) ohne Kabel || - || Weight (g) without cables&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) mit Kabel || 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| Kabelquerschnitt (mm²) || 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| BEC || / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| BEC Belastbarkeit max. (A) || / || BEC current max. (A)&lt;br /&gt;
|-&lt;br /&gt;
| BEC Kurzschlußfest || / || BEC short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Auto-Programmier-Modus || x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| Modusprogrammierung || / || Mode programming&lt;br /&gt;
|-&lt;br /&gt;
| ProgCARD fähig || x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| Heli Drehzahlregelung || x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| EMK-Bremse abschaltbar || x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| proportionale Bremse || / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| Verpolschutz || x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| Kurzschlußschutz || x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Anlaufschutz || x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| Strombegrenzung || x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| Übertemperaturschutz || x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| Unterspannungsabschaltung || x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| -&amp;quot;- abschaltbar || x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| Abschaltspann./Zelle variabel* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| Abregelung statt Abschaltung* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| aktiver Freilauf || x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| LED Statusanzeige || / || -&lt;br /&gt;
|-&lt;br /&gt;
| Taktfrequenz (kHz) || 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| Gesamte Kupferstärke (mm) || 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| Drehrichtungsumpolung || x || Reverse rotation direction&lt;br /&gt;
|-&lt;br /&gt;
| Bestellnummer || 4991 || Order number&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:ConceptCar_total_view_open.jpg</id>
		<title>File:ConceptCar total view open.jpg</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=File:ConceptCar_total_view_open.jpg"/>
				<updated>2010-08-17T07:23:07Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	<entry>
		<id>https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System</id>
		<title>Mechanical System</title>
		<link rel="alternate" type="text/html" href="https://conceptcar.iese.de:80/ConceptCar1/index.php?title=Mechanical_System"/>
				<updated>2010-08-17T07:22:55Z</updated>
		
		<summary type="html">&lt;p&gt;Donald: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
[[image:ConceptCar_total_view_open.jpg|thumb|right|The Fraunhofer IESE ConceptCar]]&lt;br /&gt;
&lt;br /&gt;
The base platform of the Concept Car is a RC Car Model CE-5 from Carson Modellbau. This platform has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* Scale is 1:5&lt;br /&gt;
* Dimensions (l*w*h) are 80cm * 40cm * 23 cm&lt;br /&gt;
* Weight is ~ 8.4kg&lt;br /&gt;
* Top speed is ~60km/h&lt;br /&gt;
* Rubber wheels, 12cm in diameter&lt;br /&gt;
* Gear reduction from motor shaft to rear wheels is 20:44 * 20:77 (2 transmissions)&lt;br /&gt;
* Differential gear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
&lt;br /&gt;
The Concept Car engine is based on an air-cooled sensorless brushless electrical motor, which is presented in Figure 1.1.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_1.JPG|thumb|500px|Figure 1.1. Basic Description of the Concept Car Engine]]&lt;br /&gt;
&lt;br /&gt;
Each part of the engine presented in Figure 1.1 is described in the following:&lt;br /&gt;
&lt;br /&gt;
* The motor is a 1930/9 from Lehner Motoren and its characteristics are shown in Figure 1.2 [[Bibliography|[LM09]]].&lt;br /&gt;
* The engine control is a Power JAZZ from Kontronik. Its characteristics are presented in Table 1.1 [[Bibliography|[Kon09]]].&lt;br /&gt;
* The power is supplied by an accumulator with a nominal voltage of ~21V and the ability to sustain a permanent discharge current of at least 80A. The actual type and internal construction of the accumulator is irrelevant, as long as these specifications are met. Currently a 5S1 LiPo accumulator is used.&lt;br /&gt;
* The 5-6V supply voltage of the steering servo (max. 3A) is generated by a high-efficiency step-down voltage converter.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure2_2.JPG|thumb|500px|Figure 1.2. Motor Characteristics]]&lt;br /&gt;
&lt;br /&gt;
Due to its sensorless nature, the engine tends to stutter when the car is pulling off.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Table 1.1: Kontronik Power JAZZ characteristics&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! Characteristics (in German) !! POWER JAZZ 63V !! Characteristics (in English)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (NiCd/NiMH) || 18-45 || Cell count (NiCd/NiMH)&lt;br /&gt;
|-&lt;br /&gt;
| Zellenzahl (LiPo) || 5-15 || Cell count (LiPo)&lt;br /&gt;
|-&lt;br /&gt;
| Spannungsbereich (V) || 13-63 || Operating Voltage (V)&lt;br /&gt;
|-&lt;br /&gt;
| Dauerstrom (A) (2,4AH Akku) || 120 || Contin. current (A) (2,4Ah battery)&lt;br /&gt;
|-&lt;br /&gt;
| max. Strom (A) (15sec) || 200 || Max. current (A) (15sec)&lt;br /&gt;
|-&lt;br /&gt;
| Maße (mm) Länge || 84 || Size (mm) length&lt;br /&gt;
|-&lt;br /&gt;
| Breite || 51 || width&lt;br /&gt;
|-&lt;br /&gt;
| Höhe || 35 || height&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) ohne Kabel || - || Weight (g) without cables&lt;br /&gt;
|-&lt;br /&gt;
| Gewicht (g) mit Kabel || 220 || Weight (g) with cables&lt;br /&gt;
|-&lt;br /&gt;
| Kabelquerschnitt (mm²) || 4/6 || Cable-cross-section (mm²)&lt;br /&gt;
|-&lt;br /&gt;
| BEC || / || BEC&lt;br /&gt;
|-&lt;br /&gt;
| BEC Belastbarkeit max. (A) || / || BEC current max. (A)&lt;br /&gt;
|-&lt;br /&gt;
| BEC Kurzschlußfest || / || BEC short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Auto-Programmier-Modus || x || Auto Programming Mode&lt;br /&gt;
|-&lt;br /&gt;
| Modusprogrammierung || / || Mode programming&lt;br /&gt;
|-&lt;br /&gt;
| ProgCARD fähig || x || ProcCARD ability&lt;br /&gt;
|-&lt;br /&gt;
| Heli Drehzahlregelung || x || Automatic Power Consumption APC&lt;br /&gt;
|-&lt;br /&gt;
| EMK-Bremse abschaltbar || x || EMF brake can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| proportionale Bremse || / || Proportional brake&lt;br /&gt;
|-&lt;br /&gt;
| Verpolschutz || x || Reverse polarity protection&lt;br /&gt;
|-&lt;br /&gt;
| Kurzschlußschutz || x || Short circuit protection&lt;br /&gt;
|-&lt;br /&gt;
| Anlaufschutz || x || False start protection&lt;br /&gt;
|-&lt;br /&gt;
| Strombegrenzung || x || Current limiting&lt;br /&gt;
|-&lt;br /&gt;
| Übertemperaturschutz || x || Overtemp. protection&lt;br /&gt;
|-&lt;br /&gt;
| Unterspannungsabschaltung || x || Undervoltage cutoff&lt;br /&gt;
|-&lt;br /&gt;
| -&amp;quot;- abschaltbar || x || -&amp;quot;- can be disabled&lt;br /&gt;
|-&lt;br /&gt;
| Abschaltspann./Zelle variabel* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| Abregelung statt Abschaltung* || x || Slow down instead of cutoff*&lt;br /&gt;
|-&lt;br /&gt;
| aktiver Freilauf || x || Active free wheeling circuit&lt;br /&gt;
|-&lt;br /&gt;
| LED Statusanzeige || / || -&lt;br /&gt;
|-&lt;br /&gt;
| Taktfrequenz (kHz) || 8-32 || PWM frequency (kHz)&lt;br /&gt;
|-&lt;br /&gt;
| Gesamte Kupferstärke (mm) || 1.9 || Total copper thickness&lt;br /&gt;
|-&lt;br /&gt;
| Drehrichtungsumpolung || x || Reverse rotation direction&lt;br /&gt;
|-&lt;br /&gt;
| Bestellnummer || 4991 || Order number&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Radio Control==&lt;br /&gt;
The ConceptCar is remotely operated via a standard 2 channel 27MHz radio transmitter system. The channels are used for throttle and steering data. The radio receiver generates a 50Hz PWM signal with 5% to 10% duty cycle.&lt;br /&gt;
&lt;br /&gt;
==Steering System==&lt;br /&gt;
The steering system has simple mechanics; a servo motor sets the steering angle. Within a range of ±30° the steering angle is set to (pulse – 1.5ms) * 1° / 0.018ms, where “pulse” denotes the length of a PWM pulse at a PWM frequency of 50Hz.&lt;br /&gt;
&lt;br /&gt;
==Brakes==&lt;br /&gt;
[[image:hydraulic_brakes.jpg|thumb|right|The ConceptCar&amp;#039;s hydraulic brakes]]&lt;br /&gt;
The ConceptCar features a set of hydraulic brakes on the front wheels. At the current state, they can not be triggered separately, but the electrical system is already prepared for that.&lt;/div&gt;</summary>
		<author><name>Donald</name></author>	</entry>

	</feed>