Hands-on in more than 50 projects
STM32 Nucleo family of processors are manufactured by STMicroelectronics. These are low-cost ARM microcontroller development boards. This book is about developing projects using the popular STM32CubeIDE software with the Nucleo-L476RG development board. In the early Chapters of the book the architecture of the Nucleo family is briefly described.
The book covers many projects using most features of the Nucleo-L476RG development board where the full software listings for the STM32CubeIDE are given for each project together with extensive descriptions. The projects range from simple flashing LEDs to more complex projects using modules, devices, and libraries such as GPIO, ADC, DAC, I²C, SPI, LCD, DMA, analogue inputs, power management, X-CUBE-MEMS1 library, DEBUGGING, and others. In addition, several projects are given using the popular Nucleo Expansion Boards. These Expansion Boards plug on top of the Nucleo development boards and provide sensors, relays, accelerometers, gyroscopes, Wi-Fi, and many others. Using an expansion board together with the X-CUBE-MEMS1 library simplifies the task of project development considerably.
All the projects in the book have been tested and are working. The following sub-headings are given for each project: Project Title, Description, Aim, Block Diagram, Circuit Diagram, and Program Listing for the STM32CubeIDE.
In this book you will learn about
STM32 microcontroller architecture;
the Nucleo-L476RG development board in projects using the STM32CubeIDE integrated software development tool;
external and internal interrupts and DMA;
DEBUG, a program developed using the STM32CubeIDE;
the MCU in Sleep, Stop, and in Standby modes;
Nucleo Expansion Boards with the Nucleo development boards.
What you need
a PC with Internet connection and a USB port;
STM32CubeIDE software (available at STMicroelectronics website free of charge)
the project source files, available from the book’s webpage hosted by Elektor;
Nucleo-L476RG development board;
simple electronic devices such as LEDs, temperature sensor, I²C and SPI chips, and a few more;
Nucleo Expansion Boards (optional).
Master the software tools behind the STM32 microcontroller
This book is project-based and aims to teach the software tools behind STM32 microcontroller programming. Author Majid Pakdel has developed projects using various different software development environments including Keil MDK, IAR Embedded Workbench, Arduino IDE and MATLAB. Readers should be able to use the projects as they are, or modify them to suit to their own needs. This book is written for students, established engineers, and hobbyists. STM32 microcontroller development boards including the STM32F103 and STM32F407 are used throughout the book. Readers should also find it easy to use other ARM-based development boards.
Advanced Programming with STM32 Microcontrollers includes:
Introduction to easy-to-use software tools for STM32
Accessing the features of the STM32
Practical, goal oriented learning
Complete code available online
Producing practical projects with ease
Topics cover:
Pulse Width Modulation
Serial Communication
Watchdog Timers
I²C
Direct Memory Access (DMA)
Finite State Machine Programming
ADCs and DACs
External Interupts
Timers and Counters
STM32 Nucleo family of processors are manufactured by STMicroelectronics. These are low-cost ARM microcontroller development boards. This book is about developing projects using the popular Nucleo development board. In the early chapters of the book, the architecture of the Nucleo family is briefly described.
Software development tools that can be used with the Nucleo boards such as the Mbed, Keil MDK, TrueSTUDIO, and the System Workbench are described briefly in later Chapters.
The book covers many projects using most features of the STM32 Nucleo development boards where the full software listings for Mbed and System Workbench are given for every project. The projects range from simple flashing LEDs to more complex projects using modules and devices such as GPIO, ADC, DAC, I²C, LCD, analog inputs and others.
In addition, several projects are given using the Nucleo Expansion Boards, including popular expansion boards such as solid-state relay, MEMS and environmental sensors, DC motor driver, Wi-Fi, and stepper motor driver.
These Expansion Boards plug on top of the Nucleo development boards and simplify the task of project development considerably.
Features of this book
Learn the architecture of the STM32 microcontrollers
Learn how to use the Nucleo development board in projects using Mbed and System Workbench Toolchains
Learn how to use the Nucleo Expansion Boards with the Nucleo development boards
Update
The Mbed compiler has been replaced with two software packages: The Mbed Studio and Keil Studio Cloud. Both of these software packages are free of charge and are available on the Internet. If you need assistance using the Keil Studio Cloud, please download the Guide below.
Hands-on in more than 50 projects
STM32 Nucleo family of processors are manufactured by STMicroelectronics. These are low-cost ARM microcontroller development boards. This book is about developing projects using the popular STM32CubeIDE software with the Nucleo-L476RG development board. In the early Chapters of the book the architecture of the Nucleo family is briefly described.
The book covers many projects using most features of the Nucleo-L476RG development board where the full software listings for the STM32CubeIDE are given for each project together with extensive descriptions. The projects range from simple flashing LEDs to more complex projects using modules, devices, and libraries such as GPIO, ADC, DAC, I²C, SPI, LCD, DMA, analogue inputs, power management, X-CUBE-MEMS1 library, DEBUGGING, and others. In addition, several projects are given using the popular Nucleo Expansion Boards. These Expansion Boards plug on top of the Nucleo development boards and provide sensors, relays, accelerometers, gyroscopes, Wi-Fi, and many others. Using an expansion board together with the X-CUBE-MEMS1 library simplifies the task of project development considerably.
All the projects in the book have been tested and are working. The following sub-headings are given for each project: Project Title, Description, Aim, Block Diagram, Circuit Diagram, and Program Listing for the STM32CubeIDE.
In this book you will learn about
STM32 microcontroller architecture;
the Nucleo-L476RG development board in projects using the STM32CubeIDE integrated software development tool;
external and internal interrupts and DMA;
DEBUG, a program developed using the STM32CubeIDE;
the MCU in Sleep, Stop, and in Standby modes;
Nucleo Expansion Boards with the Nucleo development boards.
What you need
a PC with Internet connection and a USB port;
STM32CubeIDE software (available at STMicroelectronics website free of charge)
the project source files, available from the book’s webpage hosted by Elektor;
Nucleo-L476RG development board;
simple electronic devices such as LEDs, temperature sensor, I²C and SPI chips, and a few more;
Nucleo Expansion Boards (optional).
STmicroelectronics’ wireless IoT & wearable sensor development kit
‘SensorTile.box’ is a portable multi-sensor circuit board housed in a plastic box and developed by STMicroelectronics. It is equipped with a high-performance 32-bit ARM Cortex-M4 processor with DSP and FPU, and various sensor modules, such as accelerometer, gyroscope, temperature sensor, humidity sensor, atmospheric pressure sensor, microphone, and so on. SensorTile.box is ready to use with wireless IoT and Bluetooth connectivity that can easily be used with an iOS or Android compatible smartphone, regardless of the level of expertise of the users. SensorTile.box is shipped with a long-life battery and all the user has to do is connect the battery to the circuit to start using the box.
The SensorTile.box can be operated in three modes: Basic mode, Expert mode, and Pro mode. Basic mode is the easiest way of using the box since it is pre-loaded with demo apps and all the user has to do is choose the required apps and display or plot the measured data on a smartphone using an app called STE BLE Sensor. In Expert mode users can develop simple apps using a graphical wizard provided with the STE BLE Sensor. Pro mode is the most complex mode allowing users to develop programs and upload them to the SensorTile.box.
This book is an introduction to the SensorTile.box and includes the following:
Brief specifications of the SensorTile.box; description of how to install the STE BLE Sensor app on an iOS or Android compatible smartphone required to communicate with the box.
Operation of the SensorTile.box in Basic mode is described in detail by going through all of the pre-loaded demo apps, explaining how to run these apps through a smartphone.
An introduction to the Expert mode with many example apps developed and explained in detail enabling users to develop their own apps in this mode. Again, the STE BLE Sensor app is used on the smartphone to communicate with the SensorTile.box and to run the developed apps.
The book then describes in detail how to upload the sensor data to the cloud. This is an important topic since it allows the sensor measurements to be accessed from anywhere with an Internet connection, at any time.
Finally, Pro mode is described in detail where more experienced people can use the SensorTile.box to develop, debug, and test their own apps using the STM32 open development environment (STM32 ODE). The Chapter explains how to upload the developed firmware to the SensorTile.box using several methods. Additionally, the installation and use of the Unicleo-GUI package is described with reference to the SensorTile.box. This PC software package enables all of the SensorTile.box sensor measurements to be displayed or plotted in real time on the PC.
This collection features the best of Elektor Magazine's articles on embedded systems and artificial intelligence. From hands-on programming guides to innovative AI experiments, these pieces offer valuable insights and practical knowledge for engineers, developers, and enthusiasts exploring the evolving intersection of hardware design, software innovation, and intelligent technology.
Contents
Programming PICs from the Ground UpAssembler routine to output a sine wave
Object-Oriented ProgrammingA Short Primer Using C++
Programming an FPGA
Tracking Down Microcontroller Buffer Overflows with 0xDEADBEEF
Too Quick to Code and Too Slow to Test?
Understanding the Neurons in Neural NetworksEmbedded Neurons
MAUI Programming for PC, Tablet, and SmartphoneThe New Framework in Theory and Practice
USB Killer DetectorBetter Safe Than Sorry
Understanding the Neurons in Neural NetworksArtificial Neurons
A Bare-Metal Programming Guide
Part 1: For STM32 and Other Controllers
Part 2: Accurate Timing, the UART, and Debugging
Part 3: CMSIS Headers, Automatic Testing, and a Web Server
Introduction to TinyMLBig Is Not Always Better
Microprocessors for Embedded SystemsPeculiar Parts, the Series
FPGAs for BeginnersThe Path From MCU to FPGA Programming
AI in Electronics DevelopmentAn Update After Only One Year
AI in the Electronics LabGoogle Bard and Flux Copilot Put to the Test
ESP32 and ChatGPTOn the Way to a Self-Programming System…
Audio DSP FX Processor Board
Part 1: Features and Design
Part 2: Creating Applications
Rust + EmbeddedA Development Power Duo
A Smart Object CounterImage Recognition Made Easy with Edge Impulse
Universal Garden LoggerA Step Towards AI Gardening
A VHDL ClockMade with ChatGPT
TensorFlow Lite on Small MicrocontrollersA (Very) Beginner’s Point of View
Mosquito DetectionUsing Open Datasets and Arduino Nicla Vision
Artificial Intelligence Timeline
Intro to AI AlgorithmsPrompt: Which Algorithms Implement Each AI Tool?
Bringing AI to the Edgewith ESP32-P4
The Growing Role of Edge AIA Trend Shaping the Future
Das Arduino Giga R1 WiFi bringt die Leistung des STM32H7 in den gleichen Formfaktor wie die beliebten Mega und Due und ist das erste Mega-Board mit integrierter Wi-Fi- und Bluetooth-Konnektivität.
Das Board bietet 76 digitale Ein-/Ausgänge (12 mit PWM-Fähigkeit), 14 analoge Eingänge und 2 analoge Ausgänge (DAC), die alle über Stiftleisten leicht zugänglich sind. Der STM32-Mikroprozessor mit Dual-Core Cortex-M7 und Cortex-M4 ermöglicht Ihnen zusammen mit dem integrierten Speicher und der Audiobuchse maschinelles Lernen und Signalverarbeitung.
Mikrocontroller (STM32H747XI)
Mit diesem Dual-Core-32-Bit-Mikrocontroller können Sie zwei Gehirne miteinander kommunizieren lassen (einen Cortex-M7 mit 480 MHz und einen Cortex-M4 mit 240 MHz). Sie können sogar Micropython auf dem einen und Arduino auf dem anderen ausführen.
Drahtlose Kommunikation (Murata 1DX)
Egal, ob Sie Wi-Fi oder Bluetooth bevorzugen, der Giga R1 WiFi hat alles, was Sie brauchen. Sie können sich sogar schnell mit der Arduino IoT Cloud erbinden und Ihr Projekt aus der Ferne verfolgen. Und wenn Sie sich Sorgen um die Sicherheit der Kommunikation machen, hat der ATECC608A alles unter Kontrolle.
Hardware-Anschlüsse und Kommunikation
In Anlehnung an den Arduino Mega und den Arduino Due verfügt der Giga R1 WiFi über 4x UARTs (Hardware Serial Ports), 3x I²C-Ports (1 mehr als bei den Vorgängern), 2x SPI-Ports (1 mehr als bei den Vorgängern), 1x FDCAN.
GPIOs und zusätzliche Pins
Aufgrund des gleichen Formfaktor wie Mega und Due ist es sehr einfach, Ihre benutzerdefinierten Shields an das Giga R1 WiFi anzupassen (denken Sie daran, dass dieses Board mit 3,3 V arbeitet!). Außerdem wurden wurden zusätzliche Header, so dass die Gesamtzahl der GPIO-Pins jetzt 76 beträgt, und zwei neue Pins hinzugefügt: ein VRTC, an das man eine Batterie anschließen kann, um das RTC laufen zu lassen, während das Board ausgeschaltet ist, und einen OFF-Pin, mit dem man das Board abschalten kann.
Anschlüsse
Das Giga R1 WiFi verfügt über zusätzliche Anschlüsse, die die Erstellung Ihres Projekts ohne zusätzliche Hardware erleichtern. Dieses Board hat:
USB-A-Anschluss, geeignet zum Hosten von USB-Sticks, anderen Massenspeichergeräten und HID-Geräten wie Tastatur oder Maus.
3,5-mm-Eingangs-/Ausgangsbuchse verbunden mit DAC0, DAC1 und A7.
USB-C zur Stromversorgung und Programmierung des Boards sowie zur Simulation eines HID-Geräts wie Maus oder Tastatur.
Jtag-Anschluss, 2x5 1,27 mm.
20-poliger Arducam-Kameraanschluss.
Unterstützung für höhere Spannung: Im Vergleich zu seinen Vorgängern, die bis zu 12 V unterstützen, kann das Giga R1 WiFi einen Bereich von 6 bis 24 V verarbeiten.
Technische Daten
Mikrocontroller
STM32H747XI Dual Cortex-M7+M4 32-bit low power ARM MCU (Datasheet)
Funkmodul
Murata 1DX Dual WiFi 802.11b/g/n 65 Mbps und Bluetooth (Datasheet)
Sicheres Element
ATECC608A-MAHDA-T (Datasheet)
USB
USB-C
Programmierung Anschluss / HID
USB-A
Host (Freigabe mit PA_15)
Pins
Digitale I/O-Pins
76
Analoge Eingangspins
12
DAC
2 (DAC0/DAC1)
PWM pins
12
Misc
VRT & OFF Pin
Kommunikation
UART
4x
I²C
3x
SPI
2x
CAN
Ja (erfordert einen externen Transceiver)
Anschlüsse
Kamera
I²C + D54-D67
Display
D1N, D0N, D1P, D0P, CKN, CKP + D68-D75
Audio Jack
DAC0, DAC1, A7
Stromversorgung
Betriebsspannung
3,3 V
Eingangsspannung (VIN)
6-24 V
DC-Strom pro I/O-Pin
8 mA
Taktrate
Cortex-M7
480 MHz
Cortex-M4
240 MHz
Speicher
STM32H747XI
2 MB Flash, 1 MB RAM
Abmessungen
53 x 101 mm
Downloads
Datasheet
Schematics
Pinout
STmicroelectronics’ wireless IoT & wearable sensor development kit
‘SensorTile.box’ is a portable multi-sensor circuit board housed in a plastic box and developed by STMicroelectronics. It is equipped with a high-performance 32-bit ARM Cortex-M4 processor with DSP and FPU, and various sensor modules, such as accelerometer, gyroscope, temperature sensor, humidity sensor, atmospheric pressure sensor, microphone, and so on. SensorTile.box is ready to use with wireless IoT and Bluetooth connectivity that can easily be used with an iOS or Android compatible smartphone, regardless of the level of expertise of the users. SensorTile.box is shipped with a long-life battery and all the user has to do is connect the battery to the circuit to start using the box.
The SensorTile.box can be operated in three modes: Basic mode, Expert mode, and Pro mode. Basic mode is the easiest way of using the box since it is pre-loaded with demo apps and all the user has to do is choose the required apps and display or plot the measured data on a smartphone using an app called STE BLE Sensor. In Expert mode users can develop simple apps using a graphical wizard provided with the STE BLE Sensor. Pro mode is the most complex mode allowing users to develop programs and upload them to the SensorTile.box.
This book is an introduction to the SensorTile.box and includes the following:
Brief specifications of the SensorTile.box; description of how to install the STE BLE Sensor app on an iOS or Android compatible smartphone required to communicate with the box.
Operation of the SensorTile.box in Basic mode is described in detail by going through all of the pre-loaded demo apps, explaining how to run these apps through a smartphone.
An introduction to the Expert mode with many example apps developed and explained in detail enabling users to develop their own apps in this mode. Again, the STE BLE Sensor app is used on the smartphone to communicate with the SensorTile.box and to run the developed apps.
The book then describes in detail how to upload the sensor data to the cloud. This is an important topic since it allows the sensor measurements to be accessed from anywhere with an Internet connection, at any time.
Finally, Pro mode is described in detail where more experienced people can use the SensorTile.box to develop, debug, and test their own apps using the STM32 open development environment (STM32 ODE). The Chapter explains how to upload the developed firmware to the SensorTile.box using several methods. Additionally, the installation and use of the Unicleo-GUI package is described with reference to the SensorTile.box. This PC software package enables all of the SensorTile.box sensor measurements to be displayed or plotted in real time on the PC.
This book details the use of the ARM Cortex-M family of processors and the Arduino Uno in practical CAN bus based projects. Inside, it gives a detailed introduction to the architecture of the Cortex-M family whilst providing examples of popular hardware and software development kits. Using these kits helps to simplify the embedded design cycle considerably and makes it easier to develop, debug, and test a CAN bus based project. The architecture of the highly popular ARM Cortex-M processor STM32F407VGT6 is described at a high level by considering its various modules. In addition, the use of the mikroC Pro for ARM and Arduino Uno CAN bus library of functions are described in detail.
This book is written for students, for practising engineers, for hobbyists, and for everyone else who may need to learn more about the CAN bus and its applications. The book assumes that the reader has some knowledge of basic electronics. Knowledge of the C programming language will be useful in later chapters of the book, and familiarity with at least one microcontroller will be an advantage, especially if the reader intends to develop microcontroller based projects using CAN bus.
The book should be useful source of reference to anyone interested in finding an answer to one or more of the following questions:
What bus systems are available for the automotive industry?
What are the principles of the CAN bus?
What types of frames (or data packets) are available in a CAN bus system?
How can errors be detected in a CAN bus system and how reliable is a CAN bus system?
What types of CAN bus controllers are there?
What are the advantages of the ARM Cortex-M microcontrollers?
How can one create a CAN bus project using an ARM microcontroller?
How can one create a CAN bus project using an Arduino microcontroller?
How can one monitor data on the CAN bus?
It is becoming important for microcontroller users to quickly learn and adapt to new technologies and architecture used in high performance 32-bit microcontrollers. Many manufacturers now offer 32-bit microcontrollers as general purpose processors in embedded applications.
ARM provide 32 and 64-bit processors mainly for embedded applications. These days, the majority of mobile devices including mobile phones, tablets, and GPS receivers are based on ARM technology. The low cost, low power consumption, and high performance of ARM processors makes them ideal for use in complex communication and mixed signal applications.
This book makes use of the ARM Cortex-M family of processors in easy-to-follow, practical projects. It gives a detailed introduction to the architecture of the Cortex-M family. Examples of popular hardware and software development kits are described.
The architecture of the highly popular ARM Cortex-M processor STM32F107VCT6 is described at a high level, taking into consideration its clock mechanisms, general input/output ports, interrupt sources, ADC and DAC converters, timer facilities, and more. The information provided here should act as a basis for most readers to start using and programming the STM32F107VCT6 microcontroller together with a development kit.
Furthermore, the use of the mikroC Pro for ARM integrated development environment (IDE) has been described in detail. This IDE includes everything required to create a project; namely an editor, compiler, simulator, debugger, and device programmer.
Although the book is based on the STM32F107VCT6 microcontroller, readers should not find it difficult to follow the projects using other ARM processor family members.
This e-book (pdf), a software-only follow up to the best-selling Elektor Visual Studio C# range of books, is aimed at Engineers, Scientists and Enthusiasts who want to learn about the C# language and development environment.
It covers steps from installation, the .NET framework and object oriented programming, through to more advanced concepts including database applications, threading and multi-tasking, internet/network communications and writing DLLs. The DirectX chapters also include video capture. The e-book concludes with several chapters on writing Android applications in C# using the Xamarin add-on.
This e-book is based on the Visual Studio 2015 development environment and latest C# additions including WPF applications, LINQ queries, Charts and new commands such as await and async. The latest Visual Studio debugging features (PerfTips, Diagnostic Tool window and IntellTrace) are covered. Finally, the Android chapters include GPS, E-mail and SMS applications.
Additionally, the e-book provides free on-line access to extensive, well-documented examples — in a try for yourself style — together with links to the author’s videos, guiding you through the necessary steps to get the expected results.
,
von Clemens Valens
Arduino Alvik, ein Wendepunkt in der STE(A)M-Ausbildung? (Review)
Eine Möglichkeit, die Ingenieure von morgen zu finden und hervorzubringen, besteht darin, unter unseren Kindern zu suchen. Die Idee besteht darin, ihnen unterhaltsame und einfach...