Skip to content

Parts List

Jump to the actual parts list

Overview

Raspberry Pi

The Raspberry Pi is a complete computer system in an almost credit card size. It has ethernet, USB, general-purpose-input-output pins (GPIO), a dedicated camera port, and runs a version of Debian Linux called Rasbian. You can pick up the current model, a Raspberry Pi 3 Model B+.

Raspberry Pi camera

The Raspberry Pi has a dedicated camera port for the Raspberry Pi Camera. This is an 8 megapixel camera capable of frame rates as high as 90 frames-per-second and comes in two flavors, the Pi NOIR Camera which can capture images/video using infrared (IR) lights and the 'normal' camera which can capture images/video using visible (white) light. We generally use the Pi NOIR version to record video in behavior boxes during both the daytime (white LEDs) and night-time (IR LEDs) as well as on the scope to record video during two-photon imaging in the dark using IR LEDs.

Two channel relay

A relay is a switch allowing you to turn higher voltage devices (usually LEDs connected to 12V power) on and off with 3V GPIO pins. We are using a sainsmart 2-channel relay.

LEDs

If you end up with lots of LEDs, you could try an IR LED strip and/or a white LED strip.

Optional: Analog video output

The Raspberry Pi has a 3.5mm headphone jack that can be used to view an analog video stream from the Pi camera. The headphone jack needs to have 4-poles (bands), something like this. The analog video can be connected directly to any monitor that accepts an RCA video input. Alternatively, the analog video can be sent to another computer using an analog video to USB converter, something like this. These video to USB converters are for some reason a large gray market area and you need to be careful when ordering as you might get junk that does not work. In general, these video/USB converters use the easycap driver.

The PiE server will output a live video feed when 'arm' is checked. This video feed does not interfere with simultaneous video recording to a file.

Parts List

For video recording

Quatity Item Purpose Cost Vendor Link
1 Raspberry Pi 3 Model B Raspberry Pi system including computer, SD card, power, and case. In general, buy a kit from Canakit. $75 amazon
1 USB Flash Drive, 64GB To save recorded video $17 amazon
1 (either this) Pi NoIR Camera v2, 8MP IR video camera $30 adafruit
1 (or this) Pi Camera v2, 8MP Video camera $30 adafruit
1 (either this) Pi Camera Ribbon cable (2 meters) Flat ribbon cable to connect camera to computer (not optimal) $6 adafruit
1 (or this 1/2) Pi Camera HDMI extension cable Allows camera to connect to computer using an HDMI cable $15 tindie
1 (and this 2/2) HDMI Cable of sufficient length Male/Male HDMI cable $7 - $15 amazon
1 Ethernet cable of sufficient length Connect the computer to the network $5 - $20 amazon

For video recording in a behavior box

Quatity Item Purpose Cost Vendor Link
1 SainSmart 2-Channel Relay Module Allow computer to switch LEDs on/off $9 amazon
1-2 White LEDs White light for behavior box $5 sparkfun
>4 IR LEDs, 840-850 nm IR light for behavior box. Pi Camera picks up ~850 nm light well, do not use 950 nm. $1 each sparkfun
>1 Universal 4-LED Miniature Wedge Base PCB To mount 4x LEDs + required resistor $1 each super-bright-led
1 12V 2A LED Driver (does not come with wall plug) Power the IR LEDs $12 amazon
1 Temperature/humidity sensor Measure temperature/humidity $10-$15 Either am2302 or dht22
1 Wire To wire LEDs into box $17 sparkfun

Future directions

Level shifter

If you need to connect the Raspberry Pi directly to 5V TTL lab equipment you need a level shifter to convert the 5V signal to 3V as the Raspberry Pi is only 3V tolerant. We normally use Adafruit or Sparkfun level shifters.

Teensy microcontroller

We are using Teensy 3.2 or 3.5 microcontrollers. They are Arduino compatible but have a lot more features. These microcontrollers can be programmed from the command line using platformio, no need for the Arduino IDE. To use platformio, the Raspberry Pi needs a few simple system wide configurations, see the readme in pie/platformio.

Stepper motor and driver

Use a Bipolar stepper motor with the Easy Driver motor driver.

For video recording on a scope with triggering and frame clock

Quatity Item Purpose Cost Vendor Link
1 4-channel Logic Level Converter (Bi-Directional) To connect 5V TTL lab equipment to 3V computer GPIO $4 Sparkfun, Adafruit
1 Tripod Swivel To mount the camera on an optical post and be able to angle it. $9 amazon
1 4-pole 3.5mm headphone jack Output analog video from the Pi $6 amazon
1 Video to USB converter Convert analog video to USB to view video on a computer $15 amazon

For controlling a motorized treadmill with a microcontroller

Quatity Item Purpose Cost Vendor Link
1 Teensy 3.5 Arduino compatible microcontroller $25 teensy
1 EasyDriver - Stepper Motor Driver Motor controller for stepper motor $15 sparkfun
1 Stepper Motor Share 12V 2A LED Driver for power $15 sparkfun
1 Rotary encoder Honeywell-600-128-CBL $51 digi-key or this
1 Breadboard and jumper cables A breadboard and a mixture of jumper cables: male/male, male/female, and female/female $11 amazon

Building a treadmill

These are Actobotics parts from ServoCity

Quatity Item Cost Part # Link
Aluminum channels link
4 1.50 inch Aluminum Channel 2.99 585440
4 6.00 inch Aluminum Channel 5.99 585446
1 9.00 inch Aluminum Channel 7.99 585450
1 15 inch Aluminum Channel 11.99 585458
Shafts and shaft couplers link
2 1/4 inch x12 inch Precision Shaft 3.59 634178
2 1/4 inch x4 inch Precision Shaft 1.49 634164
1 1/4 inch x6 inch Precision Shaft 2.09 634168
2 1/4 inch to 5mm Set Screw Shaft Coupler 4.99 625120
2 1/4 inch to 1/4 inch Set Screw Shaft Coupler 4.99 625104
Couplers and adapters link
8 1/4 inch Bore Clamping Hub (0.770 inch) 7.99 545588
4 1/4 inch Bore Set Screw Hub (0.770 inch) 4.99 545548
2 Stepper Motor Mount (NEMA 17) 7.49 555152
4 1/4-20 Round Screw Plate 3.99 545468
2 Large Square Screw Plate 2.69 585430
1 90 Degree Quad Hub Mount C 5.99 545360
1 90 Degree Quad Hub Mount D 5.99 545324
Ball bearings link
3 .250 inch ID x .500 inch OD Flanged Ball Bearing (Stainless Steel) 2 pack 1.99 535198
1 Dual Ball Bearing Hub A 6.99 545444
1 1/4 inch Shafting & Tubing Spacers (12 pk) 1.69 633104
Gears link
1 16T, 0.250 inch Bore, 32P Bevel Gear 5.99 615442
1 32T, 0.250 inch Bore, 32P Bevel Gear 7.99 615444
1 16T, 5mm Bore, 32P Bevel Gear 5.99 615438
2 48 Tooth, 32 Pitch Hub Gear (3/16 inch Face) 5.20 RHA32-36-48
Fasteners link
24 6-32x3/8 inch Pan Head Phillips Machine Screws (Zinc-Plated) 0.06 90272A146
8 1/2 inch 1/4-20 Flat Head Phillips Machine Screws 0.38 90273A537
1 3/32 Hex Key 1.39 57185A11
6 .250 in L x 6-32 Zinc-Plated Alloy Steel Socket Head Cap Screw (25 pk) 1.69 632106