This 8-part series covers the following modules:
- Course Introduction and Q&A
- Module 1: Understand the Hardware
- Module 2: Setting up the Arduino IDE
- Module 3.1: Programming Basic Functionality
- Module 3.2: Temperature and Humidity Settings
- Module 3.3: Measuring Battery Status
- Module 3.4: Real Time Clock
- Module 3.5: SD Card
- Module 3.6: Interrupts
Module 1: Understand the Hardware Design Stack
In Module 1, we take you through the design flow we use when we design devices. This gives a broad overview of what the requirements are, how we prototype, iterate, test, pilot and deploy them. We also discuss the basic hardware and software blocks that are common to most devices, their terminology, and what they do.
- Support documents: terminology, slides and downloads
- 1.1: Understand the Design Flow (direct link to video)
- 1.2.1: Understand the full design stack: Hardware (direct link to video)
- 1.2.2: Understand the full design stack: Memory power (direct link to video)
- 1.3: Understand the full design stack: Software (direct link to video)
- Module 1 Discussion (forum thread)
- Live Event: Office Hours (video, 43.14)
Module 2: Setting up the Arduino IDE
In Module 2, we first describe what we mean by ‘data logger’. Then we go into detail on setting up the Arduino environment for this course. We discuss installing the WildLogger board files, and setting up drivers so we can communicate with the board. Once that’s done, we introduce the Arduino program structure, then write and upload our first program, “Hello world”.
- Support documents: terminology, slides and downloads
- 2.0: Setting up the Arduino IDE (direct link to video)
- 2.1: What’s a datalogger? (direct link to video)
- 2.2: Setting up Arduino (direct link to video, pdf)
- 2.3: Arduino Program Structure (direct link to video)
- 2.4: Writing Our First Program (direct link to video)
- 2.5: Hello World (direct link to video)
- Module 2 Discussion (forum thread)
Module 3: Proof of Concept: Programming the Basic Functionality
In Module 3, we break down the basic functionality of our data logger into submodules. In each submodule, we explain the principles behind what we’re doing, and then write the code to interface with each functional block.
Module 3.1: Setting Up the Command Line
In Module 3.1, we discuss why we’re using the command line, and install the Arduino Command Line library written by us at Freaklabs. Once that’s installed, we go through our hands-on labs where we write code to implement the command line directly on the Wildlogger board. We also implement a table of custom commands which allows us to control the WildLogger in real time, in this case, changing the speed of a blinking LED.
- Module 3.1 Overview (page)
- 3: Proof of Concept: Programming basic functionality (video)
- 3.1.1: The Arduino command line (video)
- 3.1.2: Setting and accessing parameters (video)
- 3.1.3: Changing parameters in real time (video)
- Support documents and pdf versions of video slides are available in the module 3.1 page here
- Module 3.1 Discussion (forum thread)
Module 3.2: Temperature and Humidity Settings
In Module 3.2, we get an overview of the temperature and humidity sensor we’ll be using for this course. We learn the basics of temperature and humidity measurement, how the sensor works, and how to install the Arduino library to access and control the sensor. After that, we do hands-on labs where we read the temperature and humidity, control the sensor from our command line, and then use the temperature and humidity data to control another device.
- Module 3.2 Overview (page)
- 3.2: Temperature and humidity settings (video)
- 3.2.1: Hello temperature and humidity (video)
- 3.2.2: Command line temperature and humidity (video)
- 3.2.3: It’s getting hot in here (video)
- Support documents and pdf versions of video slides are available in the module 3.2 page here
- Module 3.2 Discussion (forum thread)
Module 3.3: Measuring Battery Status
In Module 3.3, we learn about how analog to digital conversion (ADC) works and what the terminology actually means. We learn about ADC resolution and bit-depth, sampling rates, and things that can increase or decrease the accuracy of our ADC. Finally we use the internal ADC on the Wildlogger board to measure our battery voltage which will eventually allow us to track our battery levels on the datalogger. By the end of this submodule, you’ll know the difference between a 10-bit ADC and a 16-bit ADC, how to interface sensors to them, and how to write software to read and process their data.
- Module 3.3 Overview (page)
- 3.3: Measuring battery status (video)
- 3.3.1: Checking battery status (video)
- 3.3.2: Give me your voltage, I command you! (video)
- Support documents and pdf versions of video slides are available in the module 3.3 page here
- Module 3.3 Discussion (forum thread)
Module 3.4: Real Time Clock
In Module 3.4, we learn about how real time clocks (RTCs) are used in instrumentation. Timekeeping plays a central role in scientific field instrumentation. It’s used to timestamp data, synchronize multiple standalone devices, and also controls power management. We discuss how RTCs work, how outdoor conditions affect clock accuracy, and the different types of clocks and their accuracy. We also learn how to access and control the real time clock on the WildLogger board, set the date and time, and read it in different formats.
- Module 3.4 Overview (page)
- 3.4: Real time clock (video)
- 3.4.1: What time is it? (video)
- 3.4.2: Command line time and date (video)
- Support documents and pdf versions of video slides are available in the module 3.4 page here
- Module 3.4 Discussion (forum thread)
Module 3.5: SD Cards and the FAT File System
In Module 3.5, we begin with the basics of SD cards in all their wonderful form factors and flavors. We discuss the technology that makes SD cards possible, the types of memory cards, the form factors, their reliability, and power consumption. We also discuss what all those little numbers you normally ignore on your SD card mean, like read speed, card type, speed class, UHS speed class, and bus speed.
Once that’s done, we talk about file systems and why they’re needed. We go into how a file system fits on top of SD cards, how it organizes the bulk storage on an SD card, and the different types of file systems including FAT32 and exFAT.
In the lab portion, we’ll learn how we access the SD card on the WildLogger, installing the Arduino library to control our SD cards, and how easy it is to implement a system that can access multiple SD cards. We learn how to create and open files for reading, writing, or appending, how to read and write to a file, and things to watch out for to prevent file corruption. We implement a mini DOS system (Wild-DOS?) with commands to list files in a directory, and read, write, and delete files. Finally we finish off by implementing a command to write timestamped sensor data and files to our SD card.
- Module 3.5 Overview (page)
- 3.5: Reading and Writing to the SD Card (video)
- 3.5.1: The FAT File System and Reading/Writing Our First Files (video)
- 3.5.2: Did I Just Create MS-DOS? (video)
- 3.5.3: Did I Just Create a Datalogger? (video)
- Support documents and pdf versions of video slides are available in the module 3.5 page here
- Module 3.5 Discussion (forum thread)
Module 3.6: Interrupts
In this final submodule for Module 3, we’ll be discussing the voodoo topic of interrupts. Interrupts are a bit of an intermediate/advanced topic in device design but they’ll also play an important role in our data logger, and many other field devices.
We start by discussing interrupts, how they fit into our power management strategy, and how they can be extended to implement things like operating systems. We then get introduced to actual interrupt implementation using the on-board pushbutton on the WildLogger. We learn things that can go wrong with push buttons, how to work around those limitations, and how to write interrupt handlers to manage push button events.
We then learn about PIR motion sensors, how they work, their limitations, and what PIR stands for. We learn how temperature affects range and also how to compensate to reduce false positives at low temperatures and missed opportunities at high temperatures. We learn how to interface a PIR motion sensor, how to write an interrupt handler for them, and programmatic limitations like their warm-up times and reset times.
Finally we learn how to set timers and alarms on our real-time clock. This fits into the main power management strategy for WildLogger and will allow us to sleep most of the time and just wake up to collect data on a minute, hourly, daily, weekly, or even monthly basis.
- Module 3.6 Overview (page)
- 3.6: Interrupts (video)
- 3.6.1: Pushbuttons and Interrupts (video)
- 3.6.2: PIR Motion Sensors and Interrupts (video)
- 3.6.3: Real Time Clock Interrupts (video)
- Support documents and pdf versions of video slides are available in the module 3.6 page here
- Module 3.6 Discussion (forum thread)
Now that we have an understanding of the basic functionality of our data logger, and working code that’s been tested, we’ll be ready to tie everything together in Module 4 where we create our functional data logger application.
Module 4: Tying it all Together
In this module, we tie together everything we’ve learned so far into a functional data logger application. We’ll be implementing the temperature and humidity sensor, realtime clock, analog digital converter, SD cards,PIR motion sensor, and command line interface to implement a test version of our datalogger. We’ll then test it for functionality and check that we have things in the format we want it in.
In the second part of this module, preparing for failure, we learn that everything fails and it’s important to prepare for this. We’ll add additional safety checks to prevent what we can, diagnostic logs for documenting errors after the fact, and error codes which will be important for both field work and forensic studies when a device fails in the field.
This module will be code heavy since we’re not introducing any new concepts, but integrating a lot of things together.
- Module 4 Overview (page)
- Module 4.0 – Tying It All Together – Integrating Our Datalogger Into A Functional Application (video)
- Module 4.1 – Safety Checks and Diagnostics (video)
- Support documents and pdf versions of video slides are available in the module 4 page here
- Module 4 Discussion (forum thread)