There are 2 images available. For Raspberry 1 B (26 pin header) and Raspberry 2 B (40 pin header). The Raspberry 1 B is based on the wheezy distribution (Linux kernel 3.12) while the newer quadcore Raspberry 2 B is based on the new jessie raspbian (Linux kernel 4.3). Both compiled with PREEMPT_RT and everything installed for GPS with PPS support and netcdf data acqusition. The images provide among others

  • python 2.7 / 3.2 with numpy, netcdf, matplotlib (these 3 take over 600MB disk and would need several hours to compile/install from source) (only Pi 1 B)
  • several useful packages already configured and installed (e.g. fail2ban or watchdog) to make the system more reliable and highly available. (only Pi 1 B)
  • lighttp (HTTP) + PHP server, vsftpd (ftp-server), websocket-server (real-time transfer of data), and many command line tools such nmap, git, highlight... (only Pi 1B)
  • libraries for development (etc. nco-tools to dump netcdf files)
  • meaningful privileges set and configured system-wide
  • no graphics, everything unnecessary removed

The easiest way is to download the entire image and flash to an SD-card.

The new image has been released recently!

Raspberry 2 B: JessiePPS-B2.img.tar.gz

tarball archive, date: 2016/11/15, compressed size: 1.7GB


Raspberry 1 B: raspbian-RT-opendatalogger20151207.img.tar.gz

tarball archive, date: 2015/12/07, compressed size: 586MB

Configuring the datalogger

  1. Copy the downloaded image to an SD-card, insert into a raspberry and boot. (Instructions)
    • username: pi
    • password: raspberry
  2. Set root password
    • sudo passwd
  3. Run sudo raspi-config which will give you a "graphical" user-interface

    • change your (pi) password
    • extend the file system to the size of your SD-card
    • change hostname
    • set time zone / keyboard


    • accept the reboot or do sudo reboot manually.
  4. Update the system

    • sudo apt-get update
    • sudo apt-get upgrade
  5. Get the sampling program up to date from the repository) using git

    • cd ~
    • git pull
  6. Test I2C connection to the AD-converters.

    • After connecting the ADS1115 IC-s to the I2C interface (Where to connect?), it is advised to check if they are recognized. Use the command: sudo i2cdetect -y 1. Each ADC (and any other device on the I2C bus) has a unique address. For the ADS1115:

    ADDR pin connected to address
    GND 0x48
    VCC (+3.3V) 0x49
    SDA 0x50
    SCL 0x51

    • i2c detect result

    • As it can be seen, only 1 ADC is present. Another i2c config guide.

    • The i2c clock frequency is set to 2MHz which is quite high. Usually, there is no need to reduce the frequency (I am able to run up to 4MHz), however if you are experimenting or having corrupt data, you can display the actual clock frequency by sudo cat /sys/module/i2c_bcm2708/parameters/baudrate and temporarly also set by writing as root to this file. The permanent setting for the clock frequency (also called baud rate) is done in the /etc/modprobe.d/i2c.conf file.
  7. If check is fine, we will compile from source. It takes just about half a minute. (Check out the directory tree). So we navigate to the directory where the makefile is, make, verify if it's running correctly and install.

    • cd ~/opendatalogger
    • before building please configure how many ADCs you are using, and what the addresses are. This must be done before compilation in the configure.txt file.

      • example A: 1 ADC with address 0x49:

        • PREPROC+=-D CFG_ADC1=0x49 and the sequence is also neccessary:
        • PREPROC+=-D CFG_SEQ1_ADC1=ADS_CONF_MUX_D_01 if you are using differential input between channel 0 and channel 1.

        Write this two lines into configure.txt

      • example B: 2 ADCs each 1 channel used.

        • PREPROC+=-D CFG_ADC1=0x49
        • PREPROC+=-D CFG_ADC2=0x48 and the sequence:

        (please do not copy the item sign and my comments)

      • for further examples go to github

      The next steps are

    • make

    • sudo build/ads --debug If there are no erros, go to the next step
    • sudo make install

      The last command copies the content of the build directory to /opt/opendatalogger/ where it is executed from the next boot. There should be no troubles since the hardware is assumed to be identical, but for completeness it is noted how to uninstall (sudo make uninstall) If you wish to start immediatelly, run

    • sudo /etc/init.d/opendatalogger start

    • to watch the output do tail -f /opt/opendatalogger/log/ads.log or go to the website localhost

...soon to be continued


comments powered by Disqus