Sie sind auf Seite 1von 58

Technische Universität

München

Fakultät für Informatik

Bachelor Thesis

Implementation of the NI myRIO into the Robotino3 Robot and


Evaluation of the Perfomance

Patrick Grzywok
Technische Universität
München

Fakultät für Informatik

Bachelor Thesis

Implementation of the NI myRIO into the Robotino3 Robot and


Evaluation of the Perfomance

Einbindung eines NI myRIO-Moduls in den Robotino3 Roboter


und Evaluierung der Funktion

Author: Patrick Grzywok


Supervisor: Prof. Dr.-Ing. habil. Alois Knoll
Advisor: Dr. Christian Verbeek
Submission:
I assure the single handed composition of this master’s thesis only supported by declared
resources.

München,

(Patrick Grzywok)
Abstract

This bachelor thesis deals with the implementation of the NI myRIO platform into the
Festo Robotino3 base. For this project a LabVIEW Toolkit has been produced which
allows a simple access to the Robotino hardware.This Toolkit includes a control for the
DC engines and drivers for different I/O. Further a micro-controller has been programmed
for the new myRIO board of the Robotino and a web application made for a remote control
access.

Inhaltsangabe

In dieser Bachelorarbeit geht es um die Integration des NI myRIO in den Festo


Robotino3. Bei dieser Arbeit wurde unteranderem ein LabVIEW Toolkit fertig gestellt,
welches einen einfachen Zugang zur Robotino Hardware ermöglicht. Dieses Toolkit
inkludiert eine Regelung für die Gleichstrommotoren, Treiber für die I/O und andere
Funktionalitäten. Ferner wurde ein Microcontroller für eine neue myRIO Patine für den
Robotino programmiert und eine Webapplikation erstellt, welche eine Fernsteuerung des
Robotinos ermöglicht.
Contents

1 Introduction 3
1.1 Robotino3 and National Instruments myRIO . . . . . . . . . . . . . . . . . 3
1.2 Chapter Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 The Onboard Microcontroller and its Function 4


2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 The Mainloop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 The Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Omnidirectional Drive 7
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Control Law for Direct Current Motors . . . . . . . . . . . . . . . . . . . . 7
3.3 The Rotational Speed Control . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4 Omnidirectional Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.1 Calculation of the Resulting Velocities . . . . . . . . . . . . . . . . 14

4 Input/Output and Sensors 17


4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Digital In (DIN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Analog In 1-4 (AIN 1-4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.5 Serial Peripheral Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.5.1 Digital Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.5.2 Analog Digital Converter . . . . . . . . . . . . . . . . . . . . . . . . 21
4.5.2.1 Infrared Sensors . . . . . . . . . . . . . . . . . . . . . . . 21
4.5.2.2 Analog In 5-8 (AIN 5-8) . . . . . . . . . . . . . . . . . . . 22
4.5.3 CAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5 Manual Remote Control 23


5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 Websocket Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.4 Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

1
CONTENTS 2

6 The System 28
6.1 The Robotino myRIO Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.1.1 Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.1.2 Sensors, IO and other Functionalities . . . . . . . . . . . . . . . . . 30
6.1.2.1 SPI Depended VI . . . . . . . . . . . . . . . . . . . . . . . 31
6.1.2.2 SPI Independed VI . . . . . . . . . . . . . . . . . . . . . . 32
6.1.2.3 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2 Demonstrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2.1 Omni Drive Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2.2 Square Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2.3 Track Get Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2.4 Radar Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.2.5 Autonomous Drive Demo . . . . . . . . . . . . . . . . . . . . . . . . 35

Appendices 38

A myRIO Input/Output 39
A.1 Code Listing Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . 46

List of figures 50
Chapter 1

Introduction

1.1 Robotino3 and National Instruments myRIO

The Festo Robotino and National Instrument myRIO share their focus in the field
of educational and research work. The Robotino provides open source software. This
approach was also continued with the Robotino myRIO Toolkit. The Robotino myRIO
Toolkit provides drivers and API for the Robotino and some VI examples so that the user
can start their Robotino LabVIEW experience out of the box.

1.2 Chapter Survey

In particular for the myRIO a new board was developed for the access of the Robotino I/O.
This board contains a µ-controller which provides the start up and other functionality.
This is part of the Chapter 2. In Chapter 3 the features of the Omni Drive are examined
and the control loop used in the toolkit explained. The Chapter 4 deals with the properties
of the I/O and their implementation into the toolkit. The Robotino myRIO Toolkit and
the demonstrations are part of the chapter 6. Further a remote control software and
concept are introduced in chapter 5 .

3
Chapter 2

The Onboard Microcontroller and its


Function

2.1 Overview

The on-board microcontroller is necessary for keeping the system on after the ON/OFF
button is released. It serves as well as watchdog for the NI myRIO and it checks the battery
voltage. The microcontroller is an Atmel Attiny24a which runs on a 8 MHz internal
clock and has 12 I/O. Of those I/O some can serve as PWM, ADC or interrupt.[2] A
push-button with an built in indicator LED is used as ON/OFF button. The Table 2.1
shows the assignment of the pins. The micro controller runs a program which was flashed
via an AVR programmer and Atmel Studio. The program utilizes interrupts to satisfy the
requirements. Those requirements are the immediate shutdown if the measured voltages
is below 18 V and shutdown of the power transmission to the DC engines if the heartbeat
has a timeout. The state diagram of the program sequence can be seen in figure 2.1.

PIN Name Description


PA0 COVER PWR BTN Singal from the Button
PA1 V SYS measurement input of the system voltage
PA2 BAT1 ON RIO Signal from the NI myRIO
PA3 TINY BATTX ON Keeps the power supply ON for HIGH
PB0 CLK An external unused clockin
PB1 MOTOR OFF HIGH for Motor Off signal
PB2 COVER BTN LED Output for the led of the button
Table 2.1: Overview of the pin assignments

4
CHAPTER 2. THE ONBOARD MICROCONTROLLER AND ITS FUNCTION 5

Figure 2.1: State diagram of power button program


CHAPTER 2. THE ONBOARD MICROCONTROLLER AND ITS FUNCTION 6

2.2 The Mainloop

The main loop primary function is to poll the ON/OFF-buttons state and voltage value
of the Analog Digital Converter (ADC). Further a function is used which lets the LED
blink. This blinking indicates a changing state for the user and is as well used for time
measurement of the user input since its delays the main loop.
First all I/O are initialised this includes the ADC and the interrupts. Second the interrupts
are enabled then if the user pushes the button for a duration of 1.6 s or 2 blink cycles
the ON state is locked with the TINY BATTX ON signal. Finally the ADC value of the
voltage and the button status are polled and if the voltage is below minimum or the
Button pressed for 1s the ON state is released.

2.3 The Interrupts

Three interrupts are used. The first one is triggered on receiving the heartbeat signal
and resets the timer of the second interrupt. This interrupt has an counter which is
incremented for every call of this interrupt. When it is below 4 the LED blinks and the
H bridge is enabled else the OFF state is released. The third interrupt resets the counter
of the first interrupt in a period between 10Hz and 100 Hz. That means a signal from
the myRIO with 10 Hz enables the H bridge and a signal of 100 Hz shuts the Robotino
down. The Second interrupt disables the H-bridge if its timer has not been reset by the
first interrupt.
Chapter 3

Omnidirectional Drive

3.1 Overview

In this chapter the features of the omnidirectional drive of the Robotino3 are discussed.
First as the system includes three DC motors the physics and control law for such devices
are introduced. Second the omnidirectional laws of motion are reviewed. Further the use
cases and an implementation into the LabVIEW Toolkit are described.

3.2 Control Law for Direct Current Motors

Fundamentals of the Direct Current Motor

Direct Current electrical machines are simply described by the Lorenz Law (3.1).

F = q(E + v × B) (3.1)

Operating as a motor an electrical current flows through the armature and an B-Field is
produced by a field coil winding or by a permanent magnet in the stator. Thus a force
is induced which creates a torque and by this a rotation. Due to the moving armature a
stationary electrical contact is necessary. This linking element is called brush and it causes
friction which increases the need for maintenance compared to other electrical machines.

7
CHAPTER 3. OMNIDIRECTIONAL DRIVE 8

Figure 3.1: Block diagram of a DC motor [6]

The fundamental equation of the DC motor electrical circuit are [12] :

dia
Ua = Ra ia + La + Ea (3.2)
dt
Ea = k1 Φe ω (3.3)

τM = k1Φe ia (3.4)
dω 1
= (τM − τL ) (3.5)
dt J
Φe = f (ie ) (3.6)

The resulting block diagram of the system is showed in figure 3.1 and translates into the
transfer function (3.7) in the Laplace domain. Apparently it is a P T2 -system. [6]
1
k1 Φe
Gg = JLa 2
(3.7)
k12 Φ2
s + kJR
2 2s
a
+1

System Modeling

The Robotino3 omnidrive powertrain has 3 DC motors of the type GR42x40 from the
manufacturer Dunkermotoren. Those motors have permament magnets as magnetic flux
source and following features presented in the table 3.1. Now the transfer function for our
motors system can be found. The constant k1 Φe can be calculated with equation (3.4)
and the values from table 3.1. Therefore the resulting transfer function for the system of
CHAPTER 3. OMNIDIRECTIONAL DRIVE 9

Data Value
Nominal voltage 24 VDC
Stall torque 33 Ncm
Starting current 5.68 A
Terminal inductance 5.1 mH
Terminal resistance 4.2 Ω
Rotor inertia 110 gcm2
Table 3.1: Values from GR-42x40 datasheet [4]

the GR-42x40 is shown in equation (3.8) .

17.21212121
Gg = (3.8)
1.66 · 10−05 s2+ 0.013687079s + 1

From the damping ratio equation (3.9) it can be seen that D = 1.678668516 and therefore
D > 1 so that the system is aperiodic stable. Figure 3.2 shows a step response plot made
in MATLAB for this plant. r
Ra J
D= (3.9)
2k1 φe La

3.3 The Rotational Speed Control

Since the relation between input voltage and rotational speed is not proportional and the
system is also disturbed by a τload a control is necessary. The transfer function describes
a P T2 -system thus the use of a PI controller is applicable. The PI control in our case is
realized in a single 1 kHz real timed loop in LabVIEW. The Nyquist–Shannon sampling
theorem states that the sampling rate should be at least twice as much as the signal
frequency. But this is not sufficient for discrete control engineering as an rule of thumb a
sampling rate 10 to 20 times higher than the signal frequency has to be choosen.[7] The
frequency response bandwidth of the in MATLAB simulated system is 12.7181 Hz so that
a loop frequency of 1 kHz should be satisfactory. From a measurement of the real systems
step response 3.3 it is noticeable that it shares the characteristics of the step response
simulated in MATLAB 3.2. Settling time and slope of the curve seem to be similar. The
measurement was with 1000 samples per second taken with a PWM duty circle of 100%
and a time delay of 1000 Samples for the Heaviside function i.e., H [1000].
CHAPTER 3. OMNIDIRECTIONAL DRIVE 10

Figure 3.2: Step response for Plant (3.8)

Figure 3.3: Real system discrete step response with 1000 Samples per second
CHAPTER 3. OMNIDIRECTIONAL DRIVE 11

Figure 3.4: Histogramm of the time difference values in the real timed loop in loop at 1 kHz

Rotational Speed Measurement

For measurement of the rotational speed an encoder is used which delivers a quad-phase
signal for the myRIO input. The myRIO has 4 encoder inputs programmed in its shipping
FPGA personality. The encoder is directly attached to the motors axis without translation.
Per revolution 64·103 incremental signals are produced in quad phase mode and 16·103 in
step and direction mode. In the loop the rotational speed is measured as encoder signals
per millisecond as it is assumed that each loop iteration takes 1 ms. In a testing within
the PI control loop the time difference between iterations were measured with the High
Resolution Relative Seconds VI which has a resolution of less than 1 µs. The results for
4000 samples was a mean of 1.000 · 10−3 s and the standard deviation was 4.4 · 10−5 s. In
Figure 3.4 a histogram of this testing is shown.
Further noise is an issue in evaluating the encoder data. The blue line in Figure 3.5 shows
the measured value in encoder signals per millisecond for a uncontrolled situation. The
motor is only attached to the gearbox, belt and omni wheel and the omni wheel has no
surface contact so that no other loads than frictional loss disturb the system. Those high
frequency disturbances seen in Figure 3.5 can be reduced by a low pass filter.

The H Bridge

In order to control the motor with a nominal voltage of 24V with the myRIO a H bridge
is necessary. The H bridge allows to control the DC motors direction and input voltage
CHAPTER 3. OMNIDIRECTIONAL DRIVE 12

Figure 3.5: Measurement of encoder steps per millisecond for a Duty Circle of 60% in blue and a low
pass filtered version in red.

through pulse width modulation (PWM). Figure 3.6 shows a simplified circuit diagram for
a H bridge. For creating the three PWM signals required the myRIO shipping personality
is used. A PWM signal approximates an analogous signal and is characterized by its
frequency and the duty circle which gives the fraction of logic HIGH in a period. Another
three outputs are used to switch the electric potential of the H bridge thus the direction
of the moment acting on the armature of the motor. The frequency used in the rotational
speed control is 40 kHz which is the maximum for the FPGA programmed PWM outputs.

The PI control

After the new encoder value is read and the difference with the last encoder value is
calculated the new proportional gain is calculated. Parallel the integral term is calculated
with the rectangle method which is limited to the values of the last 0.1 seconds. The
direction is determined by the sign of the setpoint. The Algorithm 1 is used in the real
timed loop. The Figure 3.7 shows a graph of a user defined setpoint and the resulting
discrete response of the real system. The maximum rotational speed is without surface
CHAPTER 3. OMNIDIRECTIONAL DRIVE 13

Figure 3.6: Simplified H bridge circuit diagram

Algorithm 1 PI Control
EncoderV alue, LastEncoderV alue ← get encoder value()
loop
EncoderV alue ← get encoder value()
LastEncoderV alue ← EncoderV alue
speed ← EncoderV alue − LastEncoderV alue
error ← setpoint − speed
pgain ← error · kp
igain ← Sum(errorvalues[]) · ki
P W M Output ← pgain + igain
errorvalues[0].append(speed)
errorvalues[100].remove()
end loop
CHAPTER 3. OMNIDIRECTIONAL DRIVE 14

Figure 3.7: Graph of manual defined setpoint and the resulting rotational speed

contact of the the wheel is ca. 120 encoder signal counts per millisecond. Further from the
Figure 3.7 it is apparent that the measured data scatters greater at higher speed. That
might be due to frictional forces or other unknown sources.

3.4 Omnidirectional Motion

3.4.1 Calculation of the Resulting Velocities

Due to the arrangment of the three omni wheels which axis are separated by a 120◦ angle
the Robotino has a degree of freedom (DOF) of three. Lets assume for simplicity that
the robot moves in R3 in a flat plane with a Cartesian coordinate system [x,y,z] so that
the rigid body of the robot has two translational DOF in x, y and one rotational DOF
in z. Also suspected is that the center of gravity coincides with the center of the circle
which the outline of the robotino resembles. The wheels are substituted by forces in the
direction perpendicular to their axis. Overall this simplified rigid body system features
are illustrated in Figure 3.8 . For a planar rigid body Equations (3.10) and (3.11) are
valid. [5]
mẍcog = Fx and mÿcog = Fy (3.10)
CHAPTER 3. OMNIDIRECTIONAL DRIVE 15

Figure 3.8: The mechanical system of the robotino omni drive simplified to a flat plane

Θcog ϕ̈ = Mcog (3.11)

Those equations can be integrated over time so that we have mẋcog = px , mẏcog =
py and Θcog ϕ̇ = Lcog with pi = mvi,j and L = r⊥ · mvi⊥ . Thus the velocities at the
center of gravity which is is also the center of origin can be calculated with following
equations.
ẋ = vi,x (3.12)

ẏ = vi,y (3.13)
r⊥ · v j
ϕ̇ = 2 (3.14)
rbody
ω · rwheel = v⊥ (3.15)

The speed perpendicular to the wheels axis v⊥ equals under the assumption of no slip the
circumferential speed which is calculated with equation 3.15. Since the angular position
CHAPTER 3. OMNIDIRECTIONAL DRIVE 16

of the three wheels is known we can get the resulting velocity with Equation (3.16) .
 
sin(−ϕ)
vi = v⊥ ·  cos(ϕ)  (3.16)
 
0

5π π
With ϕ1 = 3
, ϕ2 = 3
, ϕ3 = π and v⊥ = |vi | we get the resulting velocity Equation
(3.17)  √ √ 
3 3
|v 1 | − |v2 |
1 2 2
v=  2 |v1 | + 12 |v2 | − |v3 | (3.17)

0
Now for the rotational speed we can inspect Equation (3.14). Since rbody = r⊥ the resulting
rotational velocity equation is (3.18) .
 
0
0
 
ω= 
 |v | + |v | + |v |  (3.18)
1 2 3
r
As we can see the equations for vx , vy and ω are linear independent.
Chapter 4

Input/Output and Sensors

4.1 Overview

In this Chapter further non-motional I/O interfaces are discussed. This involves the
Outputs: Digtital Out (DOUT) and Relay (REL).
Inputs: Infrared Sensors (IR), Analog In (AIN) Digital In (DIN) and Charger Information.
The Voltage values of the IR and AIN are converted into digital values via the Analog
Digital Converter (ADC) and the Chargers Information is received by a Controller Area
Network (CAN) Controller. Furthermore a Serial Peripheral Interface multiplexes the lines
from the ADC and the CAN-Controller and to the DOUT register. Following Figure 4.1
shows an overview of the I/O interfaces.

17
CHAPTER 4. INPUT/OUTPUT AND SENSORS 18

Figure 4.1: An Overview of the non-motional I/O


CHAPTER 4. INPUT/OUTPUT AND SENSORS 19

DIN circuit type resistor value logic low logic high


1,4 pullup 40kΩ 0.2 V min.
2-3,5-6 pullup 2.2kΩ 0.8 V max. 2.0V min.
7-8 pulldown 40kΩ 5.25V max.
Table 4.1: electrical features of DIN lines [9, pg. 10f, 23]

4.2 Digital In (DIN)

The DIN pins are located on the upper left side of the Robotino IO-Connector and
can be used for reading 24V digital values. The 24V Digital input is connected to a
voltage divider followed by an inverting Schmitt trigger. The voltage divider reduces
the incoming voltage by the equation (4.1) . Thus for Uin = 24V the result is Uout = 4.21V .

Uin R2
Uout = (4.1)
R1 + R2
Two hex inverting Schmitt trigger of the type 74HCT14 are used to invert the logic level
of the input and to reduce jitter. The threshold value for the inversion is 1.4 V which
equals a DIN input of 7.98 V according to equation (4.1). [10]
After inversion the DIN terminates in eight DIO Lines from the MXP and MSP
Connectors. Those DIO lines could also function as 3.3V output. Moreover the function of
DIN 2-3, 5-6 can be expanded to the I 2 C-Protocol and DIN 8 can produce a PWM-Signal
if the FPGA is programmed to the NI myRIO Shipping Personality. [9, Tab. 1-2, Fig 3-4]
The used DIO lines have different electrical features according to Table 4.1 .

4.3 Analog In 1-4 (AIN 1-4)

The Analog In inputs are divided in to two groups which distinct in the path taken (see
4.1). AIN 1-4 work independent from the SPI communication because they are directly
connected to the pins 3,5,7,9 of the myRIO MXP B Connector.The range of measurable
voltage is 0-5 V. The AIN 5-8 are subject of section 4.5.2.2 .

4.4 Relay

Two G5V-1 Low Signal Relays are used with a rated coil rating voltage of 24VDC and a
maximum switching voltage and current of 125VAC, 60VDC and 1A respectively.[11] The
CHAPTER 4. INPUT/OUTPUT AND SENSORS 20

Figure 4.2: Arrangement of three SPI devices.


By CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia Commons

Relays can be used for different switching scenarios like turning on a electrical engine or
light bulb of an external electrical circuit.

4.5 Serial Peripheral Interface

The Serial Peripheral Interface (SPI) protocol was developed by Motorola and is usually
used to multiplex serial data transfer. It is a synchronous protocol so that it uses one
line for a clock (SCLK). For SPI only one host is allowed who also provides the SCLK.
There are also one line each for data transfer from the host to the slaves and vice versa.
For enabling one slave for communication one Slave Select (SS/CS) line per distinct slave
is used. [8] Figure 4.2 shows this arrangement for three SPI devices. The SPI is realized
through the shipping personality programmed FPGA of the myRIO. The myRIO is able
to produce a SCLK of up to 4MHz. In the Toolkit 4MHZ are used. For pin arrangement
see Table A.1.
The Slave Select is realized through a simple digital output of the FPGA which prolongates
the transmission significantly as seen in Figure A.1 . It takes 14µs for the SPI frame to
start after the SS failing edge. The SPI transmission only takes 8µs for one byte length
and the lag between raising edge and SPI transmission is 52µs long.
CHAPTER 4. INPUT/OUTPUT AND SENSORS 21

4.5.1 Digital Out

Due to deficit of output ports the Digital Out of the Robotino is realized through SPI and
an 8-bit shift register. The 8-bit shift register of type SN74LV594A from Texas Instruments
is used. It has an output lag of one clock circle. The SPI communication requires no
initialization respectively to the ADC and CAN. The configuration of the SPI transmission
has following characteristics. The SCLK is 1 MHz, the signal is measured at the failing
edge of SCLK and a single frame is 8-bit long.[14]

Evalutaion and Toolbox

The DOUT of the Robotino can be used for different scenarios. For accessing the DOUT
ports the user has to start the SPI communication first with the SPI init.vi which can
be found in the Robotino myRIO Toolkit palette in the IO/SPI COM folder. Now the
DOUT put.vi is functional which sets through an boolean array input the SPI frame to
be send. Further SPI transmission can be stopped with the spi close.vi at the end of the
program. For testing different LED were connected to the DOUT and GND with proper
series resistance for the 24V Output and a simple program run which blinks the LEDs at
DOUT 1-8 once every second. The program can be seen at figure A.4 .

4.5.2 Analog Digital Converter

Because of a deficit of AIN pins the ADC of type AD7490BRU from Analog Devices is
used for multiplexing 12 AIN lines 9 from the IR and 4 from AIN 5-8. The ADC has
16 AIN lines of whom 13 are used. The ADC needs initialization for usage. The ADC
is configured for 16-bit frames, MSB and falling edge data loading. A SCLK of 4 MHz
is used. The first frame of the initialization writes the control register of the ADC. The
second frame writes the shadow register which sets the range of the AIN in the serial
output circulation. After initialization the ADC iterates through the AIN consecutively
as Output. The measured values are scaled in a discrete 12-bit range from GND to two
times Vref . [1]

4.5.2.1 Infrared Sensors

The Infrared Sensors are used for detection and distance measurement of close objects.
The Robotino has 9 IR-sensors of type GP2Y0A41SK0F from SHARP. They have a
CHAPTER 4. INPUT/OUTPUT AND SENSORS 22

measurement range of 4 cm to 30 cm and are arranged with a equal angular distance


of 40 ◦ around the outer shape of the Robotino. The relation between measured distance
and voltage is not linear so that a conversion is necessary. This conversion is done by
the Voltage2Distance2.vi [A.5] which uses a table of measured values of the voltage and
distance and approximates the value for different voltages. [13]

4.5.2.2 Analog In 5-8 (AIN 5-8)

The for remaining lines of the ADC are used to multiplex additionally 4 AIN lines so that
all in all 8 AIN lines are aviable with SPI.

4.5.3 CAN

The CAN bus is utilized for the communication to the charger of the Robotino. The
Charger is able to transmit following information: voltage, amperage and temperature of
the batteries, the chargers state and time passed since turning on.
The CAN Serial Communication Controller IA82527 from Innovasic Semiconductor is
used which is a clone of the Intel 82527 Serial Controller. It allows a translation of CAN
into SPI. As seen in the figures A.3 and A.2 the CAN initialization costs significant more
time than the ADC initialization with a 1.79 µs duration. The SPI communication for the
CAN Controller is configured for 1 MHz, MSB, failing edge and a 8 bit frame. The first
frame contains the address byte which chooses the register to interact with. The second
frame or control frame decides how many bytes from the address byte on to write or read
from. The following frames send contain the message to write or in read mode the message
received from the CAN Controller. [3]
Chapter 5

Manual Remote Control

5.1 Overview

Motivation

In some scenarios Manual Control of a robot is necessary or desired. The normal Robotino3
uses an Embedded PC platform with x64 architecture for which plenty of controller drivers
are available . In the case of the NI myRIO which uses a ARM architecture and a NI Real
Time Linux drivers are mostly unusable. Since the myRIO offers the compatibility to send
and receive TCP packets remote control with a web application is possible in a wireless
LAN or more remotely through the Internet. Figure 5.1 depicts those two scenarios. In the
first one direct connection from a smart phone to the Robotino is established over wireless
LAN. The user has direct visual feedback in this case. In the second scenario a smart phone
attached to the Robotino which is also in the same wireless LAN establishes a connection
to the Internet via a mobile service e.g. LTE. The client just needs a Internet connection in
this case so that a more remote location for control can be choosen. Audiovisual feedback
can be achieved through a video chat service e.g. Microsoft Skype.

5.2 Websocket Protocol

The Websocket Protocol allows unlike HTTP a continuous connection from the client web
application to a server which is favorable for real time applications in this instance remote
control.

23
CHAPTER 5. MANUAL REMOTE CONTROL 24

Figure 5.1: Use case

The Websocket Protocol uses like HTTP TCP on the Transport Layer. It also requires
a HTTP-Handshake for establishing a connection. The Websocket Protocol is supported
vastly by all current web browsers e.g. Google Chrome or Mozilla Firefox for Android.
Which makes a smart phone or tablet interesting as a client device.

5.3 Server

The Server runs on the myRIO which supports TCP connections. The LabVIEW
WebSockets Library of Sam Sharp was used for creating a WebSocket server. The Server
listens for a incoming TCP connection on port 6124. After a connection with the client
is established it receives a string with information of the desired x,y and omega speeds
which are forwarded to the Omnidrive set.vi.

5.4 Client

The client is a web application which can be used on many devices such as mobile phones,
tablets or desktop PC. For the programming of the website HTML/CSS/Javascript,
JQuery/JQuery mobile and the library virtualjoystick.js have been used.
First the user has to establish a connection with the client. Therefor the user has to set
the IP address of the desired server on the first screen which can be seen in the Figure
5.2 . After the user presses the Connect button the second screen appears which features
the remote control of the Festo Robotino with NI myRIO. The second screen is divided
in three distinct areas in 1. the user can tap on the screen and glide a finger so that the
CHAPTER 5. MANUAL REMOTE CONTROL 25

resulting vector of first touched area and current location of the finger tip translates in a
x and y speed. In 2. the user can choose a rotational speed with a slidebar. The area 3.
functions as status bar with information about connection status and speeds. The user can
also tap on the connection status box while connected to the server to manually close the
connection. In situations where the user cant access the Internet the web application can
be easily ported into a mobile application which was tested with the help of the service
Adobe Phonegap.
Because of the 3 distinct degrees of freedom another way of control with a multitouch
gesture was searched and resulted in a experimental web application seen in Figure 5.3. In
this web application the user touches the screen with 2 fingers. The distance between the
fingers results in 3 different modes showed in the superposed screenshot 5.3. If the distance
is close (1.) the bar between the two touch boxes is green and indicates a mode where
only rotational speed control is possible. On mediocre distance (2.) the bar is yellow and
both rotational and translational speed control is possible. For far distances (3.) the bar
is red and only transverse speed control is possible. The rotational speed input depends
on the angle of the bar between the touch boxes reassembles. The translational speed
input depends on the vector which starts in the middle of the screen indicated by a X
and ends in the middle of the bar between the two touch boxes. In testing this control
was successful in utilizing all degrees of freedoms in a dynamic manner.
CHAPTER 5. MANUAL REMOTE CONTROL 26

Figure 5.2: The two different screens of the RobotinoControl web application.Same resolution as on a
Iphone 5
CHAPTER 5. MANUAL REMOTE CONTROL 27

Figure 5.3: Superposed picture of the three different modes of the alternative remote control web
application
Chapter 6

The System

6.1 The Robotino myRIO Toolbox

The Robotino myRIO Toolbox provides a LabVIEW Palette for an easy access of the
Robotino hardware. The pallette contains the three subcategories Actuators, IO and
Power which are discussed in the following two subsections.

6.1.1 Actuators

The Actuators subcategory shown in Figure 6.1 includes 8 VI with focus on the motion
of the Robotino.

Figure 6.1: The Actuators subcategory

28
CHAPTER 6. THE SYSTEM 29

The Omnidrive init.vi, Omnidrive set.vi and Omnidrive stop.vi:

Those three VI are necessary for the movement of the Robotino.


Omnidrive set.vi calls asynchronously the control loops for the three DC engines.
Additionally a collision detection can be activated with a true value on the ”Bumper
on” terminal. If activated and a collision occurs the control loops thus further movement
is stopped.
Omnidrive set.vi calculates the set point global variables for the the three distinct control
loops. The input is the speed in x,y and omega and the output is the rotational speed of
the dc-engine rotors in encoder counts per millisecond.
Omnidrive stop.vi stops the control loops and closes the references.

Motor 4:

The M4 init.vi opens the IO necessary for control of the M4 DC engine. It also starts the
heartbeat which is necessary for enabling the H bridge.
Unlike the other three engines M4 has no control law so that M4 set.vi has directly the
PWM and DIR signals as input.
M4 stop.vi closes the references on the used I/O.

The distance get.vi:

Because of disturbances the setpoint velocity integrated over time does not equal the real
measured distance. Those disturbances are caused by slip, error of measurement by the
encoder and control error. The last one can be subdued if the encoder counts are used for
distance calculation. The distance get.vi gets the total encoder counts from total variables
and translates it into positional data on the X,Y axis and rotational around the Z axis.

The path go.vi:

The path go.vi has a graph with cursors as input which can be seen in Figure 6.2.
The sequence of cursor coordinates forms a path which is followed by a simple control
algorithm. The control algorithm calculates the distance to the desired coordinate with the
distance get.vi and changes also the movement speed towards the coordinate accordingly
to the distance.
CHAPTER 6. THE SYSTEM 30

Figure 6.2: The Pathmap input for the path go.vi with four cursors set

Figure 6.3: The IO and SPI COM subcategories

6.1.2 Sensors, IO and other Functionalities

The IO palette includes the I/O discussed in chapter 4. The palette consist of 9 VI of
which 6 are depended on SPI thus separated into a SPI COM subcategory as seen in
Figure 6.3. Exceptional is the AIN get.vi which is in both categories but only runs with
limited functionality without SPI.
CHAPTER 6. THE SYSTEM 31

6.1.2.1 SPI Depended VI

The SPI init.vi:

The SPI init.vi calls asynchronously the SPI main.vi which includes the initiation and
loop of the SPI communication. With the two terminals ADC OFF? and CAN OFF? the
user can decide if those SPI communication services are needed so that unnecessary CPU
load can be safed. Turning off the DOUT service is not possible as it only take one 8-bit
frame of duration each SPI communication cycle.

The SPI close.vi:

The SPI stop.vi stops the SPI communication loop and the references.

The IR get.vi:

The IR get.vi has the distance measured in meters of the Robotinos IR sensors as output.
It reads the Global variable ADC-OUT which is written by the SPI main.vi and translates
it with the voltage2distance2.vi from volts into meter distance.

The CAN get.vi:

The CAN get.vi has a cluster of information of the current status of the Robotino charger
as output. Those information include the current voltage and amperage of the batteries
and their temperatures, the state of the charger or otherwise an error status and the time
since the charger is powered on.

The DOUT put.vi:

The DOUT put.vi has a boolean array with a length of 8 as input. Those boolean values
are set as the DOUT output.
CHAPTER 6. THE SYSTEM 32

The AIN get.vi:

The AIN is devided in two groups in terms of acquisition as seen in Figure 4.1. Thus for
the AIN 5-8 the SPI has to be initialized. The VI has the voltage values as Array output.
The maximum voltage readable is 5 V. AIN 1-4 have index values 0-3 and AIN 5-8 have
index values 4-7.

6.1.2.2 SPI Independed VI

The DIN get.vi:

The DIN get.vi gets the states of the Robotinos DIN ports as a Cluster of bools. The
logic values are inversed.

The REL put.vi:

This VI has two boolean values as terminal. It switches the relays of the Robotino.

bumper get.vi:

This VI gives the state of the Bumper. A logic low is the triggered state.

6.1.2.3 Power

shutdown.vi

The power subcategory contains the shutdown.vi which sends a heartbeat signal with a
100 Hz frequency which turns the Robotino of like explained in chapter 2 .

6.2 Demonstrations

For testing of the VIs several demonstrations have been performed. Those demonstration
can be found in the example project which is also automatically opened after the user
installs the Robotino myRIO Toolkit.
CHAPTER 6. THE SYSTEM 33

Figure 6.4: Omni Drive Demo VI

6.2.1 Omni Drive Demo

The Omni Drive demo VI shows the user how to easily handle the motion features of
the Robotino. Because of the necessary of initialization and dereferencing a flat sequence
is favorable like shown in the Figure 6.4 . In this demo first the Omnidrive is initialized
than the user can set the input with different controls for the speeds in x,y and omega
direction. When the stop button is pressed the loop halts and the Omni Drive control
loops are closed.

6.2.2 Square Demo

Further this Demo shows how to use the distance get.vi to follow a sequenced path. The
Robotino drives a path with a shape of a 1m x 1m square in this demonstration.

6.2.3 Track Get Demo

The Track Get Demo shown in Figure 6.5 draws a graph of a track with the help of the
distance get.vi. Figure 6.6 shows the results for a motion with 0.1 m/s Vy and an ω of
0.05 rps.
CHAPTER 6. THE SYSTEM 34

Figure 6.5: The Track Get Demo VI

Figure 6.6: Resulting graph in Track Get Demo VI with speeds 0.1 m/s in y direction and 0.05 rps
rotation around the z axis
CHAPTER 6. THE SYSTEM 35

Figure 6.7: Radar Demo resulting image and its setting

6.2.4 Radar Demo

The Radar Demo makes use of the IR sensors. The robot makes a turn of 40◦ over a
duration of 1 second. During the rotation the distance is measured every 2 milliseconds
by the IR-sensors. After the rotation a picture of those measured points is drawn. Figure
6.7 shows the result and setting of a Radar Demo.

6.2.5 Autonomous Drive Demo

The Autonomous Drive Demo is a example of state machines algorithm. The Demo uses
2 IR-sensors in a 40 ◦ angular distance for navigation at a outline of a wall.
If both IR-Sensor measure a distance of less than 30 cm the state is ”Both in Range”.
In this state 3 sub states are controlling the movement around a wall. If both IR sensors
measure a distance in range with the set point and tolerance the robot moves forward and
rotates slowly proportional to the difference in distance measured in both sensors. Else
if just one measured distance is out of tolerance the robot rotates and moves sideways.
And if both are out of tolerance it moves just sideways with velocity proportional to error
distance. Further if both distances are beyond 30 cm the robot is in ”No Object” state
and halts. Moreover the Autonomous Drive Demo supports detection and navigation
around convex 90 ◦ corners. First the front side sensor measures a distance over 30 cm
which initiates the ”Corner start” state. In this state the robot moves slowly forwards
CHAPTER 6. THE SYSTEM 36

Figure 6.8: Illustration of the different states in the Autonomous Drive Demo

and very slowly sideways towards the corner and rotates very slowly towards the corner
until the second sensor measures also a distance beyond 30 cm. Then the state transitions
into ”Corner mid”. In this state the robot moves slowly sideways towards the corner and
forward and it rotates fast around the corner. The last State ”Corner end” begins with
the front sensor detecting an object again and end with the rearing sensor detecting an
object. In this state the robot moves slowly forward and very slowly sideways towards
the wall and rotates very slowly towards the wall. Figure 6.8 shows an illustration of the
movement in different states along a wall with a corner.
Appendices

38
Appendix A

myRIO Input/Output

39
APPENDIX A. MYRIO INPUT/OUTPUT 40

MXP A:

PIN Number Name Description


1 +5V
3 M1 Current unused
5 M2 Current unused
6 AGND
7 M3 Current unused
8 GND
9 M4 Current unused
10 UART RX 1 unused
11 BAT2 EXISTS unused
12 GND
13 SPI CS CAN The Slave Select for the CAN line
14 UART TX 1 unused
15 SPI CS ADC The Slave Select for the ADC line
16 GND
17 SPI CS DOUT The Slave Select for the DOUT line
18 M1 A
19 Bumper LOW for triggered Bumper
20 GND
21 SPI CLK Serial Clock Output for the SPI communication
22 M1 B
23 SPI MISO Master In Slave Out for the SPI communication
24 GND
25 SPI MOSI Slave Out Master In for the SPI communication
26 DIN 4 Digital IN 4 (24V)
27 M1 PWM Motor 1 PWM signal
28 GND
29 M2 PWM Motor 2 PWM signal
30 GND
31 M3 PWM Motor 3 PWM signal
32 DIN 5 Digital IN 5 (24V)
33 +3V3 1
34 DIN 6 Digital IN 6 (24V)
Table A.1: Overview of the pin assignments for MXP A
APPENDIX A. MYRIO INPUT/OUTPUT 41

MXP B:

PIN Name Description


1 +5V
2 AO 0 2 Analog OUT 0 2 (0-5V), Pin 2 at X1
3 AIN 1 Analog IN 1
4 AO 1 2 Analog OUT 1 2 (0-5V), Pin 1 at X1
5 AIN 2 Analaog IN 2
6 AGND
7 AIN 3 Analaog IN 3
8 GND
9 AIN 4 Analaog IN 4
10 UART RX 2 UART IN, Pin at X1
11 M1 ON unused
12 GND
13 M2 ON unused
14 UART TX 2 UART OUT, Pin at X1
15 M3 ON unused
16 GND
17 M4 ON unused
18 M2 A
19 M1 DIR Motor 1 directional output for H-Bridge
20 GND
21 M2 DIR Motor 2 directional output for H-Bridge
22 M2 B
23 M3 DIR Motor 3 directional output for H-Bridge
24 GND
25 M4 DIR Motor 4 directional output for H-Bridge
26 DIN 1 Digital IN 1 (24V)
27 M4 PWM Motor 4 PWM signal
28 GND
29 REL 1 Relay 1 switch
30 GND
31 REL 2 Relay 2 switch
32 DIN 2 Digital IN 2 (24V)
33 +3V3 1
34 DIN 3 Digital IN 3 (24V)
Table A.2: Overview of the pin assignments for MXP B
APPENDIX A. MYRIO INPUT/OUTPUT 42

MSP C:

PIN Name Description


1 +15V
2 -15V
3 AGND
4 AO 0 3 Analog OUT 0 3 (±10V), Pin 5 at X1
5 AO 1 3 Analog OUT 1 3 (±10V), Pin 6 at X1
6 AGND
7 SYS Current unused
8 AI 0+ 3 Analog IN 0+ (±10V)
9 AI 1+ 3 Analog IN 1+ (±10V), Pin 15 at X1
10 AI 1- 3 Analog IN 1- (±10V), Pin 13 at X1
11 M3 A
12 DIN7 Digital IN 7 (24V)
13 M3 B
14 DIN 8 Digital IN 8 (24V)
15 M4 A
16 BAT1 EXISTS unused
17 M4 B
18 BAT1 ON RIO Signal line used for communication to IC5-µC
19 GND
20 +5V 0 1
Table A.3: Overview of the pin assignments for MSP C
APPENDIX A. MYRIO INPUT/OUTPUT 43

Figure A.1: SPI timing


APPENDIX A. MYRIO INPUT/OUTPUT 44

Figure A.2: SPI initialization timing table Figure A.3: SPI initialization timing graph
APPENDIX A. MYRIO INPUT/OUTPUT 45

Figure A.4: Example of a blinking program for DOUT

Figure A.5: The voltage2distance.vi


APPENDIX A. MYRIO INPUT/OUTPUT 46

A.1 Code Listing Microcontroller

/∗
∗ main . c

∗ Created : 2 1 . 1 0 . 2 0 1 5 1 1 : 4 5 : 3 0
∗ Author : P a t r i c k
∗ Compiled w i t h Atmel S t u d i o 7 . 0
∗/

#include <avr / i o . h>


#include < u t i l / d e l a y . h>
#include <s t d i n t . h>
#include <avr / i n t e r r u p t . h>
#include <avr /wdt . h>

#define b l i n k ( d e l a y ) { PORTB= (1<<PORTB2 ) ; delay ms ( delay ) ;


PORTB&= ˜(1<<PORTB2 ) ; d e l a y m s ( d e l a y ) ; }

/∗
” I /0” = ”Name” ” Additional Information ”
PA0 = COVER PWR BTN
PA1 = Motor OFF −High f o r Motor Off s i g n a l
PA2 = BAT1 ON RIO
PA3 = TINY BATTX ON −l o c k s t h e power s u p p l y t o an ON−s t a t e f o r HIGH
PB0 = CLK −an e x t e r n a l unused c l o c k
PB2 = COVER BTN LED −o u t p u t f o r t h e l e d o f t h e b u t t o n
∗/

uint8 t n = 0 ; // Counter f o r MyRIO O f f S i g n a l

void ADC Init ( void ){


ADMUX &= ˜ ( (1<<REFS0)|(1 < <REFS0 ) ) ;
ADCSRA = (1<<ADEN) ;
ADCSRA |= (1<<ADSC) ;
while (ADCSRA & (1<<ADSC) ) {
}
( void ) ADCW;
}
u i n t 1 6 t ADC Read( void ){
ADMUX = (ADMUX & ˜ ( 0 x1F ) ) | ( ADC1D & 0x1F ) ;
ADCSRA |= (1<<ADSC) ;
APPENDIX A. MYRIO INPUT/OUTPUT 47

while (ADCSRA & (1<<ADSC) ) {


}
return ADCW;
}
int main ( void )
{
cli ();
DDRA &= ˜ ( (1<<DDA0)|(1 < <DDA2 ) ) ;
DDRA |= (1<<DDA3 ) ;
DDRB |= ((1<<PORTB1)|(1 < <PORTB2 ) ) ;
GIMSK|= (1<<PCIE0 ) ;
PCMSK0|= (1<<PCINT2 ) ;
WDTCSR|= (1<<WDIE)|(1 < <WDP2) ;
ADC Init ( ) ;
uint8 t i = 0;
uint8 t m = 0;
uint16 t adc val = 1023;
//PORTA|= (1<<PORTA1) ; //H−B r i d g e OFF
PORTB |= (1<<PORTB1 ) ;
TIMSK1|= (1<<TOIE1 ) ; // Timer/ Counter1 , O v e r f l o w I n t e r r u p t Enable
TCCR1B|= (1<<CS10 ) ; // P r e s c a l e r s e t t o CLK/8
sei ();

while ( 1 )
{
blink (400);
blink (400);
PORTA|= (1<<PORTA3) ; //ON−S t a t e l o c k e d
PORTB|= ((1<<PORTB1)|(1 < <PORTB2 ) ) ;
while (PINA & ( 1 << PINA0 ) ) { }
while ( 1 ) {
/∗ i f (PINA & (1 << PINA2 ) )
{
PORTA|= (1<<PORTA1) ;
}
else{
PORTA&= ˜(1<<PORTA1) ;
} ∗/

while (PINA & ( 1 << PINA0 ) )


{
i f ( i <=4){
blink (125);
APPENDIX A. MYRIO INPUT/OUTPUT 48

i ++;
}
else {
PORTA&= ˜(1<<PORTA3) ; //ON−S t a t e r e l e a s e d
PORTB&= ˜(1<<PORTB2 ) ;
}
}
i =0;
a d c v a l = ADC Read ( ) ;
while ( a d c v a l <626){
i f (m>4){
PORTA&= ˜(1<<PORTA3) ; //ON−S t a t e r e l e a s e d
PORTB&= ˜(1<<PORTB2 ) ;
}
blink (100);
a d c v a l = ADC Read ( ) ;
m++;
}
}
m=0;
}
return ( 0 ) ;
}

ISR ( PCINT0 vect ){


wdt reset ( ) ;
i f ( n>=4){
PORTA&= ˜(1<<PORTA3) ; //ON−S t a t e r e l e a s e d
PORTB&= ˜(1<<PORTB2 ) ;
}
PORTB&= ˜(1<<PORTB1 ) ;
i f (PINB & ( 1 << PINB2 ) )
{
PORTB&= ˜(1<<PORTB2 ) ;
}
else {
PORTB|= (1<<PORTB2 ) ;
}
n++;
}
ISR ( WDT vect ){
PORTB|= (1<<PORTB1 ) ;
wdt reset ( ) ;
APPENDIX A. MYRIO INPUT/OUTPUT 49

PORTB|= (1<<PORTB2 ) ;
}

ISR ( TIM1 OVF vect ){


n=0;
}
List of Figures

2.1 State diagram of power button program . . . . . . . . . . . . . . . . . . . 5

3.1 Block diagram of a DC motor system . . . . . . . . . . . . . . . . . . . . . 8


3.2 Step response for Plant (3.8) . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Real system discrete step response with 1000 Samples per second . . . . . 10
3.4 Histogramm of the time difference values in the real timed loop in loop at
1 kHz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.5 Measurement of encoder steps per millisecond for a Duty Circle of 60% in
blue and a low pass filtered version in red. . . . . . . . . . . . . . . . . . . 12
3.6 Simplified H bridge circuit diagram . . . . . . . . . . . . . . . . . . . . . . 13
3.7 Graph of manual defined setpoint and the resulting rotational speed . . . . 14
3.8 The mechanical system of the robotino omni drive simplified to a flat plane 15

4.1 An Overview of the non-motional I/O . . . . . . . . . . . . . . . . . . . . . 18


4.2 Arrangement of three SPI devices. By CC-BY-SA-3.0
(http://creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia
Commons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.1 Use case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24


5.2 The two different screens of the RobotinoControl web application.Same
resolution as on a Iphone 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3 Superposed picture of the three different modes of the alternative remote
control web application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6.1 The Actuators subcategory . . . . . . . . . . . . . . . . . . . . . . . . . . . 28


6.2 The Pathmap input for the path go.vi with four cursors set . . . . . . . . . 30
6.3 The IO and SPI COM subcategories . . . . . . . . . . . . . . . . . . . . . 30
6.4 Omni Drive Demo VI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.5 The Track Get Demo VI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.6 Resulting graph in Track Get Demo VI with speeds 0.1 m/s in y direction
and 0.05 rps rotation around the z axis . . . . . . . . . . . . . . . . . . . . 34
6.7 Radar Demo resulting image and its setting . . . . . . . . . . . . . . . . . 35

50
LIST OF FIGURES 51

6.8 Illustration of the different states in the Autonomous Drive Demo . . . . . 36

A.1 SPI timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43


A.2 SPI initialization timing table . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.3 SPI initialization timing graph . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.4 Example of a blinking program for DOUT . . . . . . . . . . . . . . . . . . 45
A.5 The voltage2distance.vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Bibliography

[1] Data Sheet AD7490. Analog Devices, Inc., rev. d edition.


[2] 8-bit AVR Microcontroller with 2K/4K/8K Bytes In-System Programmable Flash -
ATtiny24A ATtiny44A ATtiny84A. ATMEL, Juni 2012.
[3] CAN Specification Version 2.0. Bosch, September 1991.
[4] GR Katalog. Dunkermotoren GmbH, Juni 2015.
[5] D. Gross. Technische Mechanik 3 Kinetik. Springer Berlin Heidelberg, Berlin
Heidelberg, 2015. ISBN 978-3-642-53954-1.
[6] P. D.-I. R. Kennel. Elektrische antriebe grundlagen und anwendungen. Übung 2:
Stationäres Betriebsverhalten der Gleichstrommaschine.
[7] M. D. v. d. Laan. ”Signal sampling techniques for data acquisition in process control”.
PhD thesis, ”1995”. ”date submitted:1996 Rights: University of Groningen”.
[8] SPI Block Guide V03.06. Motorola, Inc., Januar 2000.
[9] NI myRIO-1900 User Guide and Specifications. National Instruments, August 2013.
[10] 74HC14; 74HCT14 Hex inverting Schmitt trigger - Product data sheet. NXP,
November 2015.
[11] G5V-1 Low Signal Relay. OMRON Corporation, 2016.
[12] D. Schroeder. Elektrische Antriebe. Springer, Berlin u.a, 2000. ISBN
978-3-540-66846-6.
[13] DEVICE SPECIFICATION FOR Analog Output Type Distance Measuring Sensor
Model No. GP2Y0A41SK0F. Sharp, April 2005.
[14] SNx4LV594A 8-Bit Shift Registers With Output Registers. Texas Instruments, APRIL
2005.

53