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.
Elektor GREEN and GOLD members can download their digital edition here.
Not a member yet? Click here.
CaptureCountAn Object Detector and Counter on the Raspberry Pi 5
Voltage Reference With Arduino Pro MiniLinearize and Calibrate Your Analog Inputs
FPGAs for BeginnersThe Path From MCU to FPGA Programming
Update: STM32 Wireless Innovation Design Contest 2024
Bluetooth LE With MAUIControl Apps for Android & Co.
Port-Expanding Breakout BoardIncrease the Number of I/Os on Your Dev Board
AI SpecialistMachine Learning with the Jetson Nano
2024: An AI OdysseyFirst Forays Into TensorFlow
262,144 Ways to Play The Game of LifeA Reader’s Project in Brief
From Life’s ExperienceThe Chinese Dragon
Get Your (Brushed DC) Motor Running!Sample Projects from the Elektor Motor Control Development Bundle
ESP32-RS-232 AdapterA Wireless Link for Classic Test Equipment
Starting Out in Electronics……More About Opamps
ESP Library Recommendations
Piezoelectric DevicesPeculiar Parts, the Series
A Smart Object CounterImage Recognition Made Easy with Edge Impulse
Resolve Your Trickiest Embedded Development Challenges
ESP32 TerminalA Handheld Device with a Touch-Capable Display
Getting Started With the Zephyr RTOSAs Powerful as It Is Hard to Master
Award-Winning EthicsA Dialog with CTO Alexander Gerfer of Würth Elektronik eiSos on Enabling Innovation and Mindful Behavior
Err-lectronicsCorrections, Updates, and Readers’ Letters
Infographics: Embedded and AI
Square Wave Generation BenchmarksExploring ESP32, Pico, and Other Microcontrollers
Le téléchargement intégral de ce numéro est disponible pour nos membres GOLD et GREEN sur le site Elektor Magazine !
Pas encore membre ? Cliquez ici.
l'ESP-BLASTUn mini drone-fusée ESP32 qui vole à plus de 100 km/h
atelier sans fil (1)Modules radio déverrouillés : émetteur-récepteur sub-GHz CC1101 433 MHz
émetteur AMAvec le générateur d'ondes carrées/sinusoïdales sur Raspberry Pi Pico
STM32Cube Innovation ChallengeParticipez avec votre meilleur projet STM32C5
CoffeeCallerComment une pause café a inspiré un PCB sur mesure
audiotroniquesDistorsion harmonique totale
Elektor à 65 ansProjets de septembre et octobre au fil des ans
Bluetooth Channel Sounding pour le suivi des équipementsMesure de distance avec une précision centimétrique pour l’IoT de nouvelle génération
2026 : une Odyssée de l'IAL'informatique quantique n'est pas le prochain GPU
protéger le cloud exige de sécuriser la périphérie
premières expériences avec le HackRF ProTests pratiques avec le nouveau matériel SDR
mise à niveau du modem de GPRS/2G vers LTE/4GExemple d'un panneau de contrôle d'alarme sans fil
antenne en bouclePartie 1 : Une antenne ondes courtes à directivité réglable, à réaliser soi-même
convertisseur de radio Internet en AMUn ESP32-S3 comme émetteur
projet 2.0
mioty : aperçu généralL'approche de Fraunhofer pour les LPWAN
sagesse d'atelierConseils pratiques d'experts
Walter, le module IoT compactPartie 2 : Accéder aux services météorologiques et aux services de données
in 10 captivating lessons
Using the lessons in this book you learn how to program a microcontroller. You’ll be using JAL, a free but extremely powerful programming language for PIC microcontrollers, which enjoys great popularity in the hobby world. Starting out from scratch virtually, you slowly build up the knowledge. No previous knowledge is needed: anyone can get started with this book. Assuming you have absorbed all lessons – meaning you have actually completed all the exercises – you should be confident to write PIC microcontroller programs, as well as read and understand programs written by other people.
JAL commands
You learn the function of JAL commands such as include, pin, delay, forever loop, while loop, case, exit loop, repeat until, if then, as well as the use of functions, procedures and timer- and port interrupts.
JAL programs
You make an LED blink, build a time switch, measure a potentiometer’s wiper position, produce sounds, suppress contact bounce, and control the brightness of an LED. And of course you learn to debug, meaning: how to spot and fix errors in your programs.
Hardware
You learn to recognize various components including the PIC microcontroller, potentiometer and quartz crystal, and how to wire up a PIC microcontroller and effectively link it to your PC. A breadboard is used for the purpose, allowing you to easily modify the component arrangement for further experimenting.
The companion software with this book can be downloaded free of charge, including the JAL programming language. In addition, you may order a kit of parts so you don’t have to go shopping for the required components. Especially for a beginner, this is the easiest way to start with this unique pastime.
Having finished this book does not mean you are through with your pastime. You can get your hands dirty again, and if desired use other books packed with fun projects using the JAL programming language. More information may be found at the end of the lessons in the chapter "Done! What’s next?""
Learn to Build Intelligent Embedded Systems
Build smarter embedded systems with Arduino UNO Q. This book gives you the tools, knowledge, and confidence to turn ideas into intelligent, working solutions using the Arduino UNO Q platform. Discover how to build intelligent embedded systems with the Arduino UNO Q and AI.
Unlock the full potential of the Arduino UNO Q, a next-generation platform that combines the real-time power of the STM32U585 microcontroller with the flexibility of a Qualcomm Dragonwing QRB2210 microprocessor.
Learn how to rapidly prototype real-world applications using the Arduino IDE for low-level embedded control and Python in Arduino App Lab for high-level development.
Build confidence through hands-on projects that guide you step by step from basic board features to complete working systems.
Explore ready-to-use, AI based Arduino App Lab examples and see how they can jump-start your development and reduce time to deployment.
Step into the world of Edge AI with a clear, practical introduction to Edge Impulse Studio—no prior AI experience required.
Follow a complete, real-world workflow to create a Keyword Spotting AI application, covering data collection, model training, optimization, and on-device inference using the Edge Impulse Studio.
Bridge the gap between embedded systems and machine learning and learn how to bring intelligence directly onto your hardware.
Perfect for embedded engineers, educators, students, and makers looking to stay ahead in AI-enabled product development.
De Elektor Audio DSP FX Processor combineert een ESP32-microcontroller en een ADAU1701 Audio DSP van Analog Devices. Naast een door de gebruiker programmeerbare DSP-kern heeft de ADAU1701 hoogwaardige analoog-naar-digitaal en digitaal-naar-analoog converters ingebouwd en is hij voorzien van een I²S-poort. Dit maakt hem geschikt als hoogwaardige audio-interface voor de ESP32.
Programma's voor de ESP32 kunnen worden gemaakt met Arduino, Platform IO, CMake of door de Espressif IDF op een andere manier te gebruiken. Programma's voor de ADAU7101 audio DSP's worden gemaakt met de gratis visuele programmeertool SigmaStudio door voorgedefinieerde algoritmablokken op een canvas te slepen.
Toepassingen
Bluetooth/Wi-Fi audio sink (bijv. luidspreker) & bron
Gitaareffectpedaal (stompbox)
Muzieksynthesizer
Geluids-/functiegenerator
Programmeerbaar cross-overfilter voor luidsprekers
Geavanceerde audio-effectprocessor (reverb, chorus, pitch shifting, enz.)
Audioapparaat met internetverbinding
DSP-experimentplatform
Draadloze MIDI
MIDI naar CV-converter
en nog veel meer...
Specificaties
ADAU1701 28-/56-bit, 50-MIPS digitale audioprocessor die bemonsteringsfrequenties tot 192 kHz ondersteunt
ESP32 32-bit dual-core microcontroller met Wi-Fi 802.11b/g/n en Bluetooth 4.2 BR/EDR en BLE
2x 24-bit audio-ingangen (2 V RMS, 20 kΩ)
4x 24-bit audio-uitgangen (0,9 V RMS, 600 Ω)
4x Regelpotentiometer
MIDI in- en uitgang
I²C-uitbreidingspoort
Multi-mode werking
Voeding: 5 V DC USB of 7,5-12 V DC (cilinderaansluiting, middelste pin is GND)
Stroomverbruik (gemiddeld): 200 mA
Inbegrepen
1x ESP32 Audio DSP FX Processor board (gemonteerd)
1x ESP32-PICO-KIT
2x Truien
2x 18-pins headers (female)
4x 10 KB potentiometers
Downloads
Documentation
GitHub
Die Programmiersprache „Python“ hat in den letzten Jahren einen enormen Aufschwung erlebt. Nicht zuletzt haben verschiedene Einplatinensysteme wie der Raspberry Pi zu deren Bekanntheitsgrad beigetragen. Aber auch in anderen Gebieten, wie der Künstlichen Intelligenz oder dem Machine Learning, hat Python weite Verbreitung gefunden. Es ist daher naheliegend, Python bzw. die Variante „MicroPython“ auch für den Einsatz in SoCs (Systems on Chip) zu verwenden.
Leistungsfähige Controller wie der ESP32 der Firma Espressif Systems bieten eine hervorragende Performance sowie Wi-Fi- und Bluetooth-Funktionalität zu einem günstigen Preis. Mit diesen Eigenschaften wurde die Maker-Szene im Sturm erobert. Im Vergleich zu anderen Controllern weist der ESP32 einen deutlich größeren Flash und SRAM-Speicher, sowie eine wesentlich höhere CPU-Geschwindigkeit auf. Aufgrund dieser Leistungsmerkmale eignet sich der Chip nicht nur für klassische C-Anwendungen, sondern insbesondere auch für die Programmierung mit MicroPython.
Das vorliegende Buch führt in die Anwendung der modernen Ein-Chip-Systeme ein. Neben den technischen Hintergründen steht vor allem MicroPython selbst im Vordergrund. Nach der Einführung in die Sprache werden die erlernten Programmierkenntnisse umgehend in die Praxis umgesetzt. Die einzelnen Projekte sind sowohl für den Einsatz im Labor als auch für Alltagsanwendungen geeignet. Neben dem eigentlichen Lerneffekt steht also auch die Freude am Aufbau kompletter und nützlicher Geräte im Vordergrund. Durch die Verwendung von Laborsteckboards können Schaltungen aller Art mit geringem Aufwand realisiert werden, sodass das Austesten der selbstgebauten Geräte zum lehrreichen Vergnügen wird.
Durch die verschiedenen Anwendungen wie Wetterstationen, Digitalvoltmeter, Ultraschall-Entfernungsmesser, RFID-Kartenleser oder Funktionsgeneratoren sind die vorgestellten Projekte auch für Praktika oder Fach- und Studienarbeiten in den Naturwissenschaften bzw. im Natur- und Technikunterricht bestens geeignet.
Open-Source-Code mit Arduino IDE und PlatformIO
Autonomes Fahren: GPS, Accelerometer, Gyroskop
PS3-Controller
Mikrocontroller wie der Arduino und Einplatinenrechner wie der Raspberry Pi haben sich zu beliebten Komponenten entwickelt. Dritter im Bunde ist der ESP32 der Firma Espressif. Mikrocontroller dieser Baureihe zeichnen sich durch eine Vielzahl implementierter Funktionen aus, die bei einem Arduino konventioneller Prägung mit einem Atmel-AVR-Mikrocontroller erst mit weiterer Hardware möglich sind. Prominentes Beispiel sind hier die WiFi- und Bluetooth-Funktionalitäten. Gegenüber einem Raspberry Pi zeichnen sie sich durch einen deutlich geringeren Preis aus.
Allgemeine Informationen für die Realisierung eines Roboterauto-Projekts mit dem ESP32 sind leicht zu finden. Dabei handelt es sich aber oft nur um Ausführungen zu einem Teilaspekt, ohne inhaltliche oder funktionale Abstimmung. So ist nicht nur die Beschaffung der benötigten Informationen mühselig und zeitaufwändig, sie kann auch außerordentlich fehlerträchtig sein.
Ansatzpunkt dieses Buches ist, diese Lücke zu schließen. Es geht auf verschiedene Möglichkeiten eines Chassis ein, vermittelt nötige Kenntnisse und führt schrittweise von einer einfachen Motorsteuerung zu einem komplexen sensor- und sprachgesteuerten Roboterauto. Hacks rund um GPS und eine PlayStation 3 runden die Sache ab.
Inhalt
Bei der Reihenfolge der Kapitel wurde versucht – beginnend bei der Darstellung von grundlegenden Informationen – über die Lösung einfacher Aufgaben zu etwas anspruchsvolleren Techniken zu führen.
Der Mikrocontroller ESP32
Die Software erstellen
Die Stromversorgung
Rund um die Hardware
Das Chassis
Der Gleichstrommotor
Kabellose Steuerung über WiFi
Mit Sensoren Hindernisse erkennen
Eine eigene Roboterauto-App
Servo und Lichtsensor
GPS
Accelerometer / Gyroskop
PS3-Controller
Roboterauto-App
Hinweis zur Software
Die Dateien haben das Suffix (.cpp). Grund ist die Entwicklung mit PlatformIO. Mit Copy & Paste sollten sie auch in der Arduino-IDE verwendet werden können.
AVR Architecture and Programming An in-depth look at the 8-bit AVR architecture found in ATtiny and ATmega microcontrollers, mainly from a software and programming point of view. Explore the AVR architecture using C and assembly language in Microchip Studio (formerly Atmel Studio) with ATtiny microcontrollers. Learn the details of how AVR microcontrollers work internally, including the internal registers and memory map of ATtiny devices. Program ATtiny microcontrollers using an Atmel-ICE programmer/debugger, or use a cheap hobby programmer, or even an Arduino Uno as a programmer. Most code examples can be run using the Microchip Studio AVR simulator. Learn to write programs for ATtiny microcontrollers in assembly language. See how assembly language is converted to machine code instructions by the assembler program. Find out how programs written in the C programming language end up as assembly language and finally as machine code instructions. Use the Microchip Studio debugger in combination with a hardware USB programmer/debugger to test assembly and C language programs, or use the Microchip Studio AVR simulator. DIP packaged ATtiny microcontrollers are used in this volume for easy use on electronic breadboards, targeting mainly the ATtiny13(A) and ATtiny25/45/85. Learn about instruction timing and clocks in AVR microcontrollers using ATtiny devices. Be on your way to becoming an AVR expert with advanced debugging and programming skills.
Diese Ausgabe steht allen GOLD- und GREEN-Mitgliedern auf der ElektorMagazine-Website zum Download bereit!
Sie sind noch kein Mitglied? Hier klicken!
DIY-SolarakkusÜber den Selbstbau von Energiespeichern für Solaranlagen
Solarmodul-SimulatorFür Test und Optimierung von MPP-Trackern und Invertern
Der STM32-Edge-KI-WettbewerbEntdecken Sie den neuen STM32N6 und nehmen Sie am Wettbewerb um 5.000 € teil!
Erweiterung der BandlückeWarum gibt es so viel Interesse an SiC und GaN?
Power-Bank für NotebooksVerlängern Sie das Leben Ihres alten Laptops!
Medizinische RoboterÜberwindung technischer und regulatorischer Hürden
Frostwächter für ObstpflanzenMit Temperatur-Datenlogger
Das analoge DingDer Arduino des Analog-Computings?
Sparsames NetzrelaisMit über 90% Leistungsreduzierung
Verbesserung der DC-Last ET5410A+Keep cool and be quiet!
electronica 2024 im Rückblick
Elektromagnetische VerträglichkeitEMV kurz und bündig!
Aller Anfang......muss nicht schwer sein: Aktive Filter
Verlustleistung reduzieren mit AbleitkondensatorenEin cleverer Einsatz von kapazitiver Reaktanz
Preiswerter 12-Bit-Digital-Analog-Wandler MCP4725Mit EEPROM-Feature für sicheres Einschaltverhalten
Fnirsi LCR-ST1, die intelligente LCR-SMD-Pinzette
Test- und Messlabor mit Raspberry PiDas Wichtigste zuerst: Der ADC
Elektronischer LastwiderstandEin Projekt aus der Kiste
2025: Eine Odyssee in die KIEinige Projekte für das neue Jahr
Projekt-Update: Modulares DC-Leistungsmessgerät AmpVolt v2.0100 Ampere und mehr!
Projekt 2.0
Ethische Transparenz sichtbar gemachtErgebnisse der Umfrage 2024 von Ethics in Electronics
Elektor Audio-DSP FX-Prozessor-BoardTeil 2: Anwendungen erstellen
Easy and Affordable Digital Signal ProcessingThe aim of this book is to teach the basic principles of Digital Signal Processing (DSP) and to introduce it from a practical point of view using the bare minimum of mathematics. Only the basic level of discrete-time systems theory is given, sufficient to implement DSP applications in real time. The practical implementations are described in real time using the highly popular ESP32 DevKitC microcontroller development board. With the low cost and extremely popular ESP32 microcontroller, you should be able to design elementary DSP projects with sampling frequencies within the audio range. All programming is done using the popular Arduino IDE in conjunction with the C language compiler.After laying a solid foundation of DSP theory and pertinent discussions on the main DSP software tools on the market, the book presents the following audio-based sound and DSP projects:
Using an I²S-based digital microphone to capture audio sound
Using an I²S-based class-D audio amplifier and speaker
Playing MP3 music stored on an SD card through an I²S-based amplifier and speaker
Playing MP3 music files stored in ESP32 flash memory through an I²S-based amplifier and speaker
Mono and stereo Internet radio with I²S-based amplifiers and speakers
Text-to-speech output with an I²S-based amplifier and speaker
Using the volume control in I²S-based amplifier and speaker systems
A speaking event counter with an I²S-based amplifier and speaker
An adjustable sinewave generator with I²S-based amplifier and speaker
Using the Pmod I²S2 24-bit fast ADC/DAC module
Digital low-pass and band-pass real-time FIR filter design with external and internal A/D and D/A conversion
Digital low-pass and band-pass real-time IIR filter design with external and internal A/D and D/A conversion
Fast Fourier Transforms (FFT)
Elektor GREEN and GOLD members can download their digital edition here.
Not a member yet? Click here.
STM32 Wireless Innovation Design Contest Winners
In-Circuit LC MeterA Prototype Study
The AmpVolt Modular DC Power Meter (Part 1)Measure DC Power and Energy Consumption Up to 50 V and 5 A
embedded world 2024
Repairing Electronic EquipmentTools, Techniques and Tips
Starting Out in Electronics…...Continues the Opamp Theory
A Simple DDS Signal GeneratorDirect Digital Synthesis in Its Purest Form
Sparkplug at a GlanceA Specification for MQTT Data
The CRTCPeculiar Parts, the Series
Radar-Controlled LightingAutomatic Stairway Light With Human Presence Detection
Digital Bubble Level and Active Stroboscopic Disc for TurntablesFine-Tune Your Record Player With This All-In-One Tool
Open Source and Its Significance for the Electronics Industry (2)
M12 Circular Connector With A-codingFirst Choice for Industrial Applications
The Arduino-Inside Measurement LabAn 8-in-1 Test & Measurement Instrument for the Electronics Workbench
Sound Card Performs Gain/Phase and Impedance AnalysisFor Frequencies From 100 Hz to 90 kHz
Measuring pH Value With the Arduino UNO R4Check the Quality of Your Water
From Life’s ExperiencePangpong Butt Launcher
FNIRSI 1014D Digital Storage OscilloscopeGood Performance for Tight Budgets
2024: An AI OdysseyGetting Object Detection Up and Running
10 MHz Reference GeneratorHighly Accurate, With Distributor and Galvanic Isolation
Project Update #2: ESP32-Based Energy MeterSome Enhancements
Err-lectronicsCorrections, Updates, and Readers’ Letters
An Interview with Eben Upton, CEO of Raspberry PiRaspberry Pi 5 and Beyond