48
A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC SYSTEM THEORY Technische Universit¨ at M¨ unchen Prof. Dr. J¨org Conradt Supervisor: Prof. Dr. J¨ org Conradt Start: 01.06.2017 Intermediate Report: 26.06.2017 Final Submission: 11.09.2017

A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

A low-power embedded DynamicVision System

BACHELOR THESIS

submitted byJulian Eder

NEUROSCIENTIFIC SYSTEM THEORYTechnische Universitat Munchen

Prof. Dr. Jorg Conradt

Supervisor: Prof. Dr. Jorg ConradtStart: 01.06.2017Intermediate Report: 26.06.2017Final Submission: 11.09.2017

Page 2: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC
Page 3: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Technische Universität MünchenNeurowissenschaftliche Systemtheorie

BACHELOR THESIS

Julian Eder: Mat. No. 3666010, Electrical Engineering

Development of low-power embedded Dynamic Vision System

Problem Description:

Dynamic Vision Sensors (DVS), or event-based cameras, have been subject ofdevelopment and research for about a decade. Various existing applicationsoutperform traditional computer vision systems in terms of energy consumptionor low-latency response, but up to today no low-power embedded hardwaredesign for long term autonomous surveillance or monitoring exists. This thesisshall investigate existing embedded DVS128 systems, characterize and reduceoverall power consumption, and design a low-power long-term autonomousoperating embedded DVS system for surveillance applications. Desired featuresinclude self-sustained power supply by solar cell panels with temporary energystorage on board (for days or month without sufficient incoming energy), deeplow-power sleep mode with wake-up event on sufficient (adjustable) activity, anda simple on-board algorithm that detects meaningful activity (in contrast tonoise). The system shall be designed and build. Detailed characterization of theobtained system and evaluation of achieved features conclude the thesis.

Tasks:

Measure and characterize existing embedded DVS128 system, minimizepower consumption.

Design and characterize external low-power electronic circuitry for wake-upon activity mechanism.

Identify components (micro controller and support electronic) for low-power design.

Design complete system (PCB, housing, system integration). Build prototype of complete system. Characterize developed system and evaluate achieved features.

Supervisor: Jörg ConradtCo-supervisors: Zied Tayeb, Emec ErcelikStart: 1.6.2017Intermediate Report: 1.8.2017Delivery: 1.10.2017

(Jörg Conradt) Professor

Page 4: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC
Page 5: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Abstract

Nowadays technology experiences a strong tendency to connect every single deviceto the global Internet. For such continuously connected devices a low usage ofenergy is absolutely essential. There are also applications where it is practicalor necessary to run them completely independent from any energy grid. Thisis particularly important for security applications, where a high reliability andcomplete independence from other systems is needed.

This work describes the development of an autonomous low-power visual sensordevice with adjustable passive motion detection and a very high dynamic range forsecurity application. An important part of this project is the deployment of a low-power module for the iniLabs Dynamic Vision Sensor and the characterization ofthis sensor in terms of power consumption in different situations. Based on such alow power module, we find an appropriate energy source for autonomous operationand evaluate runtime approximations for the final system.

3

Page 6: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Contents

Abstract 3

1 Introduction 61.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.2 Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Elaboration 92.1 Characterization of eDVS128 Module . . . . . . . . . . . . . . . . . 92.2 Processing Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2.1 Essential Features . . . . . . . . . . . . . . . . . . . . . . . . 102.2.2 Additional Features . . . . . . . . . . . . . . . . . . . . . . . 11

2.3 Energy Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3.1 Energy Storage . . . . . . . . . . . . . . . . . . . . . . . . . 112.3.2 Solar Panel Efficiency . . . . . . . . . . . . . . . . . . . . . . 132.3.3 Choosing the right Solar Panel . . . . . . . . . . . . . . . . . 142.3.4 Charging with Solar Panels . . . . . . . . . . . . . . . . . . 15

2.4 Minimizing Dynamic Vision Sensor (DVS) Power Consumption . . . 172.5 Activity Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2.5.1 Adjusting the Activity Detection . . . . . . . . . . . . . . . 202.5.2 Energy Considerations . . . . . . . . . . . . . . . . . . . . . 22

2.6 Changes in the Firmware . . . . . . . . . . . . . . . . . . . . . . . . 232.6.1 Low Power Mode . . . . . . . . . . . . . . . . . . . . . . . . 242.6.2 Digital-Analog-Converter . . . . . . . . . . . . . . . . . . . . 242.6.3 Analog-Digital-Converter . . . . . . . . . . . . . . . . . . . . 24

2.7 System Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.7.1 Version History . . . . . . . . . . . . . . . . . . . . . . . . . 252.7.2 Final Module . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3 Results 283.1 Energy Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.2 Activity Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4

Page 7: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

3.2.1 Influence of the Particular Parameters . . . . . . . . . . . . 303.2.2 Test-Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.2.3 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.2.4 Adaptable Sensitivity . . . . . . . . . . . . . . . . . . . . . . 35

3.3 Final System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.3.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.3.2 Power Consumption . . . . . . . . . . . . . . . . . . . . . . 373.3.3 Leaving the Testbed . . . . . . . . . . . . . . . . . . . . . . 383.3.4 Application Example . . . . . . . . . . . . . . . . . . . . . . 39

3.4 Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

List of Figures 41

List of Tables 42

Acronyms 43

International System of Units 44

Bibliography 45

5

Page 8: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Chapter 1

Introduction

1.1 Motivation

The iniLabs DVS is an optical sensor device which perceives visual input event-based, not frame-based like common cameras. This significantly reduces theamount of redundant data [1]. The DVS has an excellent time resolution, whichmakes it very useful in fast tracking applications. It is also independent to a greatextend from ambient light intensity. This opens great opportunities in surveillanceand security applications.

An event, in this context, is a change in light intensity. The DVS128 has aresolution of 128x128 pixels, from which every single one reacts to relative lightchanges and produces either a positive event for rising, a negative event for fallingor no event for a constant light intensity.

If we interpret those three possible pixel-values as different colors, presumegreen for positive, red for negative and black for no change, we get a visual repre-sentation of the sensor data:

6

Page 9: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Figure 1.1: Visual representation of DVS data.

The resulting picture, which basically looks like a usual frame, is an accumu-lation of all events from a DVS over a short period of time. We can observe, thatedges of objects are visible in particular and that the sensor produces some noiseevents. If we inspect the figure precisely, we can also spot some yellow pixels.Those are just overlaps from red and green events.

Furthermore the DVS sensor opens the possibility of motion detection withoutany further processing, like frame-by-frame comparison. Simply by counting thenumber of events per time unit, which correlate with the amount of movementwithin the sight of the sensor. This is not only a great advantage in terms ofenergy consumption, it is also invisible for the world around the sensor, not likeother motion detection technologies like infrared or ultrasonic sensors.

In more than ten years of existence, the Dynamic Vision Sensor (DVS) hasnever been fully investigated in terms of power consumption and optimization[2]. Former research about the sensor was widely and mainly concerned about itsremarkable time-resolution.

What we want to achieve with this work is a closed system, based on theDynamic Vision Sensor (DVS), which can act as a passive visual surveillance de-vice, while being fully independent from external energy sources and completelymaintenance-free.

ARM - +

Figure 1.2: Schematic illustration of the basic concept.

7

Page 10: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

1.2 Challenge

As a basis for this project, the first step is the characterization of the iniLabsDynamic Vision Sensor (DVS) (section 2.1). Starting with power measurementsin usual running mode, we have to change the external circuitry to find a low-power state where the sensor is operating stable and similarly with a significantlyreduced power consumption (section 2.4).

Further, the external processing unit has to be chosen very thoughtfully, to getthe optimal combination of power consumption, computational power and memorycapacity for this project (section 2.2).

We can exemplary use the existing embedded Dynamic Vision System (eDVS)128module as a reference for the combination of vision sensor and processing unit,although it is necessary to entirely rethink and rework this module, since it ac-complishes completely different requirements (section 2.7).

Even though we optimize the power consumption down to a minimum, we wantto get even further and implement a sleep mode for the whole module, in whichit stays as long as nothing relevant happens in front of the vision sensor (section2.6).

In spite of that, our system also needs an interface for communication withother devices.

And finally, it has to include a very long-lasting energy source, which ideallykeeps it running for an infinite amount of time, while being robust and resistantagainst high and low temperature influences (section 2.3).

8

Page 11: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Chapter 2

Elaboration

2.1 Characterization of eDVS128 Module

The eDVS128 module consists of two main parts: The Dynamic Vision Sensor anda high performance microcontroller. For our research, the power characterizationof the DVS is particularly important. The DVS itself can be distinguished betweenan analogue and a digital circuit, which can be measured independently. Table 2.1shows the over-all power consumption of the sensor in three different states:

state ≈ 0.3 kEPS ≈ 5 kEPS ≈ 50 kEPSpower ≈ 24 mW ≈ 60 mW ≈ 122 mW

Table 2.1: DVS power consumption.

This shows the high dependency on the number of occurring events (Eventsper second). Additional measurements show, that this high variation is mainlycaused by the digital circuit. The analogue part of the DVS, however, is nearlycompletely independent from an event occurrence, but has a higher consequenceon the over-all power consumption in the idle state (noise, ≈ 0.3 kEPS), whichis mainly important for this project. Table 2.2 shows the supply current of bothsub-circuits of the DVS in idle state:

circuit analogue digitalpower 17.52 mW 4.26 mW

Table 2.2: Analogue and digital power consumption.

The microcontroller on this module is a STM L7 series model, which is opti-mized for high performance and draws approximately 290 mW with the eDVS128firmware and no events but noise.

For the power consumption of the whole module in idle state we therefore get:

Pidle ≈ 24 mW + 290 mW = 314 mW. (2.1)

9

Page 12: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

2.2 Processing Unit

In order to get the power consumption of the final system as low as possible, wehave to use a microcontroller, which is optimized for low power consumption andstill fulfills certain requirements.

For the data transfer between DVS and microcontroller we need a 16 bit databus and a DMA peripheral. For programming the bias generator of the DVSwe need additional general purpose input/output pins. Concurrently, we wantpreferably a large SRAM with 64 kB or more of memory capacity.

The desired microcontroller also has to offer various low power states, wake-up functionality triggered by an external interrupt, timer peripherals and ideallya Digital-Analog-Converter (DAC), an Analog-Digital-Converter (ADC) and aninternal comparator.

The comparison of different microcontrollers from various manufacturers shows,that ST Microelectronics offers a series, which perfectly fits the requirements. TheSTM32L4 series offers among other features:

2.2.1 Essential Features

Low Power States It offers various low power run-, stop- and sleep-modes. Forour purpose we use the ”STOP1” mode, because it is a very good compromisebetween usable peripherals, wake-up time and power consumption [3, pp. 22–27].We also have the opportunity to reduce the clock frequency from 80 MHz to 2 MHzand switch to a Low-power Run Mode, in which it can still process events, butwith a significantly reduced power consumption [3, p. 26].

Internal Low-Power Comparator The device also embeds a low power com-parator with the possibility, to use the DAC output as a reference voltage [3,p. 41]. It furthermore has a programmable and adaptable hysteresis and a lowpower mode [3, p. 41]. The output of the comparator can trigger an interrupt towake up the microcontroller from relevant sleep states [3, p. 24]. We need this forour activity detection to be able to wake up the system.

Universal Asynchronous Receiver Transmitter The L4 series offers vari-ous Universal Asynchronous Receiver Transmitter (UART) ports [3, p. 49], whichcan be used to remote control the module and for additional peripherals like wire-less communication modules. This is necessary for changing basic settings of themodule, without changing the whole firmware and for future applications (section3.4).

10

Page 13: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

2.2.2 Additional Features

Real-Time-Clock As an additional feature we can use the internal Real-Time-Clock (RTC) of the microcontroller, which also runs in all relevant low-powermodes [3, p. 47]. This can be used by the unit to calculate, how long it has beenin sleeping or active mode. The timer peripherals cannot be used for that, becausethey are frozen in this state [3, p. 24] and would overflow after about 70 minutes1,anyway.

Voltage Monitoring Furthermore, the voltage of the connected battery canbe monitored continuously by the ADC [3, p. 39]. We can use that to imple-ment deep discharging protection, low battery warning and charging indicationand predictions.

The STM32L452(VET6) microcontroller distinguishes itself with a great perfor-mance range and a notable low power consumption. It seems to be the mostefficient choice for this project.

2.3 Energy Source

A goal for this project is continuous off-grid operation. We therefore use a combi-nation of a solar panel and an energy storage as energy source.

2.3.1 Energy Storage

For the selection of the right energy storage we start with comparing supercapaci-tors and batteries. We will then compare different technologies of the chosen typeand select one of them with regard to the collected data.

Batteries in a solar-powered system are highly strained due to multiple and veryfrequent charging cycles. They are also sensitive to deep discharging and limitedin fast charging. Therefore it might be applicable to use a so-called supercapacitorinstead of a accumulator. Supercapacitors are mostly electrolytic capacitors witha very high energy density, compared with usual ”non-super” ones. For example70 F at 2.1 V, which makes

W =1

2· 70F · (2.1 V)2 = 154.35 W s (2.2)

1Counter is unsigned 32 bit integer, overflow after 4.3 · 109 µs ≈ 70 min.

11

Page 14: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

within a volume of 12.75 cm3 [4].This energy is not usable completely. We assume a system which has to run on

3.3 V. We want to get as near as possible to this voltage while using our examplecapacitor. Thereby, the aim is not to have a notable less than our desired voltage,because reducing a given voltage is more efficient than increasing it [5].

Therefore we assume two capacitors in serial, which gives us a theoretical energyof 308.70 W s at a fully-charged voltage of 4.2 V.

With a buck-converter we could now use the energy, stored in the capacitor ifand only if the voltage between its clamps is higher than 2.7 V [6]. Furthermorethe converter’s efficiency can be considered as 90% [6]. That gives us a usableenergy of:

(W4.2 V −W2.7 V) · 0.9 =(

308.70 W s− 70 F · (2.7

2V)2)· 0.9 ≈ 163 W s, (2.3)

which makes:

163 W s · 1 h

3600 s≈ 0.0453 W h. (2.4)

If we now compare this with a battery of similar physical size, with a ratedvoltage of 4 V and a capacity of 8 A h [7], we see that the energy content of thebattery,

WBattery = 4 V · 8 A h = 32 W h, (2.5)

is significantly higher than the energy content of the supercapacitor. As theruntime and therefore the capacity of the energy storage has a very high importancefor our project, we prefer batteries rather than supercapacitors.

However, there are many different kinds of rechargeable batteries. Today themost common ones are lithium- and nickel-based types and lead-acid batteries.Both, lithium and nickel-batteries have a very limited temperature range. Foroutdoor usage in Germany, the batteries have to endure temperatures between−37.8 C and 40.3 C [8][9].

12

Page 15: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

0 °C -

20 °C -

40 °C -

60 °C -

80 °C -

-20 °C -

-40 °C -

-60 °C -

40,3 °C

-37,8 °C

Li-P

oLi-Io

Lead-a

cid

Ni-M

h / N

i-C

d

Supe

rcapaci

tor

Figure 2.1: Temperature limits for different types of energy-storages.

While the upper temperature limit is not a problem at all, lithium and nickel-batteries are very sensitive to temperatures below freezing. To be precise: Alithium-ion cell will get damaged irreversibly, if it is charged below an ambienttemperature of zero degrees Celsius [10]. Nickel-based storage batteries have thesame problem with low temperatures, furthermore they are very sensitive to over-charging and memory- or lazy-effects [11]. Moreover they have a comparative highself-discharging rate of 25% per month [11]. Nickel cadmium batteries are, besidesthat, except for a few exceptions like medical applications, forbidden in Germany[11]. The relatively long known, still important and deployed lead-acid batteriesdo have excellent temperature ratings of for example −40 C to 80 C [7]. Theyare also very tough and tolerant in terms of deep discharging and from long-timestorage, because of their low self-discharging rate [7].

For these reasons, we use a lead-acid battery for this work.

2.3.2 Solar Panel Efficiency

Even though solar panels do have a specific power rating, they will never deliverthis power continuously. In Germany they deliver an average of 1000 kW h

kWpper year

13

Page 16: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

[12, p. 47]. Which is:

1000kW h

kWp

· 1

365 · 24 h≈ 0.114

W

Wp

, (2.6)

while Wp means ”Watt Peak”, which is the unit for the power of solar panels understandardized measurement conditions [13].

A solar panel in Germany therefore delivers only about 11 % of its rated powerin an annual average.

Figure 2.2 shows the efficiency trend over a full year. The data has been takenfrom a solar array in southern Germany and represents the average values from2013 to 2015. The average of 9.42 % is slightly lower than the official [12, S.47]value of 11.42 %, but it is still similar and reasonable.

0 %

2 %

4 %

6 %

8 %

10 %

12 %

14 %

16 %

18 %

20 %

2 4 6 8 10 12

Per

centa

geofW

p

Month

Monthly averageAnnual average

Figure 2.2: Average solar panel efficiency in Germany over 3 years.

2.3.3 Choosing the right Solar Panel

We are looking for a solar panel, which can deliver enough energy in an annualaverage to keep our system running continuously. It should thereby be as compactas possible and hence have a preferably high power density.

There are different technologies for solar panels. Monocrystalline solar panelsare withal the most efficient ones with an efficiency of up to 18% [14].

With reference to 2.3.2, we can tell that the Phaesun Trak King solar panelwith 12 monocrystalline cells and a maximum power rating of 6 W [15] generatesan average power of:

14

Page 17: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

6 W · 0.0942 = 565.2 mW, (2.7)

with 0.0942 being the annual average solar panel efficiency (figure 2.2).As we expect our final system to require less than 11 mW in average, this is

sufficiently high. Future versions of our system might also be able to run with asmaller solar panel, but for this prototype we use this by all means sufficient solarpanel.

2.3.4 Charging with Solar Panels

Solar panels have a specific working point where they offer the highest product ofcurrent and voltage. This point is called the Maximum Power Point (MPP). [16]It would now seem obvious to use a Maximum Power Point Tracking (MPPT) [16]charging controller, which charges our energy storage, while continuously followingthe Maximum Power Point of our solar panel to get the highest possible efficiency.This is an absolutely reasonable approach, but in no way necessary nor comparativefor this project, as we need very little power from the solar panel and the MPPTtracking itself would also require additional energy.

We will follow a more minimalistic approach: The lead-acid battery will becharged by directly applying the output voltage of the solar panel to it. As the solarpanel is rated with 6 V [15], while the battery is rated for a maximum clamp voltageof only 4.7 V [7], we will use a sufficient strong Zener-diode as an overchargingprotection.

Usolar Battery

IchargeIoverflow

Figure 2.3: Overcharging protection.

As we can see in figure 2.3, our overcharging protection uses the property of aZener diode, to have a stable and precise backwards break-through voltage. Thisvoltage has to be equal to the maximum clamp voltage of the battery. It couldbe assumed that this approach is completely inefficient, because it just cuts ofthe voltage and though wastes a lot of energy. In fact, Kirchhoff’s law conveysthat the voltage Usolar will never be higher than the voltage of the battery itself.That means lest we will only waste energy in two cases: If the battery’s clampvoltage is higher or equal to the break-through voltage of the Zener-diode or, in thesecond case, if the battery’s clamp voltage only seems to be higher than the break-through voltage. The second case occurs if the battery is nearly full and the solar

15

Page 18: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

panel delivers an appropriate high amount of energy to reach the maximum clampvoltage of the battery. In this case the current Icharge is cut off due to the physicalrestrictions of the battery in order to prevent damaging the cells. Both cases areintentional and would also happen with a more advanced charging controller, aswe cannot decide how much energy the solar panel produces. If the battery is full,we will loose the overproduced energy in any case.

In fact, compared to an advanced charging controller, the only feature thiscircuitry does not offer is MPP-tracking.

16

Page 19: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

2.4 Minimizing DVS Power Consumption

The main power consumption of an idle DVS sensor comes from the analog part ofits circuit (table 2.2). That is because of the bias currents, which can be reducedby changing the size of the master bias resistor [17].

It can be measured that, if the master resistor is enlarged by a factor of 10, theanalog current is reduced approximately by a factor of 30. In consequence of thelarger resistor the bias values change and the sensor does not run stable anymore,which results in a high amount of event noise for very short periods of time every2-10 seconds. Figure 2.4 shows this effect and the impact on current consumptionof both, the analog and digital circuit of the sensor.

Figure 2.4: Supply currents of DVS with 100 kΩ master bias resistor.

Some parts of the sensor also seem to be completely inoperative in this condi-tion and generate no events. Additionally the bandwidth of the sensor becomesnoticeable lower, which is worth mentioning, but not important for this specificapplication.

For the sensor to run stable again, the digital bias values and therefore the biascurrents have to be adapted to the new conditions. This is possible by measuringevery bias voltage and trying to get as close as possible to the original measured

17

Page 20: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

values. As the bias voltages partly influence each other, this has to be done overcertain iterations, to get a usable set of bias values.

Figure 2.5 shows the adjustment of the default bias set to a new stable bias setfor a ten times larger master resistor. Iteration I is thereby the result of scaling allbias values with factor 30, this step is intended to compensate the larger masterbias resistor and gets the new bias currents quite close to the old ones. IterationII is the fine scaling, in this step we try to get as close as possible to the originalbias currents by measuring the respective bias voltage and adjusting the digitalvalues relating to these. The sensor runs stable with the bias set from iterationtwo, but draws nearly as much current as with the initial 10 kΩ bias resistor. Thelast step, iteration III, is the result of reducing selected bias currents in order toreduce the overall input current of the sensor.

We thereby particularly consider the values diff, diffOn and diffOff, which areresponsible for the response-threshold for on and off events [18].

1067

4

39

3624

296253

16777215

0

427594

151

16777215

5579732

12316

cas

Pr

foll

diff

diffOn

puY

refr

req

diffOff

reqPd

puX

injGnd

32010

120

1170

108720

8887590

16777215

0

12827820

4530

16777215

16777215

369480

32010

20000

1170

108720

8887590

16777215

10000

12827820

4530

16777215

16777215

12000000

32010

3000

1530

10000

300000

16777215

20000

12827820

0

16777215

16777215

12000000

Bias Default Iteration I Iteration II Iteration III

Figure 2.5: Adjustment of the digital bias values for a 100 kΩ bias resistor.

With the bias set from iteration III in figure 2.5 we could observe an overall

18

Page 21: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

current reduction of 90% for the sensor in idle state.

2.5 Activity Detection

The final system needs to have an independent mechanism to detect DVS activityand be responsive to it. This is necessary, because then the microcontroller canwake up automatically on sensor activity. This section describes the idea behindour activity detection mechanism and how it is implemented in this specific project.

The DVS has a dedicated pin pair for showing the presence of events. Fromsensor’s view the request (req) pin is an output and initially on a logical highlevel. The acknowledge (ack) pin is an input. These two pins behave accordingto the following specification:

for every event doreq.low();while ack.read() != ’low’ do

pass;endreq.high();

endAlgorithm 1: Behaviour of req/ack pin pair.

As we see, the level of req is low until the event gets acknowledged by settingthe ack pin to low externally. As we want to read events as fast as possible anddo not want the DVS to wait for the acknowledgment, the two pins ack and reqare connected together. So, for every DVS event we get a short negative spike onour req pin. Figure 2.6 exemplary illustrates this behavior.

Low

High

req

t(a) no events.

Low

High

req

t(b) events.

Figure 2.6: DVS req-pin without (a) and with (b) event occurrence.

19

Page 22: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

We can use the req/ack pin-pair to detect any motion within the sight ofthe DVS without any further processing. The circuit which we use to achievethis feature consists of a very simple integrating element (shown in 2.7) and a lowpower comparator, which is built into our microcontroller. At the input site weuse a p-channel MOSFET as an open-drain inverter.

pMOS

VDD

UREQ

Rchargeiin iout

RdischargeCint UoutUin

Figure 2.7: Activity detection circuit.

The non-inverting input of the comparator is thereby connected to the outputnet of 2.7. If the DVS now produces events like in 2.6, the capacitor Cint getsslowly charged through Rcharge with every event. Simultaneously, it is dischargedeven slower through Rdischarge, which therefore has to be significantly larger thanRcharge:

Rdischarge Rcharge. (2.8)

Thus the input voltage of the comparator (Uout in 2.7) is given by the numberof DVS events per time unit. We can adjust the sensitivity of this circuit coarselyby changing the relation between the resistor sizes and the size of the capacitor.

The output of the microcontroller’s internal comparator will then be ’low’ if theamount of incoming events per time unit is below a threshold we chose beforehand,else it will be ’high’. The output of the comparator is internally connected to aninterrupt line of the microcontroller, which can then trigger a wake-up from a lowerpower state.

2.5.1 Adjusting the Activity Detection

We refer to figure 2.7. The P-channel MOSFET transistor (pMOS) acts as anopen-drain inverter. Hence follows for the input voltage Uin:

Uin = (VDD − UREQ)− UDS. (2.9)

20

Page 23: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

The output current of our circuit is equal to the input current of the low powercomparator and therefore negligible small:

iout ≈ 0. (2.10)

We can therefore observe 2.7 as two different equivalent circuit diagrams, onefor charging (2.8(a)) and one for discharging (2.8(b)) Cint.

Rcharge

CintUcharge

icharge

Uin

(a) Uin ≥ Ucharge

idischarge

RdischargeCintUcharge

(b) Uin < Ucharge

Figure 2.8: Equivalent circuit diagrams for special cases of 2.7.

Our input voltage Uin will only have two discrete states, which map to logicalone and zero:

Uin =

VDD if new DVS-event, not acknowledged yet

0 V else.(2.11)

Circuit 2.8(a) is valid, if and only if the input voltage is greater than or equalto the voltage over the clamps of the capacitor Cint:

Uin ≥ Ucharge. (2.12)

In this case we can neglect the current through Rdischarge, because Rdischarge issignificantly larger than Rcharge:

Rdischarge Rcharge ⇒ icharge idischarge. (2.13)

The whole circuit can be considered as a simple RC-element with time-constantτ = RC. The charging time for the capacitor can therefore be approximated as5 · τ [19, p. 323]. The same applies to 2.8(b) for the discharging time.

We can now choose the parameters for Rcharge, Rdischarge and Cint. We knowthat both, Rcharge and Rdischarge have to be large. Rcharge limits the energy, whichcan flow into the capacitor. If Rcharge is though large, we will draw less power fromour voltage source and waste less energy. Further, 2.13 has to apply, which gives

21

Page 24: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

us a relation between the two resistors. This relation determines the maximumcapacitor - and respectively output - voltage Uout, max, whose behavior is given bythe voltage divider formula:

Uout, max =Uin

Rcharge +Rdischarge

·Rdischarge. (2.14)

Finally, Cint has to be large enough, to smooth the input signal sufficiently andnot too large, to not enlarge the charging and discharging time too much.

The exact parameters for Rcharge, Rdischarge and Cint have to be found by testingand evaluating the behavior of the real circuit, as we cannot simulate the outputsignal and noise of the DVS adequately to adapt such theoretical values for apractical application. Nevertheless, the parameters will be in the order of:

Rcharge ≈ 10kΩ ... 100kΩ (2.15)

Rdischarge ≈ 500kΩ ... 5MΩ (2.16)

Cint ≈ 100nF ... 10µF. (2.17)

2.5.2 Energy Considerations

The energy consumption of the activity detection circuit is determined by twofactors: The total gate charge of the pMOS and the current through Rcharge:

Wdetection = Qgate · x+

∫icharge(UREQ(t)) · Uin(UREQ(t)) dt, (2.18)

while x is the number of total DVS events.We see, that the power consumption is dependent on UREQ, which is time-

invariant. We cannot know, how many events finally occur, so we could only givea result, which is a function of the number x of events per time unit. As this mightget confusing, we will calculate the energy, consumed by one single event. Thiscan later be multiplied with the number of events and give us the actual energy.

We can easily separate formula 2.18 and start with evaluating the first part:The total gate charge of the pMOS we use is 8.0 · 10−9 C [20] and the gate voltagein conducting state has an absolute value of 2.7 V. So for the energy, consumedby the gate of the pMOS per event, holds:

Wgate = Ugate ·Qgate = 2.7 V · 8 · 10−9A s = 21.6 · 10−9J. (2.19)

The second part of the formula requires a more advanced calculation, becausethe energy is not only dependent on the event count, but also on events whichhappened in near past (within the discharging time of Rdischarge). As we only want

22

Page 25: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

to become aware of the order of magnitude of our energy consumption, we assume,that the capacitor Cint is bypassed and Rcharge has a direct connection to ground:

RchargeUin

icharge

Figure 2.9: Assumption for approximating energy consumption.

The current is now only limited by Rcharge. The maximum power, dissipatedin Rcharge is given by Ohm’s law:

PRcharge= 2.7 V · icharge =

(2.7 V)2

Rcharge

. (2.20)

If Rcharge now had a resistance of 10 kΩ, which would be the worst case consid-ering energy consumption (according to 2.15), we get a power dissipation of:

(2.7 V)2

10 · 103 Ω= 729 µW.

By multiplying this with the duration of one event spike as explained in 2.6,we get the energy per event:

729 · 10−6 W · 220 · 10−9s ≈ 1.6 · 10−10J. (2.21)

We can now do an example calculation for the energy demand of the activitydetection while in idle mode, which would be less than 1000 events per second. Inthis case the second part of the formula is negligible:

Wdet = 21.6 · 10−9J · 103 s−1 = 21.6 µW. (2.22)

For the whole detection circuit we can therefore assume an average overallpower consumption of less than 22 µW, which is negliable low, compared to otherparts of our system.

2.6 Changes in the Firmware

The existing eDVS128 module runs a firmware, which handles the basic commu-nication with the DVS and additionally supports event data output via UART.

23

Page 26: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

It is not only necessary to adapt this existing firmware for the new microcon-troller, there are also certain new requirements, which are not handled by thereference version. This section gives a short overview about the firmware changesand some hints on how those were implemented.

2.6.1 Low Power Mode

The presumable most important change for this specific project is the implemen-tation of the possibility for the processing unit to enter a low power mode andwake up from that, triggered by the activity detection. We are using an internalcomparator for comparing the voltage from our activity detection (section 2.5)with our reference voltage. When the input voltage is higher than the thresholdan interrupt is triggered on the rising edge of the comparator output and the mi-crocontroller wakes up and starts processing the event data. The comparator isenabled with a small hysteresis, to prevent generating bursts of interrupts whenpassing the threshold voltage. Once the comparator voltage is under the desiredthreshold, the microcontroller waits for an adjustable amount of time, which isintended to be in the order of a few seconds and re-enables low power mode afterthat time. Furthermore, the RTC is enabled for the low power mode, so the mi-crocontroller exactly knows, how long it had been sleeping after it woke up. Weare also using a basic event counter, which is triggered immediately after the unitwoke up and stores the average event rate over a very short time, to estimate howmany events caused the wake-up. While in low power mode, unused GPIO pinsare changed to floating state to save additional energy.

2.6.2 Digital-Analog-Converter

As a reference for the comparator and therefore as a threshold voltage for theactivity detection, we use the internal DAC of the microcontroller. The DAC hasa low-power sample and hold mode, which holds the user-defined voltage while inlow power mode. It has a resolution of 12 bit, so there are 4096 possible values forthe reference voltage.

2.6.3 Analog-Digital-Converter

Our microcontroller has a dedicated Vbat pin for connecting battery cells to it.It also offers a battery charging feature, but due to limitations in the maximumvoltage we cannot use that. However, the Vbat pin can be internally connected tothe ADC to measure the battery voltage. The modified firmware is prepared forthat feature.

24

Page 27: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

2.7 System Integration

The low power module for the DVS128 is the centerpiece of this work. In thissection we give a short view into the development process of the module, describeits features and give an overview on layout- and design-thoughts.

2.7.1 Version History

The development process of this module includes four main versions.The first version of the module was basically designed for verifying the circuit

and layout and for testing the microcontroller.From the initial version to the first revision the distance between the traces,

which connect microcontroller and DVS was enlarged. The isolation distance fromcharging circuit and battery-connections (upper left) to ground plate was alsoenlarged.

(a) Initial version (b) Revision 1

Figure 2.10: Initial layout and first revision of eDVS128LP module.

From revision 1 to 2 the three SMD diodes from the charging circuit were re-placed by five through-hole diodes with a larger backwards voltage and the circuitwas extended by a surface mount rectifier diode. The number of diodes has beenincreased to get a better heat dissipation. Apart from that, a line for battery mea-surement through the Vbat pin has been added. The Vbat pin is thereby protectedby a voltage divider. We also added a jumper in order to switch between UARTand battery supply. Additionally, the two voltage regulators have been replacedby more efficient ones with a quiescent current of only 17 µA at 100 mA [21]. Ontop of that we added a buffer capacitor for the Vrefint voltage and a bridge fromthat to VCC on the backside.

25

Page 28: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

(a) Revision 2 (b) Revision 3

Figure 2.11: Second revision and final version of eDVS128LP module.

The current version of the module was completely revised, in terms of visualdetails. Wirepads and connectors are marked with short text labels. Isolation wasoptimized, to prevent short circuits, especially in the battery net. The AGND andDGND pads were connected to the ground plate and we added a ground plateunder the Zener-diodes for additional heat dissipation. Compared to revision 2,no electrical changes were made.

2.7.2 Final Module

Altogether, the final module integrates a vision sensor, a processing unit, a batterycharger and the activity detection mechanism for the vision sensor. Besides fromthat it includes connectors for UART and Joint Test Action Group (JTAG) andtwo user-buttons for hard reset and entering flash mode of the microcontroller.

26

Page 29: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

flash mode button

reset button

DVS128

activity detection

voltage regulators

solar panel conn.

charging circuitsupply jumper

battery connectors

JTAG

UART 1

UART 3

STM32F452

Figure 2.12: Final integrated system: eDVS128LP.

The module can be supplied by up to 10 V [21], the two TPS76928 voltageregulators adjust the input voltage Vbat or - depending on how the jumper is set -Vin down to 2.8 V at a maximum current of 100 mA each. We chose those specificmodels, because of their very low quiescent current and efficient, stable operation,even when drawing very low currents [21].

The system has three ports for communication with external devices. TwoUART ports and one JTAG. It can also be supplied by those UART ports.

There is a 0 Ω resistor as a bridge between the activity detection and the restof the module, so it can be bypassed for debugging purposes. The same appliesto the Vref pin, which is connected to VDD through a bridge on the backside of themodule.

27

Page 30: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Chapter 3

Results

3.1 Energy Source

In this section we describe the evaluation of the battery charging circuit as intro-duced in section 2.3.2 on page 13.

Figure 3.1 shows the test setup for the charging circuit. This is integrated inthe final system. Nevertheless, for evaluation purposes it is more applicable to testit as a separate unit.

Solar Panel Battery4.7 V5.6 V

0.9 V

Load

Figure 3.1: Charging circuit test setup.

We had to replace the Zener-diode from 2.3 by three equal Zener-diodes, todistribute the overflow power and therefore the heat generation. It is also necessaryto have a usual rectifier diode between the solar panel and the battery. Firstly,because otherwise the solar panel would draw energy, when there is no sunlightand secondly, because then the reverse leakage current of the Zener-diode arraywould be too high and drain our battery significantly faster (about 20%). Thenew Zener diodes have a higher backwards breakthrough voltage to compensatethe voltage drop across the rectifier diode.

The following data was obtained by placing circuit 3.1 on a window, facing tothe south. The test was carried out for four days in August, two of them were

28

Page 31: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

very sunny, one was rain with no sun and one was neutral. The data shows theaverage of those days:

4.1

4.2

4.3

4.4

4.5

4.6

4.7

00 04 08 12 16 20 00 04 08

Bat

tery

Vol

tage

Time of Day

Figure 3.2: Battery clamp voltage over one day.

It should thereby be remarked, that the highly increasing voltage from 10:00 to14:00 and the decreasing voltage from 14:00 to 20:00 does not represent the actualenergy content of the battery. This is the clamp voltage, which is higher than theactual battery voltage during the charging process.

Nevertheless, the battery voltage increased by ≈ 0.12 V during that day. If werefer to the datasheet of our battery [7] we can observe, that the battery has beencharged by about 27 %, from 73% to 100% in one day. The graph also shows us,that the battery has been charged 11 hours between 10:00 and 21:00, so we canassume an average charging current of roughly:

8 A h · 27%

11 h≈ 196.36 mA. (3.1)

So the battery was charged significantly. This result shows, that our chargingcircuit works like intended.

3.2 Activity Detection

The sensitivity and efficiency of the activity detection, described in 2.5, highlydepends on the choice of the main components Rcharge, Rdischarge and Cint. For

29

Page 32: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

the selection of these components we do a series of different tests under certainconditions.

Each test-series consists of different activity situations for the DVS.

3.2.1 Influence of the Particular Parameters

A rising Cint smooths the voltage-curve. We want this to a certain extent, as wedo not want our circuit to react to fast, short changes like a light that is beingswitched on or off. We still cannot make the capacitor large, because this wouldenlarge the charging and discharging time of the circuit and make it too sluggish.

Lowering Rcharge also has a useful effect on our circuit: The maximum outputvoltage and therefore the dynamic range gets higher, which makes our circuit moreadaptable to different situations. On the other hand, if Rcharge gets smaller, wedraw more current and need more energy for the activity detection. A very smallRcharge would also make the circuit too sensitive to events and trigger too fast.

The third parameter, Rdischarge, determines the discharging time of the capaci-tor. This should not be too short (more than 1 second).

Figures 3.3, 3.4 and 3.5 show us, how adjusting the parameters influences theactivity detection in practical application.

3.2.2 Test-Cases

Every test has been carried out with a different set of parameters:

Test Rcharge Rdischarge Cint

1 100 kΩ 1 MΩ 100 nF2 100 kΩ 1 MΩ 1 µF3 100 kΩ 1 MΩ 4.7 µF4 47 kΩ 1 MΩ 22 µF

Table 3.1: Parameter-sets for different tests.

30

Page 33: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Event Spikes The following figures show the comparator voltage over time whenswitching the only light source in the reference room on and off again. Thisgenerates a high number of events over a short time. We call this ”Event spikes”.Ideally, this should not trigger the activity detection.

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(a) Event spikes, parameter-set 1

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(b) Event spikes, parameter-set 2

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(c) Event spikes, parameter-set 3

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(d) Event spikes, parameter-set 4

Figure 3.3: Event spike tests for parameter-sets 1-4.

We can observe, that parameter-set 1 is very sensitive to every single DVSevent. We can even see a double-spike at second 3, when the second neon light inthe room illuminated shortly after the first one. We can also clearly see, that thenoise events of the DVS influence our detector-voltage. Using parameter-set 2, wecan see a noticeable lower noise-influence, but still a very sensitive reaction to theswitching light. In set 3 and 4 we can see, how the spikes are getting smoothedout, by an increasing capacitor.

31

Page 34: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Continuous Motion The following test-case shows the reaction of the circuiton a continuous amount of events, generated by a fan with colored blades in sightof the DVS. At the beginning of the measurement, the fan is turned off. It isturned on after about 1 second and off again after about 5 seconds. The light inthe reference room is switched on continuously. This should trigger our activitydetection.

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(a) Continuous motion, parameter-set 1

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 sC

ompar

ator

Input

Vol

tage

Time

(b) Continuous motion, parameter-set 2

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(c) Continuous motion, parameter-set 3

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(d) Continuous motion, parameter-set 4

Figure 3.4: Continuous motion tests for parameter-sets 1-4.

Again, this test shows us, that set 1 is very sensitive. We could even measurethe decreasing speed of the fan’s blade from second 4 to 6 just by this plot. We canagain observe, how increasing capacitance enlarges the charging and particularlythe discharging time. Even the smaller input resistor in set 4 does not shorten thecharging time notable.

32

Page 35: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Moving Person This final test-case should simulate a real application as goodas possible and therefore evaluate the basic ability of the activity detection totrigger on moving objects in sight of the DVS. For this test a person was slowlywalking away from the DVS. This test should also trigger our activity detection.

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(a) Moving person, parameter-set 1

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(b) Moving person, parameter-set 2

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(c) Moving person, parameter-set 3

0.0 V

0.5 V

1.0 V

1.5 V

2.0 V

2.5 V

0 s 2 s 4 s 6 s 8 s 10 s

Com

par

ator

Input

Vol

tage

Time

(d) Moving person, parameter-set 4

Figure 3.5: Moving person tests for parameter-sets 1-4.

This test confirms our former pattern. Again, while set 1 is completely noisy,we cannot see a significant voltage change in set 4. Set 3 results in very clearedges, still we can notice, how varying movement is visible, by the voltage drop atabout second 3. We can also observe the conspicuously long discharging time inset 4.

3.2.3 Evaluation

Referring to the figures in 3.2.2, we can now choose a set of parameters, which fitsour requirements. As the area where the tests were executed did not change overtime, we can assume the threshold voltage as constant, such as 2 V.

We can now observe, that the threshold voltage is reached in case 3.3(a) and3.3(b) of the Event spike test. Since we do not want our circuit to trigger because

33

Page 36: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

of short spikes, we can exclude those two parameter-sets from our selection. TheContinuous motion test is not very expressive in terms of the threshold voltage,because every test reaches 2 V. However, this test gives us some interesting hintsabout the charging and discharging time of Cint, which both seem to be a bit longin test 3.4(d).

The Moving person tests confirm our assumption from the previous test-case.Parameter set 4 is not applicable for our usage, due to the fact that the movingperson hardly influences the output voltage in test 3.5(d) and lets the circuit noteven reach the threshold voltage.

We will therefore use parameter-set 3 as a basic reference component set forthe activity detection.

34

Page 37: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

3.2.4 Adaptable Sensitivity

Our final system will not only have to work under laboratory conditions but also inthe real world, where we have certain external influences like constant motions inthe sight of the sensor or high noise due to very bright or very low light conditions.For such cases we want an adaptable sensitivity for the activity detection, which isrealized by using the Digital-Analog-Converter of the microcontroller to generate areference voltage for its internal comparator. Therefore we can adapt the thresholdvoltage on software level. Figure 3.6 shows the measured correlation betweenactual accruing Events per second (EPS) and the according digital value of thecomparator, at which the activity detection is only just triggered.

0

500

1000

1500

2000

2500

3000

3500

4000

100 Hz 1000 Hz 10000 Hz 100000 Hz

Thre

shol

d

Event rate

Figure 3.6: EPS vs. digital value of the DAC.

Figure 3.6 can be used to pre-adjust the system for the usage in areas with acertain expected event occurrence or for on-site calibration.

Noise thereby generates up to 1 kEPS, depending on the illumination situation.Small or slow movements lead to up to 6 kEPS. Withal, 90 kEPS is the maximum,we were able to measure.

35

Page 38: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

3.3 Final System

In this section we give a short summary of all achieved features of our final sys-tem. We continue with an evaluation of our system and conclude with an simpleapplication example.

3.3.1 Description

ARM - +

STM32L452

- +

SolarLead-acidUART

DVS128

Figure 3.7: Abstract - Concept to final system.

The microcontroller reads events from the DVS and provides them via UARTfor further usage. We can define a certain event threshold in the firmware. Ifthe event-rate of the DVS is under this threshold for a specific amount of time,the microcontroller changes to STOP1 mode, which stops the CPU and mostperipherals and so significantly reduces its power consumption. If the event-rategets higher than the threshold, the microcontroller wakes up immediately andcontinues sending the events out to the UART port without further instructions.

Moreover, it saves the approximate number of events which triggered the wake-up, by counting the event-rate immediately after the wake-up.

Starting with the power-up of the system, a Real-Time-Clock is running, evenin STOP1 mode, so the microcontroller can always be aware of its cumulative run-and sleep-time.

It is also possible to disable and re-enable the sleep mode or to change thewaiting time before the sleep mode is entered via the UART interface.

36

Page 39: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

!PY - enable sleep mode

!PN - disable sleep mode

!PD=t - set wait time before sleep mode to t

?PD - get wait time before sleep mode

?P - get sleep mode state (P[Y/N])

!R - request event rate measurement

?R - show last measured event rate in Hz

?T - get current time (relative to power on)

?C - get current date (relative to power on, from 25.09.2017)

Figure 3.8: Snippet of the UART interface help dialog.

3.3.2 Power Consumption

Idle For the average overall power consumption in idle state, which means thatwe only have noise events from the sensor, we could obtain the following data:

eDVS128 eDVS128LP ImprovementDVS 24 mW 2.40 mW 90.00 %

microcontroller 290 mW 2.04 mW 99.30 %sum 314 mW 4.44 mW 98.59 %

Table 3.2: Comparision of idle power comsumption.

Several Events The following table shows the power consumption of the differ-ent modules in active state, while several events (3000-6000 EPS) occur.

eDVS128 eDVS128LP Improvementpower 350 mW 75 mW 78.57 %

Table 3.3: Comparision of active power comsumption.

Many Events This final table exhibits the respective power consumption in thecase of a maximum number of occurring events.

eDVS128 eDVS128LP Improvementpower 696.22 mW 191.22 mW 72.53 %

Table 3.4: Comparision of maximum power comsumption.

37

Page 40: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

3.3.3 Leaving the Testbed

Outdoor Surveillance For the evaluation of motion detection and power con-sumption in real circumstances we test the module as a an outdoor surveillancedevice, directing to a slow street with traffic peaks. We choose a digital thresholdvalue of 2300, which correlates to about 4000 EPS. This means our module willnot wake up due to single cars, but due to traffic peaks and very fast cars.

0 mW

10 mW

20 mW

30 mW

40 mW

50 mW

60 mW

70 mW

0 20 40 60 80 100

Pow

erco

nsu

mpti

on

Time in minutes

Figure 3.9: Outdoor surveillance test.

In the graph we can see distinct spikes, those are traffic peaks, where ourmodule woke up. We can also detect some lower spikes, those are the result ofsingle cars, which did not trigger the wake-up, but still generate activity andtherefore power consumption on the DVS. The average power consumption in thissituation is 10.72 mW. This is quite low, considering how many cars and peoplemove on this specific street. We also expect a higher idle power consumption thanin our lab tests, because bright sunlight generates more noise events.

Indoor Surveillance In contrast to that, we now have an indoor test situation.The module is placed in a corridor at the chair, where either nothing moves orsingle people pass. We therefore expect less noise and very clear spikes. Thethreshold is 1800 EPS.

38

Page 41: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

0 mW

20 mW

40 mW

60 mW

80 mW

100 mW

120 mW

0 20 40 60 80 100

Pow

erco

nsu

mpti

on

Time in minutes

Figure 3.10: Indoor surveillance test.

As expected, we can distinctly indicate, when people pass and when not. Thenoise is also very low. We can also observe, that the maximum values are higher,than in the previous test. The reason for this is, that people moving directly infront of the sensor generate more events than cars from a distance. The averagepower consumption of the module in this test was 5.73 mW.

3.3.4 Application Example

We can now take the data from the previous indoor surveillance test and use it as aperson-counter. As we can see in 3.10, we can clearly distinct between person andno person. We assume, that one spike corresponds to one person. Now, to achievethat we discretize our data, using the following quantization function Q(x):

Q(x) =

1 if x > 40

0 else.(3.2)

This results to the following graph:

39

Page 42: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

0

0.2

0.4

0.6

0.8

1

1.2

0 20 40 60 80 100

Q(x

)

Time in minutes

Figure 3.11: Quantized data.

We can now see those spikes as Dirac-impulses and integrate over them to findout, that 28 people passed the sensor in those 100 minutes.

3.4 Outlook

Based on the developed system, it is possible to implement additional features.A first step would be a wireless communication module for the UART port.

This opens the possibility to completely control the system from a distance. Ap-plicable protocols for that purpose might be the Global System for Mobile Com-munications (GSM) or Wireless LAN (IEEE 802.11).

Besides from that, after a long-term evaluation it can be decided, if the energystorage and the solar panel can be sized down.

Apart from that, the microcontroller supports a Low-power (LP) Run Mode,which can be entered directly from the sleep mode. This can be used as inter-mediate step between the sleep mode and the usual run mode, to save additionalenergy. The LP Run Mode could thereby be used, to decide on a higher level thanthe activity detection (section 2.5) if further processing of the incoming events isnecessary or if the sleep mode can be re-entered.

Moreover, the firmware can be complemented to use the ADC for measuring thebattery charge and calculate a runtime estimation, based on that. The appropriatecircuit for this is already provided on the module.

40

Page 43: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

List of Figures

1.1 Visual representation of DVS data. . . . . . . . . . . . . . . . . . . 71.2 Schematic illustration of the basic concept. . . . . . . . . . . . . . . 7

2.1 Temperature limits for different types of energy-storages. . . . . . . 132.2 Average solar panel efficiency in Germany over 3 years. . . . . . . . 142.3 Overcharging protection. . . . . . . . . . . . . . . . . . . . . . . . . 152.4 Supply currents of DVS with 100 kΩ master bias resistor. . . . . . . 172.5 Adjustment of the digital bias values for a 100 kΩ bias resistor. . . . 182.6 DVS req-pin without (a) and with (b) event occurrence. . . . . . . 192.7 Activity detection circuit. . . . . . . . . . . . . . . . . . . . . . . . 202.8 Equivalent circuit diagrams for special cases of 2.7. . . . . . . . . . 212.9 Assumption for approximating energy consumption. . . . . . . . . . 232.10 Initial layout and first revision of eDVS128LP module. . . . . . . . 252.11 Second revision and final version of eDVS128LP module. . . . . . . 262.12 Final integrated system: eDVS128LP. . . . . . . . . . . . . . . . . . 27

3.1 Charging circuit test setup. . . . . . . . . . . . . . . . . . . . . . . 283.2 Battery clamp voltage over one day. . . . . . . . . . . . . . . . . . . 293.3 Event spike tests for parameter-sets 1-4. . . . . . . . . . . . . . . . 313.4 Continuous motion tests for parameter-sets 1-4. . . . . . . . . . . . 323.5 Moving person tests for parameter-sets 1-4. . . . . . . . . . . . . . . 333.6 EPS vs. digital value of the DAC. . . . . . . . . . . . . . . . . . . . 353.7 Abstract - Concept to final system. . . . . . . . . . . . . . . . . . . 363.8 Snippet of the UART interface help dialog. . . . . . . . . . . . . . . 373.9 Outdoor surveillance test. . . . . . . . . . . . . . . . . . . . . . . . 383.10 Indoor surveillance test. . . . . . . . . . . . . . . . . . . . . . . . . 393.11 Quantized data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

41

Page 44: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

List of Tables

2.1 DVS power consumption. . . . . . . . . . . . . . . . . . . . . . . . . 92.2 Analogue and digital power consumption. . . . . . . . . . . . . . . . 9

3.1 Parameter-sets for different tests. . . . . . . . . . . . . . . . . . . . 303.2 Comparision of idle power comsumption. . . . . . . . . . . . . . . . 373.3 Comparision of active power comsumption. . . . . . . . . . . . . . . 373.4 Comparision of maximum power comsumption. . . . . . . . . . . . 37

42

Page 45: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Acronyms

ack acknowledge. 19

req request. 19, 41

ADC Analog-Digital-Converter. 4, 10, 11, 24, 40

DAC Digital-Analog-Converter. 4, 10, 24, 35, 41

DVS Dynamic Vision Sensor. 3, 4, 6–10, 17, 19, 20, 22, 23, 25, 31, 36–38, 41, 42

eDVS embedded Dynamic Vision System. 4, 8, 9, 23, 25–27, 37, 41

EPS Events per second. 9, 35, 37, 38, 41

GSM Global System for Mobile Communications. 40

IEEE 802.11 Wireless LAN. 40

JTAG Joint Test Action Group. 26, 27

LP Low-power. 10, 25–27, 37, 40, 41

MPP Maximum Power Point. 15, 16

MPPT Maximum Power Point Tracking. 15

pMOS P-channel MOSFET transistor. 20, 22

RTC Real-Time-Clock. 11, 24, 36

UART Universal Asynchronous Receiver Transmitter. 10, 23, 25–27, 36, 37, 40,41

43

Page 46: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

International System of Units

Prefixes

Mega M 106

Kilo k 103

centi c 10−2

milli m 10−3

micro µ 10−6

nano n 10−9

Units

Ampere A Electric current.Volt V Electric potential.Ohm Ω Electric resistanceFarad F Electric capacity.Watt W Power.Joule J Joule.Coulomb C Electric charge.Second s Time.Bit b Information.Byte B 1 Byte = 8 Bit.

Symbols

I/i Electric current.V/v/U/u Electric potential.E Electric resistance.C Electric capacity.W Work.Q Electric charge.P Power.t Time.

44

Page 47: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

Bibliography

[1] P. L. T. Delbruck and C. Posch, “A 128x128 120dB 30mW AsynchronousVision Sensor that Responds to Relative Intensity Change”, presented at theISSCC, 2006.

[2] iniLabs. (n.d.). User Guide: Biasing Dynamic Sensors, Implications for PowerConsumption, [Online]. Available: https://inilabs.com/support/hardware/biasing/#h.wfl67ja8lxwt.

[3] STM32L452xx, ST Microelectronics, 2017.

[4] Panasonic EEC-HW0D706, Panasonic, Nov. 2012.

[5] N. K. Gabriel A. Rincon-Mora, “Unscrambling the Power Losses in SwitchingBoost Converters”, EETimes, Aug. 2006. [Online]. Available: http://www.eetimes.com/document.asp?doc_id=1273121.

[6] MICROCHIP MCP1603/B/L 2.0 MHz, 500 mA Buck Regulator, MicrochipTechnology Inc., 2007.

[7] Cyclon Selection Guide, Enersys, Jun. 2008.

[8] Statista GmbH. (Aug. 2015). Hochste je gemessene Temperaturen in aus-gewahlten Orten in Deutschland, [Online]. Available: https://de.statista.com/statistik/daten/studie/13066/umfrage/hoechsttemperaturen-

in-ausgewaehlten-orten-deutschlands.

[9] ——, (Dec. 2012). Tiefste je gemessene Temperaturen in ausgewahlten Or-ten in Deutschland, [Online]. Available: https : / / de . statista . com /

statistik/daten/studie/13069/umfrage/tiefsttemperaturen- in-

ausgewaehlten-orten-deutschlands.

[10] M. Conner. (Jan. 2007). Freezing Temps affect Lithium Ion Battery Charg-ing.

[11] Umweltbundesamt. (Dec. 2015). Batterien und Akkus, [Online]. Available:http://www.umweltbundesamt.de/umwelttipps- fuer- den- alltag/

elektrogeraete/batterien-akkus.

45

Page 48: A low-power embedded Dynamic Vision Systemmediatum.ub.tum.de/doc/1422445/553674258596.pdf · A low-power embedded Dynamic Vision System BACHELOR THESIS submitted by Julian Eder NEUROSCIENTIFIC

[12] K. Mertens, Photovoltaik. Lehrbuch zu Grundlagen, Technologie und Praxis.Munchen, 2015.

[13] M. Diehl, “Die Verwirrung um das Watt-Peak”, pvKnowHowBlog, Aug. 2009.[Online]. Available: https://www.photovoltaikbuero.de/pv-know-how-blog/die-verwirrung-um-das-watt-peak/.

[14] Renewable Energy Concepts. (Sep. 2017). Solarzellentypen - WirkungsgradSolarzellen, [Online]. Available: http://www.renewable-energy-concepts.com/german/sonnenenergie/solaranlage-solartechnik/arten-solarzellen.

html.

[15] Trek King Module Kit, Phaesun GmbH, Jul. 2015.

[16] S. Davis. (Dec. 2015). Solar System Efficency: Maximum Power Point Track-ing is Key, [Online]. Available: http : / / www . powerelectronics . com /

solar/solar- system- efficiency- maximum- power- point- tracking-

key.

[17] P. L. Tobi Delbruck, “Fully programmable bias current generator with 24 bitresolution per bias”, Inst. of Neuroinformatics, UNI-ETH Zurich, Switzer-land, 2006.

[18] iniLabs. (n.d.). User Guide: Biasing Dynamic Sensors, [Online]. Available:https://inilabs.com/support/hardware/biasing.

[19] L. O. Chua, Linear and Nonlinear Circuits. 1987.

[20] IRLML6402PbF Datasheet, International Rectifier, 2014.

[21] Ultralow-Power 100-mA Low-Dropout Linear Regulators, Texas Instruments,1999.

46