際際滷

際際滷Share a Scribd company logo
Introduction to Sensors
JADS Course: Data-Driven Food Value Chain
Lecture 3  Robin van Emden, JADS | robin@pwy.nl
22
https://github.com/robinvanemden/sensors
Introduction to Sensors: Data and code repository
About Me
Robin van Emden
Research at JADS
Academic background
- Cognitive neuroscience
- Computer science
Research at JADS at prof M. Kapteins
Computational Personalization Lab
3
About Me
Robin van Emden
30+ years R&D
For example
Tear Detection
With: Tilburg and Rijeka Uni
Problem: Tears nearly invisible
Sensor: Thermal sensor array
4
About Me
Robin van Emden
30+ years R&D
For example
Tear Detection
With: Tilburg and Rijeka Uni
Problem: Tears nearly invisible
Sensor: Thermal sensor array
5
6
Usual data science 沿艶姻壊沿艶界岳庄厩艶
As a neuroscientist: were not a brain in a vat
7
Brain in a vat Nervous system
Shapiro, L. (2019). Embodied cognition. Routledge.
Embodied cognition as inspiration for new generation robots
8
Pfeifer, R., Lungarella, M., & Iida, F. (2007). Self-organization,
embodiment, and biologically inspired robotics. science,
318(5853), 1088-1093.
Pfeifer, R., Lungarella, M., & Iida, F. (2007).
Self-organization, embodiment, and biologically inspired robotics. science, 318(5853), 1088-1093.
Ever since robots took a more embodied approach
9
Honda Asimo Boston Dynamics
10
So.. lets invert the perspective for today!
10
Sensor related projects involve the following areas:
Sensors
Generally, the most
electronics focused part.
A lot of uncharted areas
here!
Microprocessors
The signal from the
sensor needs to be
converted into digital,
most often by an MCU.
Communication
protocols
The data needs to be
transported from the
MCU(s) to a data store.
Data storage
The data needs to be
aggregated or stored.
Data analysis,
Data visualization
The data has to be shown
to others.
11
From sensor to data Sensor data analysis
 We will be doing data analysis on live data
from a greenhouse at 30Mhz, a Dutch
company that builds a data platform for
horticulture.
12
 We will be using a simple plant measurement
device to go over some basic sensor principles
and to show how to get your data from an
electronic sensor on an MCU to a database.
From sensor to data: What is a sensor?
13
 American National Standards Institute (ANSI) Definition:
A device which provides a usable output in response to a specified measurand
 General definition:
A sensor acquires a physical parameter and converts it into a signal suitable
for processing (e.g. optical, electrical, mechanical)
Sensor
Input Signal Output Signal
From sensor to data: Measurement systems
A sensor is generally part of a measurement system.
14
1515
From sensor to data: Careful! Premature filtering
1616
From sensor to data: can be a bad thing.
What they got: Average Beats Per Minute
What they where looking for: raw data
From sensor to data: Measurement systems
A sensor is generally part of a measurement system.
17
From sensor to data: DSP1 - Analog to Digital Converter
From sensor to data: DSP2 - Signal filtering
20
From sensor to data: DSP3 - sensor fusion (Kalman Filter)
https://junshengfu.github.io/tracking-with-Extended-Kalman-Filter/
From sensor to data: Digital Signal Processing (DSP)
From sensor to data: Digital Signal Processing (DSP)
https://www.amazon.
com/Scientist-
Engineers-Digital-
Signal-
Processing/dp/09660
17633/ref=sr_1_2?dc
hild=1&keywords=dig
ital+signal+processing
+book&qid=1600529
672&sr=8-2
https://scipy-
cookbook.readthedocs.i
o/items/idx_signal_proc
essing.html
From sensor to data: Measurement systems
A sensor is generally part of a measurement system.
23
From sensor to data: Measurement systems
From hardwired to microprocessor-based measurement systems
24
25
From sensor to data: What is a microcontroller
From sensor to data: Microcontroller vs Microprocessor
 CPU, RAM, ROM, I/O and Timer all
on a single chip
 Fixed amount of on-chip RAM,
ROM, IO ports
 For applications in which cost,
power, and space are critical
 Single purpose
 Relatively slow, fewer resources
26
MCU MPU
 CPU is standalone - RAM, ROM, I/O
and timer are separate
 Designer can decide on amount of
RAM, ROM, IO ports
 Versatile
 General purpose
 More expensive
 Faster, more resources
27
Choice
is yours:
Arduino or RTOS,
ESP32 or STM32
28
From sensor to data: MicroPython
29
https://micropython.org/unicorn/
From Sensor to data Sensor data analysis
 We will be doing data analysis on live data
from a greenhouse at 30Mhz, a Dutch
company that builds a data platform for
horticulture.
30
 We will be using a simple plant measurement
device to go over some basic sensor principles
and to show how to get your data from an
electronic sensor on an MCU to a database.
From data to analysis: From measurement system to analysis
31
Data analysis Data storage
(database,
temporary local data, etc)
From sensor to data:Wireless protocols
From data to analysis: Network protocol
33
Data analysis Data storage
(database,
temporary local data, etc)
https://mqtt.org/
From data to analysis: MQTT Publish/Subscribe
34https://www.ev3dev.org/docs/tutorials/sending-and-receiving-messages-with-mqtt/
https://pypi.org/project/paho-mqtt/
From data to analysis: Network protocol
35
Data analysis Data storage
(database,
temporary local data, etc)
36
From data to analysis: Timeseries databases
https://www.timescale.com/ https://www.influxdata.com/
37
From data to analysis: Timeseries analysis
38
From sensor to data TTGO HiGrow
https://docs.google.com/forms/d/e/1FAIpQLSfceR17DqjP0DpjnG46QbSU0IGBpZmOJrJCPBP1OFRGTNkaTg/viewform
From Sensor to data
Instant Communication
Lorem ipsum dolor sit
amet, consectetuer
adipiscing elit
Networked API
Lorem ipsum dolor sit
amet, consectetuer
adipiscing elit
39
LilyGo TTGO T-Higrow
TinyTronics.nl
Sensors:
 Photometric
 Temperature
 Air humidity
 Soil humidity
 Electrolyte sensor
Microprocessor:
 ESP32
40
From data to analysis: Cayenne Dashboard
https://cayenne.mydevices.com/shared/5f5d15c82130755bb2a55562/project/
e9af04f1-b554-4317-b4fb-5e5d4d831b7d
Or build your own
Instant Communication
Lorem ipsum dolor sit
amet, consectetuer
adipiscing elit
Networked API
Lorem ipsum dolor sit
amet, consectetuer
adipiscing elit
41
Start with:
Make: Sensors: A Hands-On Primer
for Monitoring the Real World with
Arduino and Raspberry Pi
by Karvinen & Valtokari
dont optimize early (left Bob Pease famous LM131 design)
42
43
From data to analysis: Edge Computing
44
From data to analysis: Edge Computing with Scailable
ThankYou
Robin van Emden
R.A.vanEmden@tilburguniversity.edu
www.jads.nl

More Related Content

From Sensors to Servers

  • 1. Introduction to Sensors JADS Course: Data-Driven Food Value Chain Lecture 3 Robin van Emden, JADS | robin@pwy.nl
  • 3. About Me Robin van Emden Research at JADS Academic background - Cognitive neuroscience - Computer science Research at JADS at prof M. Kapteins Computational Personalization Lab 3
  • 4. About Me Robin van Emden 30+ years R&D For example Tear Detection With: Tilburg and Rijeka Uni Problem: Tears nearly invisible Sensor: Thermal sensor array 4
  • 5. About Me Robin van Emden 30+ years R&D For example Tear Detection With: Tilburg and Rijeka Uni Problem: Tears nearly invisible Sensor: Thermal sensor array 5
  • 6. 6 Usual data science 沿艶姻壊沿艶界岳庄厩艶
  • 7. As a neuroscientist: were not a brain in a vat 7 Brain in a vat Nervous system Shapiro, L. (2019). Embodied cognition. Routledge.
  • 8. Embodied cognition as inspiration for new generation robots 8 Pfeifer, R., Lungarella, M., & Iida, F. (2007). Self-organization, embodiment, and biologically inspired robotics. science, 318(5853), 1088-1093. Pfeifer, R., Lungarella, M., & Iida, F. (2007). Self-organization, embodiment, and biologically inspired robotics. science, 318(5853), 1088-1093.
  • 9. Ever since robots took a more embodied approach 9 Honda Asimo Boston Dynamics
  • 10. 10 So.. lets invert the perspective for today! 10
  • 11. Sensor related projects involve the following areas: Sensors Generally, the most electronics focused part. A lot of uncharted areas here! Microprocessors The signal from the sensor needs to be converted into digital, most often by an MCU. Communication protocols The data needs to be transported from the MCU(s) to a data store. Data storage The data needs to be aggregated or stored. Data analysis, Data visualization The data has to be shown to others. 11
  • 12. From sensor to data Sensor data analysis We will be doing data analysis on live data from a greenhouse at 30Mhz, a Dutch company that builds a data platform for horticulture. 12 We will be using a simple plant measurement device to go over some basic sensor principles and to show how to get your data from an electronic sensor on an MCU to a database.
  • 13. From sensor to data: What is a sensor? 13 American National Standards Institute (ANSI) Definition: A device which provides a usable output in response to a specified measurand General definition: A sensor acquires a physical parameter and converts it into a signal suitable for processing (e.g. optical, electrical, mechanical) Sensor Input Signal Output Signal
  • 14. From sensor to data: Measurement systems A sensor is generally part of a measurement system. 14
  • 15. 1515 From sensor to data: Careful! Premature filtering
  • 16. 1616 From sensor to data: can be a bad thing. What they got: Average Beats Per Minute What they where looking for: raw data
  • 17. From sensor to data: Measurement systems A sensor is generally part of a measurement system. 17
  • 18. From sensor to data: DSP1 - Analog to Digital Converter
  • 19. From sensor to data: DSP2 - Signal filtering
  • 20. 20 From sensor to data: DSP3 - sensor fusion (Kalman Filter) https://junshengfu.github.io/tracking-with-Extended-Kalman-Filter/
  • 21. From sensor to data: Digital Signal Processing (DSP)
  • 22. From sensor to data: Digital Signal Processing (DSP) https://www.amazon. com/Scientist- Engineers-Digital- Signal- Processing/dp/09660 17633/ref=sr_1_2?dc hild=1&keywords=dig ital+signal+processing +book&qid=1600529 672&sr=8-2 https://scipy- cookbook.readthedocs.i o/items/idx_signal_proc essing.html
  • 23. From sensor to data: Measurement systems A sensor is generally part of a measurement system. 23
  • 24. From sensor to data: Measurement systems From hardwired to microprocessor-based measurement systems 24
  • 25. 25 From sensor to data: What is a microcontroller
  • 26. From sensor to data: Microcontroller vs Microprocessor CPU, RAM, ROM, I/O and Timer all on a single chip Fixed amount of on-chip RAM, ROM, IO ports For applications in which cost, power, and space are critical Single purpose Relatively slow, fewer resources 26 MCU MPU CPU is standalone - RAM, ROM, I/O and timer are separate Designer can decide on amount of RAM, ROM, IO ports Versatile General purpose More expensive Faster, more resources
  • 27. 27 Choice is yours: Arduino or RTOS, ESP32 or STM32
  • 28. 28 From sensor to data: MicroPython
  • 30. From Sensor to data Sensor data analysis We will be doing data analysis on live data from a greenhouse at 30Mhz, a Dutch company that builds a data platform for horticulture. 30 We will be using a simple plant measurement device to go over some basic sensor principles and to show how to get your data from an electronic sensor on an MCU to a database.
  • 31. From data to analysis: From measurement system to analysis 31 Data analysis Data storage (database, temporary local data, etc)
  • 32. From sensor to data:Wireless protocols
  • 33. From data to analysis: Network protocol 33 Data analysis Data storage (database, temporary local data, etc) https://mqtt.org/
  • 34. From data to analysis: MQTT Publish/Subscribe 34https://www.ev3dev.org/docs/tutorials/sending-and-receiving-messages-with-mqtt/ https://pypi.org/project/paho-mqtt/
  • 35. From data to analysis: Network protocol 35 Data analysis Data storage (database, temporary local data, etc)
  • 36. 36 From data to analysis: Timeseries databases https://www.timescale.com/ https://www.influxdata.com/
  • 37. 37 From data to analysis: Timeseries analysis
  • 38. 38 From sensor to data TTGO HiGrow https://docs.google.com/forms/d/e/1FAIpQLSfceR17DqjP0DpjnG46QbSU0IGBpZmOJrJCPBP1OFRGTNkaTg/viewform
  • 39. From Sensor to data Instant Communication Lorem ipsum dolor sit amet, consectetuer adipiscing elit Networked API Lorem ipsum dolor sit amet, consectetuer adipiscing elit 39 LilyGo TTGO T-Higrow TinyTronics.nl Sensors: Photometric Temperature Air humidity Soil humidity Electrolyte sensor Microprocessor: ESP32
  • 40. 40 From data to analysis: Cayenne Dashboard https://cayenne.mydevices.com/shared/5f5d15c82130755bb2a55562/project/ e9af04f1-b554-4317-b4fb-5e5d4d831b7d
  • 41. Or build your own Instant Communication Lorem ipsum dolor sit amet, consectetuer adipiscing elit Networked API Lorem ipsum dolor sit amet, consectetuer adipiscing elit 41 Start with: Make: Sensors: A Hands-On Primer for Monitoring the Real World with Arduino and Raspberry Pi by Karvinen & Valtokari
  • 42. dont optimize early (left Bob Pease famous LM131 design) 42
  • 43. 43 From data to analysis: Edge Computing
  • 44. 44 From data to analysis: Edge Computing with Scailable