Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Arduino Data Communications

You're reading from   Arduino Data Communications Learn how to configure databases, MQTT, REST APIs, and store data over LoRaWAN, HC-12, and GSM

Arrow left icon
Product type Paperback
Published in Nov 2023
Publisher Packt
ISBN-13 9781837632619
Length 286 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Robert Thas John Robert Thas John
Author Profile Icon Robert Thas John
Robert Thas John
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1:Introduction to Arduino and Sensor Data
2. Chapter 1: Getting Started with Arduino FREE CHAPTER 3. Chapter 2: Leveraging Various Sensors for Data Acquisition 4. Chapter 3: Prototyping with Shields 5. Chapter 4: Storing Data Collected from Sensors 6. Chapter 5: Implementing REST and MQTT Protocols for Communication 7. Part 2:Sending Data
8. Chapter 6: Utilizing Various Communication Technologies 9. Chapter 7: Communicating with LoRaWAN 10. Chapter 8: Working with Ethernet 11. Chapter 9: Leveraging Cellular Communication Technology 12. Chapter 10: Communicating via HC-12 13. Chapter 11: Managing Communication with RS-485 14. Part 3: Miscellaneous Topics
15. Chapter 12: Enhancing Security for Reducing Risk 16. Chapter 13: Scaling for High Availability 17. Chapter 14: Building and Manufacturing Hardware 18. Index 19. Other Books You May Enjoy

Learning about Arduino – The hardware

Arduino provides various microcontroller unit (MCU) development boards. When Arduino is mentioned, a lot of users think of the Arduino Uno, which is arguably the most popular board from Arduino, as well as the most popular one manufactured by other companies based on the reference designs available from Arduino. These clones aren’t called Arduino, but something similar, such as the SparkFun RedBoard manufactured by SparkFun Electronics. The following photo shows various Arduino MCUs.

Figure 1.1 – Various Arduino MCUs

Figure 1.1 – Various Arduino MCUs

We will be using official Arduino boards in this book. By using an official Arduino board, you will be helping to support the company and its open source efforts.

You might start a conversation about boards with the question, “What is the best board for…?”. The answer, as to most questions, is, “It depends!

In the world of microcontrollers, the best board is the one that gets the job done while consuming the least amount of resources (power, memory, etc.). Power consumption ties right back to the chip. The greater the capability of a chip, the more complex it is, and the greater the power consumption, normally.

During development, it is normal to pick a board at random, complete the setup, ensure it is working, and then try to downsize the board. What this means is that, at first, you might not know how large your firmware will be, or what code will need to run on it. As a result, you could pick any medium-range board.

After you are done with development, you will know the exact size of your firmware, as well as the number of pins you have utilized and the communication protocols. Then, you can pick a smaller board that supports everything you need and deploy it for production. Or, even better, you could pick the chip and sensors that you need and design a new PCB!

The first place to find Arduino hardware is on the website: https://www.arduino.cc/en/hardware. You can find the complete list of boards, and, as of this writing, attempts to classify them into three categories:

  • Nano Family: Boards with a small footprint, some embedded sensors, and support for machine learning (ML).
  • MKR Family: Boards equipped with a low-power chip, a communication chip, a cryptographic chip, and support for various shields that make it possible to prototype without additional circuit work. These boards feature a 32-bit SAMD21 (ARM Cortex-M0+) chip from Microchip Technologies (https://ww1.microchip.com/downloads/en/DeviceDoc/SAM_D21_DA1_Family_DataSheet_DS40001882F.pdf).
  • Classic Family: The older, more popular boards and their shields.

The second place to find Arduino hardware is on the Pro website: https://www.arduino.cc/pro. This website exists because Arduino wants to be reclassified from just something that is meant for learning to something that can be put to industrial use. Prior to this time, people would learn on an Arduino board but use a board from a competitor for the final product. The Pro website lists hardware in six categories (https://www.arduino.cc/pro/hardware):

  • Portenta Family: Boards with the highest-rated chips for their generation, with carriers and shields that make edge deployments possible. Connectivity is provided via shields. The chip on these is a 32-bit dual-core STM32H747 (ARM Cortex-M7 and ARM Cortex-M4) from STMicroelectronics (https://www.st.com/en/microcontrollers-microprocessors/stm32h747-757.html).
  • Edge Control: Remote monitoring and control carrier boards, optimized for outdoor environments. These boards feature a 32-bit nRF52840 (ARM Cortex-M4) chip from Nordic Semiconductors (https://www.nordicsemi.com/Products/nRF52840). Edge control boards come with two additional slots for MKR boards that let you extend functionality.
  • Nicla Family: Thumb-sized boards with industrial-grade sensors and battery connectors. These are the smallest boards available from Arduino.
  • MKR Family: The same as the MKR family from the main website.
  • Nano Family: The same as the Nano family from the main website.
  • Gateways: Devices for LoRaWAN connectivity. We will discuss these in more detail in Chapter 7, Communicating with LoRaWAN.

Let’s proceed to consider how to pick a board for the projects you will be tackling in this book.

Choosing your board – The Arduino MKR family

The board of choice for this book will be the Arduino MKR family, an example of which is the Arduino MKR WiFi 1010 (https://docs.arduino.cc/hardware/mkr-wifi-1010). The MKR family of boards is targeted at makers or tinkerers, has a popular form factor that is forward compatible with the newer and more powerful Arduino Portenta family of Pro boards, and has a number of shields that minimize the need for solderless breadboards and soldering.

Rather than picking up this board alone, I would recommend purchasing a kit that comes with other components that you can utilize for projects in this book. This kit is the Arduino Oplà IoT Kit, which you can find at this URL: https://store.arduino.cc/products/arduino-opla-iot-kit.

You will get to work with other boards as the need for different communication methods arises. All MKR family boards utilize the same chip: the SAMD21 chip from Microchip Technologies running a 32-bit ARM Cortex-M0+.

The MKR family is made up of various boards with different capabilities, some of which are listed here:

  • Arduino MKR WiFi 1010: This board provides WiFi and Bluetooth connectivity
  • Arduino MKR FOX 1200: This board provides SigFox connectivity
  • Arduino MKR WAN 1310: This board provides LoRaWAN connectivity
  • Arduino MKR GSM 1400: This board provides GSM connectivity

Don’t worry if one or more of the communication options aren’t familiar right now, as we will cover them in a later chapter.

The boards have the following general features:

  • 8 digital I/O pins
  • 13 PWM pins
  • 7 analog input pins
  • 1 analog output pin
  • 1 each of UART, SPI, and I2C
  • 256 KB of CPU internal memory
  • 32 KB of SRAM
  • Onboard WiFi and Bluetooth connectivity
  • Onboard RGB LED

Make sure you refer to the documentation for any board that you are working with, from the manufacturer’s website. This will save you a lot of stress and time.

Every board has a pinout diagram. This document provides information on what capabilities each pin on the board has. You can find the pinout diagram for the MKR WiFi 1010 here: https://content.arduino.cc/assets/Pinout-MKRwifi1010_latest.pdf.

Next, let’s discuss the IDE, which provides assistance when you write your code.

You have been reading a chapter from
Arduino Data Communications
Published in: Nov 2023
Publisher: Packt
ISBN-13: 9781837632619
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime