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.
Multilingual DIY Kit (incl. 27 RGB LEDs + Raspberry Pi Pico)
Bring some engineering magic to your festive season with the Wordy LED Christmas Tree, a unique DIY electronics kit designed by Elektor. This beautifully engineered 3D Christmas tree combines eleven PCBs, a Raspberry Pi Pico, and 27 addressable RGB LEDs to illuminate Christmas greetings in seven languages: Danish, Dutch, English, French, German, Italian, and Spanish.
Unlike ordinary LED trees, each word inside the tree has its own light chamber, creating a refined, softly glowing display without sound or flicker. The LEDs are fully WS2812-compatible and driven via the popular Adafruit NeoPixel library, making custom animations and color effects easy to create.
Perfect for makers, tinkerers, and festive electronics fans, this kit offers both an enjoyable build and a striking, conversation-worthy decoration. The Wordy Christmas Tree is your perfect holiday maker project!
Features
Multilingual greetings (7 languages) milled into the front panel
3D construction from 11 interlocking PCBs
Powered by Raspberry Pi Pico
27 individually addressable RGB LEDs (pre-mounted)
Smooth fade-in and fade-out animations
Fully programmable using the Arduino IDE
A 5-V power supply (with micro-USB connector) capable of ≥1 A is recommended for maximum brightness (not included)
Dimensions (H x W x D): 130 x 115 x 75 mm
Included
All required PCBs with LEDs and other SMD parts mounted
Raspberry Pi Pico (to be soldered & programmed by the user)
3-way pin header (to be soldered by the user)
3-way pin socket (to be soldered by the user)
4x Self-adhesive dome bumpers
Project Page
Elektor Labs
Diese Ausgabe steht allen GOLD- und GREEN-Mitgliedern auf der ElektorMagazine-Website zum Download bereit!
Sie sind noch kein Mitglied? Hier klicken!
Projekt-Update: Energiemessgerät mit ESP32Nächste Schritte beim Prototyping
Balkonkraftwerke optimierenÜberlegungen, Wissenswertes und Kalkulationen
Für Balkonkraftwerke: ESP32 mit OpenDTUDaten kleiner Wechselrichter per µC auslesen
Variables lineares Stromversorgungs-Ensemble0...50 V / 0...2 A + Doppelsymmetrische Versorgung
Energiespeicherung heute und morgenEin Interview mit Simon Engelke
2024: Eine Odyssee in die KIWeiter, immer weiter...
Bluetooth LE auf dem STM32Auf dem Weg zum fernabgelesenen Messgerät
Intelligentes KücheninventarsystemMehr als eine Küchenwaage
MAUI: Programmieren für PC, Tablet und SmartphoneDas neue Framework in Theorie und Praxis
ChatMagLevDer KI-Weg der Levitation
Einfacher PV-Energieregler für InselanlagenBauen Sie ein voll funktionsfähiges PV-Energiemanagement-System
KaltkathodenröhrenBemerkenswerte Bauteile
Aus dem Leben gegriffenNostalgie
Aller Anfang ...... muss nicht schwer sein: Vom FET zum Opamp
CAN-Bus-Tutorial für den Arduino UNO R4Zwei UNO R4 nehmen den Bus!
Infografik: Strom und Energie
Umfangreiche Unterstützung bei Design und EntwicklungArrow Engineering Services
Leistungsdichte vs. Wirkungsgrad
Aluminium-ElektrolytkondensatorenStörpotential in der Audiotechnik?
USB-Tester FNB58 von Fnirsi
Pixel Pump Das Pick-and-Place ToolVereinfachung der manuellen SMD-Bestückung
HomeLab-ToursVor nicht allzu langer Zeit in einem weit entfernten Land...
„In der Welt der Ethik in der Elektronik können auch kleine Schritte eine große Wirkung haben.“
Ethik in der ElektronikDie OECD-Leitsätze und das deutsche Lieferkettengesetz
Intelligentes Ni-MH-Ladegerät/EntladegerätDas Leserprojekt „Chadèche“ in Kürze
Projekt 2.0Korrekturen, Updates und Leserbriefe
AI in Practice
Dive into the fascinating world of robotics and automation!
This Elektor Special shows you how to build your own robots with creativity, a little know-how, and affordable technology. From your first DIY project with Arduino or Raspberry Pi to intelligent systems with AI – this issue makes modern robotics understandable and accessible.
Discover practical instructions, inspiring projects, and exciting insights into the maker scene. Learn how experimentation, community, and openness give rise to true innovation – and why robotics is so much more than just a technical hobby.
Contents
Imagination turns into reality
Arduino-controlled Drawing Robot
GalaxyRVR Mars Rover Kit for Arduino
YDLIDAR X4Pro Lidar
xHuskyLens AI Camera
DOF Robot Arm with Raspberry Pi Pico
Manufacturing Robots with Fischertechnik
Pneumatic Industrial Robot
Why Do We Keep Building Robot Dogs?
Elektor Mini-Wheelie
Robot Vehicles and Autonomous Driving
The uArm Swift Pro is a high quality robotic arm that can be used in a wide range of applications. The uArm Swift Pro was developed and optimized for use in education, which means that many packages are already available for open source platforms such as ROS. The uArm Swift Pro has a position repeatability of 0.2 mm and is also equipped with a stepper motor and a 12-bit encoder. These are just a few reasons that make the uArm Swift Pro an excellent choice for educational use. Another great feature is the 3D printing kit that converts the uArm Swift Pro into a 3D printer in less than 1 minute.
The uArm supports the following development platforms/systems:
UFACTORY SDK
Arduino
Python
ROS
GRABCAD
OpenMV
Smartphone App
The smartphone app for iOS is already available in the App Store and enables easy control and monitoring of the robotic arm. The app for Android is in development and will be available soon.
An example of the Machine Vision
The following GIF shows the uArm in combination with the OpenMV Machine Vision Cam M7 and the facial recognition applications that can be implemented in MicroPython.
Specifications
Degrees of Freedom: 4
Repeatability: Up to 0.2 mm
Payload: 500 g
Working Range: 50-320 mm
Positioning Speed: 100 m/s
Position Feedback: 12-bit Encoder
Dimensions: 150 x 140 x 281mm
Weight: 2.2 kg
Included
UFactory uArm Swift Pro Body
Bluetooth & Vacuum Gripper
Downloads
Datasheet
Projekte mit Arduino Uno und Raspberry Pi
In diesem Buch werden Anwendungen von Arduino Uno und Raspberry Pi 4 in praxisnahen Projekten auf Basis von CAN-Bus detailliert beschrieben. Durch den Einsatz von entweder Arduino Uno oder Raspberry Pi in Verbindung mit handelsüblichen CAN-Bus-Schnittstellenmodulen werden die Entwicklung, Fehlersuche und Fehlerbeseitigung sowie die Überprüfung von Projekten auf CAN-Bus-Basis erheblich erleichtert.
Dieses Buch richtet sich an jeden, der mehr über den CAN-Bus lernen möchte und mit den Grundlagen der Elektronik vertraut ist. Hilfreich ist auch Erfahrung mit den Programmiersprachen C und Python sowie mit der Programmierung von Arduino Uno unter Verwendung seiner IDE und von Raspberry Pi zu haben.
Das Buch ist eine nützliche Informationsquelle und ein Nachschlagewerk für jeden, der Antworten auf eine oder mehrere der folgenden Fragen sucht:
Welche Bussysteme stehen für die Automobilindustrie zur Verfügung?
Was sind die Grundprinzipien des CAN-Bus?
Welche Arten von Frames (oder Datenpaketen) stehen in einem CAN-Bussystem zur Verfügung?
Wie können Fehler in einem CAN-Bussystem erkannt werden, und wie zuverlässig ist ein CAN-Bussystem?
Welche Arten von CAN-Bus-Controllern gibt es?
Welches sind die Funktionsprinzipien des MCP2515 CAN-Bus-Controllers?
Wie kann ich ein CAN-Bus-Projekt mit Arduino Uno realisieren?
Wie kann ich Arduino oder Raspberry Pi CAN-Bus-Projekte mit 2 und 3 Knoten erstellen?
Wie kann ich die Daten auf dem CAN-Bus analysieren?
Wie kann ich ein CAN-Bus-Projekt mit Raspberry Pi ausführen?
Clever Tricks with ATmega328 Pro Mini Boards
With a simple Pro Mini board and a few other components, projects that 20 or 30 years ago were unthinkable (or would have cost a small fortune) are realized easily and affordably in this book: From simple LED effects to a full battery charging and testing station that will put a rechargeable through its paces, there’s something for everyone.
All the projects are based on the ATmega328 microcontroller, which offers endless measuring, switching, and control options with its 20 input and output lines. For example, with a 7-segment display and a few resistors, you can build a voltmeter or an NTC-based thermometer. The Arduino platform offers the perfect development environment for programming this range of boards.
Besides these very practical projects, the book also provides the necessary knowledge for you to create projects based on your own ideas. How to measure, and what? Which transistor is suitable for switching a certain load? When is it better to use an IC? How do you switch mains voltage? Even LilyPad-based battery-operated projects are discussed in detail, as well as many different motors, from simple DC motors to stepper motors.
Sensors are another exciting topic: For example, a simple infrared receiver that can give disused remote controls a new lease on life controlling your home, and a tiny component that can actually measure the difference in air pressure between floor and table height!
Arduino Uno est une plaque de développement de microcontrôleur, avec superposition de code source (matériel, EDI et bibliothèques). Arduino est l'une des plus grandes communautés de programmeurs, d'ingénieurs et d'électroniciens, de passionnés et d'étudiants universitaires. Merci pour vos bibliothèques, le programme devient adapté à votre jeune enfant et la rapidité. Les bibliothèques entièrement testées et fonctionnelles facilitent le test des programmes.
Le Raspberry Pi 4, une version récente du système nano-ordonné, est utilisé pour les appareils multimédias, ainsi que pour les applications industrielles, robotiques, domestiques et commerciales. Grâce à la connectivité Wi-Fi et Bluetooth, votre Raspberry Pi 4 est parfait pour la commande et la surveillance à distance via Internet.
Ce livre avec une œuvre de Raspberry Pi 4 et de l'Arduino Uno dans des applications de régulation avec l'algorithme PID. Après avoir examiné la théorie des systèmes de régulation et des systèmes intégrés, l'évaluation des fonctions du projet et les tests de pilotage des systèmes de régulation PID en temps réel. Le timing et la structure des paramètres PID et le timing et la structure des systèmes détaillés et détaillés (schémas fonctionnels, schémas de circuits, algorithmes de régulation PID, liste complète des cartes).
Ces projets s'appuient constamment sur la théorie et les applications des régulateurs PID. C'est un simple modificateur pour d'autres applications. Les projets pour le Raspberry Pi 4 sont adaptables selon les différents modèles de la famille Raspberry Pi.
Le livre couvre les sujets suivants :
Systèmes de régulation et systèmes ouverts et fermés
Capteurs analogiques et numériques
Fonctions de transfert et de système en continu
Enregistrements temporels des systèmes du 1er et du 2ème ordre
Systèmes discrets (nombres)
Les régulateurs PID sont des systèmes à température continue
Numéros PID des régulateurs
Régulation de température selon Raspberry Pi et Arduino Uno
Régulation de température PID à l'aide de Raspberry Pi et Arduino Uno
Pilotage continu de moteurs utilisant Raspberry Pi et Arduino Uno
Régulation PID pour surveiller le niveau du Raspberry Pi et de l'Arduino Uno
Régulation PID pour piloter une LED avec Raspberry Pi et Arduino Uno
Practical Multitasking Fundamentals
Programming embedded systems is difficult because of resource constraints and limited debugging facilities. Why develop your own Real-Time Operating System (RTOS) as well as your application when the proven FreeRTOS software is freely available? Why not start with a validated foundation?
Every software developer knows that you must divide a difficult problem into smaller ones to conquer it. Using separate preemptive tasks and FreeRTOS communication mechanisms, a clean separation of functions is achieved within the entire application. This results in safe and maintainable designs.
Practicing engineers and students alike can use this book and the ESP32 Arduino environment to wade into FreeRTOS concepts at a comfortable pace. The well-organized text enables you to master each concept before starting the next chapter. Practical breadboard experiments and schematics are included to bring the lessons home. Experience is the best teacher.
Each chapter includes exercises to test your knowledge. The coverage of the FreeRTOS Application Programming Interface (API) is complete for the ESP32 Arduino environment. You can apply what you learn to other FreeRTOS environments, including Espressif’s ESP-IDF. The source code is available from GitHub. All of these resources put you in the driver’s seat when it is time to develop your next uber-cool ESP32 project.
What you will learn:
How preemptive scheduling works within FreeRTOS
The Arduino startup “loopTask”
Message queues
FreeRTOS timers and the IDLE task
The semaphore, mutex, and their differences
The mailbox and its application
Real-time task priorities and its effect
Interrupt interaction and use with FreeRTOS
Queue sets
Notifying tasks with events
Event groups
Critical sections
Task local storage
The gatekeeper task
Programmierung in Assembler und C am Beispiel der ATtiny-Familie
Dieses Buch bietet einen eingehenden Blick auf die 8-Bit-AVR-Architektur in ATtiny- und ATmega-Mikrocontrollern, hauptsächlich aus der Sicht der Software und der Programmierung. Erforschen Sie die AVR-Architektur unter Verwendung von C und Assembler in Microchip Studio (früher Atmel Studio) mit ATtiny-Mikrocontrollern.
Lernen Sie die Details der internen Funktionsweise von AVR-Mikrocontrollern kennen, einschließlich der internen Register und des Speicherplans von ATtiny-Bausteinen.
Programmieren Sie ATtiny-Mikrocontroller mit einem Atmel-ICE-Programmiergerät/Debugger oder verwenden Sie ein preiswertes Hobby-Programmiergerät oder sogar einen Arduino Uno als Programmiergerät.
Die meisten Code-Beispiele können mit dem Microchip Studio AVR-Simulator ausgeführt werden.
Lernen Sie, Programme für ATtiny-Mikrocontroller in Assembler zu schreiben.
Erfahren Sie, wie Assemblersprache in Maschinencodebefehle umgewandelt wird.
Finden Sie heraus, wie Programme, die in der Programmiersprache C geschrieben wurden, in Assemblersprache und schließlich in Maschinencode umgewandelt werden.
Verwenden Sie den Microchip Studio Debugger in Kombination mit einem Hardware-USB-Programmierer/Debugger, um Assembler- und C-Programme zu testen oder verwenden Sie den Microchip Studio AVR-Simulator.
ATtiny-Mikrocontroller im DIP-Gehäuse werden verwendet, um eine einfache Nutzung auf Breadboards zu ermöglichen.
Erfahren Sie mehr über Timing und Taktimpuls in AVR-Mikrocontrollern mit ATtiny-Bausteinen.
Werden Sie zu einem AVR-Experten mit fortgeschrittenen Debugging- und Programmierfähigkeiten.
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.
The Elektor Super Servo Tester can control servos and measure servo signals. It can test up to four servo channels at the same time.
The Super Servo Tester comes as a kit. All the parts required to assemble the Super Servo Tester are included in the kit. Assembling the kit requires basic soldering skills. The microcontroller is already programmed.
The Super Servo Tester features two operating modes: Control/Manual and Measure/Inputs.
In Control/Manual mode the Super Servo Tester generates control signals on its outputs for up to four servos or for the flight controller or ESC. The signals are controlled by the four potentiometers.
In Measure/Inputs the Super Servo Tester measures the servo signals connected to its inputs. These signals may come from for instance an ESC, a flight controller, or the receiver or another device. The signals are also routed to the outputs to control the servos or the flight controller or ESC. The results are shown on the display.
Specifications
Operating modes
Control/Manual & Measure/Inputs
Channels
3
Servo signal inputs
4
Servo signal outputs
4
Alarm
Buzzer & LED
Display
0.96' OLED (128 x 32 pixels)
Input voltage on K5
7-12 VDC
Input voltage on K1
5-7.5 VDC
Input current
30 mA (9 VDC on K5, nothing connected to K1 and K2)
Dimensions
113 x 66 x 25 mm
Weight
60 g
Included
Resistors (0.25 W)
R1, R3
1 kΩ, 5%
R2, R4, R5, R6, R7, R9, R10
10 kΩ, 5%
R8
22 Ω, 5%
P1, P2, P3, P4
10 kΩ, lin/B, vertical potentiometer
Capacitors
C1
100 µF 16 V
C2
10 µF 25 V
C3, C4, C7
100 nF
C5, C6
22 pF
Semiconductors
D1
1N5817
D2
LM385Z-2.5
D3
BZX79-C5V1
IC1
7805
IC2
ATmega328P-PU, programmed
LED1
LED, 3 mm, red
T1
2N7000
Miscellaneous
BUZ1
Piezo buzzer with oscillator
K1, K2
2-row, 12-way pinheader, 90°
K5
Barrel jack
K4
1-row, 4-way pin socket
K3
2-row, 6-way boxed pinheader
S1
Slide switch DPDT
S2
Slide switch SPDT
X1
Crystal, 16 MHz
28-way DIP socket for IC2
Elektor PCB
OLED display, 0.96', 128 x 32 pixels, 4-pin I²C interface
Links
Elektor Magazine
Elektor Labs