
SG mesocosm pi interface adapter
scott-whitworth/bancroft_temperature_control
Supplementary material for Bancroft Experimental Temperature Control System

Supplementary material for Bancroft Experimental Temperature Control System
SG mesocosm pi interface is an open-source printed circuit board by scott-whitworth, from the scott-whitworth/bancroft_temperature_control repository on GitHub. It is a 2-layer board of 169 × 81 mm with 77 parts on 54 nets, routed with 599 tracks and 17 vias.
It is built around the TBD62783APG, PPPC031LFBN-RC and PJ-002A. Its parts include 33 connectors and 2 ICs. It belongs with the interfaces and adapters boards of this library.
This is a repository of software, hardware specification and data related to a distributed embedded ecological temperature control system.
Funding for this work was provided by a grant from the National Science Foundation ( 2222214 ). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
This work is based on previous work supported by Whitworth's Summer STEM Research Program and the M.J. Murdock Charitable Trust.
Technical Lead:
Scott Griffith, Whitworth University
Science Leads:
Betsy Bancroft, Gonzaga University
Annika Rose-Person, Gonzaga University
Tiffany Garcia, Oregon State University
Student Developers and Maintainers
Summer 2023 - Sarah Mott, Matheus Mielle Silva, Whitworth University
Summer 2024 - Keegan Davis, Wes Ostlund, Whitworth University
Spring 2025 - Matheus Mielle Silva, Salim Dhahri, Whitworth University
Summer 2025 - Eli Chapman, Whitworth University
| Sub Folder | |
|---|---|
./archive | Code for posterity and reference. If someone wanted to re-develop this system on a different platform, these files might be useful references |
./configs | This system is highly configurable for various temperature needed. Documentation and examples for system configuration. |
./hardware | Hardware specifications and documentation for custom interface boards. |
./pythonCode | All of the python scripts used on the Raspberry Pis for Remote and Central nodes |
./supplementaryData | Diagnostic or representative data collected regarding the system. Diagrams and photos of the system. |
./systemSetup | .service files and information on configuring automatic start up of the system |
./tempData | Placeholder for output data. Both centralNode.py and remoteNode.py write various log files to this directory. |
./utility | OneWire address reading arduino code |
./websiteFiles | Rudimentary web interface for the system. Uses Flask. |

This system is specifically designed to facilitate ecological climate change experiments. The core requirement of the system is to individually control and record the temperature for a collection of aquarium tanks. The context of this system is to be generate varied and dynamic temperature conditions in fresh water ecosystem experiments. The system is able to replicate day/night cooling/heating cycles as well as day-to-day seasonal temperature shifts.
One configuration of the system is controlling the temperature of aquarium tanks located inside of a temperature controlled room. In this configuration the cooling of the tanks is achieved via the ambient temperature of the room, heating is driven by aquarium heaters in each tank. In this configuration various temperature treatments can be applied across tanks in the experiment. In the past we have used field-data derived control treatments, predictive future-offset treatments, extreme heat effect treatments, as well as gradient offset treatments.
Another configuration the system can be applied to is monitoring and dynamically applying an 'ambient + offset' heating effect in outdoor mesocosm experiments. In this configuration individual tank set-points can be derived from other tank's current temperature. This gives the ability to have a control treatment that follows environmental heating and cooling, and other offset-based treatments based off of the control temperatures. We have used static offset (i.e. +4 degrees C above ambient) as well as extreme heat effect (i.e. +10 degree C for x number of days, +0 offset other days).
System configuration is flexible for experiments with varying numbers of tanks. We have configured indoor experiments with varying numbers of tanks from 32 to 96. System configuration is flexible for experiments with varying number of temperature probes per tank and varying number of aquarium heaters per tank. This system uses relatively simple to manufacture interface boards and off-the-shelf Raspberry Pi computers in an attempt to keep implementation as cost-effective as possible.
The basic concept behind the system's design is that a tank will have some actual temperature that is derived from measurements from one or more temperature probes. Each tank will also have a temperature set-point pulled directly from a treatment file, or calculated as an offset to an ambient temperature. Then a choice is made for each tank to turn a heater on or off based on those two temperatures. Heaters are controlled via 120V relays, so off-the-shelf aquarium heaters of various heating power can be used as appropriate to the size of tank. There are other features, like power-load leveling, that are implemented to aid in the scalability of large experiments.
This repository contains all of the code that is run on the Raspberry Pi computers, the hardware specifications for the integration boards, and the set-up configuration for the system. We have also included information pertaining to previous iterations of this system, most of these artifacts are stored within the archive directory. The first use of the current iteration was over the summer of 2024. Any references pre-dating then were utilizing a similar context, but with different hardware and software controls.
For context: the lab has a long running fixation with the American actor Shia LaBeouf (https://www.youtube.com/watch?v=o0u4M6vppCI). The lab also loves Tolkien and Harry Potter. In reality, we just needed a lot of distinct names for 33+ nodes.
Location: Gonzaga University, Hughes Science Hall
Two, approximately 10ft by 8ft, temperature controlled rooms, each set at a static 14 degrees C
Summer 2025
Goal: support 96 2.5-gallon aquarium tanks.
Heaters: one 50W ViaAqua Quartz Submersible Heater per tank
Temperature probes: one DS18B20 per tank
Due to power distribution and cooling needs, 48 tanks were set up in each room.
| Node Type | Node Name | Tanks | Power Circuit |
|---|---|---|---|
| Central Node | Sam | 1 | |
| Remote Node | Frodo | 1 - 16 | 1 |
| Remote Node | Pippin | 17 - 32 | 1 |
| Remote Node | Merry | 33 - 48 | 2 |
| Remote Node | Bilbo | 49 - 64 | 3 |
| Remote Node | Rosie | 65 - 80 | 3 |
| Remote Node | Smeagol | 81 - 96 | 4 |
Power Circuit: In each room there there are two power circuits, one 15 AMP service and one 20 AMP service (for a total of 4 circuits across both rooms). The nodes are spread out across circuits so that the 20 AMP services support 32 heaters and the 15 AMP services support 16 heaters. If we were to put all 96 tanks in the same room, which we have done in the past, it would be possible for the power draw to trip the associated breakers. In such a configuration, the software supports power cycling to limit the max number of heaters on at a given time.
Fall 2025
Summer 2025
Spring 2025
Fall 2024
Summer 2024
Fall 2025
Summer 2025
Spring 2025
Fall 2024
Summer 2023
Location: John L Fryer Aquatic Animal Health Laboratory, Oregon State University
Summer 2025
Goal: support 48 190-L outdoor tanks.
Heaters: one 500W hygger 802 Aquarium Heating Element per tank
Temperature probes: two DS18B20 per tank
Due to the significant power draw of 500W heaters, eight dedicated 20AMP 120V power circuits were needed. The heaters were evenly loaded across the power circuits. Because of the single Relay Pack interface used, a single node could only be connected to one power source. This meant that there were power distribution nodes (1,3,4,6,7,9,10 and 12) and supplementary nodes (2,5,8,11). The supplementary nodes were only connected to temperature probes and were powered via the other circuits.
| Node Type | Node Name | Node Index | Temp Probes for Tanks | Heater Control for Tanks | Power Circuit |
|---|---|---|---|---|---|
| Central Node | albus | 1 | |||
| Remote Node | rubeus | 1 | 1, 2, 4, 5 | 1-6 | 1 |
| Remote Node | severus | 2 | 3, 6, 7, 10 | 1 | |
| Remote Node | minerva | 3 | 8, 9, 11, 12 | 7-12 | 2 |
| Remote Node | remus | 4 | 13, 14, 16, 17 | 13-18 | 3 |
| Remote Node | gilderoy | 5 | 15, 18, 19, 22 | 3 | |
| Remote Node | sybill | 6 | 20, 21, 23, 24 | 19-24 | 4 |
| Remote Node | filius | 7 | 25, 26, 28, 29 | 25-30 | 5 |
| Remote Node | pomona | 8 | 27, 30, 31, 34 | 5 | |
| Remote Node | aurora | 9 | 32, 33, 35, 36 | 31-36 | 6 |
| Remote Node | septima | 10 | 37, 38, 40, 41 | 37-42 | 7 |
| Remote Node | firenze | 11 | 39, 42, 43, 46 | 7 | |
| Remote Node | neville | 12 | 44, 45, 47, 48 | 43-48 | 8 |
This experiment also used ambient clustering. Sets of 6 tanks were logically connected to compute a local ambient temperature. The ambient clustering followed the power circuits, so all of the tanks attached to circuit 1 (tanks 1-6) were part of the same ambient cluster.
A summary of the above information is described in the following diagram.
Spring 2024
There are two primary software contexts that make up the system: The Central Node and the Remote Node. Both contexts communicate using RabbitMQ message queues, with the Central Node co-hosting a RabbitMQ server, as well as the control python scripts.
The Central Node is the main configuration point for the system, as well as the primary control of the overall system state. The Central Node manages dedicated RabbitMQ message queues that are used by each of the Remote Nodes. Remote Nodes send in temperature messages and the Central Node makes choices based on those temperature messages. The Central Node manages the state of the heaters attached to Remote Nodes based on temperature calculations derived from received temperature messages in conjunction with temperature treatment information pulled from configuration files. The Central Node also manages circuit load balancing.
The Central Node calculates fusedTemp values for each tank based on the configured probes. If a tank has more than one assigned probe, the Central Node will take the median of all attached temperature probes as that tank's fused temperature. The system still records the intermediate values for accurate post-processing.
The system will likely be set up with many Remote Nodes. Each Remote Node is connected to one interface board. That interface board can control up to 16 heater channels and up to 36 temperature probe channels. Remote Nodes relay temperature measurements to the Central Node, via temperature update messages with corresponding OneWire addresses. These addresses are what is configured on the Central Node, so there is not a direct need to have temperature probes plugged into specific Remote Nodes, just that they are plugged into any Remote Node. Remote Nodes receive heater control messages from the Central Node. When received, the Remote Node changes the state of heater relay channels accordingly.
More information about system configuration can be found in the ./configs subdirectory. All of the python code can be found in the pythonCode subdirectory.
Remote Node detail from Gonzaga Lab setup. Fall 2024

Remote Node detail from OSU Mesocosm setup. Spring 2024

The Central Node needs to be connected to an IP network system to communicate with the Remote Nodes. Each node needs to have a dedicated static IP address to aid in setting up the communication pathways. It is also beneficial for the Central Node to have access to a NTP (Network Time Protocol) source for accurate time stamp calculations. HTTP access is also needed if using the web interface for monitoring.
In both examples described above, some form of network segmentation and VLAN access was used to create system-specific networking contexts.
Each Remote Node needs a corresponding interface board. These boards are described in detail within the ./hardware subdirectory.
Remote Nodes interface with DS18 OneWire temperature probes. We purchased custom 4 meter, 3-pin cable assemblies from JuBaoLai Electronics.
Remote Nodes interface with ADJ SRP8 relay packs. These relay packs are a basic enclosures for 120V-rated relays. Shortly after finalizing the design of the interface boards, the relay packs were marked as 'discontinued.' While still sporadically available, the electronics inside are not overly complicated and their functionality could be reproduced.
Prices below are representative of when material was purchased (2024-2025) but is included as a reference for general cost. Shipping and tax are not included. Some elements benefit from bulk ordering, prices are what we actually paid.
| Item | Unit Price | Quantity | Source |
|---|---|---|---|
| Raspberry Pi 4, 2GB (with power, SD and case) | $84.99 | 1 | https://vilros.com/products/vilros-raspberry-pi-4-complete-starter-kit |
| Unmanaged Network Switch | $76.99 | 1 | https://www.officedepot.com/a/products/140194/TP-Link-16-Port-Gigabit-Ethernet |
| 20ft Cat6 Ethernet Cable | $9.79 | 1 | https://www.amazon.com/dp/B00G9BN9KW |
| Total | $171.11 |
This represents the approximate cost for one Remote Node. The number of tanks a Remote Node can support is based on system configuration. In the GU Lab set up detailed above, each remote node mapped to 16 tanks. In the OSU Mesocosm setup detailed above, a remote node mapped to 4-ish tanks. This does not include the cost of the aquarium heaters connected to the system or power distribution material.
| Item | Unit Price | Quantity | Source |
|---|---|---|---|
| Raspberry Pi 4, 2GB (with power, SD and case) | $84.99 | 1 | https://vilros.com/products/vilros-raspberry-pi-4-complete-starter-kit |
| Interface Board + 12V Power | $23.59 | 1 | Custom Interface Board |
| Adaptor Board | $9.94 | 1 | Custom Adaptor Board |
| ADJ SRP8 relay packs | $51.99 | 2 | see note below |
| DS18B20 Temperature Probe assembly, 4 meter cable | $1.50 | 16 | Custom fabricated by Shenzhen JuBaoLai Electronics, similar to https://www.sparkfun.com/products/11050 |
| 20ft Cat6 Ethernet Cable | $9.79 | 1 | https://www.amazon.com/dp/B00G9BN9KW |
| Total | $256.29 |
Approximate material for a for a 96 tank lab setup: $1,700
Note about ADJ SRP8 Relay Packs When we started designing this system in 2023, we contacted American DJ, the company that sells the SRP8 relay packs. We were assured that the packs would not be discontinued for the foreseeable future. As soon as we finalized the electronic design of the interface board and went to purchase all of the SRP8 relay packs we needed, they were marked as discontinued. We were able to source them, mainly purchasing them in small lots whenever they were in stock. In October of 2025, they are sill available in limited quantities from various online marketplaces.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 33 | PPPC031LFBN-RC | Digikey_Schematics:CONN_PPPC031LFBN-RC_SUL | J1, J2, J10, J11, J12, J13, J14, J15, J16, J17, J18, J19, J20, J21, J22, J23 +17 |
| 18 | CQY99 | LED_THT:LED_D5.0mm_IRGrey | 5V_PWR, 12V_PWR, D11, D12, D13, D14, D15, D16, D17, D18, D21, D22, D23, D24, D25, D26 +2 |
| 17 | 1k R | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R-1k, R11, R12, R13, R14, R15, R16, R17, R18, R21, R22, R23, R24, R25, R26, R27 +1 |
| 2 | A-DS 09 A/KG-T2S | Digikey_Schematics:CONN09_A-DS_30P81X12P55_ASM | RP_1, RP_2 |
| 2 | TBD62783APG | Digikey_Schematics:P-DIP18-300-2p54-001_TOS | U1, U2 |
| 1 | 300 R | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R-300 |
| 1 | 4.7k R | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R-4.7k |
| 1 | LOGO | Digikey_Schematics:17mm_bancroftFrog | G*** |
| 1 | PJ-002A | Digikey_Schematics:PJ-002A_CUD | 12V |
| 1 | RPi Jumper | Digikey_Schematics:CONN40_SBH11-PBPC-D20-ST-BK_SUL | Rpi |

scott-whitworth/bancroft_temperature_control
Supplementary material for Bancroft Experimental Temperature Control System


Kayzerjali/UQ_Magnetometer_Data_Logger
Code for the data logging system of the UQ Magnetometer

mikedahlgren/Pool-Controller
This runs a pool from a Waveshare ESP32-S3-RELAY-6CH and the PoolVeras sensor hat plugged onto its Pico headers.

grantek/minisynth32
A 3D-printable MIDI synthesiser inspired by the Roland MT-32 and clumsyMIDI, and powered by the mt32-pi MT-32 emulator.

thewonderidiot/lachesis
Portable, safe readers for Apollo Guidance Computer core rope memory modules

jrowe88/RPi-LED-RGBMatrix-Hat
Hardware hat for Raspberry Pi to support RGB Matrix and LED strips

cegep-electronique-programmable/pcb_alimentation_prototypage
Cette carte génére une tension de 3.3V ou 5V et se branche sur une plaquette de prototypage (breadboard).

It measures 169 × 81 mm and has 2 copper layers, 1.6 mm thick.
77 parts, built around the TBD62783APG, PPPC031LFBN-RC and PJ-002A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the scott-whitworth/bancroft_temperature_control repository on GitHub, at the commit this page was made from: the board is hardware/InterfaceBoard/SG_mesocosm_pi_interface.kicad_pcb and its schematic hardware/AdaptorBoard/SG_mesocosm_pi_interface_adapter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask scott-whitworth before reusing the design.