This page describes how to build the two main components of the hardware: the Sticky Pi Device and the Data Harvester. Briefly, multiple Sticky Pis are deployed in the field. Each device stores its images on its own SD card. On a regular basis (e.g. weekly), experimenters use a data harvester to retrieve the data from multiple devices. Silently, the data harvester also syncs the location and time of the devices it communicates with. One Data Harvester may be used to maintain multiple traps. Multiple Data Harvesters can exist in the same platform (e.g. five experimenters, one harvester per experimenter, ten devices per experimenter).

This section involve familiarity with 3D printing, electronics, DIY, ... We are working on streamlining the assembly process towards a more `off-the-shelf tool', but are generally happy to collaborate and help building devices -- do not hesitate to contact us.



Sticky Pi Device

Figure 1: Sticky Pi Device

As you can see in Figure 1, the device has two main parts, which are connected with a ribbon cable: the camera box and the light box.

A complete description of the parts, price and reference is available in our Bill of Material

Note that all 3D-printed parts are available on our onshape repository where they can be exported in a variety of formats.

You can also take a look at our schematic.


The camera Box and light box can be assembled separately and swapped between devices (i.e. the light box acts as a plug and play module for the camera box).

Camera box

Needed parts for the camera box

Figure 2: Needed parts for the camera box

  1. Burn our OS image onto the SD card (note you can also make your own from scratch image by adaptingthe scripts in).

    Danger Zone! Ensure you know what you are doing here. In particular, give the path to the correct drive otherwise you may wipe out the wrong drive, and lose data. On Unix-like systems, use lsblk to see all drives.

    To burn an SD card use our script like sh burn_image.sh -i <PATH_TO_LOCAL_IMAGE> -d <DEVICE>, where <PATH_TO_LOCAL_IMAGE> is the OS image you just downloaded, and <DEVICE> the SD card location e.g. /dev/mmcblk0 -- you need etcher-cli.

  2. Prepare the Raspberry Pi.
    Modifications to the Raspberry Pi Zero

    Figure 3: Modifications to the Raspberry Pi Zero

    1. Solder 2x5 headers for the Real Time Clock on pins 1-10. Mount the clock (Figure 3A).
    2. Solder directly the IDC right angle connector onto the board on pins 35-40 (Figure 3A).
    3. On the back of the Raspberry pi board, use a jumper cable to solder GPIO pin 40 to +5V (this provides power to the Pi, Figure 3B)
      Mounting the Raspberry Pi on the sledge

      Figure 4: Mounting the Raspberry Pi on the sledge

    4. Use four screws to mount the pi on the "Pi sledge". Plug the ribbon cable for the camera (Figure 4A).
    5. Fold the ribbon cable around the sledge as in the picture, and mount the camera with another four screws (Figure 4B-C)
    6. Insert the OS SD card (burnt as described above)
    7. Focus the camera. For those who want to assemble multiple devices, we recommend a "camera focusing station" that can adapt a Pi sledge and has a display, keyboard... This way, one can use raspivid in preview mode to check focus and alignment.
    8. Initialize your device (you can do that at the same time as focusing), which you can do with the Data harvester:
      1. Power the data harvester, and ensure the time is set (not it is in GMT/UTC).
      2. Plug it to the pi's USB port.
      3. Boot/power the pi.
      4. The data harvester should then display information, including the unique ID of the pi. It will be an eight-digit hexadecimal number (e.g. abcd0123). Make a couple of physical label with this tag and stick them to the box (and write them on the sledge).
      5. As part of the communication process, the clock of the raspberry pi will be updated (indeed the factory RTC is unset)
    9. Thread the 1x6 ribbon cable (it should be at least 50cm long) through the "camera box" before clamping the 2x3 IDC connector on each side. You want have the two connectors in the same orientation (i.e. a wire connect pin 1 of the left connector to pin 1 o the right connector -- and not pin 6): IDC
    10. Plug the ITC connector on the Pi GPIO, and gently slide the Pi sledge inside the camera box, while pulling the slack cable from the outside. Note, at the stage, you can also add some desiccant inside the box to reduce fogging.
    11. Assemble the "camera box lid":
      Assembly of the camera box lid

      Figure 5: Assembly of the camera box lid

      1. Cut a glass microscope slide into a 25x25mm square with a glass cutter (e.g. with a 3d printed gauge and snaping tool and tool it takes just a few seconds, Figure 5A-C).
      2. Place the glass window on the slot, use masking tape or duct tape to cover the central area and the back. Cast a layer of epoxy resin, and let it set for a day this will embed the glass in the lid. Note that it makes sense to make multiple lids at the same time and avoid wasting time and epoxy (Figure 5D-E).
      3. Clean the lid. Optionally coat it with water repellent such as Rain-X
    12. Add calk at the junction between the lid and the box, screw the lid on the box. Also use calk to seal the 6x1 ribbon cable outlet.
    13. Coat the whole box with a layer of epoxy (note you can also chose to do that before assembly)

Light box

Needed parts for the light box

Needed parts for the light box

  1. Assemble our custom PCB:
    Assembly of the custom PCB

    Figure 6: Assembly of the custom PCB

    1. Manufacture/order the PCB from the gerber files (Figure 6A)
    2. Prepare the timer (scratch the board to disable the built-in potentiometer) -- (red in Figure 6B).
    3. Solder all parts to the board. This should be fairly self explanatory from the labels (Figure 6C).
    4. Make a custom connection to our push button (red in Figure 6C). This is arguably a bit of a hack, but that allows us to mimic the built-in TLP5110 push button, with our own.
    5. Thread the push button (before soldering it, not to twist the cables)
    6. Screw the PCB to the bottom of the light box (be careful not to split the material, do not hesitate to use shorter screw).
      Assembly of the custom PCB

      Figure 7: Assembly of the custom PCB

    7. Insert the battery connector (Figure 7A)
    8. Screw the Humidity and temperature sensor to the outside the box (Figure 7A-B).
    9. Glue the solar panel in the top slot
  2. Assemble the light diffuser:
    Assembly of the custom PCB

    Figure 8: Assembly of the custom PCB

    1. Cut six 5V, white, led light strips (Figure 8A).
    2. On one side, cut away the + pad, and the - on the other side.
    3. Align all the + pads on the top, and solder them together, in parallel, with a transverse wire
    4. Solder the 1x2 header to be connected to our PCB as in the picture (the male pins will be protruding downward). Use superglue to glue the header to the diffuser (Figure 8B).
  3. Test setup: Connect a camera box, using the 1x6 cable. Plug the light diffuser (or just a placeholder 5v LED light for now). Plug a battery. You should see the LED of the timer glowing (if not, press the push button to force reset the timer). After less than a minute, the The flash should be triggered, and the timer should shut down. Pressing the push button should restart the whole process. If left untouched, this should happen every 20min, approximately.

QC and troubleshooting

Controlling the assembly before deployment in the field will save you a lot of trouble. A few suggestions:

  1. Plug all devices, and press the push button to initiate the image acquisition.
  2. Ensure all devices flash. The light should blink twice.
    • If the light does not blink. Check power/timer/light connection
    • If the light blinks more than twice, the device is reporting an error. Typically, the camera cannot be found.
  3. Plug the Data Harvester and boot a device you want to test. Data transfer should be initiated.
    • Check the label of the pi matches the ID displayed by the harvester.
    • Monitor image transfer.
  4. Once all devices have been harvested, retrieve the memory stick of the harvester and inspect the content.
    • There should be one directory for each device
    • Each directory contains all the pictures for this device and a log file
    • Open the log file to check no errors were reported
    • The name of each image contains the time in UTC. Ensure the time is correct.
    • Open the images to check exposure, focus,...
    • The environmental data (temperature, relative humidity, GPS coordinates and other meta variables) are encoded in the exif metadata inside the "Make" field (Sometime, though rarely, the temperature/humidity sensor fails, so you may have missing values).


Data harvester