Projects with Arduino Uno & Raspberry Pi with Examples for the MCP2515 CAN Bus Interface Module
This book details the use of the Arduino Uno and the Raspberry Pi 4 in practical CAN bus based projects. Using either the Arduino Uno or the Raspberry Pi with off-the-shelf CAN bus interface modules considerably ease developing, debugging, and testing CAN bus based projects.
This book is written for students, practicing engineers, enthusiasts, and for everyone else wanting 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 and Python programming languages and programming the Arduino Uno using its IDE and Raspberry Pi will be useful, especially if the reader intends to develop microcontroller-based projects using the CAN bus.
The book should be a useful source of reference material for anyone interested in finding answers to questions such as:
What bus systems are available for the automotive industry?
What are the principles of the CAN bus?
How can I create a physical 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 dependable is a CAN bus system?
What types of CAN bus controllers exist?
How do I use the MCP2515 CAN bus controller?
How do I create 2-node Arduino Uno-based CAN bus projects?
How do I create 3-node Arduino Uno-based CAN bus projects?
How do I set the acceptance masks and acceptance filters?
How do I analyze data on the CAN bus?
How do I create 2-node Raspberry Pi-based CAN bus projects?
How do I create 3-node Raspberry Pi-based CAN bus projects?
Zeitsteuerung, Scheduler, PIO und Zustandsmaschinen
Multitasking ist der Schlüssel zu leistungsfähigen Embedded-Systemen, und zugleich eine der größten Herausforderungen in der Mikrocontroller-Programmierung. Dieses Buch zeigt Ihnen Schritt für Schritt, wie Sie von einem einfachen Ein-Task-Programm zu einem strukturierten, reaktionsfähigen und skalierbaren System gelangen. Dabei steht nicht nur das Wie, sondern vor allem das Warum im Mittelpunkt.
Sie lernen:
warum scheinbare Parallelität entsteht
weshalb blockierende Programme instabil werden
wie Aufgaben effizient und kontrolliert parallel ablaufen
Ausgehend vom klassischen Superloop vermittelt das Buch moderne Multitasking-Strategien – von nicht-blockierender Programmierung und Tick-Systemen bis zu Task-Schedulern, Zustandsmaschinen und ereignisgesteuerten Konzepten.
Der Fokus liegt auf der Praxis: Sensoren, Displays, Kommunikation und reale Anwendungen werden Schritt für Schritt integriert und mit verständlich kommentierten Beispielprogrammen erklärt.
Fortgeschrittene Themen umfassen:
Multicore-Programmierung mit dem Raspberry Pi Pico
asynchrones Programmieren mit uasyncio
RTOS-Grundlagen mit FreeRTOS
die Kombination aus Multicore und RTOS
Dabei werden auch die Grenzen dieser Techniken, insbesondere unter MicroPython, klar aufgezeigt.
Das Buch richtet sich an ambitionierte Einsteiger und fortgeschrittene Entwickler, die Embedded-Systeme fundiert verstehen und robuste, wartbare Multitasking-Anwendungen entwickeln möchten.
Program, build, and master 60+ projects with the Wireless RP2040
The Raspberry Pi Pico and Pico W are based on the fast, efficient, and low-cost dual-core ARM Cortex M0+ RP2040 microcontroller chip running at up to 133 MHz and sporting 264 KB of SRAM and 2 MB of Flash memory. Besides spacious memory, the Pico and Pico W offer many GPIO pins, and popular peripheral interface modules like ADC, SPI, I²C, UART, PWM, timing modules, a hardware debug interface, and an internal temperature sensor.
The Raspberry Pi Pico W additionally includes an on-board Infineon CYW43439 Bluetooth and Wi-Fi chipset. At the time of writing this book, the Bluetooth firmware was not yet available. Wi-Fi is however fully supported at 2.4 GHz using the 802.11b/g/n protocols.
This book is an introduction to using the Raspberry Pi Pico W in conjunction with the MicroPython programming language. The Thonny development environment (IDE) is used in all of the 60+ working and tested projects covering the following topics:
Installing the MicroPython on Raspberry Pi Pico using a Raspberry Pi or a PC
Timer interrupts and external interrupts
Analogue-to-digital converter (ADC) projects
Using the internal temperature sensor and external sensor chips
Using the internal temperature sensor and external temperature sensor chips
Datalogging projects
PWM, UART, I²C, and SPI projects
Using Bluetooth, WiFi, and apps to communicate with smartphones
Digital-to-analogue converter (DAC) projects
All projects are tried & tested. They can be implemented on both the Raspberry Pi Pico and Raspberry Pi Pico W, although the Wi-Fi-based subjects will run on the Pico W only. Basic programming and electronics experience are required to follow the projects. Brief descriptions, block diagrams, detailed circuit diagrams, and full MicroPython program listings are given for all projects.
PC USB Logic Analyzers with Arduino, Raspberry Pi, and Co.
Step-by-step instructions guide you through the analysis of modern protocols such as I²C, SPI, UART, RS-232, NeoPixel, WS28xx, HD44780 and 1-Wire. With the help of numerous experimental circuits based on the Raspberry Pi Pico, Arduino Uno and the Bus Pirate, you will learn the practical application of popular USB logic analyzers.
All the experimental circuits presented in this book have been fully tested and are fully functional. The necessary program listings are included – no special programming or electronics knowledge is required for these circuits. The programming languages used are MicroPython and C along with the development environments Thonny and Arduino IDE.
This book uses several models of flexible and widely available USB logic analyzers and shows the strengths and weaknesses of each price range.
You will learn about the criteria that matter for your work and be able to find the right device for you.
Whether Arduino, Raspberry Pi or Raspberry Pi Pico, the example circuits shown allow you to get started quickly with protocol analysis and can also serve as a basis for your own experiments.
After reading this book, you will be familiar with all the important terms and contexts, conduct your own experiments, analyze protocols independently, culminating in a comprehensive knowledge set of digital signals and protocols.
Mehr als 50 Grundlagenprojekte mit MicroPython und dem RP2040-Mikrocontroller
Der Raspberry Pi Pico ist eine leistungsstarke Mikrocontroller-Platine, die speziell für das Physical Computing – also hardwarenahe Anwendungen – entwickelt wurde. Der Raspberry Pi Pico kann so programmiert werden, dass er eine einzelne Aufgabe sehr effizient ausführt und ermöglicht so schnelle Steuerungs- und Überwachungsanwendungen in Echtzeit. Der 'Pico', wie wir ihn nennen, basiert auf dem schnellen, effizienten und kostengünstigen Dual-Core ARM Cortex-M0+ RP2040 Mikrocontroller-Chip, der mit bis zu 133 MHz läuft und über 264 KB SRAM und 2 MB Flash-Speicher verfügt. Neben dem großen Speicher hat der Pico noch weitere attraktive Eigenschaften, darunter eine große Anzahl von GPIO-Pins sowie gängige Schnittstellen wie ADC, SPI, I²C, UART und PWM. Als Krönung bietet der Chip schnelle und genaue Timer, eine Hardware-Debug-Schnittstelle und einen internen Temperatursensor.
Zur Programmierung lassen sich leicht die gängigen Hochsprachen wie MicroPython oder C/C++ verwenden. Dieses Buch ist eine Einführung in die Verwendung des Pico mit der Programmiersprache MicroPython. In allen Projekten wird die Thonny-Entwicklungsumgebung (IDE) eingesetzt. Über 50 Projekte decken folgende Themen ab:
Installation von MicroPython auf dem Raspberry Pi Pico
Timer-Interrupts und externe Interrupts
Projekte mit Analog-Digital-Wandler (ADC)
Verwendung des internen sowie externer Temperatursensoren
Datenlogger
Projekte zur PWM, UART, I²C-Bus und SPI-Bus
Wi-Fi und Bluetooth für die Kommunikation mit Smartphones
Projekte mit dem Digital-Analog-Wandler (DAC)
Alle in diesem Buch vorgestellten Projekte wurden vollständig getestet und sind funktionsfähig. Es werden keine Programmier- oder Elektronikkenntnisse vorausgesetzt, um sie nachzuvollziehen. Für alle beschriebenen Projekte gibt es kurze Beschreibungen, Blockdiagramme, detaillierte Schaltpläne und vollständige MicroPython-Programmlistings. Die Listings sind auch auf der zum Buch gehörenden Elektor-Webseite zu finden.
Program, build, and master over 50 projects with MicroPython and the RP2040 microprocessor The Raspberry Pi Pico is a high-performance microcontroller module designed especially for physical computing. Microcontrollers differ from single-board computers, like the Raspberry Pi 4, in not having an operating system. The Raspberry Pi Pico can be programmed to run a single task very efficiently within real-time control and monitoring applications requiring speed. The ‘Pico’ as we call it, is based on the fast, efficient, and low-cost dual-core ARM Cortex-M0+ RP2040 microcontroller chip running at up to 133 MHz and sporting 264 KB of SRAM, and 2 MB of Flash memory. Besides its large memory, the Pico has even more attractive features including a vast number of GPIO pins, and popular interface modules like ADC, SPI, I²C, UART, and PWM. To cap it all, the chip offers fast and accurate timing modules, a hardware debug interface, and an internal temperature sensor. The Raspberry Pi Pico is easily programmed using popular high-level languages such as MicroPython and or C/C++. This book is an introduction to using the Raspberry Pi Pico microcontroller in conjunction with the MicroPython programming language. The Thonny development environment (IDE) is used in all the projects described. There are over 50 working and tested projects in the book, covering the following topics: Installing the MicroPython on Raspberry Pi Pico using a Raspberry Pi or a PC Timer interrupts and external interrupts Analogue-to-digital converter (ADC) projects Using the internal temperature sensor and external temperature sensor chips Datalogging projects PWM, UART, I²C, and SPI projects Using Wi-Fi and apps to communicate with smartphones Using Bluetooth and apps to communicate with smartphones Digital-to-analogue converter (DAC) projects All projects given in the book have been fully tested and are working. Only basic programming and electronics experience is required to follow the projects. Brief descriptions, block diagrams, detailed circuit diagrams, and full MicroPython program listings are given for all projects described. Readers can find the program listings on the Elektor web page created to support the book.
Praxisnahe Projekte, Profi-Tricks und eigene Anwendungen
Dieses Buch führt Sie Schritt für Schritt in die faszinierende Welt der State Machines ein und zeigt, wie Sie Hardware direkt und effizient ansteuern können – jenseits klassischer CPU-gesteuerter Ansätze.
In diesem Buch lernen Sie:
LEDs und NeoPixel kreativ steuern: Blinken, Dimmen, Farbwechsel und komplexe Animationen
Taster und Encoder zuverlässig auslesen und in Echtzeit in Ihre Projekte integrieren
Analoge Eingänge (ADC) nutzen und Signale digital steuern
Servos präzise ansteuern und Bewegungsabläufe automatisieren
SPI mit PIO umsetzen, um Displays, Sensoren und Module anzusteuern
Menüsysteme und Submenüs auf SPI-Displays realisieren, inklusive Navigation über mehrere Taster
PWM, Signalgenerierung und Frequenzsteuerung für akustische oder visuelle Effekte
Debugging-Strategien und Tipps, um Ihre PIO-Programme effizient zu entwickeln
Alle Beispiele sind praxisnah, sofort umsetzbar und zuverlässig. Mit klaren Anleitungen, Hintergrundwissen und fertigen Codebeispielen lernen Sie, die PIO-Fähigkeiten des Pico maximal zu nutzen – egal ob für Maker-Projekte, Prototypen oder professionelle Anwendungen.
Erleben Sie, wie Sie komplexe Hardwaresteuerung elegant mit dem Pico realisieren können – schneller, flexibler und leistungsfähiger als je zuvor.
Vom Messwert zur stabilen Entscheidung
Wie wird aus einem einfachen Mikrocontroller ein intelligentes System, das Sensorwerte erfasst, verarbeitet und sinnvoll darauf reagiert? Dieses Buch zeigt es Ihnen Schritt für Schritt – verständlich, praxisnah und ohne unnötige Vorkenntnisse.
Sie beginnen mit den Grundlagen der digitalen und analogen Ein- und Ausgänge. Anschließend lernen Sie, wie Sensorwerte gelesen, geglättet und zuverlässig bewertet werden. Anschauliche Beispiele erklären, warum einzelne Messwerte oft täuschen können und wie Mittelwertbildung, Hysterese und einfache Entscheidungsregeln für stabile Ergebnisse sorgen. Nach und nach erweitern Sie Ihre Projekte um Displays, I²C-Kommunikation und mehrere vernetzte Mikrocontroller. So entstehen verteilte Systeme, in denen Raspberry Pi Pico und ATtiny-Controller Daten austauschen und gemeinsam Aufgaben übernehmen.
Im fortgeschrittenen Teil erhalten Sie einen leicht verständlichen Einstieg in Merkmalsbildung, Datenvorverarbeitung, hybride Entscheidungsmodelle und TinyML-nahe Anwendungen. Dabei verbinden Sie klassische Regelungstechnik mit modernen datenbasierten Methoden.
Alle Projekte werden von ausführlich kommentierten Programmen in C und MicroPython begleitet. Das Buch richtet sich an Einsteiger, Maker, Studierende und alle, die Embedded-Systeme von Grund auf verstehen möchten.
Am Ende können Sie eigene Systeme entwickeln, die nicht nur messen, sondern Informationen auswerten, zuverlässige Entscheidungen treffen und gezielt reagieren.
ModbusRTU and ModbusTCP examples with the Arduino Uno and ESP8266
Introduction to PLC programming with OpenPLC, the first fully open source Programmable Logic Controller on the Raspberry Pi, and Modbus examples with Arduino Uno and ESP8266
PLC programming is very common in industry and home automation. This book describes how the Raspberry Pi 4 can be used as a Programmable Logic Controller. Before taking you into the programming, the author starts with the software installation on the Raspberry Pi and the PLC editor on the PC, followed by a description of the hardware.
You'll then find interesting examples in the different programming languages complying with the IEC 61131-3 standard. This manual also explains in detail how to use the PLC editor and how to load and execute the programs on the Raspberry Pi. All IEC languages are explained with examples, starting with LD (Ladder Diagram) over ST (Structured Control Language) to SFC (Special Function Chart). All examples can be downloaded from the author's website.
Networking gets thorough attention too. The Arduino Uno and the ESP8266 are programmed as ModbusRTU or ModbusTCP modules to get access to external peripherals, reading sensors and switching electrical loads. I/O circuits complying with the 24 V industry standard may also be of interest for the reader.
The book ends with an overview of commands for ST and LD. After reading the book, the reader will be able to create his own controllers with the Raspberry Pi.
This book details the use of the Arduino Uno and the Raspberry Pi 4 in practical CAN bus based projects. Using either the Arduino Uno or the Raspberry Pi with off-the-shelf CAN bus interface modules considerably ease developing, debugging, and testing CAN bus based projects.
This book is written for students, practicing engineers, enthusiasts, and for everyone else wanting 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 and Python programming languages and programming the Arduino Uno using its IDE and Raspberry Pi will be useful, especially if the reader intends to develop microcontroller-based projects using the CAN bus.
The book should be a useful source of reference material for anyone interested in finding answers to questions such as:
What bus systems are available for the automotive industry?
What are the principles of the CAN bus?
How can I create a physical 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 dependable is a CAN bus system?
What types of CAN bus controllers exist?
How do I use the MCP2515 CAN bus controller?
How do I create 2-node Arduino Uno-based CAN bus projects?
How do I create 3-node Arduino Uno-based CAN bus projects?
How do I set the acceptance masks and acceptance filters?
How do I analyze data on the CAN bus?
How do I create 2-node Raspberry Pi-based CAN bus projects?
How do I create 3-node Raspberry Pi-based CAN bus projects?
2 Channels • 350 MHz • 1 GSa/s • 50,000 wfm/s • 7 inch Touchscreen
The FNIRSI DPOS350P is a sleek 4-in-1 powerhouse in tablet form! This compact and portable device packs serious functionality: it combines a 2-channel oscilloscope (350 MHz), a signal generator (50 MHz), a frequency response analyzer (50 MHz), and a spectrum analyzer (200 kHz–350 MHz) – all in one unit.
Whether you're in R&D, troubleshooting, or field testing, the DPOS350P delivers the tools you need to measure, generate, analyze, and visualize electronic signals with precision and clarity. Its responsive high-resolution touchscreen and intuitive controls make signal analysis fast, flexible and efficient.
Features
Powerful Multi-Function Integration
350 MHz 2-channel oscilloscope with 1 GSa/s real-time sampling
50 MHz signal generator with 14 standard + custom waveforms
Spectrum analyzer (200 kHz–350 MHz): Perfect for EMI, RF & HF testing
Frequency response analyzer (FRA) up to 50 MHz
High-Performance Waveform Capture
50,000 wfm/s refresh rate for real-time signal clarity
350 MHz bandwidth (single-channel mode)
Detects rare and low-probability anomalies
Crisp Display & Smooth Operation
7" IPS touchscreen (1024 x 600 resolution)
Switch between grayscale and color temperature display
Easy to operate in various test environments
Reliable, Protected & Fast-Charging
High-voltage protection up to 400 V
Fast charging with QC 18 W (full charge in 2 hours)
Built for stable long-term operation
Data Storage & Export
Save up to 500 waveform records + 90 screenshots
USB export for easy reporting and offline analysis
Specifications
General
Display
7 inch (IPS full viewing angle)
Resolution
1024 x 600 pixels
Interaction mode
Capacitive touch screen
Total power consumption
10 W
Power-on configuration
5 presets
Charging
QC 18 W, 12 V/1.5 A (USB-C)
Battery
3.7 V, 8000 mAh lithium battery
Battery life
approx. 3 hours in operation, 5 hours standby
Heat dissipation
Air cooling
Expansion interface
USB data port
Automatic shutdown
15~60 minutes / off
Firmware upgrade
Support .iso image upgrade
Languages
English / Portuguese / Russian / Chinese
Dimensions
190 x 128 x 37 mm
Oscilloscope
Analog channels
2
Analog bandwidth
350 MHz
Rise time
1ns
Real-time sampling rate
1 GSa/s
Memory depth
60 Kpts
Input impedance
1 MΩ / 14PF
Time base range
5ns ~ 50s
Roll time base
50ms ~ 50s
Vertical sensitivity
2 mV ~ 20 V (1X)
Vertical range
16 mV ~ 160 V (1X)
DC accuracy
±2%
Time accuracy
±0.01%
Input coupling
DC / AC
Probe attenuation
1X / 10X / 100X
Hardware bandwidth limit
150M / 20M
High resolution mode
8bit ~ 16bit
Parameter measurements
12 types
Cursor measurement
Time, period, frequency, level, voltage
Trigger detection
Digital trigger
Trigger channel
CH1 / CH2
Trigger mode
Auto / Single / Normal
Trigger edge
Rising edge / Falling edge
Trigger suppression
L1 ~ L3
Trigger level
Manual / automatic 10% ~ 90%
Screenshot storage
90 pictures
Waveform storage
500 groups
Background grid
Display / hide
Waveform movement
Coarse adjustment / fine adjustment
Overvoltage protection
Withstand voltage 400 V
Waveform brightness
Adjustable
Simple FFT display
Yes
Digital fluorescence
Yes
Color temperature display
Yes
X-Y mode
Yes
ZOOM time base
Yes
One-key automatic adjustment
Yes
One-key return to zero
Yes
Data browser
Yes
Signal Generator
Waveform types
14 standard functions + captured waveform
Frequency
0~50 MHz (sine wave only, other waveforms up to 10M/5M/3M)
Amplitude
0~5 VPP
Offset
-2.5 V ~ +2.5V
Duty cycle
0.1~99.9%
Frequency resolution
1 Hz
Amplitude resolution
1 mV
Offset resolution
1 mV
Duty cycle resolution
0.1%
Customizable captured waveform
500 groups
Frequency Response Analyzer (FRA)
Excitation signal frequency
100 Hz ~ 50 MHz
Excitation signal amplitude
0~5 VPP
Excitation signal offset
-2.5V ~ +2.5V
Excitation frequency count
20~500
Cursor measurement
Frequency / gain / phase
Operating mode
Single / cyclic
System calibration
Yes
Spectrum Analyzer
Conversion method
FFT
FFT length
4K ~ 32K
Frequency range
200 KHz ~ 350 MHz
Level range
-60 dBmV ~ +260 dBmV
Cursor measurement
Frequency / amplitude
Marking parameter
Maximum energy harmonic
Waterfall chart
Yes
3D waterfall chart
Yes
Automatic adjustment
Yes
System calibration
Yes
Included
1x FNIRSI DPOS350P Oscilloscope (4-in-1)
2x 350 MHz Probes
1x QC 18 W Fast Charger (EU)
1x USB-C Cable
1x Alligator Clip
1x Storage Bag
1x Manual
Downloads
Manual
Firmware
Raspberry Pi-based Eye Catcher
A standard sand clock just shows how time passes. In contrast, this Raspberry Pi Pico-controlled sand clock shows the exact time by “engraving” the four digits for hour and minute into the layer of sand. After an adjustable time the sand is flattened out by two vibration motors and everything begins all over again.
At the heart of the sand clock are two servo motors driving a writing pen through a pantograph mechanism. A third servo motor lifts the pen up and down. The sand container is equipped with two vibration motors to flatten the sand. The electronic part of the sand clock consists of a Raspberry Pi Pico and an RTC/driver board with a real-time clock, plus driver circuits for the servo motors.
A detailed construction manual is available for downloading.
Features
Dimensions: 135 x 110 x 80 mm
Build time: approx. 1.5 to 2 hours
Included
3x Precut acrylic sheets with all mechanical parts
3x Mini servo motors
2x Vibration motors
1x Raspberry Pi Pico
1x RTC/driver board with assembled parts
Nuts, bolts, spacers, and wires for the assembly
Fine-grained white sand