Intro: IOT and Endpoint Electronics
Today I’m going to discuss a subject that’s a little different than those featured in my other videos. I’m not going to talk about any specific project, but instead, about my entry into the “Maker” realm. This is precisely how I started working with the Internet of Things. I will also explain about LPWan, LoRa, and LoraWan, address the types of LoRa radios, and also show some assembly examples that I developed. In the conclusion, I’ll talk a little about electronics, specifically the architecture of an EndPoint.
I addressed these issues in a lecture I gave in the city of São Paulo earlier this month, at the second IoT Inside SP Meetup. As I really like these topics, I decided to extend the information to everyone who follows me. Thus, I'm recording this video.
In addition to the IoT, we’ll talk about Endpoint Electronics, as I believe this subject accounts for 90% of my work, and is well beyond the gateways. However, I would like to start approaching the gateways in the future, though I consider this theme a bit complicated due to all the different models that necessitate understanding of encryption, keys, and other specifics.
Step 1: How I Started With IoT
About three years ago, I created a face-to-face course to teach children to program. In the computer lab of the school where I work, we presented Arduino to these students. The demand for the course increased, and we began to also teach adults who were interested in the subject.
After learning from course creation and the deeper programming instruction it entailed, I acquired considerable knowledge concerning the world of technology. From there, I decided to create a channel on YouTube. I post videos twice a week, and on my Blog, I post more detailed articles on the topics covered in the videos.
Step 2: Maker
I highly value the “Maker” realm, which is that Do-It-Yourself philosophy of having components and tools at home and doing things by hand. I believe that this can attract other people, who may or may not have professional training in the area but are principally passionate about this integration (like me) of electronics, mechanics, and IoT.
Concerning this “Maker” realm, there are some topics that are a necessity to mention:
- Components vs. Module: the evolution of the components for the transformation in the existing modules was essential to facilitate access and performance in this area. Nowadays, we have a series of ready-to-use boards, with microcontrollers, displays, and sensors, which enables faster prototyping.
- Price and availability: nowadays, we can say that the price is more affordable than a few years ago. This improvement also occurred in relation to the availability of products involving this area. These were previously difficult to find.
- Information on the Internet (Datasheet, outlines, blogs, and Youtube): Today we have easy access to everything concerning the “Maker” realm. An example of this is my channel and blog, among many others that exist today on the web.
Step 3: Connectivity
Point to point:
- 24L01 digital radio only
- Radios with UART TX RX transceiver 433mhz 915mhz etc.
- Car Alarm Keychain 433mhz
- Bluetooth / Bluetooth TX RX UART
- LoRa: point to point
- ESP-Now Protocol
Endpoint: Sensor / Actuator
Sensors: Availability / Adaptation
Step 4: Experience With LPWan
Many followers of my channel ask me about using LoRa, LoRaWAN, or LoRa protocol for Internet connection in a residence with a site, for example. In these situations, I must say, LoRa is not good. It’s thus necessary to make a comparison between LoRa and WiFi 802.11.
LoRa (Low Power Wide Area Network) is a low power network used basically to power a LoRa battery chip, which can last up to 20 years.
What is the main difference between LoRa and WiFi 802.11, and which one should you use on your home router? The router does the following: it optimizes to the maximum its capacity to send information that is spent with the necessary quantity of Watts. It doesn’t want to know how much is spent, as it is connected to energy. In relation to distance, this question doesn’t apply, as it gives more importance to the capacity to send data.
In the case of LoRa, of the assemblies we have already made (the ESP32 with LoRa chip) the data transfer rate is abandoned for the distance to be optimized. This means that LoRa spends less power to go as far as possible.
- Lora RADIO: ESP32
- Lora RADIO / Proprietary Protocol: EBYTE radio example
- LoraWan / Lpwan: for minimum battery consumption and maximum distance, maximum nodes per gateway
Step 5: LoRa Proprietary Protocol
This is an example of LoRa
proprietary protocol. I put a DHT22 sensor with an ESP32 LoRa, which sends the data to an ESP32 LoRa receiver. Via Uart, it accesses an Arduino Nano and, via SPI, an Ethernet Interface. In this case, we then access a Gateway that sends an SMS with the information collected for a smartphone. See how this montage works in the video: ESP32 LORA: Gas Sensor, Humidity and Temperature by SMS.
In image is the diagram of this circuit
Step 6: When Should I Use ES32 LoRa?
• when you need to prototype
• when you need speed "response time"
• when you don’t want to pay monthly/traffic fees
• when there is no public coverage of gateways
• for specific applications
• for exotic sensors that are incompatible with standard hardware
• when the number of nodes is less than 255
Step 7: When Should I Use LoRaWan and EndPoints?
• when the number of nodes is
very large: above 255
• when you don’t need speed "response time"
• when there is public coverage of gateways
• for tested sensors and endpoints, and availability on a large scale
What to do with the large amount of data?
Step 8: Possible Architecture of an Endpoint
Here we have two examples of high consumption circuits.
• One 40mA @ 9V
• Mega 60mA @ 9V
Step 9: Low Power to Operate With Battery:
Step 10: ESP32: M5Stack With DHT
I show here another example of Endpoint, this time with M5Stack. This is a very special ESP32 and is perfect for the Internet of Things. It even has the ESP32 inside it, adding even display, a keyboard, amplifier, speaker, and battery. Thus, it is a device that can do countless things. I have already executed a project with it, shown in this video: ESP32: M5Stack with DHT22.
Here, we have sample examples of modules that can be connected to M5Stack and project templates.
Step 11: Case: Square Payment System
I want to talk about a slightly different EndPoint here. I found out about this case in Chris Anderson's book: Makers - The New Industrial Revolution. In this case, McKelvey and Dorsey set up a company called the Square Payment System and created a device to plug into a cell phone audio cable port. It then converts the data from a credit card, turning the smartphone into a type of credit card machine. This is not a new concept today, and it’s necessary to note McKelvey and Dorsey developed this project back in 2009.
Unlike earlier McKelvey and Dorsey (which have also famously founded Twitter) developments, Square was a combination of hardware and software. The small accessories for connection to the phone were the atoms, while the application for the phone and Web services (to be activated by the hardware) were the bits. This meant they were both in an electronics business, whether they wanted to be or not.
Dorsey said: "If I had not, that knowledge would have been broached. We would have an awkward product, designed by a committee. More time consuming, more expensive and much less cool".