article / 21 January 2021

Course Directory

Welcome to the Build Your Own Datalogger virtual course. On this page, you'll find a table of contents to help you navigate around the course and supporting materials.  

Before you start


Module 1: Understand the 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.

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”. 

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.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.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.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.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.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. 

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 datalogger 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 5: Optimising your Application

In Module 5 we’ll optimise our data logger application, and add the finishing touches to application code so it’s ready for deployment. We go through calculating battery life, ways to power optimise our device in both the hardware and software, putting our device into low power mode and waking it up again, and implementing a watchdog timer to gracefully recover from tricky embedded software bugs like stack overflows, race conditions and memory leaks.  Then, we’ll remove our command line code, and implement all these features into our final deployment code.  Woohoo!

Module 6: Ruggedising Devices

In Module 6 we discuss ways to project devices from water, dust and animals. Then we assemble the WildLogger using cable glands so our device remains protected in its enclosure.

Mechanical failures are a common reason devices fail in the field, however there’s lots we can do to protect our devices. In this module we cover enclosure IP ratings, screws, and protecting the bare PCB using varnish, potting, heat shrink tubing and silica gel. We also discuss wire gauges and AWG ratings. Plus we cover waterproofing holes with ePTFE and TPU, securing cables using cable harnesses, and getting our cables safely through the enclosure using cable glands and external connectors like barrel jack aviation, SP and M connectors.

Finally, we go through how to disassemble and reassemble cable harnesses so we can thread the WildLogger cables through the cable glands and seal it, ensuring our enclosure remains IP65 rated.

Module 7: Piloting and Testing

In Module 7, we take our fully assembled system into the lab, sandbox and pilot test environments. We go through the purpose of each environment, running accelerated testing and some general tips. We also troubleshoot common issues such as shorter-than-expected battery life, inaccurate readings and missed readings. 

Module 8: In the Field

It's Module 8 and you've reached the final module in the course! We’ve built, coded and tested our data logger. Now we’re taking it into the field. We’ll discuss the overall field maintenance approach, and go through useful equipment to have with you including solder irons, wire strippers, wire crimpers, extra cable harnesses, extra wires, and a bunch more. Finally, we discuss visually expecting devices for damage, and debugging with and without a laptop.

By the end of this module, you would have completed the course. Congratulations! We hope this is just the beginning of customising your own devices for field research and conservation. 

End of Course Survey

Well done! You have now (hopefully!) reached the end of the Build Your Own Datalogger course and have a real, working datalogger. This course has been a lot of work to develop (more than we anticipated if we're honest, that third module was a monster), but your enthusiasm for the course and what you're learning has made it more than worthwhile. 

As we look ahead to running this course again next year and developing new courses, we'd love to hear about your experience taking this course. What went well? What can we impove? How are you using the datalogger you build? What courses could we design in the future to answer your questions? 

This survey has 11 questions and should only take about 5mins to complete. Take the survey here

Add the first post in this thread.

Want to share your own conservation tech experiences and expertise with our growing global community? Login or register to start posting!