Skip to content

4. Set up sensors and other hardware

Grace Smith Vidaurre edited this page Nov 14, 2023 · 24 revisions

Step 1. Solder a customized printed circuit board (PCB)

The customized PCB allows for connecting more sensors to the Raspberry Py by extending the general purpose input and output pins (GPIO).

Materials

  • Adafruit Perma Porto 1/2 sized breadboard and 40 pin Raspberry Pi GPIO kit with the ribbon cable (using the breadboard as the PCB)

  • Strips of pin headers compatible with soldering

  • 330 ohm resistor (resistors from 200 - 500 ohm will work)

  • Red LED

  • Solid core 22 AWG PVC coated wire in red and black

  • Soldering iron station. Digital irons provide better temperature control for safety

  • Helping hands and magnetic cones, or a tabletop vice

  • 1/2 sized breadboard (plastic)

  • Diagram of the PCB with the holes to be soldered filled in as a guide

  • Diagonal wire cutters

  • Wire strippers

  • Hot glue gun

  • Small vice grips or pliers

  • Desoldering tool or pump to clean up mistakes

  • A tabletop workspace protected with silicone or plastic mats

Methods

1.1. Break apart the strips of pin headers by hand or with the wire cutters to the following sizes:

  • 16-strip x 2 (for the RFID reader)

  • 8-strip x 2 (for the positive and negative connections of other sensors)

  • 2-strip x 1 (for the data connections of the beam breakers)

  • 1-strip x 2 (for positive and 1-wire data connections of the temperature probe)

1.2. Cut the red and black jumper cables to size:

  • Cut one 6 cm length of the black wire, one 6 cm length of the red wire, and one 4 cm length of the black wire

  • Strip about 1 cm of insulation off either end of each wire

1.3. Prepare the resistor and LED for soldering:

  • Bend the long (positive for Adafruit LEDs) leg so it looks like it’s taking a short step forward

  • Bend both legs of the resistor downwards, right next to the body of the resistor

1.4. Prep the 1/2-sized breadboard (plastic, not the PCB) by disconnecting the leftmost side. The middle and rightmost chunks should remain. This breadboard will be used to secure pin headers while soldering

1.5. Turn the soldering iron on. If it’s digital, turn it up to at least 610 degrees F

1.6. Push each of the 2 16-strip pin headers into row 1, columns d and g (respectively) of the breadboard, with the long pin side down. Then place the PCB on top of the pin headers, face down so the gold circles on the back are face up. The pin headers should sit immediately adjacent to either side of the GPIO adapter chunk outlined in the middle

1.7. Check that the short sides of the pin headers stick out evenly above the back side of the PCB. If not, take off the PCB and either use a flat hard edge to push the pins down, or a small vice grips to pull them up if they’re too short. Then replace the PCB

1.8. Solder all 32 pins. Let the solder dry briefly, then remove the PCB and pins from the breadboard

1.9. Repeat steps 1.6 to 1.8 for the 8-step, 2-strip, and 1-strip pins (all together):

  • Push one 8-strip into rows 6-13, column E
  • Push the next 8-strip into rows 14-21, column D
  • Push the 2-strip into rows 19-20, column B
  • Push the 2 1-strips into rows 3 and 6, respectively, in column B

Carefully place the PCB so that the single pin headers fall into the holes for the 3V power and the #4 1-wire data hole. All others should fall into place. Use the helping hands to evenly secure the PCB before soldering

1.10. Place the 40 pin GPIO socket header in its location at the center of the PCB. Make sure to line up the groove of the header with the groove marked on the board. Flip the socket header and PCB upside down, then solder all 40 pins. Use the helping hands or magnetic cones to keep the PCB in place

1.11. Place the 3 jumper cables, the resistor, and the LED on the PCB. As these are each placed, bend the ends that stick out behind the PCB to hold each piece in place:

  • Place the 6 cm long red wire in the top 5v0 hole (column J) on the top right of the PCB, and the top hole of the positive strip marked on the left side of the PCB

  • Place the 6 cm long black wire in the top GND hole (column J, 3rd hole from the top) on the top right of the PCB, and the top hole of the negative strip marked on the left side of the PCB

  • Place the 4 cm long black wire in row 24, column F on the right side of the PCB, and the leftmost hole in the last GND row above

  • Secure the resistor on row 24 as well, with the legs in columns G and I, respectively

  • Put the negative (short and straight) leg of the LED in row 24, column J, and the positive (long, bent) leg in row #16 of the GPIO area and column J

1.12. Solder each of these pieces after flipping the PCB to be upside down, and holding it in place with either helping hands, magnetic cones, or the vice

1.13. Use the diagonal cutters to clip off the extra long ends of each piece on the back of the PCB

1.14. Double-check the quality of the soldering:

  • All soldered connections should look stable (see examples in video tutorials)

  • There should not be solder connecting rows or columns that aren’t already meant to be connected

1.15. If all soldered connections look good, then use a hot glue gun to dab hot glue over all the ends of the jumper cables, the entire resistor, and the legs of the LED. This is to cover up exposed metal that will be live connections once the Pi is turned on, which reduces the likelihood of short circuiting by accidentally touching a live connection

Step 2. Make a RFID loop antenna

Literature and tutorials:

  • RFID perch antenna: Mason Youngblood (2019) A Raspberry Pi-based, RFID-equipped birdfeeder for the remote monitoring of wild bird populations, Ringing & Migration, 34:1, 25-32, DOI: 10.1080/03078698.2019.1759908

    • We used the same EM4102 PIT tags from Eccel Technology recommended by Mason. These PIT tags require RFID antenna inductance of 770 ± 50 microhenries (uH), as well as the CognioT RFID reader. Mason's paper describes RFID perch antennas, and most of these materials and similar methods can be used to make loop antennas
  • MakeTronica video tutorial

Materials:

  • 125kHz CognIoT RFID reader with 36 pins (can be purchased on Tindie or directly from the CognIoT online store). You can contact CognIoT directly to order readers in bulk. Future versions of this RFID reader may be updated to fit on all 40 Rapsberry Pi 4 pins

  • Raspberry Pi 4 Model B (any size RAM will do). The CognIoT RFID reader should also be compatible with other Raspberry Pi models, including the Zero (see Youngblood 2019 above)

  • M4102 PIT tags. I used Eccel Technology bands with an inner diameter of 2.3mm for zebra finches (SKU 411). If you're working with another avian species then be careful to choose an appropriate band size

  • Inductance meter. I used a Proster LCR Meter LCR Multimeter (for measuring inductance, capacitance, resistance, Amazon ASIN 5060492194040)

  • Heat gun (optional)

  • Lighter

  • Wire strippers that can strip 24 AWG wires

  • Diagonal wire cutters

  • Roller holder. This may be included in some soldering stations, but you can also use magnetic cones that are available with helping hands for soldering projects or a toilet paper dispenser

  • Crimping tool that can handle 24 AWG crimp tins (IWISS SN-28B Dupont Crimping Tool AWG 18 to 28, Amazon ASIN: B00OMM4YUY)

  • Soldering iron or station and a spool of solder (I used the side-mounted solder roller holder on an X-Tronic soldering iron station. Amazon ASIN B079VVHPPS)

  • Spool of 30 AWG enameled magnet wire. I used 8oz / 1606ft spools from Remington Industries (SKU 30SNSP.25)

  • A length of 1 1/2 in PVC, about 6 in long or more

  • Strip of paper about 1 in wide that is long enough to wrap once around the PVC

  • One piece of masking tape

  • One piece of Scotch tape

  • Four short pieces of Electrical tape

  • One length of 24 AWG green/white stranded twisted pair hook-up wire (Jameco Electronics, SKU BX13-68251-GW). The length of this wire will depend on your setup (e.g. how far the RFID reader will be from the entrance of the tunnel entrance). I used about 150 cm

  • Two 24-26 AWG crimp tins (Digikey 0874210000)

  • Heat-shrink plastic tubing

  • One 3-pin rectangular connector (1.50mm)(Digikey 0874390300)

  • Full-face respirator

  • Plastidip

Methods

2.1. Place the strip of paper around the length of PVC and tape the edges together with masking tape

2.2. Use the circuits.dk calculator to calculate how the number of turns will be needed to make the antenna. The inner diameter of the coil is the outer diameter of the 1 1/2 in PVC, which is about 1 7/8 in

  • Inductance: 770 uH

  • Coil inner diameter: 45.672 mm (1 7/8 in)

  • Coil length: 4 (see MakeTronica tutorial, this was the estimated mm between each pair of turns)

  • Wire gauge: 30

Note: The wire will need to be wrapped for at least 93 turns to make an antenna with the properties above. After making several antennae though, I found that this was too many turns for 770 uH +/- 50 uH, possibly because there was more variation in the coil length than 4 mm. I ended up doing 82 turns, and then removing turns while tuning each antenna to 770 uH +/- 50 uH.

2.3. Secure the free end of the magnet wire to the masking tape holding the paper on the PVC. Leave a ~4in long length hanging off on the free end. This free end will be connected to a lead wire later

2.4. Place the spool of magnet wire on the roller dispenser. Wind the free end of the wire around the PVC while laying each loop directly on the paper strip, and as close to the previous loop as possible

2.5. Upon reaching the total number of turns (see notes after 2.2), place a small piece of electrical tape directly on the magnet wire to hold all the loops in place.

2.6. Unwind an extra length of wire from the spool that is ~4in long, and cut the wire with the diagonal wire cutters

2.7. Carefully slide the paper and antenna off of the PVC. Unstick the electrical tape and wrap it around the loops to secure them. Use another piece of electrical tape to secure the loops directly opposite of the first piece of tape. I found that the loops need to be secured like this in order to get a consistent inductance reading

2.8. Check the inductance of the antenna with the inductance meter. Set the Proster LCR inductance to 2mH, connect the positive and negative leads to the ends of the antenna, and check the reading in mH

2.9. Tune the antenna inductance by unsticking the electrical tape and removing turns until the inductance is less than 770 uH (e.g. about 720 or 750)

  • If the wire comes loose from the cylinder or the antenna needs to be wrapped again, the wire can be wrapped around another cylindrical object (like a pencil) and held in place with tape before rewrapping the antenna. Careful with tangles and knots in the wire, keep it as smooth as possible while rewrapping

2.10. Once tuned, use two more pieces of electrical tape on opposite sides to secure the loops. There should now be 4 pieces of electrical tape securing the turns of the RFID antenna. This helps keep the antenna steady for more accurate inductance readings, as well as for covering the magnet wire in Plastidip

2.11. Do one more inductance reading to confirm that the antenna inductance lies within the expected range. I’ve found that securing the antenna with 4 pieces of tape increases the inductance reading from step 2.9.

2.12. Cut the free ends of the antenna to about 3cm, then burn a few mm of each loose end of the antenna with the lighter

2.13. Solder the magnet wire to two strips of 24 gauge wires

  • Each insulated strand (1 green, 1 white) will be used to hold the 3-pin connector that will fit into the RFID reader. The magnet wire used to make the antenna is too thin to fit into this connector directly. Unwind the strands of the lead wire for ~ 10 cm

  • Use the wire strippers to strip off about 1/4in or 1/2in of insulation from each insulated strand of the 24 gauge wires

  • Place one of the second smallest diameter heat shrink tubes onto each strand of the 24 gauge wire before soldering, and then the next smallest heat shrink tubing, which should sit snugly on each 24 gauge wire strand

  • Wind each burned end of the magnet wire around one of the stripped 24 gauge wires before soldering

2.14. Slide the two heat shrink tubing pieces so that the smallest diameter piece covers the soldered joint and as much of each free end of the antenna magnet wire as possible. Use the lighter or heat gun to shrink each pair over the magnet wire and soldered joint

2.15. Place the next widest heat shrink tubing onto the twisted end of the 24 gauge wire, and move it down to the other end where the strands are split. Use the lighter or heat gun to shrink this and secure the split joint

2.16. Place another piece of heat shrink tubing that will fit snugly over the wide end of the 3-position 1.5mm connector (the end into which the crimping connectors will be inserted)

2.17. Use the crimping tool to crimp leads into the 24–26-AWG terminals or crimp tins, then insert these terminals into the left and right slots of the 3-position 1.5mm connector (the middle slot will remain empty). This connector fits into the external antenna port on the RFID reader

  • Use the wire strippers to strip a few millimeters of insulation of the loose ends of the 24 AWG leads

  • Hold each crimp tin in a crimping cavity of the right size, then insert the stripped end of the wire and crimp the terminal without cutting through the wire

  • The crimped terminals have a bump on one end. When inserting the terminals into the connector, hold these terminals upside down so that bump touches the bottom of the connector slot

2.18. Secure the last piece of heat shrink tubing with the heat gun or lighter. The heat shrink tubing catches the lip of the wide end of the 3-position connector (to provide more stability)

2.19. Dip the antenna in Plastidip in a well-ventilated area (while also wearing a respirator). Use the Plastidip instructions to do at least 3 full coatings (30 minutes between coatings, 4 hours to dry completely). Adjust the number of coatings as needed so that the antenna fits snugly in the circular entrance of the nest container. I’ve been using black Plastidip, and any neutral color should work as long as it’s used consistently

2.20. Test the antenna by plugging the connector into the external antenna port on the RFID reader. Make sure the Raspberry Pi is off when connecting or disconnecting antennas

  • Turn the Pi back on. The LED onboard the RFID reader should be red if it detects the connected antenna. If not, this LED will blink

  • Start the automated tracking software in a terminal window

  • Open another terminal window and run tail -f /home/pi/log/nameoflogfile to track activity

  • Pass a PIT tag over the antenna to see if the ID is printed to the log file. Keep an eye on the LED onboard the RFID reader. This should turn from red to green when a tag is detected

  • Test detection performance by passing the PIT tag over the antenna at different distances, orientations, and velocities

Step 3. Make custom jumper cable harnesses for the different sensors

Customized jumper cable harnesses will be necessary when the jumper cables that are commercially available are not long enough for your experimental setup. These harnesses can be made using either crimping connectors or directly soldering jumper cables to either the customized PCB, the sensors, or both. Whether to use crimping connectors or soldering, or some combination of both, is up to you. I used crimping connectors only because I wanted to be able to easily remove/replace sensors throughout long experiments if devices failed. Also, since I was reusing cable harnesses across experiments, I didn't want to run into issues with soldered connections cracking over time.

The customized harnesses are also helpful for more stable connections with sensors that need a lot of cables, since jumper cables will be placed into DuPont header connectors that are joined together. For instance, while the RFID reader doesn't need long jumper cables, using harnesses of 8 or 5 cables placed in conjoined housing makes connections for the RFID reader more stable and easier to place/remove than using the single jumper cables that are commercially available.

For these harnesses you can use any colors that you'd like. I used black for ground, red for 5v0 power, orange for 3v0 power, white/blue for data in beam breaker and temperature probe harnesses, and yellow, green, and blue for other GPIO connections in the RFID harnesses. Also, the DuPont connector housing or headers that you use will depend on the headers soldered to the PCB (I used pin headers), as well as the jumper cables or headers on each of the sensors you're using.

Materials

  • Spools of 22 AWG stranded wire in different colors (red, black, white, blue, green, orange, yellow)

  • Socket crimping tins that fit 22 AWG wire, at least 30

  • Pin crimping tins that fit 22 AWG wire, at least 70

  • DuPont plastic connector housing in strips of 1 (at least 3 of these), 2 (at least 2), 3 (at least 1), 4 (at least 4), 5 (at least 4), and 8 (at least 4)

  • Diagonal wire cutters

  • Wire strippers

  • Crimping tool compatible with the larger crimping tins

  • Needle nose pliers

  • Flexible measuring tape

Methods

3.1. Cut lengths of the stranded wire in black, orange, and white for the temperature probe harness

  • 18 cm long lengths
  • White x 1
  • Orange x 1
  • Black x 1

3.2. Cut lengths of the stranded wire in black, red, blue, and white for the beam breaker harnesses

  • 98 cm long lengths
  • Red x 4
  • Black x 4
  • White x 1
  • Blue x 1

3.3. Cut lengths of the stranded wire in black, red, blue, green, yellow, and orange for the RFID reader harnesses

  • 30 cm long lengths
  • Black x 5
  • Red x 2
  • Orange x 2
  • Yellow x 7
  • Blue x 4
  • Green x 6

3.4. Strip about 4-5 mm of PVC insulation off each end of each wire

3.5. Use the crimping tool to attach crimping tins to each end of each wire:

  • Beam breaker cables: socket crimping tins on each end

  • Temperature probe cables: socket crimping tins on each end

  • RFID cables: socket crimping tins on one end, and pin crimping tins on the other

3.6. Place the crimped ends of each wire for the beam breakers into DuPont connector housing. For these cable harnesses, the direction that the open slots (in the plastic housing) are facing doesn't matter, but make sure to place each cable in order in the housing pieces on either end

  • 4 red cables into a 4-header housing strip on each end

  • 4 black cables into a 4-header housing strip on each end

  • 1 white and 1 blue cable into a 1-header housing strip on each end

Use the needle nose pliers to gently push on the upper edge of each crimping connector so it fits well in the housing.

3.7. Repeat step 3.6. for the temperature probe harness, but with the following changes:

  • From left to right, place the white, orange, and then black cables in the 3-header housing on one end. The black cable should go into the slot with the triangle symbol (this side of the harness will connect directly to the temperature probe)

  • Then place single housing pieces on the other end of each cable (these are the ends that will connect to the PCB, and are too far apart to be placed in the same header)

3.8. Repeat step 3.6. for the 26-pin RFID reader (13 pins on either side), but for 4 separate harnesses:

  • First 8-header harness, from left to right with the header slots facing upwards:

    • yellow (into the triangle slot on the socket side)
    • yellow
    • yellow
    • black
    • blue
    • blue
    • blue
    • orange (into the triangle slot on the pin side)
  • Second 8-header harness:

    • red (into the triangle slot on the socket side)
    • red
    • black
    • green
    • green
    • yellow
    • black
    • yellow (into the triangle slot on the pin side)
  • First 5-header harness:

    • black (into the triangle slot on the socket side)
    • blue
    • green
    • green
    • orange (into the triangle slot on the pin side)
  • Second 5-header harness:

    • yellow (into the triangle slot on the socket side)
    • black
    • yellow
    • green
    • green (into the triangle slot on the pin side)

Making the RFID harnesses in this way ensures that the open slots on each header will be easily accessible for testing continuity after using the harness to connect the RFID reader to the PCB

3.9. Fasten two or more cable ties around each harness to keep the wires from tangling, and clip the loose ends of the cable ties

Step 4. Modify a cage to fit the custom nest container

This protocol was developed for modifying a Prevue travel cage that fits inside a recording chamber. The front of the cage is cut open to fit a custom nest container, such that container entrance sits inside the cage, but back half of the container sits outside of the cage, with the back door accessible when the recording chamber is opened. I used laminated plastic and cable ties to seal gaps around the container itself.

Materials

  • Small cage

  • Small 8 in bolt cutters

  • Laminator

  • 5 mm laminating plastic sheets (at least 4)

  • Revolving punch pliers

  • Scissors

  • 8 in or 6 in cable ties x 15

  • Dry erase marker

  • Permanent marker

Methods

4.1. Use the bolt cutters to cut the left front side of the cage (which should include a small door) as follows:

  • Cut the thick horizontal rod on the top left after 6 gaps

  • Cut the thick horizontal rod on the top right (after the middle divide) after 5 gaps

  • Cut the thick horizontal rod on the bottom left after 5 gaps

  • Cut the thick horizontal rod on the bottom right (after the middle divide) after 4 gaps

  • Cut the smaller vertical rods as close to the nearest thicker piece as possible to free this large section of the cage

4.2. Run the 4 pieces of laminate through the laminator

4.3. Use two pieces (or more) to make templates of a longer piece that will sit on the front, and a shorter piece that will sit on the top of the cage. The longer piece should have a rough cutout of the vertical shape of the nest container, and the top piece should have a semi-circular cutout to accommodate the curved front side of the container. The top and bottom piece should overlap enough to place a cable tie through both pieces on the left and right sides. Use the 3.5mm punch to make holes for cable ties, and the 4.5mm punch to make larger holes for a larger cable tie to secure the bottom of the container to the cage. It took me a few tries (with laminated plastic, the punch pliers, and cable ties) to make these templates

4.4. Trace the templates onto new pieces of laminated plastic, including the holes that should be punched. Mark the top left corner with "Top L" in permanent marker, then erase all dry erase markings

4.5. Cut the new pieces of plastic, and use the 3.5mm punch to make the 22 holes for the smaller cable ties, and the 4.5 mm punch to make 2 holes for the large cable tie

4.6. Attach the front piece with 10 cable ties, making sure to place the plastic sheet inside the cage. This is to ensure that the birds are protected from sharp metal edges. The bottom edge of this piece should line up with the bottom metal piece of the cage. Don't attach the very topmost cable ties at the top left and right, as well as the large cable tie (this should be used when placing the container later)

4.7. Attach the top piece with 5 cable ties. For the bottommost holes on the left and right, run the cable ties through both the top and front laminated pieces to attach them to each other

4.8. Tighten all cable ties as needed, and clip loose ends

Step 5. Make the nest container shields

These shields are laminated paper that 1) block the beam breaker cables from the birds' view, and 2) block the birds from perching on top of the beam breaker mounts. They are custom-made for this nest container design and templates should be adapted as needed.

Materials

  • Laminator

  • Scrap laminated plastic

  • 3 mm laminating plastic sheet x 2

  • Blank sheet of paper

  • Revolving punch pliers

  • Scissors

  • M3 8 mm screws x 4

  • Dry erase marker

  • Permanent marker

Methods

5.1. Use the scrap laminated plastic to make templates of shields that fit over the left and right beam breaker mounts (2 beam breakers each). These shields should not block the circular entrance. I made these templates with four 3.5 mm holes for M3 screws. Two holes are used to attach the shield to the lower screw of each bracket, and the outer beam breaker (underneath the nut), and two holes are used to attach the shield directly to the nest container (above the circular entrance and below the beam breaker mounts). The left and right templates are not symmetrical

5.2. Laminate the blank paper with the 3 mm laminate plastic

5.3. Use the dry erase marker to trace the edges and holes of each template, then cut out each template and holes with the scissors and punch pliers

5.4. Laminate the shields again with a 3mm laminate sleeve, so that the cut ends are sealed

5.5. Cut the shields out while leaving a thin edge of laminate around each. Mark the back and top of each shield with the permanent marker

5.5. Attach each shield to the container using the M3 8mm screws, the lower screw of each bracket, and the outer beam breaker

Step 6. Assemble the Pi, sensors, and nest container for experiments

PCT_wiring_diagram

When recording validation videos, you will only need to connect a camera to the Raspberry Pi. You will not need the printed circuit board, beam breakers, RFID antenna and reader, temperature probe, and all of the associated cable harnesses.

Materials

  • Raspberry Pi materials: * Raspberry Pi computer with or without the tracking system installed * Mini SD card with Raspbian pre-installed * Power cord * External hard drive * HDMI to mini HDMI cable, USB keyboard, USB mouse (optional) * Smraza acrylic with fan and aluminum heat sinks (optional)

  • Custom-built PVC nest container with a 3D-printed cap

  • Custom solder printed circuit board (PCB)

  • RFID materials: * Custom-built RFID loop antenna * 125 kHz CognIoT RFID reader * Custom jumper cable harnesses for all 26 GPIO connections * 4 in cable ties x 4 * Hot glue gun * Small scissors

  • Beam breaker materials: * 2 pairs of infrared beam breakers * M3 35 mm or 40 mm long screws x 4 * M3 hex nuts x 4 * Needle nose pliers * Small multi-bit screwdriver * Custom jumper cable harnesses for 5V power and ground for receivers and emitters, and data for receivers only

  • Camera materials: * Waveshare H infrared camera with 2 infrared LEDs * 2 m long ribbon cable * M2 screws at least 25 mm long x 4 * M2 hex nuts x 4 * Flat washers x 8 * Tweezers * Small multi-bit screwdriver

  • Temperature probe materials: * DS18B20 temperature sensor module kit with waterproof stainless steel probe * 4 in long cable tie * Custom jumper cable harness (3V power, ground, and 1-wire data)

  • Custom nest container shields, and M3 screws 6 or 8 mm long x 4

  • Modified tupperware container and Velcro

  • Modified Prevue cage fitted for breeding birds * 1 long and thick natural wood perch * 1 short and thin natural wood perch * 1 short wooden dowel * Seed hopper held in place with a bungee cord * Water bottle held in place with a metal bungee cord * Cuttlebone and holder with a short perch * Plastic swing * Nest hair holder * Long (> 10 in) cable tie x 1 * 4 in cable tie x 2

Methods

6.1. Slide the SD card into the Pi

6.2. Optional: If you're using a Smraza case, then use the manual for assembly but with the changes below. Using a case with heat sinks and a fan can help dissipate heat, especially if Pis will be operating over long experimental timelines:

  • Connect the camera ribbon cable to the Pi before any pieces that have a slot through which to thread this cable. Use the flat end of the tweezers or the needle nose pliers to gently lift up the plastic housing and push it back down to secure the cable

  • Also connect the 40-pin GPIO ribbon cable onto the GPIO pins about halfway through the case assembly. These cases differ slightly, so you may have to play around with which pieces come before and after the ribbon cable. If you need to take the ribbon cable off and replace it, use the needle nose pliers to pull up each end as gently as possibly without bending the pins. Place the ribbon cable so that the side with the divot faces into the Pi. Also check that the 5V power pins line up between the RPi (with a GPIO diagram) and the custom PCB

  • Thread the camera and GPIo ribbon cables through additional pieces of the Smraza case as needed

  • Connect the other side of the GPIO ribbon cable to the custom soldered PCB

6.3. Attach the RFID antenna to the circular entrance. The antenna should sit in the very middle of the entrance, so that birds coming in or out of the container will step directly on the antenna. This method of fastening the RFID antenna is designed to hold the antenna securely in place but also allows for the antenna to be switched out for troubleshooting if necessary:

  • Trim off drips of Plastidip with small scissors

  • Dab a small amount of hotglue on bottom side of the antenna and the bottom center of the entrance hole. Place the antenna inside the entrance hole and hold for 30 seconds while the glue dries

  • Thread the 4 cable ties through each of the 4 holes around the antenna with the heads pointing outwards, and tighten to ensure the antenna stays in place but also doesn't block the beam breakers

  • Trim off the tails of the cable ties and either file down or burn the resulting sharp edges

6.4. Attach the beam breakers to the 3D-printed mounts:

  • Each receiver and emitter in a pair should be placed across from one another, with the LEDs fitting into the bottom hole and the jumper cables feeding out over the top of the container

  • Place 2 flat washers on the M3 screws before placing each beam breaker. This ensures that the beam breaker sits parallel to the mount and doesn't get pulled diagonally when the hex nut is tightened

  • Use the M3 hex nuts, the multi-bit screwdriver, and the needle nose pliers to fasten each beam breaker tightly to the mount

6.5. Attach the left and right shields that fit over each beam breaker mount:

  • Remove the hex nut for each outer beam breaker, place the middle hole of each shield over the screw and re-tighten the hex nut

  • Use the short M3 screws and multi-bit screwdriver to fasten each shield to the container (2 more screws per shield)

  • Each shield should block the birds from accessing the jumper cables of the beam breakers as well as perching on the mounts

6.6. Attach the temperature probe:

  • Feed the probe through the larger hole drilled into the side of the container

  • Thread the 4 in cable tie through the 2 smaller holes drilled below

  • Slide the probe down into the loop created by the cable tie, and secure the cable tie over the heatshrink-protected part of the probe

6.7. Attach the camera to the nest container cap

  • Use the multi-bit screwdriver and the M2 screws and hex nuts to attach the IR camera and LEDs to the cap

  • Place the camera first, then each LED over it. Make sure the - and + holes line up for the camera and LEDs

6.8. Attach all sensors for a dry run:

  • Attach the RFID antenna to the RFID reader, then attach the RFID reader to the PCB with the custom jumper cable harnesses (26 pins total for earlier versions of the CognIoT readers). Make sure to line up the correct GPIO between the reader and the PCB (use a GPIO diagram as needed, and the color coding of the jumper cable harnesses)

  • Attach the beam breakers to the custom cable harnesses, and connect the other ends of the cable harnesses to the PCB. The data cables for the inner and outer beam breakers should connect to GPIO #13 and #19, respectively

  • Connect the temperature probe to the pull-up resistor with the multi-bit screwdriver, and then to the PCB with the custom jumper cable harness. The temperature probe needs to be connected to 3V power and GPIO #4 (for 1-wire data transfer)

  • Attach the other end of the camera ribbon cable to the camera itself. The side of the ribbon cable with short metal strips should face away from the plastic housing that lifts up/down to secure the cable

* *Optional if using the Smraza case*: Connect the power and ground cables for the fan to the PCB using short commercially available socket-socket jumper cables
  • Test the continuity of a few connections with a multimeter

6.9. Perform a dry run with the tracking system software to test that all sensors are working correctly:

  • Doublecheck that all sensors are connected to the PCB and Pi

  • If the Pi hasn't been set up with the tracking system software, then you can work on earlier protocols with the current hardware setup

  • Open a Terminal window, navigate to the directory for the tracking system and execute Main.sh

  • Check the log output for any errors or screens that aren't running. You can also run screen ls to ensure that all screens are working

  • If screens are failing, then you may need to start troubleshooting by checking connections. It's also possible that some jumper cable harnesses need to be tweaked, the soldering job on the PCB should be checked, or some sensors or other hardware need to be fully replaced

  • If all sensors are working smoothly, then detach these from their jumper or ribbon cables

6.10. Attach the nest container to the modified Prevue cage:

  • Feed a long cable tie (> 10 in) through the two large holes in the laminated plastic

  • Push the nest container into the open gap in the laminated plastic so that the entrance is inside the cage and the back door sticks out. The square brackets and cap should sit just above the top of the cage. You may need to loosen and drop the long perch that sits perpendicular to the container

  • Feed the small cable ties through 1 hole in each square bracket and around the top of the cage

  • Tighten all 3 cable ties and trim trailing ends

  • Replace and tighten any perches as needed

6.11. For experiments that require audio recordings, set up the cage and nest container in a recording or sound isolation chamber. The chamber should already be equipped for live animals (e.g. with LED strips on a light:dark cycle, fresh airflow, mics and recording software)

6.12. If you're using a recording chamber for experiments, then reattach all sensors after feeding through cables into chamber:

  • For these experiments, you can place the Pi, external hard drive, PCB, RFID reader, and most of the jumper cable harnesses inside a tupperware container that sits on top of the recording chamber (with Velcro or some other fastener)

  • Then the cables for the beam breakers, temperature probe, and camera can be fed through a hole in the side of the chamber and reconnected to the respective sensors. You will need to disconnect the temperature probe from the pull-up resistor before feeding it through, then reattach to the pull-up resistor after

  • You can lift the cables off the bottom of the chamber by attaching them to the ceiling with Velcro

  • This setup can help reduce clutter inside the recording chamber for daily husbandry tasks as well as animals' neophobia

6.13. Power on the Pi and connect remotely via ssh to mount the external hard drive and start the tracking system. I recommend doing another dry run overnight with the system to ensure that everything is working as expected in this full setup before placing live animals

Clone this wiki locally