This quick start guide is meant to get you up and running with your ALog BottleLogger as efficiently as possible.
All right. You have your logger, and you’re ready to measure… something. Anything, really. But you need a hand getting out of the blocks. This page is here for you.
First, download and install all of the required software. To install the Arduino software and customize it with our core data logging libraries, run through the following steps:
- Download Arduino’s latest version (1.8.0 at the time of writing): http://arduino.cc/en/Main/Software
- Download the latest versions of the required software libraries and place them in your ~/Arduino/libraries (or ~/sketchbook/libraries, for older Arduino versions) folder.
Stable release: [ZIP] [TAR.GZ] (recommended)
Nightly build: [ZIP] [TAR.GZ] (for only those who can tolerate things breaking once in a while
- Run the Arduino program and follow the instructions at https://github.com/NorthernWidget/Arduino_Boards to add the “Northern Widget” boards definitions.
- In order to communicate with the ALog and set its clock, you will want to download ALogTalk from our GitHub repository, along with Python if you are running Windows (Linux and Mac users have Python by default). See http://www.python.org/getit/. An easy distribution of Python is Anaconda.
If you need some help getting up an running with Arduino
Limor Fried has an excellent tutorial for Arduino at http://www.ladyada.net/learn/arduino/. If you are unfamiliar with the platform (and/or embedded electronics), I strongly suggest that you purchase and Arduino Uno (http://arduino.cc/en/Main/arduinoBoardUno), which is their basic board upon which the ALog BottleLogger is based, and run through these tutorials to get used to C/C++ programming and Arduino.
Once all of these are installed, you are ready to program your ALog.
Second, upload some code to your data logger. We’ll start with an example that does nothing but log the time. Follow these steps:
- Start the Arduino application on your computer.
- Go to File→Examples→Logger→alog_no_sensors. Click to open it.
- After following the instructions on the software page or here, select “ALog BottleLogger” under “Northern Widget LLC” as your board.
(OLD BOOTLOADER VERSIONS ONLY — PRE-2017: Select “Arduino Pro. Sparkfun’s Arduino Pro 3.3V has the same microcontroller chip and clock speed as the ALog BottleLogger, so its settings are compatible.)
- Plug in your ALog BottleLogger using a USB A to B cable, like this one. (No, we’re not affiliated with SparkFun, I just like them and they were just my local open-source electronics distributor when I (Andy) was in grad school in Boulder, Colorado.)
- The BottleLogger should blink a couple of times on the LED’s that are right by the USB port. This means that it sees that it has been plugged in. Sometimes, we ship the BottleLoggers with a “blink” program installed. This will cause the large red LED in the center to blink when the ALog is plugged in… so your board might do this too. It’s our way of testing that the board is programmable before shipping it to you.
- Click on the “tools” menu, like the above figure. The “Serial Port” item in that menu should no longer be grayed out.
- Click “upload”, and send the code to the ALog. It will compile for a little while first, and then be sent over as a bitstream while the two small LED’s by the USB port on the ALog blink furiously: these are telling you that data is being sent to the logger (RX) or transmitted from the logger to the computer (TX).
- Once this is done, click the “Serial Monitor” button and set the baud rate to 38400 to see what your data logger says. It will probably say something about setting the clock while the ALog flashes a syncopated rhythm on its main LED. This means that it is time for your next step…
Third: Interfacing with the ALog and setting its clock
To set the clock of the ALog, plug it into your computer and run the “ALogClockSet.py” program, part of the ALogTalk package. This requires a Python interpreter (standard on all Linux and Mac computers; I suggest Anaconda if you need to install it on a non-Linux OS) as well as “pyserial“. (This can be installed by typing “pip install pyserial” once the other Python packages have been installed.) Once your full Python system has been set up, the clock-setting program can be run from the terminal by navigating to the ALogTalk directory and typing:
>> python ALogClockSet.py
Instructions will appear on the screen; if the logger does not respond, you can push its “reset” button.
Note: if you have sensors plugged into the UART, run SimpleClockSet.py instead, after uploading the “ALog_DS3231_set_echo” sketch that comes with the Northern Widget DS3231 real-time-clock library.
Fourth: Creating and uploading a custom data logging routine
The Github repository has examples of data logging routines, which you can modify for your own purposes. See the “examples” folder. You can also look at “Logger.h” to see what variables you need to pass to each sensor’s function.
These examples include comments for where you should place your commands to communicate with various sensors, both analog and digital.
If you are unfamiliar with C or Arduino programming, the Arduino reference guide can help: http://arduino.cc/en/Reference/HomePage.
Fifth: Attaching sensors
Use the screw terminals (labeled) to connect sensors to the logger. These screw terminals are labeled with pin numbers that correspond to the pin numbers used in the program.
Sixth: Field deployment
We have learned a bit from past field installations, so you can e-mail us at firstname.lastname@example.org to tell us that you want some of these examples on the website. In the meantime, it’s basically an exercise in keeping the logger away from the elements and animals that like to chew wires.