{"id":17372896,"url":"https://github.com/kronopt/cricket-environmental-control","last_synced_at":"2026-02-10T15:33:12.106Z","repository":{"id":197110456,"uuid":"578321943","full_name":"Kronopt/cricket-environmental-control","owner":"Kronopt","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-07T02:17:36.000Z","size":2164,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-07T03:22:52.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kronopt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-14T19:26:12.000Z","updated_at":"2024-11-07T02:17:40.000Z","dependencies_parsed_at":"2023-10-12T02:41:58.141Z","dependency_job_id":"1e7e260e-4a7d-4748-85dc-eb2dce3b9165","html_url":"https://github.com/Kronopt/cricket-environmental-control","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"4cba5686d7e46949391856c6731eab55a3105c2d"},"previous_names":["kronopt/cricket-environmental-control"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kronopt%2Fcricket-environmental-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kronopt%2Fcricket-environmental-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kronopt%2Fcricket-environmental-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kronopt%2Fcricket-environmental-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kronopt","download_url":"https://codeload.github.com/Kronopt/cricket-environmental-control/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228497153,"owners_count":17929667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T02:04:37.496Z","updated_at":"2026-02-10T15:33:12.067Z","avatar_url":"https://github.com/Kronopt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cricket Environmental Control\nHardware and Software for a Proof of Concept cricket environmental control system\n\n# Hardware\nElectronics schematics\n\n![electronics schematics](docs/electronics_schematics.png)\n\n## Parts\nFor each node in the system:\n- x1 [Raspberry Pi 3/4](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/)\n- x1 NH³ Sensor ([MQ-137](https://www.sparkfun.com/products/17053))\n- x1 CO²/Humidity/Temperature Sensor ([SCD40-D-R2](https://eu.mouser.com/ProductDetail/Seeed-Studio/101020952?qs=Wj%2FVkw3K%252BMAxvvk3MfR8Aw%3D%3D))\n- x9 Pump, 12v DC, Normally Cosed\n- x9 FAN, 4 PIN ,PWA\n- x1 Power Supply\n- x1 [Raspberry Pi GPIO T-Cobbler](https://mauser.pt/catalog/product_info.php?cPath=1667_2620_2955\u0026products_id=096-7339)\n- x1 Analogue-Digital Signal Converter ([ADS 1115](https://mauser.pt/catalog/product_info.php?cPath=1667_2604_3365\u0026products_id=096-7616))\n- x1 1-Channel Relay\n- x1 4.7KΩ resistor\n\n## How to Build\nRaspberry Pi pins layout, for reference\n\n![raspberry pi pins](docs/raspberry_pi_pins.png)\n\n### MQ137\nConnect the pins as shown in the first figure. Red for 5V, black for ground, yellow for signal. Don't forget the 4.7KΩ resistor.\n\n![mq137](docs/mq137.png)\n![mq137 connections](docs/mq137_connections.png)\n\n(the mics5524 in the diagram is a placeholder for MQ137)\n\n| SCD40  | Raspberry Pi | ADS 1115 |\n|--------|--------------|----------|\n|   5V   |   5v Power   |          |\n| Ground |    Ground    |          |\n| Signal |              |    A0    |\n|        |      SDA     |    SDA   |\n|        |      SCL     |    SCL   |\n|        |    Ground    |  Ground  |\n|        |   3v Power   |    VDD   |\n\n### SCD40\nMake the following connections\n\n| MQ137 | Raspberry Pi |\n|-------|--------------|\n|  VCC  |   3v Power   |\n|  GND  |    Ground    |\n|  SDA  |      SDA     |\n|  SCL  |      SCL     |\n\n### Fans\nTypical PWA Fan connector\n\n![fan connector](docs/fan_connector.png)\n\n- Connect the VCC wire of each fan to the 12V power supply's positive terminal\n- Connect all the GND wires of the fans to the 12V power supply's negative terminal and also to the Raspberry Pi's ground (GND) pin\n- Connect the PWM wire of each fan to the GPIO12 pin on the Raspberry Pi\n\n|  Fan  | Raspberry Pi | Power Supply |\n|-------|--------------|--------------|\n|  VCC  |              | 12v (yellow) |\n|  GND  |    Ground    |Ground (black)|\n|  PWM  |    GPIO 12   |              |\n\n### Pumps\n\nStep 1: Connect the power supply to the relay module\n- Connect the positive terminal of the power supply to the COM pin on the relay module\n- Connect the negative terminal of the power supply to the negative terminal of each valve\n\nStep 2: Connect the relay module to the Raspberry Pi\n- Connect one of the relay module's control pins (IN1/SIG1 or IN2/SIG2) to the GPIO 18 pin on the Raspberry Pi\n- Connect the GND pin on the relay module to any available ground pin on the Raspberry Pi\n- Connect the VCC pin on the relay module to 5V pin on Raspberry Pi\n\nStep 3: Connect the devices to the relay module\n- Connect the positive terminal of all valves to the relay module's NC (normally closed) terminal\n\n# Sofware\n\n## Configure Raspberry Pi\n1. Flash **Raspberry Pi OS** onto the Raspberry Pi **micro SD card**\n2. Insert the micro SD card into the Raspberry Pi\n3. Connect the Raspberry Pi to a computer screen, turn it on and follow the on-screen instructions to configure the OS\n    1. Connect to WI-FI\n4. Extra configurations\n    1. Run, in a terminal, `sudo raspi-config`\n    2. Select option 3, `Interface options`\n    3. Select option I5, `I2C`, and select `yes`\n    4. Reboot the PI\n5. Clone the github repository into `~/cricket-environmental-control`\n6. Run `sudo ./setup.sh` inside the project folder\n7. Access frontend at url [localhost:8080](http://localhost:8080) or through \u003craspberry-pi-ip\u003e:8080\n\n## Frontend\nThe system control panel looks like this:\n\n![screen](docs/screen.png)\n\nIn the left the panel are the settings, which can be expanded. \nThere are 2 buttons to apply changes made to the settings:\n- `Apply Current`, applies settings to the current connected Rasperry Pi\n- `Apply All`, applies settings to all Raspberry Pis in the network (including the current connected Raspberry Pi)\n\nAt the bottom, there's a `Search for new Nodes` button, which searches the local network for other Raspberry Pis running this software.\nIf any new Raspberry Pi is found, it shows up in the right panel. The blue border represents the currently connected Raspberry Pi, while the white border represents remote Raspberry Pis in the same local network.\n\nRelevant information is shown for each Raspberry Pi. Host information (node info):\n- CPU usage\n- RAM usage\n- Disk usage\n- CPU Temperature\n\nCrickets enviroment information:\n- Environment Temperature (°C)\n- CO² concentration (ppm)\n- NH³ concentration (ppm)\n- Relative Humidity (%)\n- Fans speed (%)\n- Pumps state (ON/OFF)\n\nThe circles update in real time and show a `green`/`orange`/`red` color to indicate if the value is ok or not.\n\nMore settings panel details. If all settings menu are expanded, we get this:\n\n![screen](docs/all_settings.png)\n\nCrickets environment `temperature`, `CO²` concentration and `NH³` concentration affect the speed of the `fans`.\nAll 3 settings are divided into 3 levels, each one defining at which speed the fans should run if the temperature/CO²/NH³ reach that value.\nThe highest fan speed prevails\n\nThe `humidity` affects when the `pumps` open or close.\nA target humidity can be defined which will trigger the pumps if the humidity gets below that threshold.\nWhile the humidity is below the threshold, the pumps switch between the ON and OFF state at a rate defined by the Burst options.\nThe pumps will stay ON for X seconds every Y seconds, as defined by the settings.\n\nLastly, cycles can be defined using the Humidity Cycle calendar.\nA cycle is a period where the target relative humidity will increase/decrease linearly from the current set target until the target defined for that cycle.\n\nFor example:\n- The current target is set at 23%RH\n- Set a cycle between 2023-10-18 and 2023-11-18 with a new target of 50%RH\n- When we enter the first day of the cycle, 2023-10-18, the target relative humidity will automatically increase linearly\n- Every 12h the target relative humidity gets updated to a new value closer to the new target\n- At the end of the cycle, the automatic update stops","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkronopt%2Fcricket-environmental-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkronopt%2Fcricket-environmental-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkronopt%2Fcricket-environmental-control/lists"}