SlideShare a Scribd company logo
Hands-on Workshop:
An insight over the STM32 Platform +
Presentation of a water-level & temperature monitoring
prototype
Presenter: Julio César Carrasquel
carrasquelgamez.1726154@studenti.uniroma1.it
Rome, Italy. May 2017.
Università degli Studi di Roma La Sapienza
Dipartimento di Ingegneria Informatica,
Automatica e Gestionale Antonio Ruberti (DIAG)
2
Let me introduce myself
● Licentiate Degree in Computer Science from Central University of Venezuela.
Caracas, Venezuela. Former Software Developer at Wincor Nixdorf.
● Master of Science of Engineering in Computer Science at La Sapienza University of
Rome. Rome, Italy.
● Embedded Software Traineeship at INTECS Solutions SpA (Italian company
focused on embedded systems development for several sectors such as defense,
railway, and automotive among others).
● Some key interests: Embedded Software Development, Internet of Things, Computer
Networks, Service-oriented architectures, C/C++, Java.
● For additional info check out my LinkedIn profile:
https://www.linkedin.com/in/julio-césar-carrasquel-b5729844/
3
About this presentation and acknowledgements
● The following slides have been prepared as an introductory support for the
hands-on workshop on the STM32 Platform that was held on the Pervasive
Systems course (La Sapienza University of Rome, May 2017).
● The slides provide a quick look-up over the STM32 platform. In addition, it
is introduced as a demo a prototype developed within a traineeship period at
INTECS Solutions SpA (Rome, Italy).
● Special thanks to Ugo Maria Colesanti (INTECS Solution SpA) for the
tutorship given throughout the traineeship, and professor Ioannis
Chatzigiannakis (http://ichatz.me/) for the opportunity provided.
4
Key notions
● Embedded System: A computer system with dedicated functions within a larger
electro-mechanical system. They range from simple portable devices (wearables,
MP3 players) up to large complex systems (automotive, telecomunications,
avionics, space).
● Microcontroller: Small computer on a single integrated circuit. It includes the
processor, memories, and input/output peripherals. Core piece on an Embedded
System.
5
ARM Architecture
● Set of specifications regarding the instruction set, execution model, memory
organization, instruction cycle, and more which describes a machine
implementing that architecture.
● ARM Cortex: Wide set of 32/64 ARM Architectures.
– Cortex-A: It stands for applications. Designed for hosting rich operating system
platforms (e.g. Linux, Android).
– Cortex-M: It stands for embedded. Processors optimized for the embedded
market (low cost, energy efficient, low-power).
– Cortex-R: Real-time. High-performance and very critical scenarios (reliability,
real-time response, for example: the automative world).
● ARM Holding is a British company that develops the architecture of ARM-
based product. Intellectual Property business model.
6
STMicroelectronics and the STM32 platform
● STMicroelectronics is a French-Italian multinational electronics and
semiconductor manufacturer headquartered in Geneva, Switzerland.
● STM32 is a family of 32-bit microcontrollers developed by
STMicroelectronics. Based on the 32-bit ARM processor cores. Specifically,
in the ARM Cortex-M architecture.
● In particular, we work in this workshop with the STM32L476
microcontroller which belongs to the family of low-power microcontrollers.
● The STM32L476 MCU is placed within the Nucleo development board.
The Nucleo boards provide a medium for debugging and development with
the microcontroller units.
7
The NUCLEO-L476RG Development Board
St-link debugger
User button
Arduino –
compatible
pins
STM32L476RG
MCU
User Led
USB Connector
Reset button
Expansion pins
32 kHz
External
crystal
● STM32L476 MCU:
– Based on the ARM Cortex M-4 Architecture.
– 1 MB Flash memory, 128 Kb SRAM Data Memory.
– Clock frequency: up to 80 MHz.
Debugger
8
ARM Cortex M-4 Architecture
● 32-bits Harvard based architecture
● Thumb-32 instruction set (16/32 bits instructions)
● Core registers: R0...R12 general purpose, SP stack pointer, PC program counter,
LP link register, APSR program status register.
● Unified memory space 4GB
● On-chip bus interfaces: Based on the ARM AMBA (defines the communication
between the microcontroller modules through the on-chip buses)
– AHB (High-performance bus) connecting the MCU core elements.
– APB (Peripheral bus). Low-bandwidth connection with the peripherals.
● NVIC controller: Interruptions and exceptions management with priority
handling
● Systick timer (24-bit decrement timer).
● Optimized for low power consumption. Various sleep modes available.
9
ARM Cortex M-4 Architecture
● Example of the ARM Architecture design. The system bus (AHB) connects the core
elements (processor, memories, debug interface) whereas the peripheral bus (APB) deals
with the connection of all MCU peripherals.
● Both bus channels are interconnected by a bridge managed by a Master-Slave mechanism
following the ARM AMBA specification.
10
ARM Cortex M-4 Memory map
● Address space: 4GB, little/big endian
11
STM32L476 Look-up
● The microcontroller is based on the Cortex M-4. However, as it has been shown, it has its
vendor own characteristics (clock frequency speed, memory, consumption, etc).
● Different clock sources:
– External 4-48 Mhz crystal oscillator (HSE)
– Internal 16Mhz factory-trimmed RC (HSI16)
– Internal 32 Khz low power RC (LSI)
– External 32 Khz crystal for RTC (LSE)
– Internal multi-speed 100kHz-48Mhz oscillator (MSI)
– System PLL (uses HSE,HSI16 or MSI) up to 80Mhz.
● A wide set of peripherals, for example:
– Timers (16-bit low-power, generic, basic, watchdog, Systick timer)
– ADC/DAC: Analog-to-digital, digital-to-analog converters.
– Several interfaces for communication: USART, SPI, I2C, CAN, etc.
– Configurable general-purpose input/output (GPIOs).
12
Software development tools
● STM32CubeMX Tool
– Make an initial configuration of the
microcontroller features.
– Pin-out conflict resolution
– Clock sources configuration
– Peripherals setting
– C code generation
● System Workbench 4 IDE
– Eclipse-based integrated development
tool-chain
– Import generated code of the
STM32CubeMX
– Debugging features
– Connection with the Nucleo
development board
13
Tank water-level & temperature monitoring system
● It was used the STM32L476RG as the the core piece for the development of a tank water-
level & temperature monitoring solution.
– For detecting water-level is used the HCSR04 ultra-sonic ranging device.
– For the temperature is used the water-proof DS18B20 thermometer.
● The system also includes an U-Blox NEO-6M GPS receiver which keeps track of the location
where the system is operating.
System schematic diagram
14
Tank water-level & temperature monitoring system
Sensors used within the project
● NEO-6M GPS receiver device
– Connected to the MCU through a UART interface.
– Working with the NMEA 0183 standard.
● Water-proof DS1820 temperature sensor
– Measures temperatures between -55 °C and +125 °C.
– Managed by the 1-Wire communication bus mechanism.
● Ultra-sonic HC-SR04 ranging device
– – It sends 40KHz burst pulses which are reflected back by the
obstacle.
– It forwards through the echo-line a pulse whose width is
proportional to the distance towards the obstacle.
– Measuring range: 2 cm – 400 cm
15
Tank water-level & temperature monitoring system
An additional look about how the HC-SR04 ranging device works
● For measuring the distance with respect to an obstacle (the water surface), is required to supply
through the trigger input line a pulse of 10 microseconds.
● Then, it will start the ranging sending out an 8 cycle burst of ultrasound at 40 kHz.
● Whenever the sensor receives the signal back, it will set a high pulse through the echo output line
whose pulse width will be proportional to the distance between the sensor and the obstacle.
● Finally, for calculating the distance between the module and the obstacle, the echo pulse width (in
microseconds) is divided by 58 which giving the distance in order of centimeters.
16
Tank water-level & temperature monitoring system
● The HC-SR04 sensor is positioned at the top of the tank, and sends the ultra-sonic
waves towards the water surface where are immediately reflected back to the device.
● Thus, this mechanism can derive the distance between the device and the water
surface. Knowing in advance the tank height it can be calculated which is the
current tank water level.
Water tank with its associated levels and thresholds.
17
Tank water-level & temperature monitoring system
Implementation of a system console for the monitoring system
● The monitoring system integrates a module embedded for managing a system terminal. The idea
is to provide a command-line interface for interacting with the user connecting the
microcontroller with the computer using an UART channel which goes over the USB connection.
● Through this interface the user can configure the system main variables (sampling period, turning
on/off devices, water-tank height and the different thresholds), receive the sensor measurements
and the corresponding alarms.
18
● For getting more details about the developed prototype:
– Find the project source code freely available on Github:
https://github.com/juliocesarcarrasquel/waterlevel-monitoringsystem
– Download the system technical report on Slideshare:
https://www.slideshare.net/juliocesarcarrasquel/tank-water-level-
monitoring-solution-based-on-the-stm32l476-mcu
Tank water-level & temperature monitoring system
19
Other useful references
● ST Microelectronics. STM32L476RG Microcontroller: Ultra-low-power with FPU ARM Cortex-M4
MCU 80 MHz. http://www.st.com/en/microcontrollers/stm32l476rg.html
● ST Microelectronics. STM32L476xx Datasheet: Ultra-low power ARM Cortex-M4 32-bit MCU.
Retrieved from: http://www.st.com/resource/en/datasheet/stm32l476rg.pdf
● ST Microelectronics. STM32CubeMX – STM32Cube initialization code generator.
http://www.st.com/en/development-tools/stm32cubemx.html
● OpenSTM32 Community Site. System Workbench for STM32.
http://www.openstm32.org/System+Workbench+for+STM32
● NEO-6 U-Blox GPS modules Datasheet. Doc. Number: PS.G6-HW-09005-E. Rev. E. December
2011.
● NMEA Data. Retrieved from: http://www.gpsinformation.org/dale/nmea.htm. (April 2017).
● Dallas Semiconductors Corp. Division of Maxim Integrated Products, Inc. DS18B20 Programmable
Resolution 1-Wire Digital Thermometer Datasheet.
● ElecFreaks. Ultrasonic Ranging Module HC–SR04 Datasheet. Retrieved from:
http://www.micropik.com/PDF/HCSR04.pdf (April 2017).
20
Thanks for your attention!
Hands-on Workshop:
An insight over the STM32 Platform +
Presentation of a water-level & temperature monitoring prototype
Questions, comments and suggestions are welcome!
Presenter: Julio César Carrasquel
carrasquelgamez.1726154@studenti.uniroma1.it
Rome, Italy. May 2017.

More Related Content

What's hot

Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
Gaurav Verma
 
PIC16F877A interfacing with LCD
PIC16F877A interfacing with LCDPIC16F877A interfacing with LCD
PIC16F877A interfacing with LCD
sunil polo
 
WIRELESS ROBOT PPT
WIRELESS ROBOT PPTWIRELESS ROBOT PPT
WIRELESS ROBOT PPT
AIRTEL
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
Embeddedcraft Craft
 
Overview of LPC214x MCUs
Overview of LPC214x MCUsOverview of LPC214x MCUs
Overview of LPC214x MCUs
Premier Farnell
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
Sadiq Rahim
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
Anurag Tomar
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
Rahat Sood
 
Bootloaders
BootloadersBootloaders
Bootloaders
Anil Kumar Pugalia
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
FastBit Embedded Brain Academy
 
STM32 L4 presentation
STM32 L4 presentation STM32 L4 presentation
STM32 L4 presentation
Sylvie Boube-Politano
 
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC InterfacingPIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
International Institute of Information Technology (I²IT)
 
ARM
ARMARM
Embedded Product Development Life Cycle(EDLC)
Embedded Product Development Life Cycle(EDLC)Embedded Product Development Life Cycle(EDLC)
Embedded Product Development Life Cycle(EDLC)
UshaRani289
 
FreeRTOS
FreeRTOSFreeRTOS
FreeRTOS
Ankita Tiwari
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
Prashant Tiwari
 
Arduino
ArduinoArduino
Arduino
vipin7vj
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
Dr. Pankaj Zope
 

What's hot (20)

Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
 
PIC16F877A interfacing with LCD
PIC16F877A interfacing with LCDPIC16F877A interfacing with LCD
PIC16F877A interfacing with LCD
 
WIRELESS ROBOT PPT
WIRELESS ROBOT PPTWIRELESS ROBOT PPT
WIRELESS ROBOT PPT
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
Overview of LPC214x MCUs
Overview of LPC214x MCUsOverview of LPC214x MCUs
Overview of LPC214x MCUs
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
Board Bringup
Board BringupBoard Bringup
Board Bringup
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
STM32 L4 presentation
STM32 L4 presentation STM32 L4 presentation
STM32 L4 presentation
 
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC InterfacingPIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
 
ARM
ARMARM
ARM
 
Embedded Product Development Life Cycle(EDLC)
Embedded Product Development Life Cycle(EDLC)Embedded Product Development Life Cycle(EDLC)
Embedded Product Development Life Cycle(EDLC)
 
FreeRTOS
FreeRTOSFreeRTOS
FreeRTOS
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
 
Arduino
ArduinoArduino
Arduino
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 

Similar to Introduction on STM32 Platform and Presentation of a Water-Level & Temperature Monitoring Solution

Tank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUTank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCU
Julio César Carrasquel
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollers
EdwardOmondi4
 
Micro controller
Micro controllerMicro controller
Micro controller
Shrikunj Patel
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1
AJAL A J
 
TEMPERATURE MONITORING
TEMPERATURE MONITORINGTEMPERATURE MONITORING
TEMPERATURE MONITORINGManisha Chandu
 
Education set for collecting and visualizing data using sensor system based ...
Education set for collecting and visualizing data using sensor  system based ...Education set for collecting and visualizing data using sensor  system based ...
Education set for collecting and visualizing data using sensor system based ...
IJMER
 
Wireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationWireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculation
Udayalakshmi JK
 
Research Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and ScienceResearch Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and Scienceresearchinventy
 
Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...researchinventy
 
Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...
IJMER
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes
Dr.YNM
 
AVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdf
AVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdfAVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdf
AVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdf
Ismailkhan77481
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
Mathivanan Natarajan
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
SangeetaTripathi8
 
18CS44-MODULE1-PPT.pptx
18CS44-MODULE1-PPT.pptx18CS44-MODULE1-PPT.pptx
18CS44-MODULE1-PPT.pptx
KokilaK25
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded System
rmkceteee
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
Pratik Gohel
 
Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...
Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...
Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...Cemal Ardil
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_control
Bhukya Mangu
 

Similar to Introduction on STM32 Platform and Presentation of a Water-Level & Temperature Monitoring Solution (20)

Tank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUTank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCU
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollers
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1
 
TEMPERATURE MONITORING
TEMPERATURE MONITORINGTEMPERATURE MONITORING
TEMPERATURE MONITORING
 
Education set for collecting and visualizing data using sensor system based ...
Education set for collecting and visualizing data using sensor  system based ...Education set for collecting and visualizing data using sensor  system based ...
Education set for collecting and visualizing data using sensor system based ...
 
Wireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationWireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculation
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Research Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and ScienceResearch Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and Science
 
Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...
 
Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes
 
AVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdf
AVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdfAVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdf
AVR Atmega16 based Projects List - ATMega32 AVR _ Atmega16 based Projects.pdf
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
 
18CS44-MODULE1-PPT.pptx
18CS44-MODULE1-PPT.pptx18CS44-MODULE1-PPT.pptx
18CS44-MODULE1-PPT.pptx
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded System
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...
Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...
Design development-and-implementation-of-a temperature-sensor-using-zigbee-co...
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_control
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 

Introduction on STM32 Platform and Presentation of a Water-Level & Temperature Monitoring Solution

  • 1. Hands-on Workshop: An insight over the STM32 Platform + Presentation of a water-level & temperature monitoring prototype Presenter: Julio César Carrasquel carrasquelgamez.1726154@studenti.uniroma1.it Rome, Italy. May 2017. Università degli Studi di Roma La Sapienza Dipartimento di Ingegneria Informatica, Automatica e Gestionale Antonio Ruberti (DIAG)
  • 2. 2 Let me introduce myself ● Licentiate Degree in Computer Science from Central University of Venezuela. Caracas, Venezuela. Former Software Developer at Wincor Nixdorf. ● Master of Science of Engineering in Computer Science at La Sapienza University of Rome. Rome, Italy. ● Embedded Software Traineeship at INTECS Solutions SpA (Italian company focused on embedded systems development for several sectors such as defense, railway, and automotive among others). ● Some key interests: Embedded Software Development, Internet of Things, Computer Networks, Service-oriented architectures, C/C++, Java. ● For additional info check out my LinkedIn profile: https://www.linkedin.com/in/julio-césar-carrasquel-b5729844/
  • 3. 3 About this presentation and acknowledgements ● The following slides have been prepared as an introductory support for the hands-on workshop on the STM32 Platform that was held on the Pervasive Systems course (La Sapienza University of Rome, May 2017). ● The slides provide a quick look-up over the STM32 platform. In addition, it is introduced as a demo a prototype developed within a traineeship period at INTECS Solutions SpA (Rome, Italy). ● Special thanks to Ugo Maria Colesanti (INTECS Solution SpA) for the tutorship given throughout the traineeship, and professor Ioannis Chatzigiannakis (http://ichatz.me/) for the opportunity provided.
  • 4. 4 Key notions ● Embedded System: A computer system with dedicated functions within a larger electro-mechanical system. They range from simple portable devices (wearables, MP3 players) up to large complex systems (automotive, telecomunications, avionics, space). ● Microcontroller: Small computer on a single integrated circuit. It includes the processor, memories, and input/output peripherals. Core piece on an Embedded System.
  • 5. 5 ARM Architecture ● Set of specifications regarding the instruction set, execution model, memory organization, instruction cycle, and more which describes a machine implementing that architecture. ● ARM Cortex: Wide set of 32/64 ARM Architectures. – Cortex-A: It stands for applications. Designed for hosting rich operating system platforms (e.g. Linux, Android). – Cortex-M: It stands for embedded. Processors optimized for the embedded market (low cost, energy efficient, low-power). – Cortex-R: Real-time. High-performance and very critical scenarios (reliability, real-time response, for example: the automative world). ● ARM Holding is a British company that develops the architecture of ARM- based product. Intellectual Property business model.
  • 6. 6 STMicroelectronics and the STM32 platform ● STMicroelectronics is a French-Italian multinational electronics and semiconductor manufacturer headquartered in Geneva, Switzerland. ● STM32 is a family of 32-bit microcontrollers developed by STMicroelectronics. Based on the 32-bit ARM processor cores. Specifically, in the ARM Cortex-M architecture. ● In particular, we work in this workshop with the STM32L476 microcontroller which belongs to the family of low-power microcontrollers. ● The STM32L476 MCU is placed within the Nucleo development board. The Nucleo boards provide a medium for debugging and development with the microcontroller units.
  • 7. 7 The NUCLEO-L476RG Development Board St-link debugger User button Arduino – compatible pins STM32L476RG MCU User Led USB Connector Reset button Expansion pins 32 kHz External crystal ● STM32L476 MCU: – Based on the ARM Cortex M-4 Architecture. – 1 MB Flash memory, 128 Kb SRAM Data Memory. – Clock frequency: up to 80 MHz. Debugger
  • 8. 8 ARM Cortex M-4 Architecture ● 32-bits Harvard based architecture ● Thumb-32 instruction set (16/32 bits instructions) ● Core registers: R0...R12 general purpose, SP stack pointer, PC program counter, LP link register, APSR program status register. ● Unified memory space 4GB ● On-chip bus interfaces: Based on the ARM AMBA (defines the communication between the microcontroller modules through the on-chip buses) – AHB (High-performance bus) connecting the MCU core elements. – APB (Peripheral bus). Low-bandwidth connection with the peripherals. ● NVIC controller: Interruptions and exceptions management with priority handling ● Systick timer (24-bit decrement timer). ● Optimized for low power consumption. Various sleep modes available.
  • 9. 9 ARM Cortex M-4 Architecture ● Example of the ARM Architecture design. The system bus (AHB) connects the core elements (processor, memories, debug interface) whereas the peripheral bus (APB) deals with the connection of all MCU peripherals. ● Both bus channels are interconnected by a bridge managed by a Master-Slave mechanism following the ARM AMBA specification.
  • 10. 10 ARM Cortex M-4 Memory map ● Address space: 4GB, little/big endian
  • 11. 11 STM32L476 Look-up ● The microcontroller is based on the Cortex M-4. However, as it has been shown, it has its vendor own characteristics (clock frequency speed, memory, consumption, etc). ● Different clock sources: – External 4-48 Mhz crystal oscillator (HSE) – Internal 16Mhz factory-trimmed RC (HSI16) – Internal 32 Khz low power RC (LSI) – External 32 Khz crystal for RTC (LSE) – Internal multi-speed 100kHz-48Mhz oscillator (MSI) – System PLL (uses HSE,HSI16 or MSI) up to 80Mhz. ● A wide set of peripherals, for example: – Timers (16-bit low-power, generic, basic, watchdog, Systick timer) – ADC/DAC: Analog-to-digital, digital-to-analog converters. – Several interfaces for communication: USART, SPI, I2C, CAN, etc. – Configurable general-purpose input/output (GPIOs).
  • 12. 12 Software development tools ● STM32CubeMX Tool – Make an initial configuration of the microcontroller features. – Pin-out conflict resolution – Clock sources configuration – Peripherals setting – C code generation ● System Workbench 4 IDE – Eclipse-based integrated development tool-chain – Import generated code of the STM32CubeMX – Debugging features – Connection with the Nucleo development board
  • 13. 13 Tank water-level & temperature monitoring system ● It was used the STM32L476RG as the the core piece for the development of a tank water- level & temperature monitoring solution. – For detecting water-level is used the HCSR04 ultra-sonic ranging device. – For the temperature is used the water-proof DS18B20 thermometer. ● The system also includes an U-Blox NEO-6M GPS receiver which keeps track of the location where the system is operating. System schematic diagram
  • 14. 14 Tank water-level & temperature monitoring system Sensors used within the project ● NEO-6M GPS receiver device – Connected to the MCU through a UART interface. – Working with the NMEA 0183 standard. ● Water-proof DS1820 temperature sensor – Measures temperatures between -55 °C and +125 °C. – Managed by the 1-Wire communication bus mechanism. ● Ultra-sonic HC-SR04 ranging device – – It sends 40KHz burst pulses which are reflected back by the obstacle. – It forwards through the echo-line a pulse whose width is proportional to the distance towards the obstacle. – Measuring range: 2 cm – 400 cm
  • 15. 15 Tank water-level & temperature monitoring system An additional look about how the HC-SR04 ranging device works ● For measuring the distance with respect to an obstacle (the water surface), is required to supply through the trigger input line a pulse of 10 microseconds. ● Then, it will start the ranging sending out an 8 cycle burst of ultrasound at 40 kHz. ● Whenever the sensor receives the signal back, it will set a high pulse through the echo output line whose pulse width will be proportional to the distance between the sensor and the obstacle. ● Finally, for calculating the distance between the module and the obstacle, the echo pulse width (in microseconds) is divided by 58 which giving the distance in order of centimeters.
  • 16. 16 Tank water-level & temperature monitoring system ● The HC-SR04 sensor is positioned at the top of the tank, and sends the ultra-sonic waves towards the water surface where are immediately reflected back to the device. ● Thus, this mechanism can derive the distance between the device and the water surface. Knowing in advance the tank height it can be calculated which is the current tank water level. Water tank with its associated levels and thresholds.
  • 17. 17 Tank water-level & temperature monitoring system Implementation of a system console for the monitoring system ● The monitoring system integrates a module embedded for managing a system terminal. The idea is to provide a command-line interface for interacting with the user connecting the microcontroller with the computer using an UART channel which goes over the USB connection. ● Through this interface the user can configure the system main variables (sampling period, turning on/off devices, water-tank height and the different thresholds), receive the sensor measurements and the corresponding alarms.
  • 18. 18 ● For getting more details about the developed prototype: – Find the project source code freely available on Github: https://github.com/juliocesarcarrasquel/waterlevel-monitoringsystem – Download the system technical report on Slideshare: https://www.slideshare.net/juliocesarcarrasquel/tank-water-level- monitoring-solution-based-on-the-stm32l476-mcu Tank water-level & temperature monitoring system
  • 19. 19 Other useful references ● ST Microelectronics. STM32L476RG Microcontroller: Ultra-low-power with FPU ARM Cortex-M4 MCU 80 MHz. http://www.st.com/en/microcontrollers/stm32l476rg.html ● ST Microelectronics. STM32L476xx Datasheet: Ultra-low power ARM Cortex-M4 32-bit MCU. Retrieved from: http://www.st.com/resource/en/datasheet/stm32l476rg.pdf ● ST Microelectronics. STM32CubeMX – STM32Cube initialization code generator. http://www.st.com/en/development-tools/stm32cubemx.html ● OpenSTM32 Community Site. System Workbench for STM32. http://www.openstm32.org/System+Workbench+for+STM32 ● NEO-6 U-Blox GPS modules Datasheet. Doc. Number: PS.G6-HW-09005-E. Rev. E. December 2011. ● NMEA Data. Retrieved from: http://www.gpsinformation.org/dale/nmea.htm. (April 2017). ● Dallas Semiconductors Corp. Division of Maxim Integrated Products, Inc. DS18B20 Programmable Resolution 1-Wire Digital Thermometer Datasheet. ● ElecFreaks. Ultrasonic Ranging Module HC–SR04 Datasheet. Retrieved from: http://www.micropik.com/PDF/HCSR04.pdf (April 2017).
  • 20. 20 Thanks for your attention! Hands-on Workshop: An insight over the STM32 Platform + Presentation of a water-level & temperature monitoring prototype Questions, comments and suggestions are welcome! Presenter: Julio César Carrasquel carrasquelgamez.1726154@studenti.uniroma1.it Rome, Italy. May 2017.