ultrasonic sensing design and implementation for detecting

78
Department of Science and Technology Institutionen för teknik och naturvetenskap Linköping University Linköpings universitet g n i p ö k r r o N 4 7 1 0 6 n e d e w S , g n i p ö k r r o N 4 7 1 0 6 - E S LiU-ITN-TEK-A--12/030--SE Ultrasonic sensing design and implementation for detecting and interacting with human beings in an AI system Peter Faltpihl 2012-06-01

Upload: others

Post on 05-May-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ultrasonic sensing design and implementation for detecting

Department of Science and Technology Institutionen för teknik och naturvetenskap Linköping University Linköpings universitet

gnipökrroN 47 106 nedewS ,gnipökrroN 47 106-ES

LiU-ITN-TEK-A--12/030--SE

Ultrasonic sensing design andimplementation for detectingand interacting with human

beings in an AI systemPeter Faltpihl

2012-06-01

Page 2: Ultrasonic sensing design and implementation for detecting

LiU-ITN-TEK-A--12/030--SE

Ultrasonic sensing design andimplementation for detectingand interacting with human

beings in an AI systemExamensarbete utfört i Elektroteknik

vid Tekniska högskolan vidLinköpings universitet

Peter Faltpihl

Handledare Allan HuynhExaminator Qin-Zhong Ye

Norrköping 2012-06-01

Page 3: Ultrasonic sensing design and implementation for detecting

Upphovsrätt

Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare –under en längre tid från publiceringsdatum under förutsättning att inga extra-ordinära omständigheter uppstår.

Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat förickekommersiell forskning och för undervisning. Överföring av upphovsrättenvid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning avdokumentet kräver upphovsmannens medgivande. För att garantera äktheten,säkerheten och tillgängligheten finns det lösningar av teknisk och administrativart.

Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman iden omfattning som god sed kräver vid användning av dokumentet på ovanbeskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådanform eller i sådant sammanhang som är kränkande för upphovsmannens litteräraeller konstnärliga anseende eller egenart.

För ytterligare information om Linköping University Electronic Press seförlagets hemsida http://www.ep.liu.se/

Copyright

The publishers will keep this document online on the Internet - or its possiblereplacement - for a considerable time from the date of publication barringexceptional circumstances.

The online availability of the document implies a permanent permission foranyone to read, to download, to print out single copies for your own use and touse it unchanged for any non-commercial research and educational purpose.Subsequent transfers of copyright cannot revoke this permission. All other usesof the document are conditional on the consent of the copyright owner. Thepublisher has taken technical and administrative measures to assure authenticity,security and accessibility.

According to intellectual property law the author has the right to bementioned when his/her work is accessed as described above and to be protectedagainst infringement.

For additional information about the Linköping University Electronic Pressand its procedures for publication and for assurance of document integrity,please refer to its WWW home page: http://www.ep.liu.se/

© Peter Faltpihl

Page 4: Ultrasonic sensing design and implementation for detecting

Preface

This document describes my master thesis project, which was performedat Embedded Intelligent Solutions (EIS) in Göteborg during the spring of2012. The �eld of this thesis is Electronics Design in embedded systems. Mystudies were performed under the department of science and technology atLinköpings University.I would specially like to thank Per Söderstam, my supervisor at EIS, for helpthroughout the project. I would also like to thank the rest of the employeesat EIS, for having me there and being very helpful and kind. Finally, Ithank Qin-Zhong Ye and Allan Huynh, my examiner and supervisor at theuniversity.

1

Page 5: Ultrasonic sensing design and implementation for detecting

Abstract

This thesis covers the work performed to implement a Sonar sensor solution todetect human beings on a robotic lamp. A previously available solution wasevaluated, but had to be redesigned due to faulty electronics. New hardwarewas developed, together with software to control this hardware. A softwareimplementation of this new Sonar sensor system was also developed, on therobotic lamp itself.The nature of this thesis was very practical, so this report will focus ondescribing the di�erent design stages that were performed, together with awide discussion about future improvements and work, in order to achieve arobotic lamp that interacts with a human in an interesting manner.

i

Page 6: Ultrasonic sensing design and implementation for detecting

Acronyms

ASF Atmel Software FrameworkDC Direct CurrentEIS Embedded Intelligent SolutionsESD Electro Static DischargeGPIO General Purpose Input/OutputIDE Integrated Development EnvironmentLED Light Emitting DiodeMCU MicrocontrollerPCB Printed Circuit BoardPIR Passive InfraredRGB Red, Green, Blue

ii

Page 7: Ultrasonic sensing design and implementation for detecting

Glossary

ADC Analog to digital converter. Used to convertan analog signal (voltage) to digital informa-tion. In this case, this device is built in theMCU.

Arduino A complete hardware and software platformbased on an Atmel ATMega microcontroller.

DAC Digital to analog converter.Embedded system An embedded system is a complete system

which is developed to perform a speci�c task.Usually involving system architecture, soft-ware and hardware design. Examples: re-mote control, computer keyboard, electronictoys/robots

Evaluation board A demonstration hardware platform thatsome manufacturers o�er in order to easilystart working with a new piece of hardware

ISR Interrupt Service Routine. A routine that theMicrocontroller (MCU) runs when an inter-rupt has been initiated.

LDO Low Dropout regulator (LDO) is a linear volt-age regulator which can be used to transforma high voltage input to a stable lower voltage.

MATLAB A piece of software and programming lan-guage used for mathematical and engineeringtasks.

iii

Page 8: Ultrasonic sensing design and implementation for detecting

Glossary Glossary

Peripheral A auxiliary device which is embedded into themicrocontroller and handles connectivity withthe external world. Examples: handling in-put/output functionality, setting up commu-nication protocols

Pull-up resistor A resistor which is connected to the positiveTTL voltage. This is used so that when aline is not driven low, it is pulled high by thisresistor.

RS232 A serial communication protocol which oftenuses three wires for transmission. One for re-ceiving, one for transmitting and one for com-mon reference/ground.

RS422 A serial communication protocol which usesdi�erential transmission. (Di�erential mean-ing two complementary signals, each on a sep-arate wire)

Servo A small rotary actuator often used to moveparts in robots, radio-controlled vehicles etc.

Sonar In this text, always means active sonar. Atechnique for detecting objects using sound.In this case, sound with a frequency of 40 kHzis used (which is above what the human earcan hear)

TVS Transient Voltage Suppressor. A device de-signed for protecting electronic circuitry fromElectro Static Discharge (ESD) damage.

TWI Two Wire Interface. A serial communicationprotocol which is supported by hardware onmost Atmel AVR microcontrollers. This pro-tocol is fully compatible with the I2C proto-col. Uses open-collector outputs so that mul-tiple devices with di�erent voltage levels canuse the bus simultaneously.

iv

Page 9: Ultrasonic sensing design and implementation for detecting

Contents

Acronyms ii

Glossary iii

1 Introduction 1

1.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4.1 Hardware used . . . . . . . . . . . . . . . . . . . . . . 41.4.2 Software used . . . . . . . . . . . . . . . . . . . . . . . 5

1.5 About EIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.6 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.7 Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 System overview 7

2.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.1 Lower part . . . . . . . . . . . . . . . . . . . . . . . . . 82.1.2 Upper part . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.1 ASF . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.2 Platform . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.3 Devices . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.4 Services . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.5 Lamp . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Old sonar solution 13

3.1 Hardware overview . . . . . . . . . . . . . . . . . . . . . . . . 13

v

Page 10: Ultrasonic sensing design and implementation for detecting

CONTENTS CONTENTS

3.2 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4 New sonar solution 16

4.1 New design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.1.1 Restrictions of The Lamp . . . . . . . . . . . . . . . . 164.1.2 Desired behavior . . . . . . . . . . . . . . . . . . . . . 184.1.3 Required data . . . . . . . . . . . . . . . . . . . . . . . 184.1.4 Data requirements . . . . . . . . . . . . . . . . . . . . 19

4.2 Sensor choice . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.3 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.3.1 Loneliness detection . . . . . . . . . . . . . . . . . . . 204.3.2 Following . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.4 Number of sensors . . . . . . . . . . . . . . . . . . . . . . . . 224.5 Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.6 New sonar board . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.6.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . 244.6.2 Subsystems . . . . . . . . . . . . . . . . . . . . . . . . 244.6.3 Board layout . . . . . . . . . . . . . . . . . . . . . . . 30

5 Software 33

5.1 Sonar board software . . . . . . . . . . . . . . . . . . . . . . . 335.2 Main board software . . . . . . . . . . . . . . . . . . . . . . . 34

5.2.1 Sonar class . . . . . . . . . . . . . . . . . . . . . . . . 355.2.2 MissNosy personality . . . . . . . . . . . . . . . . . . . 355.2.3 Evaluation Methods . . . . . . . . . . . . . . . . . . . 35

6 Implementation 37

6.1 Old sonar prototype . . . . . . . . . . . . . . . . . . . . . . . 376.2 Old sonar failure . . . . . . . . . . . . . . . . . . . . . . . . . 376.3 New sensor tests . . . . . . . . . . . . . . . . . . . . . . . . . 38

6.3.1 Sensor data testing . . . . . . . . . . . . . . . . . . . . 386.3.2 Person detection testing . . . . . . . . . . . . . . . . . 38

6.4 New sonar prototype . . . . . . . . . . . . . . . . . . . . . . . 406.5 New sonar prototype 2 . . . . . . . . . . . . . . . . . . . . . . 406.6 Final implementation . . . . . . . . . . . . . . . . . . . . . . . 41

vi

Page 11: Ultrasonic sensing design and implementation for detecting

CONTENTS CONTENTS

7 Result 42

7.1 New sonar solution . . . . . . . . . . . . . . . . . . . . . . . . 427.1.1 Test results . . . . . . . . . . . . . . . . . . . . . . . . 42

7.2 The Lamp's behavior . . . . . . . . . . . . . . . . . . . . . . . 43

8 Discussion 44

8.1 Multiple lamps . . . . . . . . . . . . . . . . . . . . . . . . . . 448.2 Reasons for a new design . . . . . . . . . . . . . . . . . . . . . 448.3 Sensor choice . . . . . . . . . . . . . . . . . . . . . . . . . . . 458.4 Sensor signal choice . . . . . . . . . . . . . . . . . . . . . . . . 458.5 New sonar board . . . . . . . . . . . . . . . . . . . . . . . . . 468.6 Sensor update rate . . . . . . . . . . . . . . . . . . . . . . . . 478.7 New vs old sonar - advantages . . . . . . . . . . . . . . . . . . 478.8 Curiosity level . . . . . . . . . . . . . . . . . . . . . . . . . . . 488.9 Number of persons . . . . . . . . . . . . . . . . . . . . . . . . 488.10 PIR sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488.11 Faulty electronics . . . . . . . . . . . . . . . . . . . . . . . . . 48

9 Conclusion 50

10 Further work 52

10.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5210.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

A Upper LED Board Schematics 56

B Old Sonar Board Schematics 59

C New Sonar Board Schematic 62

D Sonar sensor Tests 63

D.1 One sensor test . . . . . . . . . . . . . . . . . . . . . . . . . . 63D.2 All sensors test . . . . . . . . . . . . . . . . . . . . . . . . . . 64

vii

Page 12: Ultrasonic sensing design and implementation for detecting

Chapter 1

Introduction

Figure 1.1: The Lamp

The Relight>Relate project was started by EIS in 2009, as an attemptto design a lamp that stands out from the general de�nition of a lamp[1].This project will here on forth be referred to as "The Lamp". The Lamp wasintended to make people feel compassion, interest, happiness; much more like

1

Page 13: Ultrasonic sensing design and implementation for detecting

1.1. PROBLEM CHAPTER 1. INTRODUCTION

a pet than a lamp.This was achieved with it's cute appearance and capability to interact

with people.There was continuous work performed on The Lamp up until late 2010,

when the project was put on ice. Unfortunately, The Lamp was not �nishedby then.

The mechanical parts and The Lamp's outer shell (see �gure 1.1 on thepreceding page) have been �nished, same goes for most of the electroniccomponents needed. However, one big part is still missing...

1.1 Problem

The Lamp has a great e�ect on people, who are often surprised to see that itinteracts with them. In its current state however, The Lamp can only performa very poor interaction. In order to achieve a more advanced and interestinginteraction, The Lamp has to gather more data about it's environment:

• Is there anyone near The Lamp?This is the most important data. Being able to have a di�erent be-havior when alone or near people is crucial to the e�ect of The Lamp'sbehavior.

• Person arriving?This is used when a person is closing in on The Lamp, such as theexample scenario: "The Lamp is shy, and looks away when a personapproaches The Lamp".

• Person leaving?In the same way as person arriving, this is an important piece of in-formation for showing sympathy, sadness or any other emotion whenbeing left alone by a person.

• Where is the person?The Lamp has an eye, which it can move around inside its body toact as if The Lamp is looking in di�erent directions. When a personapproaches The Lamp, it might for example be nosy, and look straightat the person curiously. When the person moves around, The Lampshould be able to follow this person with its eye.

Having this data about a nearby person allows for many di�erent actions,such as:

2

Page 14: Ultrasonic sensing design and implementation for detecting

1.1. PROBLEM CHAPTER 1. INTRODUCTION

• Greet a person

• Become scared of an approaching person

• Show shyness by looking away from a person

• Be nosy and look straight at the person

• Follow a person that is leaving with a sad look

In order to gather this information, data about the surroundings is re-quired. The Lamp was designed with two types of sensors, supposed toachieve su�cient information about The Lamp's vicinity:

• Passive Infrared (PIR) SensorsUsed for determining if a person is in the surrounding area

• Sonar sensorsUsed for more precise information about a persons location

Upon starting this thesis, the Sonar sensors were not implemented in thesystem, but there was a hardware platform available (chapter 3 on page 13).The PIR sensors were fully implemented, meaning that the only informationThe Lamp could get about it's vicinity was through the PIR sensors.

This had proved to be a big problem, because the PIR sensors have certaindrawbacks:

• They can only detect movement, not presence of a person

• SensitivityThey can be very sensitive to movement not only close to The Lamp,but also "background movement" such as other persons moving furtheraway, which is not interesting to The Lamp.

• AccuracyThey are not very accurate - they cannot be used for �nding the positionof a person

This means that The Lamp could only detect a persons presence while itwas moving, but could not know where that person was. This made the in-teraction very poor, because the behavior of The Lamp became very limited.

3

Page 15: Ultrasonic sensing design and implementation for detecting

1.2. AIM CHAPTER 1. INTRODUCTION

1.2 Aim

This thesis aims to evaluate and implement a Sonar sensor system in TheLamp, to such an extent that The Lamp will be able to detect and follow aperson with it's eye. Furthermore, a prototype behavior is to be implementedin order to demonstrate this capability, following a person as accurately aspossible. The accuracy should be high enough so that a person is convincedthat The Lamp is looking directly at the person.

1.3 Restrictions

There are two main restrictions for this thesis:

• Sonar sensorsThe type of sensors are limited to Sonar sensors.

• Hardware modi�cationsNo hardware other than the Sonar board may be modi�ed. This coversboth the electronics and mechanical parts.

1.4 Method

The work is split into four main parts:

• Old Sonar systemImplementation of the previously available Sonar hardware.

• New Sonar hardware designNew design of the Sonar system.

• New Sonar software designNew software for controlling the new Sonar board.

• Software implementationImplementation of the new Sonar system on The Lamp.

1.4.1 Hardware used

The prototyping was built on an Atmel EVK1100 evaluation board and anArduino Duemilanove[2] [3]. The implementation was then realized on anAtmel AVR32UC3A1512 MCU.(More details in 2.1 on page 7)

4

Page 16: Ultrasonic sensing design and implementation for detecting

1.5. ABOUT EIS CHAPTER 1. INTRODUCTION

1.4.2 Software used

The Integrated Development Environments (IDEs) used in this thesis are thefollowing:

• Atmel AVR32 Studio 2.6

• Atmel AVR studio 5.0

For schematic and Printed Circuit Board (PCB) layout, Altium DesignerRelease 10 was used.

1.5 About EIS

EIS is a consultant �rm located in Göteborg, who specialize in embeddedsystems. They have about 60 employees in Göteborg, but are also stationedin �ve other locations around Sweden. They are a part of the Semcon group,a global company with 2800 employees worldwide.

1.6 Assumptions

Readers of this report are expected to have basic technical knowledge, withsome knowledge in general electronics and embedded systems. Typical ex-amples would be �rst grade students of the Electronics Design program.

1.7 Structure

Most abbreviations, technical terms and references are click-able in PDF for-mat.

Chapter 2 on page 7 describes how The Lamp is built up.Chapter 3 on page 13 is a description of the previously available Sonar sys-tem.Chapter 4 on page 16 goes through the design of the new Sonar sensor sys-tem.Chapter 5 on page 33 describes the di�erent softwares designed in this thesis.Chapter 7 on page 42 goes through what result was reached.Chapter 8 on page 44 discusses the result.

5

Page 17: Ultrasonic sensing design and implementation for detecting

1.7. STRUCTURE CHAPTER 1. INTRODUCTION

Chapter 9 on page 50 gives a conclusion to the thesis.Chapter 10 on page 52 lists some further work to be done.

6

Page 18: Ultrasonic sensing design and implementation for detecting

Chapter 2

System overview

This chapter will give an introduction to the di�erent parts of The Lamp.The Lamp can lean and raise/lower it's body, change it's color and intensity,change the size of it's eye beam and move it's eye beam around it's head.

2.1 Hardware

The Lamp has the following hardware features (�gure 2.1 on the next page):

• A body full of Red, Green, Blue (RGB) Light Emitting Diodes (LEDs),meaning The Lamp can change the color of its' body in order to expressemotions.

• A very bright LED which acts as an eye, which can change intensity

• A red LED which illustrates a heartbeat, which can change its' ratedepending on The Lamps mood

• Three motors in its' base, which allows The Lamp to rise up and downand lean in all directions

• A Servo for moving the eye up and down

• A Servo for moving the eye left and right

• A Servo for focusing the eye, making the beam appear smaller or biggeron the outer plastic shell

The Lamp can be divided into two main parts; the upper and lower part.Besides these two main parts, it has an plastic outer shell which gives itits' characteristic look. The upper and lower boards communicate with eachother through a RS422 protocol.

7

Page 19: Ultrasonic sensing design and implementation for detecting

2.1. HARDWARE CHAPTER 2. SYSTEM OVERVIEW

Figure 2.1: System overview

2.1.1 Lower part

The lower part of The Lamp includes the three motors, the PIR sensors andthe lower board which connects to them.

8

Page 20: Ultrasonic sensing design and implementation for detecting

2.1. HARDWARE CHAPTER 2. SYSTEM OVERVIEW

Lower board

The lower board consists of the main MCU, which controls the motors andis responsible for handling the software related to the behavior of The Lamp.

PIR sensors

There are six sensors evenly distributed at the base of The Lamp. They areplaced so that each sensor is covering 60 degrees (equation 2.1).

360◦

6= 60◦ (2.1)

Motors

The three Direct Current (DC) motors are responsible for moving the wholebody of The Lamp. The motors are controlled through three motor drivers,which are controlled by the MCU on the lower board.

2.1.2 Upper part

The upper part, which is the focus of this thesis, consists of a MCU (of AVR32type), a Servo controller, all the LEDs and driver circuitry for controllingthem. The Sonar board connects to this upper board, and the upper boardis responsible for handling the Sonar data.

Upper board

The main components of the upper board are the MCU, RGB LEDs andvarious connectors.

LED board

The LED board consists of 96 RGB LEDs and four LED drivers which arecontrolled from the MCU. The LED drivers communicate with the MCUthrough a serial protocol.

Servo board

The servos are controlled through a dedicated controller, the Polulu SSC03A[4].A RS232 serial protocol is used to communicate with this controller.

9

Page 21: Ultrasonic sensing design and implementation for detecting

2.2. SOFTWARE CHAPTER 2. SYSTEM OVERVIEW

Sonar board

This is the central part of this thesis. The Sonar board is described morethroughly in chapter 3 on page 13 and chapter 4 on page 16.

2.2 Software

The software is divided in four layers (�gure 2.2 on the next page):

• PlatformAbstracts the hardware drivers from Atmel Software Framework (ASF)into an object oriented interface.

• DeviceRepresents devices in The Lamp, such as servos and LEDs. This helpsuse these devices in a more logical structure, with easy to use interface.

• ServicesThis layer provides application resources and management. Acts as alayer that connects devices into usable services for application.

• LampThe application layer, where all the behavior and control logic is han-dled.

2.2.1 ASF

The Atmel Software Framework (ASF)[5] is used to implement every memberin Platform, to get access to peripherals and core functionality of the MCU.

2.2.2 Platform

The main parts of interest in this thesis are:

• GPIOControlUsed for access to the Sonar board

• InterruptControlUsed for controlling interrupts which are needed to gather data fromthe Sonar board.

10

Page 22: Ultrasonic sensing design and implementation for detecting

2.2. SOFTWARE CHAPTER 2. SYSTEM OVERVIEW

Figure 2.2: Software structure

2.2.3 Devices

This is where the Sonar is implemented.

11

Page 23: Ultrasonic sensing design and implementation for detecting

2.2. SOFTWARE CHAPTER 2. SYSTEM OVERVIEW

2.2.4 Services

The services are handling the control of the devices.

2.2.5 Lamp

This is where all the actual behavior takes place. This layer mainly usesservices to control the devices.

12

Page 24: Ultrasonic sensing design and implementation for detecting

Chapter 3

Old sonar solution

This chapter will describe the basics of the old Sonar system.

3.1 Hardware overview

The old Sonar design consists of the following main parts (�gure 3.1):

Figure 3.1: Old sonar board

• ReceiverTwo receivers placed on the left/right side of the board. Used forlistening to the returning sound waves. These signals are very weak,and are ampli�ed and recti�ed in several stages.

13

Page 25: Ultrasonic sensing design and implementation for detecting

3.2. OPERATION CHAPTER 3. OLD SONAR SOLUTION

• TransmitterOne transmitter placed in the center of the board. Sends out sound of40 kHz.

• Ampli�erThe digital signal that the MCU sends to the board is ampli�ed.

More details can be found in the schematics in Appendix B on page 59.

3.2 Operation

This board does not have any logic, so everything has to be controlled fromthe main MCU on the upper mainboard.The board consists of one transmitter and two receivers. The transmittersends out sound during a short period of time, and then the MCU on theupper mainboard listens to the two receivers. The MCU counts the time ittakes for both receivers to receive the sound that has bounced back. Whenthe time it takes for the sound to travel from the transmitter to the target (aperson) and then back to the receiver is known, this time can be translatedinto a distance using equation 3.1.

d =t ∗ v2

(3.1)

d = distance, t = time, v = speed of sound = 343.2 m/s

3.3 Usage

Figure 3.2 on the next page describes the way of using the Sonar board,where the following signals are used:

• BURSTUsed for sending the sound

• TSFSignal that turns on the ampli�er for the sound

• Sonar1Signal from Sonar 1

• Sonar2Signal from Sonar 2

14

Page 26: Ultrasonic sensing design and implementation for detecting

3.3. USAGE CHAPTER 3. OLD SONAR SOLUTION

Figure 3.2: Sonar timing diagram

Usage:

1. Send sound on the BURST line while turning the transmitter on withTSF.

2. Turn o� the transmitter with TSF low. Start listening for the returningsound on both Sonar lines.

3. After a while, stop listening for the returning sound. Transform timeinto distance.

4. Repeat

15

Page 27: Ultrasonic sensing design and implementation for detecting

Chapter 4

New sonar solution

After the failure of the old Sonar board (discussed in section 8.2 on page 44and section 6.2 on page 37, ), a new design of the whole Sonar system wasperformed.

4.1 New design

In order to design a new Sonar system, it was necessary to �rst specify whatthis new Sonar system was to achieve. How was The Lamp meant to be used,and what was the Sonar system required to add to The Lamps functionality?

In order for this thesis to maintain focus on the implementation of a Sonarsensor solution, the design of the new Sonar system was preferred to use asmany ready-to-use components as possible.

4.1.1 Restrictions of The Lamp

There are certain restrictions on how The Lamp can be used. Some of theseare due to the design of The Lamp and some are due to the desired usage ofThe Lamp.

The Lamp has been mainly used on exhibitions and fairs. The Lamp alsohas certain mechanical limitations in its design, which are beyond the limitsof this thesis to address. This created a number of restrictions and demands:

• 180 degree rotational movement

16

Page 28: Ultrasonic sensing design and implementation for detecting

4.1. NEW DESIGN CHAPTER 4. NEW SONAR SOLUTION

The Lamp can only rotate 180 degrees. This means that The Lamphas a front side, in which it can look at any direction, but also a backside, where it cannot look at all.

• PlacementThe previous limitation states that one side of The Lamp is in a "deadzone". In order to reduce the visible e�ect of this, The Lamp shouldbe placed with its front toward the audience. In an exhibition, thiswould most often mean that The Lamp is placed against a wall of theshowcase, or just with its front turned toward where the crowd is.

• Distance to personsThere is often quite much movement in an exhibition environment.The Lamp should only react on persons which are that close, so thatthey can be assumed to interact with The Lamp. The range of manySonar sensors is long, often so long that people walking far away in thebackground could be detected. Therefore, the distance that The Lampcan "see", has to be limited.A reasonable maximum distance is about 2 meters. This distance isnot �xed but just a preliminary approximation, which is due to change.The minimum distance, due to the fact that The Lamp can lean, ismeasured to be about 0.5 meters.

• Number of personsThe goal is to be able to detect whether one or multiple persons areclose to The Lamp. In order to get a clear interaction between TheLamp and surrounding persons, there has to be a maximum personlimit. There are two main reasons for this limit:

� SpaceToo many people will not �t close to The Lamp

� DetectionIn order to di�erentiate between one and multiple persons, themaximum number of persons has to be limited.

A preliminary limit of 3 persons is chosen. This number was worked outfrom typical exhibition situations, and should be further investigatedand tested.

• Multiple LampsBecause of the nature of Sonar technology, multiple sources will inter-fere with each other. Having two or more units running in the same

17

Page 29: Ultrasonic sensing design and implementation for detecting

4.1. NEW DESIGN CHAPTER 4. NEW SONAR SOLUTION

area is not possible, unless su�cient distance or opposite direction canbe achieved.

4.1.2 Desired behavior

There are a couple of basic behavioral criteria, on which a more advancedbehavior and personality can be built upon. The following actions werechosen as a base:

• GreetWhen a person comes close within a certain range, The Lamp shoulddetect this and perform a visual greeting.

• PartWhen a person leaves the area, The Lamp should detect this and per-form a visual sequence, for example "The Lamp is left alone and be-comes sad".

• FollowWhen a person is in The Lamp's vicinity, The Lamp should be able tofollow the person with its eye.

• PrioritizeWhen multiple persons are in The Lamp's vicinity, The Lamp shouldbe able to choose which person to give its attention.

4.1.3 Required data

The information that The Lamp needs to have about its vicinity in order toachieve the behavior in section 4.1.2 is:

• Number of personsIn order to decide whether The Lamp is alone, or if there are anypersons nearby.

• Distance to personsNeeded to prioritize persons, but also for other behavioral decisions,such as "The Lamp gets scared if a person is too close".

• Position of personsIn order to look at a person, The Lamp will have to turn either left orright.

18

Page 30: Ultrasonic sensing design and implementation for detecting

4.2. SENSOR CHOICE CHAPTER 4. NEW SONAR SOLUTION

• Speed of personsNeeded if The Lamp wants to act di�erently depending on how fastpersons are moving.

4.1.4 Data requirements

The requirements on the data that is gathered through the Sonar solution ispresented here.

Stability

In order for The Lamp to move �uently and precisely, data stability is im-portant. A system where no signal processing has to be performed, in orderto receive stable data, was desired.

Resolution

The quality of The Lamp's behavior is a�ected by the resolution of the data.For example, the algorithm for following a person (section 4.3.2 on page 21)will work more accurately if the resolution of the range data is higher.

Data rate

The rate of which new data is gathered from the Sonar sensors is an importantfactor. If the data rate is too slow, The Lamp will not have smooth and �uentmovements, and may even miss a person that is moving in its vicinity.

4.2 Sensor choice

The types of sensors that were considered were ready-to-use products, thatwould detect the closest target and have the distance to this target ready toread by the MCU on the upper mainboard.

Several Sonar sensors were considered:

• MaxBotix (several)[6]

• Parallax PING)))[7]

19

Page 31: Ultrasonic sensing design and implementation for detecting

4.3. ALGORITHMS CHAPTER 4. NEW SONAR SOLUTION

• Devantech SRF02[8]

The Sonar sensor chosen from MaxBotix range was the MaxBotix MB1300XL-MaxSonar AE0.MaxBotix have a range of sensors with greater accuracy and more documen-tation than any other that were found, but at a cost - they were the mostexpensive sensors. The MB1300 sensor had the best beam width for detectingpersons, and was the sensor MaxBotix recommended for detecting persons[6].

The most interesting features of the MaxBotix MB1300 sensor[6]:

• Low average current consumption: 3.4 mA

• Fast rate of updating (10 Hz)

• A lot of data processing is performed, in order to guarantee a goodstable reading

• Combined transmitter/receiver (tranceiver) in a small physical size

• 1 cm resolution

• Multiple di�erent interfaces to choose from, when reading data fromthe sensor

4.3 Algorithms

These algorithms were developed to make sure that the Sonar sensor solutionwould perform the necessary tasks.

4.3.1 Loneliness detection

The Lamp needs to know whether there is a person in it's vicinity or not.A threshold value is used to de�ne a level of curiosity. This value will

determine how far The Lamp can see, and can be varied for di�erent per-sonalities. If the desired behavior is shy, The Lamp may only be desired toreact when persons are very close, but if the behavior is curious, it will reacton persons further away as well.

20

Page 32: Ultrasonic sensing design and implementation for detecting

4.3. ALGORITHMS CHAPTER 4. NEW SONAR SOLUTION

When any Sonar sensor detects a value that is lower than the curiosity thresh-old, The Lamp is not alone. If all sensors give values higher than the curiositythreshold, The Lamp is alone.

4.3.2 Following

This algorithm was partially designed before choosing the number of sensors,and was �nalized when the number of sensors was chosen( section 4.4 on thefollowing page).

Figure 4.1: Left: Person is standing to the left. Right: The Lamp turns left,until straight at person.

When following a person, The Lamp is facing the person as straight-on aspossible. This means that The Lamp's eye-light is facing the person, givingthe person the impression that The Lamp is looking at him/her.

When only sensors on one side of The Lamp are detecting a person, TheLamp will directly know in which direction to turn toward the person. WhenThe Lamp has turned enough so that only the middle sensor/sensors are de-tecting the person, The Lamp is still not looking straight at the person. Thissituation needs a �ner detection of whether a person is straight ahead of TheLamp, or not.

Figure 4.1 shows the theoretical operation of this algorithm: A person is

21

Page 33: Ultrasonic sensing design and implementation for detecting

4.4. NUMBER OF SENSORS CHAPTER 4. NEW SONAR SOLUTION

standing just a little to the left or right of The Lamp's center, so that onlytwo sensors placed in the middle detect the person. The di�erence in distancebetween the two sensors will be detected, and The Lamp will turn until bothsensors give the same distance value. When this occurs, The Lamp shouldbe facing the person straight on.

The complete algorithm is described in �gure 4.2.

Figure 4.2: Following algorithm

4.4 Number of sensors

The Lamp has 10 holes around it's neck (�gure 1.1 on page 1). These holeswere designed for placing the Sonar sensors, because the sound cannot travelthrough the plastic shell.The Lamp has a front and back direction (section 4.1.1 on page 16), and inorder for it to mimic human behavior, it should not have "eyes in it's back".Because of this, a maximum of 180 ◦ angle of sight is desired.

22

Page 34: Ultrasonic sensing design and implementation for detecting

4.5. PLACEMENT CHAPTER 4. NEW SONAR SOLUTION

Since The Lamp has 10 holes symmetrically placed around it's neck, thatleaves 5 holes to cover the desired range of 180 ◦. Each sensor has approxi-mately 60 ◦ beam width at distances from about 1-3 meters[6].In order to cover the 180 ◦ area, at least 3 sensors are required. To allow thefollowing-algorithm (section 4.3.2 on page 21) to work, two sensors need tobe facing the same direction.These two criteria sets the requirement to a total of 4 sensors.

4.5 Placement

Placing the sensors has to be done as shown in �gure 4.3 due to the demandscovered in section 4.4 on the previous page and section 4.3.2 on page 21:

• A total of four sensors

• Two sensors facing the same direction

Figure 4.3: Placement of the sensors

This placement will result in two sensors being the center of The Lamp,with one sensor on each side symmetrically.

23

Page 35: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

4.6 New sonar board

The upper mainboard has limited connectivity possibilities, only four Gen-eral Purpose Input/Outputs (GPIOs) are available (appendix A on page 56).Each Sonar sensor needs one control signal and one data signal at least, foursensors will require a total of eight GPIOs. These sensors run at 5 V (formaximum beam width, which is desired), which is not available from theupper mainboard.

In order to run four Sonar sensors in the desired way, a new Sonar boardhas to be designed. This board should handle all controlling of the sensors,handle their data output and send this data to the main board.

4.6.1 Requirements

Requirements for the new Sonar board are:

• Power from 24 V supply voltage from the upper board

• Control each sensor with a digital signal

• Read the analog voltage level from each sensor

• Send data in a digital form to the upper mainboard

• Have the same form factor as the old Sonar board, in order to �t me-chanically

• Have the same placement of connectors as the old Sonar board, toconnect to the upper mainboard

4.6.2 Subsystems

The design of each subsystem is described here.

Power supply

The main board is running on 24 V, and the MaxBotix Sonar sensors require5 V for maximum reach and lobe width. The sensors consume an average of3.4 mA and a peak (when transmitting) of 100 mA[6]. The MCU normallyonly consumes a few mA at most, meaning that the current supply shouldbe able to deliver:

24

Page 36: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

Figure 4.4: New sonar design overview

4 ∗ 3.4 = 13.6 mA avg (4.1)

4 ∗ 100 = 400 mA peak (4.2)

The total requirements on the power supply are then:

• 5 V down from 24 V

• Average current of at least 30 mA (with a LED that indicates power,MCU and average current of the sensors included).

• Peak current of 400 mA

A commonly used device that should suite these needs is a LDO. A STL7805[9] was chosen for evaluation, for the following reasons:

• Previous experiencesPrevious experience with similar devices makes it more comfortable touse this type of device

• AvailabilityThese devices are readily available in many forms, from many compo-nent distributors. As EIS are often using Farnell for their componentpurchases, the availability of the item with Farnell was considered aswell

25

Page 37: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

• PriceAlthough cost is not a big issue in this thesis, these devices are oftenone of the cheaper solutions for this type of voltage regulation

• Ease of useThese devices do not require a lot of components to work, which makesthe design easier and neater

• Current capabilityThese devices are often capable of delivering high currents (up to acouple amperes).

There are di�erent packages available for this device, but since space isnot an issue in this design, the typical TO220 package was chosen in thisevaluation. This package has good thermal capabilities, which prevents itfrom overheating, and if it would be required, a heat sink is easy to �nd forthis package to reduce the heat even more.

The data sheet ([9], page 7) states that the thermal resistance junction-ambient is 60 ◦C/W. This means that the device temperature will rise 60 ◦

with each watt of power that is dissipated in the device. The data sheet ([9],page 7) also states that the maximum operating temperature is 125 ◦C. Therise in temperature can now be calculated:

The voltage drop in the LDO:

24− 5 = 19 V (4.3)

The peak power dissipation, at 400 mA:

19 V ∗ 400 mA = 7.6 W (4.4)

The average power dissipation, at 30 mA:

19 V ∗ 30 mA = 570 mW (4.5)

The average power dissipation is the interesting parameter to look at, dueto the very short time that the peak power is dissipated.

The temperature rise in the device due to this power dissipation is calcu-lated in equation 4.6.

570 mW ∗ 60◦C/W = 34.2◦C (4.6)

26

Page 38: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

The temperature of the device in an ambient temperature of 30 ◦C:

34.2◦C + 30◦C = 64.2◦C (4.7)

This temperature is well below the speci�ed maximum temperature of125 ◦C. Hence no heat sink will be required, and this device should �t wellin the design.This device requires two external capacitors, which are chosen according tothe data sheet[9].

Microcontroller

In order to work with something familiar, simple and cheap, an Atmel AVRATTiny24 MCU was chosen as the central part of the design. This MCUhas the necessary peripherals to control the Sonar sensors and communicatewith the upper board[10]:

• TWI communication support in hardware

• Su�cient amount (more than four) of ADC channels

• Internal oscillator, for simplicity

Connections

The Sonar board has to connect to the upper mainboard and the four Sonarsensors. The sensors each require the following connections:

• Vcc

• Gnd

• Analog output

• Trigger signal

Four connections to each sensor are necessary. For simplicity, ordinaryheader connectors with 100 mil (2.54 mm) spacing were chosen. They aremounted as edge connectors (lying down), instead of the normal through-holemounting. This is because the wires connected to these will be less interferingwith the mechanical parts of The Lamp, if they are placed in this direction.

In order to connect the Sonar board to the main board, two pieces of 2x4connection sockets with 2mm spacing are to be used. These connectors are

27

Page 39: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

identical to the ones used on the old Sonar board, and may not be replacedin order for the new board to �t.

Finally, in order to program the MCU, a 3x2 connector with 100 mil(2.54mm) spacing was used.

ESD protection

The Lamp was designed so that the Sonar sensors are meant to be placed inthe holes around The Lamp's neck. When placed like this, the sensors arevulnerable to ESD damage. This damage can occur when a person happensto touch The Lamp. In order to protect the Sonar board, as well as the uppermainboard, from damage due to ESD, some protection was required.

If an ESD discharge is passed through a Sonar sensor, it can travel throughany line to the Sonar board, and then through to the upper mainboard.Therefor, all signal lines from the Sonar sensors are to be protected fromsuch discharges. In order to simplify the addition of these components to theboard layout, a small size was decided as high priority.

The technique chosen for ESD protection was a TVS diode. The reasonsfor choosing this technique were mainly the availability in small packages andoverall good protection compared to some other commonly used techniques[11].

The speci�c TVS device was chosen because it was one of the smallest avail-able (at Farnell, with a reasonable price) with the correct parameters. Thisdevice has the following relevant[12] speci�cations[13]:

• Reverse standard voltage: 5 VThis voltage should be greater to, or equal, the operating voltage (whichis 5 V in this design)

• Clamping voltage: 10 VThis is the maximum voltage across the TVS when the transient currentis 1 A. This value should be chosen as low as possible so that the deviceconnected to this line (the MCU) su�ers as little (or none) damage aspossible.

• Size: SOD323 package, 2.7 x 1.35 mm

• Bidirectional

28

Page 40: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

This means that the TVS works in both directions, meaning it cansuppress both positive and negative voltage spikes. (It also means thatit can be mounted in any direction)

Low pass �ltering

Analog signals (were �rst meant to be used instead of the serial interface,section 8.5 on page 47) going from the Sonar sensors to the Sonar board aretraveling through long cables (> 1 m) where many sources of disturbance(motors, cables, servos) are present. In order to prevent this noise from re-sulting in incorrect readings, a low pass �lter was introduced on every analogsignal line.

A simple low pass �lter consisting of a resistor and a capacitor is su�cientfor this task. This was also recommended by MaxBotix themselves, in oneof their tutorials[14].Since the Sonar sensors only change their data output at most 10 times/second,the �lter can be designed to �lter the signal very intensively. The timeconstant for such a �lter, is a parameter that determines how long time ittakes for the voltage to change from one value to another. The time con-stant was calculated in equation 4.8 [15], using recommended values fromMaxBotix[14].

t = R ∗ C = 10 k ∗ 100 n = 0.001 s (4.8)

Other components

The following additional components are also in the design:

• A decoupling capacitor was added close to the MCU, to protect it fromnoise.

• A LED that indicates that the power supply is working, together witha current-limiting resistor.

29

Page 41: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

4.6.3 Board layout

The full schematic on which this layout was based can be seen in Appendix Con page 62.

Size

The size of the board was limited by the mechanical placement of parts inthe head of The Lamp. The new board should be of roughly the same sizeas the old board. If it would be much smaller, the connectors to the mainboard would not �t (they have a large separation). If it would be larger, theboard itself might not �t onto The Lamp.The old Sonar board as 100 x 32 mm and the new design was designed to70 x 20 mm. With this size, the connectors can still �t with the requiredspacing, and some excess board space on the sides is also present, which isgood for mechanically inserting the Sonar board onto the main board.

Placement

The LDO is placed on the edge so that it's legs can be bent outward andmake room for a heat sink (if later required) for maximum cooling.The TVS diodes are placed as close to the connectors as possible, for maxi-mum protection.

30

Page 42: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

Result

Figure 4.5: Sonar board top layer

Figure 4.6: Sonar board bottom layer

Note that changes were made to the design after the board was fabricated(section 8.5 on page 46)

31

Page 43: Ultrasonic sensing design and implementation for detecting

4.6. NEW SONAR BOARD CHAPTER 4. NEW SONAR SOLUTION

Summary

The following speci�cations summarize the design of the new Sonar board:

• The four MaxBotix MB1300 sensors are connected through the serialinterface to the new Sonar board

• Each sensor is connected with 4 lines: VCC, GND, serial communica-tion for distance reading and digital control signal.

• Two 2x4 connectors to the main upper board

• Runs on 5 V, using an LDO to convert down from 24 V from the uppermainboard

• Average current consumption < 15 mA

• Peak current consumption of about 400 mA

• Atmel ATTiny24 MCU

• TVS diodes for ESD protection

• TWI communication to upper mainboard MCU

32

Page 44: Ultrasonic sensing design and implementation for detecting

Chapter 5

Software

This chapter will present the most important software developed in this the-sis.

5.1 Sonar board software

The Sonar board software controls the Sonar sensors, receives data fromthem, and sends this data to the main board (�gure 5.1 on the next page).The MCUs on the two boards communicate through a TWI protocol. Thereare no physical Pull-up resistor implemented for this protocol (internal in theMCU on the main board is used instead).

33

Page 45: Ultrasonic sensing design and implementation for detecting

5.2. MAIN BOARD SOFTWARE CHAPTER 5. SOFTWARE

Figure 5.1: New sonar timing

5.2 Main board software

The implementation of the sonar into the system of The Lamp is writtensolely in C++. This section roughly describes the function of the softwareimplementation.

34

Page 46: Ultrasonic sensing design and implementation for detecting

5.2. MAIN BOARD SOFTWARE CHAPTER 5. SOFTWARE

5.2.1 Sonar class

The sonar class holds a state-machine that handles the TWI communica-tion protocol for receiving data from the Sonar board. The sonar class wasimplemented under the device layer (section 2.2 on page 10).

The state machine is updated on interrupts from both SDA and SCLlines, through their ISRs.

When all data is read, the sonar class pushes an "new data available"event to the system to notify that new data is present

5.2.2 MissNosy personality

The personality that is implemented in the Lamp layer, is called MissNosyand has three behaviors:

• Greet arriving personIf a person has just arrived, rise up, change color to red and look atthe person

• Look at personDepending on whether a person is standing to the right or to the leftof MissNosy, turn toward the person. If facing the person directly, donothing.

• Look sad when being leftWhen a person has just left MissNosy alone, change color to blue, lookdown at the �oor and decline to a sad sunken position.

5.2.3 Evaluation Methods

In order for MissNosy to get information for the di�erent behaviors, data fromthe Sonar sensors has to be translated to useful information. This translationis handled by evaluation methods. The following evaluation methods areimplemented:

• PersonApproachingReturns true if a person is just approaching

• PersonPresentReturns true if a person is present

35

Page 47: Ultrasonic sensing design and implementation for detecting

5.2. MAIN BOARD SOFTWARE CHAPTER 5. SOFTWARE

• PersonLeavingReturns true if a person is just leaving

• PersonPositionReturns -1 if a person is to the left, 0 if centered or 1 if the person isto the right

36

Page 48: Ultrasonic sensing design and implementation for detecting

Chapter 6

Implementation

This chapter describes the di�erent stages of implementation in chronologicalorder.

6.1 Old sonar prototype

The old Sonar board was connected to the Evaluation board. A test programwas written, using ASF following the scheme in �gure 3.2 on page 15. Thedata was analyzed using an oscilloscope, which con�rmed the functionality ofthe board, but also that the data was very noisy. This prototype con�rmedthat it was impossible to get a stable reading of the Sonar receivers by simplyreading the values, using the proposed technique. Some sort of data process-ing was determined necessary, in order for The Lamp to make use of the data.

This stage was the �rst time a simple algorithm for following a person wascon�rmed, proving the concept of following a person using two sensors de-scribed in section 4.3.2 on page 21.

6.2 Old sonar failure

After con�rming that the system was working, the Sonar board was con-nected to the main board instead, in order to work on The Lamp instead ofthe Evaluation board. At this point, the Sonar board started to fail. Moredetails about the damage is discussed in section 8.11 on page 48.

37

Page 49: Ultrasonic sensing design and implementation for detecting

6.3. NEW SENSOR TESTS CHAPTER 6. IMPLEMENTATION

In order to repair the MCU that was damaged on the upper mainboard, thewhole upper part of The Lamp was disassembled.

6.3 New sensor tests

Multiple tests were performed in order to validate the speci�cations of thenew Sonar sensors as well as testing performance on a human target. TheSonar sensors were connected to the Arduino, which was used to send datathrough to a PC for data collection.

6.3.1 Sensor data testing

In this test, only one sensor was tested at a time. A two meter high and onemeter wide sign, made out of �rm fabric, was used as a target. This sign wasplaced at distances from 0-2 meters while the data was studied. There wereno recordings made of this data, because similar data was extracted from thenext test session (section 6.3.2).This test proved that the 1 cm accuracy that was claimed by the manufacturer[6],was indeed achievable. Also, the test con�rmed that the data gathered fromthe sensors was very stable.

6.3.2 Person detection testing

The goal of this test was to see how the sensors behave in a more realistic en-vironment. This tested both their individual stability, but also their behaviorwhen running together. This test was performed to determine whether allsensors could run at the same time, or if they had to be run sequentially.

The Lamp was disassembled at this point, therefor a temporary mechani-cal solution was built to hold the sensors on The Lamp. This was requiredso that the intended placement of the sensors could be tested. A mannequinwas dressed in a coat, in order to pose as a person for these tests (�gure 6.1on the next page). All four Sonar sensors were connected to the Arduino,which was connected to a computer running MATLAB, with a simple pro-gram that gathered data from the sensors.

When running all of the sensors at once, the data was not as stable as when

38

Page 50: Ultrasonic sensing design and implementation for detecting

6.3. NEW SENSOR TESTS CHAPTER 6. IMPLEMENTATION

Figure 6.1: Test setup

one sensor was running alone. This was caused by interference between thesensors, due to sound waves being re�ected from multiple sensors at once[14].The way to resolve this issue is to run the sensors one, or a few, at a time.

At �rst, running two sensors at a time was tested. This gave some im-provement, but still not the same result as when running one sensor.

39

Page 51: Ultrasonic sensing design and implementation for detecting

6.4. NEW SONAR PROTOTYPE CHAPTER 6. IMPLEMENTATION

A scheme was then developed, where sensors were sequenced so that onlyone sensor was running at a time.Each sensor was started by the Arduino, with an adjustable delay betweeneach sensor. This delay parameter is very important; too short time andthe sound waves from one sensor will still be able to interfere with the nextsensor. On the other hand, if the delay is too long, the data-rate will bemuch slower, which will a�ect the performance of The Lamp.The test results are presented in section 7.1.1 on page 42, and test data inappendix D on page 63.

6.4 New sonar prototype

In order to test the new Sonar sensors with the desired functionality of thenew Sonar solution, a �rst prototype was developed. This prototype used theArduino in place of the Sonar board, which was connected to the Evaluationboard.

The Servo controller was also connected to the Evaluation board, in order toallow The Lamp to turn sideways. The code was written mostly using theASF directly, in order to determine what part of the drivers that would benecessary for controlling the sensors (all of these functionalities might nothave been implemented in the higher level of The Lamp's software architec-ture).

With these basic functionalities, it was possible to test the algorithm forfollowing (section 4.3.2 on page 21).When a simple form of the algorithm for following was con�rmed and datafrom the Sonar sensors was determined stable, the next step was to go fromusing the Evaluation board to the upper mainboard on The Lamp.

6.5 New sonar prototype 2

The progress continued with the Sonar sensors being connected to the Ar-duino, which was connected to the upper mainboard. The Lamp was builttogether, so that all functionalities of The Lamp could be utilized.

In this prototype, a simple personality was developed, using more of The

40

Page 52: Ultrasonic sensing design and implementation for detecting

6.6. FINAL IMPLEMENTATION CHAPTER 6. IMPLEMENTATION

Lamp's functionalities than ever before. The personality had the followingactions:

1. If no person is within range, look bored. This bored look was visualizedby:

• set the color of The Lamp's LEDs to blue

• look down on the �oor

• move head slowly side to side, acting bored and sad

2. When a person comes into range:

• change the color of The Lamp's LEDs to red

• look up at the person

• follow the person

3. When a person moves out of range: go back to being bored

The software was ported from the Evaluation board to the main board,using more of the available software from The Lamp's project, instead ofusing the ASF directly. This was done to allow most of the code to be reusedin the �nal implementation.

6.6 Final implementation

This stage implemented the same behavior as had previously been done (sec-tion 6.5 on the previous page), but using the �nal mechanical parts and elec-tronics. The Arduino was replaced by the new Sonar board. The softwarewas redesigned, using the software implementation described in section 5.2on page 34 and the Sonar sensors were mounted on The Lamp's plastic shell.

With the plastic shell mounted, The Lamp should now be ready to be used.Further improvements in software are desirable to give The Lamp more funactions and a more detailed behavior, but this is left as further work (sec-tion 10.2 on page 53).

41

Page 53: Ultrasonic sensing design and implementation for detecting

Chapter 7

Result

7.1 New sonar solution

The new sonar solution has very stable readings, even when working withtargets that are normally hard to obtain stable results from (clothed persons).Tests results (Appendix D.1 on page 63, Appendix D.2 on page 64) showthat the resulting stability with the new solution was very good, mostly onlyvarying by 1 cm.

7.1.1 Test results

The tests in appendix D.2 on page 64 show that all sensors cannot run atonce, and the solution was to control them sequentially. The order to run thesensors was chosen to: 3,1,4,2. The placement of the sensors can be found insection 4.5 on page 23. This sequence was chosen to minimize the occuranceof two nearby sensors running after each other.

The delay between starting sensors in this sequence was determined throughthe tests, and set to 40 ms. With 40 ms delay between the sensors, thedata-rate of the sensors is:

1

40ms ∗ 4= 6.25 readings/second (7.1)

Each sensor can be run at a maximum of 10 times/second, so this delaycauses a noticeable degradation of the data-rate[6].

42

Page 54: Ultrasonic sensing design and implementation for detecting

7.2. THE LAMP'S BEHAVIOR CHAPTER 7. RESULT

7.2 The Lamp's behavior

The simple personality which is implemented on The Lamp, is a big improve-ment to the audience of The Lamp. Instead of having a randomized behavior,The Lamp is now reacting in a logical manner depending on adjacent personsmovements.

The Lamp is following a person with enough speed, so that it does not loosetrack of a person if the person is not moving too fast (one can move fast, butnot run around the lamp).

43

Page 55: Ultrasonic sensing design and implementation for detecting

Chapter 8

Discussion

Certain aspects of this thesis are further discussed in this chapter.

8.1 Multiple lamps

Using Sonar sensor technology means that multiple units standing close toeach other cannot run at the same time. If in the future, it is highly desiredto have multiple units running together, there has to be investigations toshow whether Sonar sensors are still usable, or some other technology has tobe used.

8.2 Reasons for a new design

The main reasons for choosing to redesign the system, instead of trying to�x the old design were:

• TimeIn order to fully investigate and correct the old Sonar board, the PCBwould most likely have to be redesigned and manufactured. This wouldtake up most of the time of this thesis. Furthermore, much signalprocessing would be required in order to make the data stable andusable, which is also a very time-consuming task.

• AimThe aim of this thesis was not to redesign the Sonar board, but toimplement a Sonar solution.

44

Page 56: Ultrasonic sensing design and implementation for detecting

8.3. SENSOR CHOICE CHAPTER 8. DISCUSSION

• DocumentationThere was quite limited documentation of the Sonar board. Manydesign aspects such as power consumption, accuracy and resolution ofthe Sonar readings were lacking. This makes it hard to predict thebehavior of the board, and fully verify it's functionality. The peoplewho designed the board are no longer employees at glseis, which madeit even more impossible to answer questions about the design.

• FunctionalityBecause there are only two Sonar receivers on the board, the functional-ity is limited. With these two alone, The Lamp has a very narrow viewof sight. As described in section 4.3 on page 20, certain functionalitiesrequire more than two sensors.

• CostThere was only one Sonar board available. The Sonar board is a 4-layerdesign with many expensive components, so it costs a lot to manufac-ture. In order for multiple units of The Lamp to use this solution, atleast two or more new boards would have had to be manufactured.

8.3 Sensor choice

There was no equivalent competitor to the MaxBotix sensors. The two othersensors that seemed popular among robotics projects were in some way in-ferior. The Parallax PING)))[7] was not a combined transceiver - multipleunits would not �t in The Lamp's plastic casing. The Devantech SRF02[8]had no speci�cation about resolution, which was an important parameter.MaxBotix seemed to be a better quality product, with more support andinformation available.Perhaps further investigations would have resulted in �nding a harder to �nd,smaller manufacturer.

8.4 Sensor signal choice

The MaxBotix AE0[6] sensors have three interfaces for reading the data out-put:

• Serial dataSerial data sent with RS232 compatible protocol

45

Page 57: Ultrasonic sensing design and implementation for detecting

8.5. NEW SONAR BOARD CHAPTER 8. DISCUSSION

• Analog voltageAn analog voltage is set that represents the distance

• Analog envelopeThe "raw data" from the sensor, for manual processing

The reason for choosing the analog voltage at �rst was that it is a very simpleand fast task to read an analog voltage on the MCU, instead of reading theserial data. A �rst attempt was made to use the RS232 compatible serialinterface, but was disgarded due to higher complexity. The stability of thereadings using the analog level was determined good in the tests, which wasthe biggest fear with using the analog level.However, upon completing the new Sonar board, the digital interface was�nally chosen after all. This was due to some unstability when running thewhole system in the �nal implementation.

8.5 New sonar board

There were a few design issues with the �rst revision of the Sonar board.Because the boards still work with a minor tweak (one wire), it was notdeemed necessary to redesign the board at this point.

Voltage division

The Sonar board runs on 5 V(because the sensors need to be run at 5 V) andthe upper mainboard MCU runs on 3.3 V. Therefore, when designing thenew Sonar board, voltage division resistors(R5-R12, appendix C on page 62)were put on the board to make sure that the voltage to the upper mainboardwould not exceed 3.3 V. Some revisions of the MCU on the upper mainboardare not tolerant to 5 V.In the �nal implementation of the new Sonar board, an open-collector TWIcommunication protocol was implemented, which negates the need of theseresistors. They are therefore not populated (R5, R7, R9, R11 are replacedwith 0 Ohm resistors) on the board.

Unusable port

One of the signals that was supposed to be used for controlling one sensor(PB3)[10] was not possible to use without disabling the option to program

46

Page 58: Ultrasonic sensing design and implementation for detecting

8.6. SENSOR UPDATE RATE CHAPTER 8. DISCUSSION

the MCU further. Therefore, a wire was used to change the output to one ofthe sensors from PB3 on the Attiny 84 MCU to PA4.

Analog to digital change

When the new Sonar board was programmed and used in the system, itwas noticed that, despite �ltering, the data gained was a little unstable. TheLamp has many sources of disturbances, with all it's wires, motors and signalsthat are running around the sensors, which disturbed the analog level.When the scheme for controlling all sensors was developed and tested, itwas determined that there was enough time to use the serial interface of thesensors instead.This change made the �lters(R1-R4, C4-C7 in appendix C on page 62) onthe new Sonar board redundant. The running version of the board has theseunpopulated or replaced with 0 Ohm resistors.

8.6 Sensor update rate

It is hard to calculate what the minimum update rate is in order to get agood reaction time from The Lamp. This could perhaps have been furthertested, but instead the result was determined to be proof enough that theactual update rate is su�cient.

8.7 New vs old sonar - advantages

Since cost is not a major concern regarding the development of The Lamp,the reduction in cost is not of much use. Besides this advantage, there ismuch less processing required by the MCU on the upper mainboard. Whenmore advanced behavior and other features are to be implemented in thefuture, this can make for quite an advantage.

The simplicity of the new design, in respect to the old one, is a welcomechange. If more boards are required, something breaks or someone wants tocontinue developing the hardware, it is much more clear what the purposeand function of the new Sonar board is.

47

Page 59: Ultrasonic sensing design and implementation for detecting

8.8. CURIOSITY LEVEL CHAPTER 8. DISCUSSION

8.8 Curiosity level

Ideally, the maximum distance that The Lamp is interested in (the curiositylevel, see section 4.3.1 on page 20) should be adjustable in the �eld(withoutthe need of a PC connected, without the need of an engineer), in order tocustomize The Lamp for di�erent environments. This could be done witha simple external board that communicates with The Lamp. With a fewbuttons and a display, parameters could be adjusted easily.

8.9 Number of persons

The maximum detectable number of persons could be tweaked after usingThe Lamp for a while. How people will actually interact with The Lamp ishard to predict.

8.10 PIR sensors

Upon completing the Sonar sensor implementation, the PIR sensors are notmandatory to use at all. These were reported very troublesome and unstableby earlier employees that worked on The Lamp, therefore leaving them mightbe a pleasant change.

8.11 Faulty electronics

After producing the old Sonar board, there was only a short veri�cation ofit's functionality performed. This short veri�cation was only made by thehardware designer in order to con�rm that the board seemed to work cor-rectly. There were no prolonged tests, nor any attempt at an implementationof this system. The following errors that occurred were likely to have beencaught earlier if more tests were performed earlier.At �rst, one of the sensors on the old Sonar board stopped responding.Shortly after, the other sensor stopped as well.Investigations showed that the MCU on the upper mainboard had been dam-aged, as well as the ampli�er that is used to amplify the sound to the trans-mitter.The damaged ampli�er was replaced, and the Sonar board was tested. At this

48

Page 60: Ultrasonic sensing design and implementation for detecting

8.11. FAULTY ELECTRONICS CHAPTER 8. DISCUSSION

point, no errors were found. Just before putting everything back together,the Sonar board was tested once again. During this testing, the same ampli-�er that had previously been damaged, broke down once again. Much timewas spent trying to investigate why the �rst Sonar board behaved strangely,and later broke down.

ESD damage was most likely not a reason, as both an ESD mat and braceletwas used at the workplace. The electronics broke down without anyone com-ing in contact with them, which would be strange for ESD damage. Testswere performed, that also excluded heat as a factor. Together with an em-ployee at glseis, the most likely reason for the breakdown was instabilitythat caused the devices to break down after running a period of time. Muchthought was put into designing the new Sonar system. The old Sonar sys-tem was not su�cient to implement all the desired functions. The designof the new system was aimed to make sure that the functionality would besu�cient.

49

Page 61: Ultrasonic sensing design and implementation for detecting

Chapter 9

Conclusion

This thesis has resulted in improvements to the abilities The Lamp has todetect and interact with persons in its vicinity. The old Sonar solution wasdetermined to:

• Deliver unstable data, which had to be processed a lot to be usable

• Use an insu�cient amount of sensors for more advanced detection al-gorithms

• Cost a lot of money to produce

• Be very poorly documented

• Have been developed by the same person who thought about imple-mentation, resulting in a rather ill-�tted solution for the application(The Lamp)

The old Sonar board ended up breaking down, and because of the many�aws of this design, a new design was initiated. The design of a brand newSonar solution included:

• New sensors, that are ready-to-use and easy to implement

• New Sonar board, that controls the new sensors and takes away a lotof work load on the MCU on The Lamp

• Software that controls the new sensors for minimum interference be-tween sensors, while maintaining maximum update-rate of the sensors

50

Page 62: Ultrasonic sensing design and implementation for detecting

CHAPTER 9. CONCLUSION

• Implementation of a simple personality to verify and demonstrate theuse of the new Sonar system

Many bene�ts were gained by redesigning the whole Sonar system:

• More number of sensors make possible more advanced behavior for TheLamp, such as a wider �eld of sight and possibilities to detect multiplepersons

• A higher resolution in the distance data allows more accurate behaviorfor The Lamp

• High stability in the distance data prevents unpredicted behavior ofThe Lamp in certain situations

• Sensors that are ready-to-use require no data processing to operate,allowing focus on implementation during this thesis.

• Further work and improvement on The Lamp is easier to perform, witha simpler and more well documented Sonar system.

The result of this thesis can be easily observed by running The Lampwith the new Sonar system. Compared to the old system, which is lackingthe Sonar implementation, The Lamp is interacting much more with personsin it's vicinity.

51

Page 63: Ultrasonic sensing design and implementation for detecting

Chapter 10

Further work

10.1 Hardware

• Mechanical improvementWhen putting the plastic shell on The Lamp on/o�, a lot of damagecan be done to the upper main/LED board. The biggest issue for theSonar part is that the Sonar sensors can be damaged. A di�erent wayof attaching the plastic shell should be revised.

• Main boardThe redesign of the Sonar board has made some parts of the main boardobsolete (mainly the DAC). Furthermore, the Sonar board should beconnected to the TWI ports of the upper mainboard MCU. In the caseof redesigning the upper mainboard, external Pull-up resistors shouldbe added there as well.

• Lower boardSince this thesis has focused on the upper part of The Lamp, the lowerboard was not evaluated enough to �nd any speci�c means of improve-ment.

• External settings boardWith the possibility of switching between di�erent personalities, or justwanting to change the curiosity level depending on the surroundingsThe Lamp is in, an external board could be of interest. This couldeither communicate with mobile devices, giving them some data andcontrol of The Lamp, or just house a display and some buttons forsetting various parameters. Or why not both?

52

Page 64: Ultrasonic sensing design and implementation for detecting

10.2. SOFTWARE CHAPTER 10. FURTHER WORK

10.2 Software

• MissNosyThe MissNosy personality which has been started, can be much im-proved.

• Further personalitiesWhen MissNosy is fully implemented, adding more personalities wouldbe of interest. A suitable way of changing between personalities shouldalso be investigated. One way of solving this is by using the serial portthat is available on the lower board, but this requires a computer toconnect to The Lamp.

• Port to new version of ASFThe version of the ASF used in the Relight Relate project, is veryoutdated. There has been some changes made in the ASF to �t theproject's needs, because some functionalities were not supported bythe ASF. More bene�ts that are not further investigated are sure to begained by upgrading to the newest version of the ASF.

• Implement algorithms for detecting multiple personsAlgorithms for determining the following are thought of, but not yetimplemented:

� Whether multiple persons are in the area

� Which person is closest

� How fast are persons moving

53

Page 65: Ultrasonic sensing design and implementation for detecting

Bibliography

[1] Semcon, Relight>Relate public homepage. [www], http://www.

relightrelate.com

[2] Atmel, EVK1100 evaluation board schematics. [www], http:

//www.atmel.com/dyn/resources/prod_documents/EVK1100_

SCHEMATICS_REVC.pdf, date 2012-01-10

[3] Arduino, Arduino Duemilanove. [www], http://arduino.cc/en/Main/arduinoBoardDuemilanove, date 2012-03-22

[4] Polulu, Polulu Servo Controller. [www], http://www.pololu.com/file/0J37/ssc03a_guide.pdf, date 2012-02-01

[5] Atmel, ASF Source Code Documentation - UC3 A0/A1 Documentation.[www], http://asf.atmel.com/docs/latest/uc3a/html/index.html,date 2012-01-10

[6] MaxBotix, XL-MaxSonar AE0 (MB1300). [www], http://www.

maxbotix.com/documents/MB1200-MB1300_Datasheet.pdf, date 2012-04-01

[7] Parallax, Parallax PING))). [www], http://www.parallax.com/tabid/768/ProductID/92/Default.aspx, date 2012-04-01

[8] Devantech, Devantech SRF02. [www], http://www.

robot-electronics.co.uk/htm/srf02tech.htm, date 2012-05-01

[9] ST MicroElectronics, ST L7805ABP TO220. [www], http:

//www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_

LITERATURE/DATASHEET/CD00000444.pdf, date 2012-03-25

54

Page 66: Ultrasonic sensing design and implementation for detecting

BIBLIOGRAPHY BIBLIOGRAPHY

[10] Atmel, ATtiny84. [www], http://www.atmel.com/devices/attiny84.aspx, date 2012-03-30

[11] Benny Lee, An Overview of ESD Protection Devices. [www], http://www.ce-mag.com/archive/01/Spring/Lee.html, date 2012-03-30

[12] Semtech, TVS Diode Application Note. [www], http://www.semtech.com/images/datasheet/tvs_diode_selection.pdf, date 2012-03-30

[13] NXP, NXP PESDxL1BA bidicertional ESD protection diode. [www],http://www.farnell.com/datasheets/682594.pdf, date 2012-03-30

[14] MaxBotix, MaxBotix tutorials. [www], http://www.maxbotix.com/

tutorials.htm, date 2012-04-15

[15] Electronics tutorials , Passive Low Pass Filters. [www], http://www.electronics-tutorials.ws/filter/filter_2.html, date 2012-03-28

55

Page 67: Ultrasonic sensing design and implementation for detecting

1 2 3 4 5 6 7 8

A

B

C

D

87654321

D

C

B

A

Title

Number RevisionSize

A3

Date: 14-Dec-2009 Sheet of File: R:\hardware\UpperLEDBoard\design\V0.5\UpperLEDBoard.ddbDrawn By:

USART_RS232_TX

USART_RS232_TX

SPI1_MISOSPI1_MOSISPI1_SCK

XERRXLAT

GSCLK

MODE

BLANK

24V

SONAR

3V3

TCK

TDO

TMS

TDI

RESET_N

RESET_NSPARE_JTAG

USART_RS422_RXUSART_RS422_TX

3V3

3V3

7VSERVO

JTAG

Reset_Pololu

Reset_Pololu

USART_RS232_RX

3V3

3V3

7V

1:ANODE 2:CATHODE

Heart PWM

USART_RS422_TX

USART_RS422_RX

CONNECTION TO MASTER MCU

USART_RS232_RX

SONAR_BURSTSONAR_TSF

SONAR_BURSTSONAR_TSF

HEART DRIVER

7V

EYE LED 1=ANODE 2=CATODEMAX 350mA

EYE DRIVER

Eye PWM

Sonar 1Sonar 2

3V3

SYNC

SYNC

DIN

DINSCLK

SCLK

3V3

DCDC SYNC

TEMP SENSE 1TEMP SENSE 2

14

NC

2N

C3

Y1

KX32.768KHF2T-ES

14

NC

2N

C3

Y2

CFPX104 12.0 MHZ

C19C 22P 50V NP0 0603

C20C 22P 50V NP0 0603

C21C 22P 50V NP0 0603

C22C 22P 50V NP0 0603

PA0019

PA0120

PA0223

PA0324

PA0425

PA0526

PA0627

PA0728

PA0829

PA0930

PA1031

PA1133

PA1236

PA1337

PA1439

PA1540

PA1641

PA1742

PA1843

PA1944

PA2045

PA2151

PA2252

PA2353

PA2454

PA2555

PA2656

PA2757

PA2858

PA2983

PA3084

PB0065

PB0166

PB0270

PB03 71

PB04 72

PB0573

PB0674

PB0775

PB08 76

PB09 77

PB1078

PB1181

PB1282

PB13 87

PB14 88

PB1595

PB1696

PB1798

PB18 99

PB19 100

PB201

PB212

PB223

PB23 6

PB24 7

PB258

PB269

PB2710

PB28 14

PB2915

PB3016

PB3117

PC

00

63

PC

01

64

PC

02

85

PC

03

86

PC

04

93

PC

05

94

VBUS46

DM48

DP49

RESET_N18

TMS 89

TCK90

TDO91

TDI92

VDDANA59

ADVREF60

GNDANA61

VD

DO

UT

11

VD

DC

OR

E2

2

VD

DC

OR

E3

4

VD

DC

OR

E3

8

VD

DC

OR

E9

7

VD

DP

LL

62

VD

DIN

12

VD

DIO

4

VD

DIO

47

VD

DIO

67

VD

DIO

68

VD

DIO

79

GN

D5

GN

D1

3

GN

D3

5

GN

D6

9

GN

D8

0

GN

D5

0

N/C

32

GN

D2

1

U7

AVR32UC3A1512

C23C 100N 16V X7R 0603

C24

C 33N 25V X7R 0603

C26C 470P 50V NP0 0805

C28

C 100N 16V X7R 0603

C29C 33N 25V X7R 0603C30C 33N 25V X7R 0603

C31C 33N 25V X7R 0603

C32C 33N 25V X7R 0603

C33C 2.7N 50V X7R 0603C34C 2.7N 50V X7R 0603

C35C 2.7N 50V X7R 0603

C36C 2.7N 50V X7R 0603C29-32: C33-36:

C38

C 33N 25V X7R 0603

C39C 2.7N 50V X7R 0603

C41C 1N 50V X7R 0603

C43

C 100N 16V X7R 0603

C44

C 100N 16V X7R 0603

C45

C 100N 16V X7R 0603

C46

C 100N 16V X7R 0603

C47

C 100N 16V X7R 0603C43-47: C48-52:

C48

C 33N 25V X7R 0603

C49

C 33N 25V X7R 0603

C50

C 33N 25V X7R 0603

C51

C 33N 25V X7R 0603

C52

C 33N 25V X7R 0603

C53C 100N 16V X7R 0603

3V3

C55

C 100N 16V X7R 0603R15R 3.9K 1% 0.1W 0603

R16R 3.9K 1% 0.1W 0603

R17R 1.2 1% 0.1W 0603

R18R 1.2 1% 0.1W 0603

R19

R 270 1% 0.25W 120612

J2

CON2 3.5 STRAIGHT SCREW

R22

R 3.9K 1% 0.1W 0603

R23

R 3.9K 1% 0.1W 0603

R25

R 3.9K 1% 0.1W 0603

R26

R 3.9K 1% 0.1W 0603R22-23: R24: R25-26:

C58

C 100N 16V X7R 0603

A8

B 7

Y5

RO2

DI3 Z 6

GN

D4

VC

C1

U10

MAX3488/3490

12345678910

J6

CON10 MALE IDC SMD

R27

R 120 1% 0.1W 0603

R28

R 120 1% 0.1W 0603

C59C 100N 16V X7R 0603

Relight Relate - Upper LED Board - MCU

0.5

2 4L Henriksson

R29

R 0 1% 0.1W 0603

C60

C NOT MOUNTED 0603

C61

C NOT MOUNTED 0603C60-61:

12345

J7CON5 3.5 STRAIGHT SCREW

VOUT4

VD

D1

GN

D8

SY

NC

5

SC

LK

6

DIN

7

DAC

U9

AD5300BRM

Q1NPN BC817-25

Q2NPN BFS17

Q3NPN BFS17

Q4NPN BFS17

D38DZ 2.4V 0.25W BZX84C2V4 SOT23

C57

C 10U 25V X5R 1206

C40C 4.7U 10V X5R 10% 1206

C42C 4.7U 10V X5R 10% 1206

C25C 2.2U 35V X5R 20% 1210

C27C 2.2U 35V X5R 20% 1210

C37C 2.2U 35V X5R 20% 1210

C54C 1U 100V Y5V 0805

C56C 22P 50V NP0 0603

R24

R 47K 1% 0.1W 0603

R14R 9.1K 1% 0.1W 0603

R20

R 2.4K 1% 0.1W 0603

R21

R 270 1% 0.1W 0603

OUT1

OUT 16

V511

CS+9

CS-10

NC14

EN15

NC8

IN2

IN3

NC7

DIM13

NC6

NC4

NC5

GND 12

EP17

U8

MAX16803

1V8

RESET_N

12345678

J5

CON8 M80-84108

12345678

J10

CON8 M80-84108

3V3R34

R 620 1% 0.1W 0603

D43

LED_EL19-21VRC

S1

SWITCH B3U-1000P

123

J3

CON3 3.5 STRAIGHT SCREW

123456

J4

CON6 3.5 STRAIGHT SCREW

SiktmärkeFID1

SIKTMÄRKE

SiktmärkeFID2

SIKTMÄRKE

SiktmärkeFID3

SIKTMÄRKE

SiktmärkeFID4

SIKTMÄRKE

SiktmärkeFID5

SIKTMÄRKE

SiktmärkeFID6

SIKTMÄRKE

APPENDIX A. UPPER LED BOARD SCHEMATICS

Appendix A

Upper LED Board Schematics

56

Page 68: Ultrasonic sensing design and implementation for detecting

1 2 3 4 5 6 7 8

A

B

C

D

87654321

D

C

B

A

Title

Number RevisionSize

A3

Date: 14-Dec-2009 Sheet of File: R:\hardware\UpperLEDBoard\design\V0.5\UpperLEDBoard.ddbDrawn By:

14V3V3

SPI1_MOSIXERRSPI1_SCKXLATGSCLKMODEBLANKSPI1_MISO

RGB DRIVER

TEMP SENSE 1

TEMP SENSE 2

TEMPERATURE SENSOR

C16C 100N 16V X7R 0603

C17C 100N 16V X7R 0603

C18

C 100N 16V X7R 0603

R12R 2.4K 1% 0.1W 0603

R13R 2.4K 1% 0.1W 0603

Relight Relate - Upper LED Board - RGB LED

0.5

3 4L Henriksson

1234567891011121314

J9

CON14 MOLEX PICOFLEX

CH 1

CH 2

CH 3

VDD1

VSS3VOUT

2

U6

TC1047A

SIN5

XERR23

SCLK4

XLAT3

GSCLK25

BCSEL6

BLANK2

XTEST26

IREF27

VCC28

GND1

SOUT24

OUT0 7

OUT18

OUT29

OUT3 10

OUT4 11

OUT512

OUT613

OUT714

OUT8 15

OUT9 16

OUT1017

OUT1118

OUT1219

OUT13 20

OUT14 21

OUT1522

TH PAD29

U4

TLC5943

SIN5

XERR23

SCLK4

XLAT3

GSCLK25

BCSEL6

BLANK2

XTEST26

IREF27

VCC28

GND1

SOUT24

OUT0 7

OUT1 8

OUT29

OUT310

OUT411

OUT5 12

OUT613

OUT714

OUT815

OUT9 16

OUT10 17

OUT1118

OUT1219

OUT1320

OUT14 21

OUT15 22

TH PAD29

U5

TLC5943

R11R 47K 1% 0.1W 0603

625

134

R

BG

D1

D LRTB_G6TG

625

134

R

BG

D2

D LRTB_G6TG

625

134

R

BG

D3

D LRTB_G6TG

625

134

R

BG

D4

D LRTB_G6TG

625

134

R

BG

D5

D LRTB_G6TG

625

134

R

BG

D6

D LRTB_G6TG

625

134

R

BG

D7

D LRTB_G6TG

625

134

R

BG

D8

D LRTB_G6TG

625

134

R

BG

D9

D LRTB_G6TG

625

134

R

BG

D10

D LRTB_G6TG

625

134

R

BG

D11

D LRTB_G6TG

625

134

R

BG

D12

D LRTB_G6TG

625

134

R

BG

D13

D LRTB_G6TG

625

134

R

BG

D14

D LRTB_G6TG

625

134

R

BG

D15

D LRTB_G6TG

625

134

R

BG

D16

D LRTB_G6TG

625

134

R

BG

D17

D LRTB_G6TG

625

134

R

BG

D18

D LRTB_G6TG

625

134

R

BG

D19

D LRTB_G6TG

625

134

R

BG

D20

D LRTB_G6TG

625

134

R

BG

D21

D LRTB_G6TG

625

134

R

BG

D22

D LRTB_G6TG

625

134

R

BG

D23

D LRTB_G6TG

625

134

R

BG

D24

D LRTB_G6TG

625

134

R

BG

D25

D LRTB_G6TG

625

134

R

BG

D26

D LRTB_G6TG

625

134

R

BG

D27

D LRTB_G6TG

625

134

R

BG

D28

D LRTB_G6TG

625

134

R

BG

D29

D LRTB_G6TG

625

134

R

BG

D30

D LRTB_G6TG

625

134

R

BG

D31

D LRTB_G6TG

625

134

R

BG

D32

D LRTB_G6TG

625

134

R

BG

D33

D LRTB_G6TG

625

134

R

BG

D34

D LRTB_G6TG

625

134

R

BG

D35

D LRTB_G6TG

625

134

R

BG

D36

D LRTB_G6TG

12345678910111213141516

J8

CON16 MOLEX PICOFLEX

APPENDIX A. UPPER LED BOARD SCHEMATICS

57

Page 69: Ultrasonic sensing design and implementation for detecting

1 2 3 4 5 6 7 8

A

B

C

D

87654321

D

C

B

A

Title

Number RevisionSize

A3

Date: 14-Dec-2009 Sheet of File: R:\hardware\UpperLEDBoard\design\V0.5\UpperLEDBoard.ddbDrawn By:

3V3

7V

24V24V24V 14V

24V

3.3V SUPPLY 14V SUPPLY

7V SUPPLY

DCDC SYNC

F1

F HOLDER MICROFUSE

C1

C 220U 50V 20% ELEC_D10

C3

C 1U 100V Y5V 0805

C4C 4.7U 10V X5R 10% 1206

R1

R 30K 1% 0.1W 0603

R2R 2.4K 1% 0.1W 0603

C5C 2.2U 35V X5R 20% 1210

C6C 47U 16V X5R 1210

R3

R 47K 1% 0.1W 0603

R4

R 27K 1% 0.1W 0603

R5R 2.4K 1% 0.1W 0603

C11

C 100P 50V NP0 0603

C12

C 47U 16V X5R 1210

C13

C 47U 16V X5R 1210

C14

C 47U 16V X5R 1210

C15

C 47U 16V X5R 1210

R7R 2M 1% 0.125W 0805

R8R 390K 1% 0.1W 0603

R9

R 9.1K 1% 0.1W 0603R10

R 270 1% 0.1W 0603

Relight Relate - Upper LED Board - DCDC

0.5

4 4L Henriksson

C2C 10U 25V X5R 1206

C7C 10U 25V X5R 1206

C8

C 10U 25V X5R 1206

C10

C 10U 25V X5R 1206

D37

DS 5A 30V VF=0.45V SSC53L SMD

F2

F 5A MICROFUSE

1234

J1

CON4 3.5 STRAIGHT SCREW

C9C 33N 25V X7R 0603

R6

R 390K 1% 0.1W 0603

RUN/SSL5VIN

L1

GNDA7

BIAS H5

ADJK7

VOUTA1

SHAREH7

RTG7

SYNCL6

AUX G5

PGOODJ7

U2

LTM8025EV

RUNA10

VINA1

PGNDD1

FCBM12

MARG0 C12

VOUT M1

COMPA11

INTVCCA7

DRVCCC10

MARG1 C11

PGOODG12

FSETB12

PLLINA8

SGNDD9

VFBF12

TRACK/SSA9

VDB7

MPGMA12

U3

LTM4612EV

RUN/SSA1VIN

A5

GNDH1BIAS H3

ADJ A2

VOUTH5

U1

LTM8021EV

INDICATORS

24V 14V 7V 3V3

R30R 9.1K 1% 0.1W 0603

R31

R 3.9K 1% 0.1W 0603

R32

R 2.4K 1% 0.1W 0603

R33R 620 1% 0.1W 0603

D39LED_EL19-21VRC

D40LED_EL19-21VRC

D41LED_EL19-21VRC

D42LED_EL19-21VRC

D39-D43:

APPENDIX A. UPPER LED BOARD SCHEMATICS

58

Page 70: Ultrasonic sensing design and implementation for detecting

1 2 3 4

A

B

C

D

4321

D

C

B

A Title

Number RevisionSize

A4

Date: 22-Feb-2010 Sheet of File: H:\RelightRelate\hardware\sonar\design_v0.3\Sonar_V03.ddbDrawn By:

GND

+24V

TSFBURST

SONAR1SONAR2

+5V

GND

GND

R510k

GND

+5V

C2100n

GND

SONAR1SONAR2

TRESHOLD

Ultrasonic transmitter and power

V0.32 4

Martin Andersson

TSF

+24V +24V

GND

GND

+5V

-5V

GND

C3

10U

C510u

GND

GND

C42.2u

C12.2u

GND

C6100n

C9100n

C10100n

C7100n

C8100n

+5V

GND

-5V

U4

U5

U3

GND

R422k

3

2

14

7

58

6

U3

LT1711 LS1

ULTRASONIC TRANSMITTER

R2160k

R9160k

R1

0

R6

0

R7

0

R8

0

SiktmärkeFID1

SIKTMÄRKE

SiktmärkeFID2

SIKTMÄRKE

TP1TESTPUNKT

TP2TESTPUNKT

TP3TESTPUNKT

TP4

TESTPUNKT

TP5TESTPUNKT

ENVELOPE1ENVELOPE2

R3

1k

VinA1 Vout A5

SHDNC1 BIAS C3

AD

JE

1

GN

DE

5

U1LTM8020EV

VinA1 Vout A5

SHDNC1 BIAS C3

AD

JE

1

GN

DE

5

U2LTM8020EV

TP10TESTPUNKT

TP15TESTPUNKT

12345678

J1

CON8 M80-85008

12345678

J2

CON8 M80-85008

APPENDIX B. OLD SONAR BOARD SCHEMATICS

Appendix B

Old Sonar Board Schematics

59

Page 71: Ultrasonic sensing design and implementation for detecting

1 2 3 4

A

B

C

D

4321

D

C

B

A Title

Number RevisionSize

A4

Date: 22-Feb-2010 Sheet of File: H:\RelightRelate\hardware\sonar\design_v0.3\Sonar_V03.ddbDrawn By:

-5V-5V

-5V-5V

+5V+5V

+5V+5V

C1115n

C12

10n

C13

10n

C1610n

R16

10k

R18100k

R15

100k

R21

100k

R17

10k

R11

10k

D2

BAV99

D3

BAV99

D4

BAV99

GND

GNDGND

GND

R23

4k7

GND

R2510k

GND

R2447k

TRESHOLD

-5V

SONAR1

GND

GND

MK1

ULTRASONIC RECEIVER

D1

BAV99

R20270k

C14100n

GND

TSF

R14470

L1

1mH

Ultrasonic receiver circuit 1

V0.33 4

Martin Andersson

2

3

41

1

1

U4A

TS464CD

6

5

41

1

7

U4B

TS464CD

9

10

41

1

8

U4C

TS464CD

13

12

41

1

14

U4D

TS464CD

Q1

BC847C

R2643k

R13100

R10

22k

R1222k

R1922k

R440

ENVELOPE1

TP6TESTPUNKT TP7

TESTPUNKT

TP8TESTPUNKT

TP9TESTPUNKT

C15

47p

R22

1k

APPENDIX B. OLD SONAR BOARD SCHEMATICS

60

Page 72: Ultrasonic sensing design and implementation for detecting

1 2 3 4

A

B

C

D

4321

D

C

B

A Title

Number RevisionSize

A4

Date: 22-Feb-2010 Sheet of File: H:\RelightRelate\hardware\sonar\design_v0.3\Sonar_V03.ddbDrawn By:

-5V-5V

-5V-5V

+5V+5V

+5V+5V

C1715n

C18

10n

C19

10n

C2210n

R33

10k

R35100k

R32

100k

R38

100k

R34

10k

R28

10k

D6

BAV99

D7

BAV99

D8

BAV99

GND

GNDGND

GND

R40

4k7

GND

R4210k

GND

R4147k

TRESHOLD

-5V

SONAR2

GND

GND

MK2

ULTRASONIC RECEIVER

D5

BAV99

R37270k

C20100n

GND

TSF

R31470

L2

1mH

Ultrasonic receiver circuit 2

4 4Martin Andersson

2

3

41

1

1

U5A

TS464CD

6

5

41

1

7

U5B

TS464CD

9

10

41

1

8

U5C

TS464CD

13

12

41

1

14

U5D

TS464CD

Q2

BC847C

R4343k

R30100

R27

22k

R2922k

R3622k

R450

ENVELOPE2

TP11TESTPUNKT TP12

TESTPUNKT

TP13TESTPUNKT

TP14TESTPUNKT

C21

47p

R39

1k

V0.3

APPENDIX B. OLD SONAR BOARD SCHEMATICS

61

Page 73: Ultrasonic sensing design and implementation for detecting

1

1

2

2

3

3

4

4

D D

C C

B B

A A

Title

Number RevisionSize

A4

Date: 2012-05-11 Sheet ofFile: C:\Users\..\Sonar_Comm_schematic.~(21).SchDocDrawn By:

1uFC1

100nFC2

VCC5

PWR

330

R13

GND

VCC5

GND

1 23 45 6

ISCP

VCC1

PB02

PB13

PB3/RST4

PB25

PA76

PA6/MOSI7 PA5/MISO 8

PA4/USCK 9

PA3 10

PA2 11

PA1 12

PA0 13

GND 14

Attiny24

MISO/RX3

SCK/GPIO4

RST/TX1

VCC5

MOSI/GPIO3

GND

MISO/RX3MOSI/GPIO3

RST/TX1

SCK/GPIO4

Vin VoutGND

VR1

L7805

VCC24

1234

Sonar1

Header Sensor1

1234

Sonar2

Header Sensor2

1234

Sonar3

Header Sensor3

1234

Sonar4

Header Sensor4

1 23 45 67 8

P1

Header 4X2

1 23 45 67 8

P2

Header 4X2

GND

GND

GND

GND

GND

VCC5

VCC5

VCC5

VCC5

RX1TX1

RX2TX2

MISO/RX3TX3

RX4TX4

VCC24

GND GND

Sonar communication board

1Peter Faltpihl

GPIO1

GPIO2

RX2

RX1

GPIO1_DividedGPIO2_DividedGPIO3_DividedGPIO4_divided

TX4_f

RX4

TX3_f

TX2_f

To main board

Voltage regulator

ProgrammingTo sensors

VCC5

100nFC3

VCC5

GND

100nFC4

100nFC5

100nFC6

100nFC710k

R1

Res310k

R2

Res310k

R3

Res310k

R4

Res3

GND GND GND GND

TX1 TX2 TX3 TX4RST/TX1 TX2_f TX3_f TX4_f

Low pass filters for A/D signals

15k

R5

Res3

15k

R6Res3

15k

R7

Res3

15k

R8Res3

15k

R10Res315k

R9

Res3

15k

R11

Res3

15k

R12Res3

GND

GND

GND

GND

GPIO1

GPIO2

MOSI/GPIO3

SCK/GPIO4

Voltage divisionGPIO1_Divided

GPIO2_Divided

GPIO3_Divided

GPIO4_divided

ESD protection (TVS)

D1

DiodeD2

Diode

D3Diode

D4

DiodeD5

Diode

D6Diode

D7

DiodeD8

Diode

D9Diode

D10

DiodeD11

Diode

D12Diode

GND

GND

GND

GND

GND

GND

GND

GND

VCC5

GND

RX: signal to sensor to trigger readingTX: serial data from sensor

Place as close to the upper edge of PCB as possible, they are to be put very tight to the main board in order to fit.

To get a voltage <3.3V, even though most revisions of the MCU tolerate 5V

APPENDIX C. NEW SONAR BOARD SCHEMATIC

Appendix C

New Sonar Board Schematic

62

Page 74: Ultrasonic sensing design and implementation for detecting

Appendix D

Sonar sensor Tests

The following tests were performed with a mannequin dressed in a coat.

D.1 One sensor test

This test was performed at a distance of about 300cm, using a mannequindressed in a coat (�gure 6.1 on page 39). The mannequin was placed on astraight path from the active sensor. This distance was measured manuallywith not so great accuracy. This test was intended to measure stability whentargeting a human-like clothed target.

The data in table D.1 are recorded from one sensor that is running atmaximum speed (10 measurements/second).

288 287 288 287 287 288288 288 288 287 287 288288 288 287 287 287 287287 287 287 287 288 288287 287 287 287 287 287287 287 287 287 287 287287 287 287 286 287 287287 287 287 287 287 287287 287 287 287 286 287287 287 287 287 288 288287 288 287 288 287 287

Table D.1: One sensor measurements

63

Page 75: Ultrasonic sensing design and implementation for detecting

D.2. ALL SENSORS TEST APPENDIX D. SONAR SENSOR TESTS

D.2 All sensors test

The mannequin was placed on a straight path from the middle sensors (sensor2 and 3), at di�erent distances. Distance to the sensors and the time delaybetween starting the sensors was varied in the tests. These tests were per-formed in order to decide how long time to use between starting the sensors,to maximize the update-frequency of the sensors while maintaining stabilityof the data. The sensors were sequenced in the order: 3,1,4,2.

Sonar1 Sonar2 Sonar3 Sonar4255 255 255 255 202 202 202 202 205 205 204 204 255 255 255 255255 255 255 255 202 202 202 202 204 205 204 204 255 255 255 255255 255 255 255 202 202 202 202 205 204 255 205 255 255 255 255255 255 255 255 202 202 202 202 204 204 204 204 255 255 255 255255 255 255 255 202 202 202 201 204 205 204 203 255 255 255 255255 255 255 255 202 202 202 202 203 203 204 204 255 255 255 255255 255 255 255 202 202 202 202 204 204 204 205 255 255 255 255255 255 255 255 202 202 202 202 204 204 204 204 255 255 255 255255 255 255 255 202 202 202 202 204 204 204 204 255 255 255 255255 255 255 255 202 202 202 202 205 204 204 204 255 255 255 255255 255 255 255 202 202 202 202 204 204 204 204 255 255 255 255255 255 255 255 202 202 202 202 204 204 204 204 255 255 255 255

255 255 202 202 204 204 255 255

Table D.2: Distance: 2m, time delay: 50ms

64

Page 76: Ultrasonic sensing design and implementation for detecting

D.2. ALL SENSORS TEST APPENDIX D. SONAR SENSOR TESTS

Sonar1 Sonar2 Sonar3 Sonar4255 255 255 255 202 201 202 202 203 203 204 204 255 255 255 255255 255 255 255 201 201 202 201 204 204 203 203 255 255 255 255255 255 255 255 202 202 202 202 203 203 203 203 255 255 255 255255 255 255 255 202 202 202 202 204 203 203 203 255 255 255 255255 255 255 255 202 202 201 202 204 203 203 203 255 255 255 255255 255 255 255 202 202 202 202 203 203 203 203 255 255 255 255255 255 255 255 201 202 202 202 203 203 203 203 255 255 255 255255 255 255 255 202 202 201 201 203 203 204 204 255 255 255 255255 255 255 255 201 202 202 201 203 204 203 203 255 255 255 255255 255 255 255 202 202 202 202 203 204 203 203 255 255 255 255255 255 255 255 201 201 202 202 203 203 204 203 255 255 255 255

255 255 202 201 204 204 255 255

Table D.3: Distance: 2m, time delay: 40ms

Sonar1 Sonar2 Sonar3 Sonar4255 255 255 255 202 202 202 202 255 255 255 255 255 255 255 255255 255 255 255 201 202 202 202 255 255 255 255 255 255 255 255255 255 255 255 202 202 202 202 255 255 255 255 255 255 255 255255 255 255 255 202 202 202 201 255 255 255 255 255 255 255 255255 255 255 255 202 201 202 202 255 255 255 255 255 255 255 255255 255 255 255 202 202 202 201 255 255 255 255 255 255 255 255255 255 255 255 202 202 202 202 255 255 255 255 255 255 255 255255 255 255 255 201 201 201 202 255 255 255 255 255 255 255 255255 255 255 255 202 202 202 202 255 255 255 255 255 255 255 255255 255 255 255 202 202 202 201 255 255 255 255 255 255 255 255255 255 255 255 202 202 202 202 255 255 255 255 255 255 255 255255 255 255 255 202 202 201 201 255 255 255 255 255 255 255 255

255 255 201 202 255 255 255 255

Table D.4: Distance: 2m, time delay: 30ms

65

Page 77: Ultrasonic sensing design and implementation for detecting

D.2. ALL SENSORS TEST APPENDIX D. SONAR SENSOR TESTS

Sonar1 Sonar2 Sonar3 Sonar471 71 72 72 55 55 55 55 55 55 55 55 67 67 67 6671 72 72 71 55 55 55 55 55 55 55 55 67 66 67 6771 72 71 71 55 55 55 55 55 55 55 55 66 67 66 6671 72 71 72 55 55 55 55 55 55 55 55 66 66 67 6671 71 71 71 55 55 55 55 55 55 55 55 67 67 66 6772 72 71 71 55 55 55 55 55 54 55 55 67 67 67 6671 71 72 71 55 55 55 55 55 55 55 55 67 67 67 6672 71 71 71 55 55 55 55 55 55 55 55 67 66 67 6671 71 71 71 55 55 55 55 55 55 55 55 66 66 67 6771 71 72 71 55 55 55 55 55 55 55 55 67 67 67 6672 72 71 71 55 55 55 55 55 55 55 55 67 67 67 6771 71 71 71 55 55 55 55 55 55 55 55 66 67 67 66

71 71 55 55 55 55 67 67

Table D.5: Distance: 0.5m, time delay: 50ms

Sonar1 Sonar2 Sonar3 Sonar471 71 71 72 55 55 55 55 55 55 55 55 67 66 67 6771 71 71 71 54 54 55 55 55 55 55 55 67 67 67 6771 71 71 71 55 55 55 55 55 55 55 55 67 67 66 6771 71 71 71 55 55 55 55 55 55 55 55 67 67 66 6771 71 71 71 55 54 55 56 55 55 55 55 66 66 67 6771 71 71 71 55 55 55 55 55 54 55 55 66 66 67 6771 71 71 71 55 55 55 55 55 55 55 55 66 67 67 6771 71 72 71 55 55 55 55 55 55 55 55 67 67 66 6772 72 71 71 56 55 55 55 55 55 55 55 67 66 65 6771 72 72 71 55 55 55 55 55 55 55 55 67 67 67 6771 71 71 71 55 55 56 55 54 55 55 55 66 67 67 6772 71 71 71 55 55 55 55 55 55 55 55 67 67 67 67

72 71 55 55 55 55 67 66

Table D.6: Distance: 0.5m, time delay: 40ms

66

Page 78: Ultrasonic sensing design and implementation for detecting

D.2. ALL SENSORS TEST APPENDIX D. SONAR SENSOR TESTS

Sonar1 Sonar2 Sonar3 Sonar472 71 71 71 56 55 55 55 55 55 55 56 67 67 66 6771 72 71 72 55 55 55 55 55 55 55 55 67 67 66 66

255 255 71 255 57 57 55 55 55 55 55 55 67 67 67 6671 73 71 73 54 56 56 55 55 55 55 55 67 66 66 6771 72 71 71 55 55 55 54 55 55 55 55 67 67 67 6671 71 73 73 55 55 55 55 55 55 55 55 66 67 67 6673 73 72 71 55 55 56 55 55 55 55 55 67 67 67 6672 71 71 71 55 55 55 55 55 55 55 55 66 67 67 6771 71 71 71 56 55 55 54 55 54 55 55 65 67 66 6772 72 71 71 55 55 55 56 55 55 55 55 67 67 66 6771 71 71 72 55 55 55 56 55 55 55 55 67 67 66 6772 72 71 72 55 55 56 54 55 55 55 55 67 67 66 67

71 71 56 56 55 55 66 67

Table D.7: Distance: 0.5m, time delay: 30ms

67