IoT M2M Cookbook

 IoT M2M Cookbook

How to develop a device based on Wireless Wide Area Network modules

Excerpt of the IoT-M2M-Cookbook here

 

 

 

 

 

 

 

Table of contents

1          Why Did I Write the IoT/M2M Cookbook?      4
2          Fundamental considerations before starting an IoT/M2M project     6
3          Certifications and approvals   6
3.1       Examples for Radio approvals in EU and US            6
3.2       Examples for Radio approvals in US and Canada (PTCRB) 8
3.3       Examples for automotive related approvals in Europe          8
3.4       SAR – Specific Absorption Rate         9
4          Cellular data communication (GPRS, USSD, SMS, CSD, DTMF)    10
4.1       Voice communication  10
4.2       Modem/acoustic coupler/encryption   11
4.3       DTMF (Dual Tone Multi Frequency)   11
4.4       GPRS (General Packed Radio Service)        11
4.5       SMS    12
4.6       USSD (Unstructured Supplementary Service Data)  13
4.7       Comparison of power consumption (SMS, USSD and GPRS)         13
4.8       CSD (Circuit Switched Data)  14
5          Supply voltage            15
5.1       Power on timing and waiting  16
5.2       Cellular module in power save mode 16
5.3       Internal resistance of batteries and linear voltage transformers        16
5.4       Switched mode voltage regulator       18
5.5       Simulation of a switched power supplies with LT Spice        19
5.6       Capacitors at power supply and cellular module       21
5.7       Supply voltage for GNSS antenna     21
6          Antennas for IoT/M2M devices           21
6.1       Monopole and dipole antennas          21
6.2       Are you sure nothing will interfere with your embedded antenna?    22
6.3       Why do embedded chip or patch antennas have different resonant frequencies?            23
6.4       How will the ground plane affect your embedded antenna?  23
6.5       How to connect your embedded antenna with your wireless module           26
6.6       How to design an antenna matching circuit   27
6.7       Free of charge software to generate a matching circuit automatically          28
6.8       How to switch between an internal and external cellular or GNSS antenna inexpensively  29
7          GPS antenna selection for a tracker  30
7.1       Which GPS antenna types we can select from?        30
7.2       A closer look on Bluetooth/GNSS antennas  31
8          GPS antenna selection for a people or pet tracker    33
8.1       GPS chip loop antenna type A matched to GPS only – test 1           35
8.2       GPS chip loop antenna type A matched to GPS/Glonass – test 3    37
8.3       Effect of the a human or pet body on GNSS antenna type B            37
8.4       Nine different PCB with chip antennas – just one is under test         39
8.5       Return Loss test of the human/pet tracker with and without meat    40
8.6       GPS chip antenna type B  unmatched           42
8.7       Effect the enclosure on GPS chip antenna type B    43
8.8       GPS chip antenna type B frequency drift caused by temperature change   44
8.9       Effect of the cut-out zone without copper under the GPS chip antenna type B            45
8.10     Testing chip antenna performance on the human hand with a special magnetic probe   46
8.11     Why it is impossible to compare the GSM antenna design with a GPS antenna design?           49
9          Examples for IoT devices with embedded antennas 50
9.1       Example: Embedded PCB antenna inside a vending machine         51
9.2       Example: Embedded antennas in Telematic device GPSauge IN1 v.2 of GPSoverIP      52
10        Simulation of an embedded GSM PCB track antenna           52
10.1     Definition of the antenna simulation project   52
10.2     Description of the inverted F antenna            53
10.3     3D model of the simulation     54
10.4     Optimization – determination of antenna shape         54
10.5     Typical requirements of a quad-band GSM antenna 55
10.6     Optimization of the quad-band antenna GSM antenna shape          56
10.7     Directional characteristics of the antenna for two GSM frequencies 57
10.8     Influence of the housing on antenna characteristics  59
10.9     Influence of the ground plane on antenna characteristics     59
10.10   Optimisation of the simulated antenna with matching circuit 61
10.11   Designing in the simulated antenna to a special GSM/GPS tracker 62
10.12   Test setup for F-antenna in housing with AC plug     64
10.13   Variants of the Dual-IFA in simulation            64
10.14   Two NB-IoT-GSM antenna test setups          65
10.15   The journey to develop the Gillette order button        65
10.16   Dos and don’ts during embedded antenna design    73
11        Components around the cellular module       74
11.1     SIM card         74
11.2     SIM card subscription 75
11.3     Low ESR capacitor     76
11.4     ESD protection            76
11.5     Loudspeaker and microphone            76
11.6     Firmware update for the final PCB     77
12        Examples of mistakes and errors during M2M development 77
12.1     Power down reset       77
12.2     SMS errors      77
12.3     CSD errors      78
12.4     IP connection errors   79
12.5     Analysis of several design mistakes in one M2M design      79
12.6     Analysis of mistakes of a PCB track antenna for GSM         80
12.7     Analysis of a GSM chip antenna on a small ground plane    81
12.8     Analysis of a Swiss GSM watch         82
12.9     Analysis of embedded LTE antenna in detail 82
13        Radiation noise, maximum spurious antenna radiation         83
13.1     Antenna radiation versus radiation noise       83
13.2     Conductive noise        85
13.3     Conductive noise transformed to radiated noise       85
13.4     Radiated noise transformed to conductive noise       85
13.5     Prevention against radiated noise      86
14        How to use a vector network analyser for IoT/M2M development     88
14.1     Quick Start Guide Vector Analyser MiniVNA Tiny     90
14.2     Explanation S11, VSWR, return loss, reflection coefficient and antenna bandwidth        92
14.3     Revealing the truth – four cellular antennas tested with MiniVNA      94
14.4     A comparison of three Vector Network Analysers     101
14.4.1  General overview        102
14.4.2  Graphical presentation of results       104
14.4.3  Save/recall      104
14.4.4  Exporting         105
14.4.5  Some actual measurements   106
14.4.6  Measuring LCR circuit 1         106
14.4.7  Measuring LCR circuit 2         107
14.4.8  Helical antennas tested with two different Vector Network analysers           108
15        Testing your M2M device       108
15.1     TX power peaks by cellular module test mode          108
15.2     Pseudo load of 2 Ampere peak load with self-made function generator       108
15.2.1  Schematic diagram of a self-made function generator          109
15.3     TX power peaks with a GSM tester    109
15.4     Testing of the sensitivity         110
15.5     Testing radiated TX power     110
15.6     Where can you buy a cheap cellular tester?  110
15.7     Example of a measurement report from GSM test equipment          111
15.8     Ripple and peak voltage – visible on GSM test equipment    115
15.9     How to test a UMTS module on foreign band            116
15.10   Testing with UMTS testers     116
15.10.1            Tests without a UMTS tester  117
15.11   How to test an LTE module on foreign bands            117
15.12   Potential difficulties with LTE modules worldwide      118
15.13   Testing the GNSS module      119
15.14   Measurement of the cellular antenna in 3D   119
15.15   Summary of testing     120
16        AT Commands            120
16.1     AT commands during power on of your cellular module eval. kit         120
16.2     ”Hello World” for GSM – AT commands to send a SMS        122
16.3     AT commands and logic loops to set up a communication channel  122
17        Project descriptions of IoT/M2M devices       123
17.1     Project description of a long-term tracking device     123
17.2     Project description of a flexible tracking device for bank notes         124
18        The difference between NB-IoT, LTE-M and GSM    125
19        The difference of NB-IoT and LTE-M to LTE Class 1            129
20        What does an NB-IoT network look like?       130
20.1     Cellular base stations in Lübeck         130
21        Power-supply for NB-IoT and LTE-M modules          135
22        From the idea to a final device by NB-IoT/LTE-M reference design 136
22.1     Example: NB-IoT/LTE-M Tracker for construction machines            140
22.2     Example: Wireless IoT Service Button on NB-IoT and LTE-M          142
23        Thank you       144

1 Why Did I Write the IoT / M2M Cookbook?

I have worked in the Wireless M2M industry for more than a quarter of a century. Twenty-five years ago, we did not even have a word for “M2M” or “IoT”. We developed Machine-to-Machine devices without knowing that decades later these creations would be called “M2M devices”. Twenty-five years ago, the GSM network for wireless data communication did not exist. I took my first steps in wireless data communication with Frequency Shift Keying (FSK) on Private Mobile Radios (PMR). On PMRs, we achieved communication speeds of 3600 bits per second. A little later, we started using public analogue trunked radios. These trunked radio systems provided local terrestrial wireless networks on FSK. Years ago, the last public analogue trunked radio network in Germany was taken out of service. GSM jumped in with its Short Message Service (SMS) and Circuit Switched Data (CSD). CSD provided us 9600 bits per second. We could use SMS and CSD for straightforward countrywide data communication. Later on, GSM roaming offered us worldwide data communication.

Today, GSM/GPRS is being gradually phased out and is being replaced by 3G and 4G technology. GSM networks have been switched off in the USA, Australia, Singapore and many other countries. In Germany, the GSM networks remain in place but 3G (UMTS, HSPA) will be phased out in 2020. Similar things are happening in many other countries. 3G is disappearing but 2G remains. In Switzerland, however, GSM is to be switched off completely. Devices for pan-European use must therefore support 2G, 3G and 4G whereas in the USA, NB-IoT or LTE-M is sufficient. There are several parallel NB-IoT and LTE-M networks. NB-IoT and LTE-M are the new stars in the IoT and M2M firmament and combine classic cellular radio networks with LPWAN. The base station antennas for LTE are also used for NB-IoT and LTE-M. Both techniques have new variable timers, which allow the management of wireless activity and extends the potential operational life of devices up to 10 years from one battery.

Some people try to differentiate between M2M and IoT. Call it IoT or M2M – it does not matter. Applications for IoT or M2M often use the same wireless technology. IoT is the umbrella term for a number of subsets of wireless data communications. M2M is one of these subsets and maybe one of the oldest. Another subset of IoT is called Industry 4.0 or Industrial Internet of Things (IIoT). Just wait a while and a new buzz world will always come up.

This IoT/M2M Cookbook describes how to develop a tracking device based on cellular and Global Navigation Satellite System (GNSS) modules. You can create a telemetric device by ignoring the GNSS aspect. Typical devices without GNSS include cellular routers with Ethernet ports or a cellular to Wi-Fi bridge. Nevertheless, the navigation system for trucks described in this book already uses six different wireless technologies (2G, 3G, GNSS, Classic Bluetooth, Bluetooth Low Energy and NFC) with five different antennas within one enclosure.

Cellular networks for GSM, HSPA,LTE, LTE-M and NB-IoT are the popular Wireless Wide Area Networks (WWAN). However, in some regions we have WWAN over CDMA and WiMAX.

Sometimes it is not easy to come up with the appropriate English word for the terms in this book. The common word for SMS in UK is “text message”. In this book, we will consistently use the term “SMS”. A prepaid SIM card in UK is called a “Pay as you go SIM card”. I will typically use the common words specified by ETSI – I will call it a prepaid SIM card. If I use the term “GSM module”, this will cover 3G and 4G modules as well, because the fallback of UMTS, HSPA, LTE, LTE-M and NB-IoT is still 2G (GSM/GPRS). GPS is fundamentally an incorrect term. The Global Positioning System (GPS) is just one out of several GNSS that provide the functionality we refer to as “GPS”. We can currently access the Russian GNSS called Glonass. The Chinese GNSS is called Beidou. At some point, we will be able to access the European GNSS called Galileo, and with the coming of Brexit, there may be a UK-only system in the future.

The IoT/M2M Cookbook is intended to help developers of wireless applications save some time and perhaps provide some inspiring ideas. It is a book for makers, and summarises the collective experience gained across my different jobs. By leading the team of developers that is required to design a mobile GSM/GPS GPS tracking device, I learned to think like a developer of an IoT/M2M device. In over fifteen years of working with manufacturing and distribution, I have repeatedly provided the same hints and recommendations to developers of wireless applications. The origin of this book was a 14-page application note written in July 2010. In May 2012, I made the decision to document the story that I deliver weekly to customers within a book. The goal of this book is to guide developers from the concept stage of an IoT/M2M device all the way to the final mass-produced product. This book will not provide introductory details such as how an inverted F antenna works. To explain those concepts, I will provide links to relevant supporting information. In any case, this book will provide you with information that is often omitted in the official radio module and antenna manufacturers’ documentation. This book shows an inverted F PCB antenna for GSM, NB-IoT and LTE-M in detail. It explains how to redesign it with your own PCB and how to encapsulate the whole design in epoxy resin. It also explains how to integrate a chip or PCB antenna with coaxial cable. Moreover, it explains success stories of self-made PCB antennas in mass production. The order button on a cellular module for Gillette razor blades is such an example. Some power supply concepts including LT Spice modules for DC/DC regulators and load generator for the 2 Ampere peak currents are included in the book, too. It should be noted that the power down reset is still the main fault in designs with cellular modules.

I hope you will enjoy reading the book and I hope it will save you some time as well.

688 Comments

Add a Comment
  1. Hi Antonio,
    You will find an offer in your email inbox as well.
    Best regards
    Harald

  2. Dear Harald,

    Am very impressed with your profile and excellence of your work. I am curious to gleam through your Cookbook.

    Hopefully our roads will meet in this marketspace.

    Keep doing great work.

    Best Regards,

    Daivesh

  3. Dear Daivesh, you will find an offer in your inbox.
    “I am what I am because my boss shared his knowledge with me 30 years ago” – Harald Naumann, 2017.
    Now I share the current state of the art in LPWAN both online and offline in the IoT-University.
    https://www.linkedin.com/groups/13500663

  4. Hi Harald,

    I am newb to IoT.
    I came across this and found very helpful to me.
    I like to have a copy of this book.

    Thanks.

    Regards,
    Antonio

  5. Dear Harald,

    I am very interested in your profile and excellence of your cookbook. I am hopeful to read your great Cookbook.

    Hopefully you will help curios people to understand the new world in this IOT world…

    Keep doing great work.

    Best Regards,

  6. Hi Herald
    Great article. Your work is really impressive. Can you send me a copy of IoT / M2M Cookbook

    Thank you
    Shreejith Shivan

  7. Dear Shreejith, just have a look in your email inbox. You will find an offer 🙂

  8. Hi Oliver, you will find an offer in your inbox. Just ti let you know that I am working on my next “IoT / M2M Cookbook – – How to develop LPWAN technology – real products, real networks”. I am busy for the next few month. 😉

  9. Hi Antonio, I have written the Iot M2M Cookbook to support people in wireless IoT to all offer the world. I will be glad if yiu will be a customer as well. You will find an offer in your email inbox.
    Regards
    Harald

  10. Hello how are you

    I am interested in having this book, please write to me.

    Thank you

  11. Hi Christian, you will find an offer in your inbox.

  12. Great sites…is there possibility to get the full cookbook?
    Regards.

  13. Hi Harald,

    Where can I buy this book?

  14. HI dear Harald,
    congratulations for a lot of good work. I need the documentation too please, and i wait your response in linkedin to the conference of Nuremberg.
    Thx in advance!

  15. Hi Morgan, you will an offer in your email inbox. Since three years I sell the IoT / M2M Cookbook direct. I prefer the direct contact to my book reader. The feedback from the readers end in updates or often in projects for matching of the antenna, concepts for new IoT devices up to orders for the development of customised antennas or complete designs for mass production.

  16. Hi Michael, you will find an offer in your email in inbox. if you tell me your application, then I can take care of a set of components as well.

  17. Hello, Harald!
    May I have an offer for your book?

  18. Hi Jacob, you will find an offer in your email inbox. Your order is welcome. BTW, I invested the incoming money in a NB-IoT shield in Arduino footprint. the same PCB can hold a GSM, UMTS or a LTE module as well. Read more here: http://www.gsm-modem.de/M2M/iot-m2m-tools/iot-out-of-the-box-with-nb-iot-module-arduino/

  19. Hello, Harald!
    I am Fernando from Chile. Topics about IoT here are still in “baby diapers”…
    May I have an offer for your book?
    Thanks a lot !

  20. Hi Harald Naumann,

    The topics you have mentioned in the cookbook are really interesting and useful.

    I would like to get a copy of the book.

    Thanks
    Ravi

  21. Hi Harald,

    Very much interested to read this book. I am doing a product development project in this area.

  22. Hello Harald.

    I’m interested in your coock book.
    Please send me an email with the price.

    Greetings.
    Juan Carlos

  23. Hi Harald,
    Your description sounds very promessing to master the challenges in building a wireless communication solution and to understand the different technologies involved. Where can I get the complete recipes so I can start cooking?)
    Thanks, Greeting, eddi

  24. Hello Harald,
    may I have an offer for your book?

  25. Hi Peter, thank you for your order. Maybe you are interested in my NB-IoT adapters for your evaluation. Some more details here:
    http://www.gsm-modem.de/M2M/iot-m2m-tools/iot-out-of-the-box-with-nb-iot-module-arduino/
    http://www.gsm-modem.de/M2M/m2m-news/arduino-footprint-nb-iot-shield-update/
    Best regards from Germany
    Harald

  26. Hi Juan, you got an offer. I will be glad if you will be a customer as well. Maybe you are interested in my NB-IoT adapters with Arduino header for your evaluation. Oot of NB-Iot you can get it with GSM. UMTS, LTE-Cat1 or LTE-CATNB1/M1 module. Some more details here:
    http://www.gsm-modem.de/M2M/iot-m2m-tools/iot-out-of-the-box-with-nb-iot-module-arduino/
    http://www.gsm-modem.de/M2M/m2m-news/arduino-footprint-nb-iot-shield-update/
    Best regards from Germany
    Harald

  27. Dear Fernando, you got an offer by email. I will be glad if you will be a customer as well. Maybe you are interested in my NB-IoT adapters with Arduino header for your evaluation. Oot of NB-Iot you can get it with GSM. UMTS, LTE-Cat1 or LTE-CATNB1/M1 module. Some more details here:
    http://www.gsm-modem.de/M2M/iot-m2m-tools/iot-out-of-the-box-with-nb-iot-module-arduino/
    http://www.gsm-modem.de/M2M/m2m-news/arduino-footprint-nb-iot-shield-update/
    Best regards from Germany
    Harald

  28. Dear Ravi, you got an offer as well. I will be glad if you will be a customer as well. Maybe you are interested in my NB-IoT adapters with Arduino header for your evaluation. Oot of NB-Iot you can get it with GSM. UMTS, LTE-Cat1 or LTE-CATNB1/M1 module. Some more details here:
    http://www.gsm-modem.de/M2M/iot-m2m-tools/iot-out-of-the-box-with-nb-iot-module-arduino/
    http://www.gsm-modem.de/M2M/m2m-news/arduino-footprint-nb-iot-shield-update/
    Best regards from Germany
    Harald

  29. Dear Alexander, you got an offer. I will be glad if you will be a customer as well. Maybe you are interested in my NB-IoT adapters with Arduino header for your evaluation. Oot of NB-Iot you can get it with GSM. UMTS, LTE-Cat1 or LTE-CATNB1/M1 module. Some more details here:
    http://www.gsm-modem.de/M2M/iot-m2m-tools/iot-out-of-the-box-with-nb-iot-module-arduino/
    http://www.gsm-modem.de/M2M/m2m-news/arduino-footprint-nb-iot-shield-update/
    Best regards from Germany
    Harald

  30. Hi Eddi, You will find an offer in your inbox.
    Maybe you are interested in a cellular evaluation kit listed http://iot-university.org/ and here http://www.gsm-modem.de/M2M/iot-m2m-tools/nb-iot-shield-arduino/

  31. Hello Harald,

    I am interested in your cookbook, could you send me an offer?

    Best regards,
    Sergiu

  32. Hi Sergiu, you will find an offer in your Inbox. I will make an offer for my akorIoT eval kit as well. akorIoT got its here:
    http://iot-university.org/nb-iot-shield-arduino/
    Best regards from sunny Germany
    Harald

  33. Hi Harald Naumann,

    I am interesed in your cookbook, may I have an offer for your book?

  34. Hi Harald,

    I am interested in your Cookbook.

    May I have the offer for your book?

    Regards,

    Alex

  35. Hi Alex, you will find an offer in your email inbox. Maybe you are interested in my evaluation kits with Arduino header. The kits support NB-IoT, LTE-Cat-M1, LTE-Cat1, GPRS, GSM, UMTS and GNSS (GPS, Galileo, Glonass, Beidou). Read more:
    http://www.gsm-modem.de/M2M/m2m-componets/arduino-shield-lte-cat-m1-lte-cat-nb1-nb-iot-gprs/

  36. Hi Alex, I assume you contacted me twice. You got your offer in the meantime.
    Regards
    Harald

  37. Hi Herald!

    Your work is really good. Can you send me a copy of IoT / M2M Cookbook

    Thank you

  38. Dear Harold,

    Thanks for accepting my LinkedIn request.
    I am planning to start project in ioT and I am sure your book will help me lot.
    I would like to have copy of your book.

    Thanks
    Jitendra Singh

  39. Hello Mr. Naumann,

    I am interested in your cookbook. How I can get a copy?

    I will be grateful with your comments,

    Thank you,

    Jorge

  40. Hi Harald,

    I am interested in your book. May I have an offer for the book?

  41. Hey Harald,

    I’m interested in your CookBook.
    Could you send me an offer?

    Best Regards

    Johannes

  42. Dear Mr Harald Naumann,

    I am a lecturer at the University Of Technology, HOCHIMINH City, VietNam. I am very interested in your book. Pleae tell me how can I get the offer of it?

    Thank you very much

  43. Hello Harald,
    may I have an offer for your book?

  44. Hi Herald,
    I too would love to have a copy of your cook book.
    Thanks 🙂

  45. Hello, Harald!
    May I have an offer for your book?

  46. Hi Ivan, you will find an offer in your email inbox. I also can help with evaluation kits for prototyping IoT devices. At http://iot-university.org/nb-iot-shield-arduino/ you will find several cellular / GPS radio adapter with Arduino header. The Arduino UNO we use for testing. Prototyping we do on STM32 Nucleo.
    A typical design process:
    http://www.gsm-modem.de/M2M/m2m-componets/arduino-shield-lte-cat-m1-lte-cat-nb1-nb-iot-gprs/
    Best regards
    Harald

  47. Hi Hillux, you will find an offer in your email inbox. I also can help with evaluation kits for prototyping IoT devices. At http://iot-university.org/nb-iot-shield-arduino/ you will find several cellular / GPS radio adapter with Arduino header. The Arduino UNO we use for testing. Prototyping we do on STM32 Nucleo.
    A typical design process:
    http://www.gsm-modem.de/M2M/m2m-componets/arduino-shield-lte-cat-m1-lte-cat-nb1-nb-iot-gprs/
    Best regards
    Harald

  48. Hi Mirza, you will find an offer in your email inbox. I also can help with evaluation kits for prototyping IoT devices. At http://iot-university.org/nb-iot-shield-arduino/ you will find several cellular / GPS radio adapter with Arduino header. The Arduino UNO we use for testing. Prototyping we do on STM32 Nucleo.
    A typical design process:
    http://www.gsm-modem.de/M2M/m2m-componets/arduino-shield-lte-cat-m1-lte-cat-nb1-nb-iot-gprs/
    Best regards
    Harald

  49. Hi Bao, you will find an offer in your email inbox. I also can help with evaluation kits for prototyping IoT devices. At http://iot-university.org/nb-iot-shield-arduino/ you will find several cellular / GPS radio adapter with Arduino header. The Arduino UNO we use for testing. Prototyping we do on STM32 Nucleo.
    A typical design process:
    http://www.gsm-modem.de/M2M/m2m-componets/arduino-shield-lte-cat-m1-lte-cat-nb1-nb-iot-gprs/
    Best regards
    Harald

  50. Hi Johannes,
    you will find an offer in your email inbox. I also can help with evaluation kits for prototyping IoT devices. At http://iot-university.org/nb-iot-shield-arduino/ you will find several cellular / GPS radio adapter with Arduino header. The Arduino UNO we use for testing. Prototyping we do on STM32 Nucleo.
    A typical design process:
    http://www.gsm-modem.de/M2M/m2m-componets/arduino-shield-lte-cat-m1-lte-cat-nb1-nb-iot-gprs/
    Best regards
    Harald

Leave a Reply

Your email address will not be published. Required fields are marked *

Blue Captcha Image
Refresh

*