Before you start
- Register for the course - this helps us track participants and gives you email updates when new modules are released and events are scheduled.
- Build along with Wildlogger kit ($30 USD). You'll also nee a USB cable (Mini-B), 3 AA batteries and a microSD card.
- Join our BYO Datalogger Community Forum to ask questions and meet fellow course participants
- Visit the Course Playlist on our YouTube Channel to watch all videos in order
- You can find the hardware files, documentation, and software at the github repository for this course here.
Welcome
- Course Overview and FAQs (page)
- Live Event: Course Overview & FAQs (video)
- Meet other participants (forum thread)
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 1 Overview (page)
- 1.1: Understand the Design Flow (video, 4:19)
- 1.2.1: Understand the full design stack: Hardware (video, )
- 1.2.2: Understand the full design stack: Memory power (video)
- 1.3: Understand the full design stack: Software (video)
- Support documents: Terminology (pdf)
- Module 1 Discussion (forum thread)
- Live Event: Office Hours (video)
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 2 Overview (page)
- 2: Setting up the Arduino IDE (video)
- 2.1: What's a datalogger? (video)
- 2.2: Setting up Arduino (video, pdf)
- 2.3: Arduino program structure (video)
- 2.4: Writing our first program (video)
- 2.5: Hello world (video)
- Support documents and pdf versions of video slides are available in the module 2 page here
- 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 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 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)
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 5 Overview (page)
- Module 5.0: Power Optimisation: How low can you go? (video)
- Module 5.1: Who let the watchdogs out! (video)
- Module 5.2: The Grand Finale (video)
- Module 5 Discussion (forum thread)
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 6 Overview (page)
- Module 6: Ruggedising Devices (video)
- Module 6.1: Ruggedising cables, connectors and user interfaces (video)
- Module 6.2: Assembling the Wildlogger (video)
- Module 6 Discussion (forum thread)
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 7 Overview (page)
- Module 7: Piloting and Testing (video)
- Module 7 Discussion (forum thread)
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.
- Module 8 Overview (page)
- Module 8: In the Field (video)
- Module 8: Discussion (forum thread)
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.
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.