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?
Plot, Cut, Drill, Mill and Laser with the Z99
This book covers the construction, hardware, software, and operation of the Z99 – CNC machine. This is a multifunctional 4-axis machine for home construction.
The capabilities of the Z99 machine include:
large-format schematic plotting
PCB plotting with etch-resist pens
schematic plotting with conductive-ink pens
letter cutting out of vinyl
paper cutting
PCB/substrate drilling
PCB/substrate milling
text milling
laser engraving
laser cutting of solder paste masks
By making the support software available as freeware, readers of the book are challenged and encouraged to develop new applications for the Z99.
The machine would not be of much use if the user has no option to create suitable files for the designs in mind. A large part of this book is dedicated to creating source files in a variety of freeware software packages, including Inkscape, DesignSpark PCB, KiCad, and FlatCAM.
The book is also useful for readers keen to comprehend and then master the basic structure of HPGL, Gerber, Drill, and G-code files, as well as to have a go at deciphering them using software.
Get Cracking with the Arduino Nano V3, Nano Every, and Nano 33 IoT
The seven chapters in this book serve as the first step for novices and microcontroller enthusiasts wishing to make a head start in Arduino programming. The first chapter introduces the Arduino platform, ecosystem, and existing varieties of Arduino Nano boards. It also teaches how to install various tools needed to get started with Arduino Programming. The second chapter kicks off with electronic circuit building and programming around your Arduino. The third chapter explores various buses and analog inputs. In the fourth chapter, you get acquainted with the concept of pulse width modulation (PWM) and working with unipolar stepper motors.
In the fifth chapter, you are sure to learn about creating beautiful graphics and basic but useful animation with the aid of an external display. The sixth chapter introduces the readers to the concept of I/O devices such as sensors and the piezo buzzer, exploring their methods of interfacing and programming with the Arduino Nano. The last chapter explores another member of Arduino Nano family, Arduino Nano 33 IoT with its highly interesting capabilities. This chapter employs and deepens many concepts learned from previous chapters to create interesting applications for the vast world of the Internet of Things.
The entire book follows a step-by-step approach to explain concepts and the operation of things. Each concept is invariably followed by a to-the-point circuit diagram and code examples. Next come detailed explanations of the syntax and the logic used. By closely following the concepts, you will become comfortable with circuit building, Arduino programming, the workings of the code examples, and the circuit diagrams presented. The book also has plenty of references to external resources wherever needed.
An archive file (.zip) comprising the software examples and Fritzing-style circuit diagrams discussed in the book may be downloaded free of charge below.
An Ultra-Rapid Programming Course
This book serves as the very first step to for novices to learn Python programming. The book is divided into ten chapters. In the first chapter, readers are introduced to the basics of Python. It has the detailed instructions for installation on various platforms such as macOS, Windows, FreeBSD, and Linux. It also covers the other aspects of Python programming such as IDEs and Package Manager. The second chapter is where the readers get an opportunity to have a detailed hands-on with Python programming. It covers a group of built-in data structures popularly known as Python Collections. The third chapter covers the important concepts of strings, functions, and recursion.
The fourth chapter focuses on the Object-Oriented Programming with Python. The fifth chapter discusses most commonly used custom data structures such as stack and queue. The sixth chapter spurs the creativity of the readers with Python’s Turtle graphics library. The seventh chapter explores animations and game development using the Pygame library. The eighth chapter covers handling data stored in a variety of file formats. The ninth chapter covers the area of Image processing with Wand library in Python. The tenth and the final chapter presents an array of assorted handy topics in Python.
The entire book follows a step-by-step approach. The explanation of the topic is always followed by a detailed code example. The code examples are also explained in suitable detail and they are followed by the output in the form of text or screenshot wherever possible. Readers will become comfortable with Python programming language by closely following the concepts and the code examples in this book. The book also has references to external resources for readers to explore further.
A download of the software code, and links to tutorial videos can be found on the Elektor website.
Develop your own custom home automation devices
Espressif's ESP8266 and ESP32 microcontrollers have brought DIY home automation to the masses. However, not everyone is fluent in programming these microcontrollers with Espressif's C/C++ SDK, the Arduino core, or MicroPython. This is where ESPHome comes into its own: with this project, you don’t program your microcontroller but configure it.
This book demonstrates how to create your own home automation devices with ESPHome on an ESP32 microcontroller board. You’ll learn how to combine all kinds of electronic components and automate complex behaviours. Your devices can work completely autonomously, and connect over Wi-Fi to your home automation gateways such as Home Assistant or MQTT broker.
By the end of this book, you will be able to create your own custom home automation devices the way you want. Thanks to ESPHome and the ESP32, this is within everyone’s grasp.
Set up an ESPHome development environment and create maintainable configurations
Use buttons and LEDs
Sound a buzzer and play melodies
Read measurements from various types of sensors
Communicate over a short distance with NFC, infrared light, and Bluetooth Low Energy
Show information on various types of displays
Downloads
Software
A Reference and User Guide for the Arduino Uno Hardware and Firmware
A manual providing up-to-date hardware information for the popular Arduino Uno, the easy to use open-source electronics platform used by hobbyists, makers, hackers, experimenters, educators and professionals.
Get all the information you need on the hardware and firmware found on Arduino Uno boards in this handy reference and user guide.
Ideal for the workbench or desktop
Contains all of the Arduino Uno hardware information in one place
Covers Arduino / Genuino Uno revision 3 and earlier boards
Easily find hardware technical specifications with explanations
Pin reference chapter with interfacing examples
Diagrams and illustrations for easy reference to alternate pin functions and hardware connections
Learn to back up and restore the firmware on the board or load new firmware
Basic fault finding and repair procedures for Arduino Uno boards
Power supply circuits simplified and explained
Mechanical dimensions split into five easy to reference diagrams
Contains circuit diagrams, parts list and board layout reference to locate components easily
Learn to use Python productively in real-life scenarios at work and in everyday life
If you have mastered the basics of Python and are wanting to explore the language in more depth, this book is for you. By means of concrete examples used in different applications, the book illustrates many aspects of programming (e.g. algorithms, recursion, data structures) and helps problem-solving strategies. Including general ideas and solutions, the specifics of Python and how these can be practically applied are discussed.
Python 3 for Science and Engineering Applications includes:
practical and goal-oriented learning
basic Python techniques
modern Python 3.6+ including comprehensions, decorators and generators
complete code available online
more than 40 exercises, solutions documented online
no additional packages or installation required, 100% pure
Python Topics cover:
identifying large prime numbers and computing Pi
writing and understanding recursive functions with memorisation
computing in parallel and utilising all system cores
processing text data and encrypting messages
comprehending backtracking and solving Sudokus
analysing and simulating games of chance to develop optimal winning strategies
handling genetic code and generating extremely long palindromes
Downloads
Software
Créer des modèles pour l'impression 3D, le fraisage CNC, la communication des processus et la documentation
Les ingénieurs redoutent de concevoir des modèles 3D à l’aide d’un logiciel de modélisation traditionnel. OpenSCAD adopte une approche rafraîchissante et complètement différente. Créez vos modèles en organisant des solides géométriques dans un langage de type JavaScript et utilisez-les avec votre imprimante 3D, votre fraiseuse CNC ou votre communication de processus.
OpenSCAD diffère des autres systèmes de conception en ce qu'il utilise une modélisation programmatique. Votre modèle est composé de primitives invoquées à l'aide d'un langage de type C, Java ou Python. Cette approche de la conception de modèles est proche du « travail mécanique » effectué dans le monde réel et séduit les ingénieurs et autres personnes qui ne font pas partie de la classe créative traditionnelle. OpenSCAD fournit également une grande variété de fonctions de confort qui brisent la relation 1:1 entre code et géométrie. Ce livre présente les différentes fonctionnalités du langage de programmation à l'aide d'exemples pratiques tels qu'un bouton de remplacement pour un oscilloscope LeCroy, un cintre pour armoire, un récipient pour distributeurs de savon et divers autres exemples réels.
Écrit par un ingénieur ayant plus de 15 ans d'expérience, ce livre s'adresse aussi bien aux utilisateurs de Linux que de Windows. Si vous avez de l'expérience en programmation dans n'importe quel langage, ce livre vous permettra de produire des objets tridimensionnels pratiques en peu de temps !
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.
Ready to explore the world around you? By attaching the Sense HAT to your Raspberry Pi, you can quickly and easily develop a variety of creative applications, useful experiments, and exciting games.
The Sense HAT contains several helpful environmental sensors: temperature, humidity, pressure, accelerometer, magnetometer, and gyroscope. Additionally, an 8x8 LED matrix is provided with RGB LEDs, which can be used to display multi-color scrolling or fixed information, such as the sensor data. Use the small onboard joystick for games or applications that require user input. In Innovate with Sense HAT for Raspberry Pi, Dr. Dogan Ibrahim explains how to use the Sense HAT in Raspberry Pi Zero W-based projects. Using simple terms, he details how to incorporate the Sense HAT board in interesting visual and sensor-based projects. You can complete all the projects with other Raspberry Pi models without any modifications.
Exploring with Sense HAT for Raspberry Pi includes projects featuring external hardware components in addition to the Sense HAT board. You will learn to connect the Sense HAT board to the Raspberry Pi using jumper wires so that some of the GPIO ports are free to be interfaced to external components, such as to buzzers, relays, LEDs, LCDs, motors, and other sensors.
The book includes full program listings and detailed project descriptions. Complete circuit diagrams of the projects using external components are given where necessary. All the projects were developed using the latest version of the Python 3 programming language. You can easily download projects from the book’s web page. Let’s start exploring with Sense HAT.
History and Future in the Internet of Things
This book thoroughly reviews the history of the development of embedded Operating Systems, covers the technical characteristics, historic facts, as well as background business stories of mainstream embedded Operating Systems, and analyzes the technical evolution, market development, and new opportunities of embedded Operating Systems in the age of the Internet of Things.
From the perspective of time, the book examines the evolution of critical technical aspects, including real-time and Power Management of embedded Operating Systems and Linux, Internet of Things security, communication, and cloud computing.
The book looks into applications of embedded Operating Systems with important markets of mobile phones, communication equipment, automobile, and wearable devices, and also discusses business model and the issue of intellectual property of embedded Operating Systems.
In addition, the book walks through the status quo, technical features, product evaluation and background of the Internet of Things Operating Systems in the second half of the book.
La technologie des ondes courtes présente un attrait particulier : elle peut facilement couvrir de grandes distances. En faisant rebondir les signaux à ondes courtes sur les couches conductrices de l’ionosphère, ils peuvent être reçus au-delà de l’horizon et ainsi atteindre n’importe où sur Terre. Bien que la technologie évolue vers des fréquences de plus en plus élevées et que la radio soit généralement écoutée sur FM, DAB+, satellite ou Internet, les méthodes de transmission modernes nécessitent une infrastructure étendue et sont extrêmement vulnérables. En cas de panne de courant mondiale, rien n’est plus important que les ondes courtes. La radio amateur n'est pas seulement un passe-temps, c'est aussi un système radio d'urgence !
Le SDR-Shield d'Elektor (SKU 18515) est un récepteur polyvalent à ondes courtes jusqu'à 30 MHz. À l'aide d'un Arduino et du logiciel approprié, les stations de radio, les signaux Morse, les stations SSB et les signaux numériques peuvent être reçus. Dans ce livre, l'auteur à succès et radioamateur enthousiaste Burkhard Kainka décrit la pratique moderne de la radio définie par logiciel utilisant le Shield SDR d'Elektor. Il fournit non seulement une formation théorique, mais explique également de nombreux outils logiciels open source.
Recently, the development of a tiny chip called the ESP8266 has made it possible to interface any type of microcontroller to a Wi-Fi AP. The ESP8266 is a low-cost tiny Wi-Fi chip having fully built-in TCP/IP stack and a 32-bit microcontroller unit. This chip, produced by Shanghai based Chinese manufacturer Espressif System, is IEEE 802.11 b/g/n Wi-Fi compatible with on-chip program and data memory, and general purpose input-output ports. Several manufacturers have incorporated the ESP8266 chip in their hardware products (e.g. ESP-xx, NodeMCU etc) and offer these products as a means of connecting a microcontroller system such as the Android, PIC microcontroller or others to a Wi-Fi. The ESP8266 is a low-power chip and costs only a few Dollars.
ESP8266 and MicroPython – Coding Cool Stuff is an introduction to the ESP8266 chip and describes the features of this chip and shows how various firmware and programming languages such as the MicroPython can be uploaded to the chip. The main aim of the book is to teach the readers how to use the MicroPython programming language on ESP8266 based hardware, especially on the NodeMCU.
Several interesting and useful projects are given in the book to show how to use the MicroPython in NodeMCU type ESP8266 hardware:
Project “What shall I wear today?”: You will be developing a weather information system using a NodeMCU development board together with a Text-to-Speech processor module.
Project “The Temperature and Humidity on the Cloud”: You will be developing a system that will get the ambient temperature and humidity using a sensor and then store this data on the cloud so that it can be accessed from anywhere.
Project “Remote Web Based Control”: You will be developing a system that will remotely control two LEDs connected to a NodeMCU development board using an HTTP Web Server application.
A Hands-on Guide to Crafting Your Own Power Plant
The book you are about to read provides a step-by-step guide for building a renewable energy power plant at home. Our goal was to make the book as practical as possible. The material is intended for immediate application with a small amount of theory. Yet, the theory is important as a foundation that saves time and effort by disabusing the readers of potential misconceptions. Specifically, upon having a firm understanding of photovoltaic physics, you will not be inclined to fruitlessly search for 90% efficient solar panels!
We want our readers to be the “doers”. If the book gets covered in grime and some pages become torn while you are building your power plant – this is the best compliment to us. The book covers solar and wind energy. Also, a curious power source based on manure is discussed as well, giving the doers an opportunity to further develop the manure fuel cell.
It is important to note that there are many companies offering installation of complete solar solutions. Upon installing the panels, the system is not owned by the customer. Therefore, there is no freedom for experimentation and optimization. Also, none can beat the cost of a DIY solution as well as the ultimate satisfaction.
All that is written here is a result of us building a renewable energy solution in Southern California. As the book was completed, the energy began flowing!
This book discusses the basic components of any alarm system.
All alarm systems have two basic functions. First, they monitor their environment looking for a change such as a door or window opening or someone moving about in the room. Second, they alert the legal owner or user to this change. The system described in this book uses a scanning type software to detect intruders. It behaves like a guard dog, pacing up and down the fence line on the lookout for either an intruder or a familiar person. If you have an alarm key, you can disarm the system and enter.
With the scanning method, the software is easy to write and explain. It can scan eight alarm zones plus two special fire zones in about one second.
You don’t have to be an electrical engineer to install an alarm system, just a decent carpenter, painter, and plasterer! Because this alarm system runs on 12 volts, you don’t have to be a licensed electrician either to install it. The alarm system presented here uses Python software on the Raspberry Pi combined with some elementary electronic circuits. The code described in the book, as well as CAD files and a bill of materials for the alarm panel, are available for free downloading. The book provides the reader with examples of typical configurations coming straight from the author‘s experience. After reviewing the hardware components typically used in common alarm systems, the author shows how to plan one yourself.
To implement a modular alarm, no matter if it is for a single house or for a business or restaurant, the book shows how to skillfully combine a Raspberry Pi with small auxiliary electronic circuits. These are not installation instructions but food for thought that will enable readers to find a solution to their needs.
All you need to know about good acoustics and sound systems in performance and worship spaces!
Everyone knows that the ability to hear music in balance and to understand speech is essential in any space used for performance or worship. Unfortunately, in the early 21st century, we find that buildings with good acoustics are the exception rather than the rule. Much of the fault leading to this result can be traced to the widespread perception that acoustics is a black art. In fact, scientific acoustics as developed in the last century is a well-defined engineering practice that can lead to predictable excellent results.
A basic, non-engineering understanding of acoustics will help building owners, theater managers, ministers and teachers of music, performers, and other professionals to achieve their goals of excellent acoustics in venues with which they work. Performers having a basic understanding of acoustics will be able to make the most of the acoustics of the venue in which they perform.
This book helps those responsible for providing good acoustics in performance and worship spaces to understand the variables and choices entailed in proper acoustic design for performance and worship. Practicing acoustical consultants will find the book a useful reference as well. The level of presentation is comfortable and straightforward without being simplistic. If correct acoustical principles are incorporated into the design, renovation, and maintenance of performance and worship venues, good acoustics will be the result.
35 Touch Develop & MicroPython Projects
The BBC micro:bit is a credit sized computer based on a highly popular and high performance ARM processor. The device is designed by a group of 29 partners for use in computer education in the UK and will be given free of charge to every secondary school student in the UK.
The device is based on the Cortex-M0 processor and it measures 4 x 5 cm. It includes several important sensors and modules such as an accelerometer, magnetometer, 25 LEDs, 2 programmable push-button switches, Bluetooth connectivity, micro USB socket, 5 ring type connectors, and a 23-pin edge connector. The device can be powered from its micro USB port by connecting it to a PC, or two external AAA type batteries can be used.
This book is about the use of the BBC micro:bit computer in practical projects. The BBC micro:bit computer can be programmed using several different programming languages, such as Microsoft Block Editor, Microsoft Touch Develop, MicroPython, and JavaScript.
The book makes a brief introduction to the Touch Develop programming language and the MicroPython programming language. It then gives 35 example working and tested projects using these language. Readers who learn to program in Touch Develop and MicroPython should find it very easy to program using the Block Editor or any other languages.
The following are given for each project:
Title of the project
Description of the project
Aim of the project
Touch Develop and MicroPython program listings
Complete program listings are given for each project. In addition, working principles of the projects are described briefly in each section. Readers are encouraged to go through the projects in the order given in the book.