
Circuit smart soja
virgile-tchidehou/smart-soja
An autonomous IoT-based mobile system for soybean pre-processing, integrating embedded systems, industrial automation, solar energy and cloud connectivity.

whose that pokemon
Smart poultry edge ai is an open-source printed circuit board by AnonCreed, from the AnonCreed/smart-poultry-edge-ai repository on GitHub, published under the MIT licence. It is a 2-layer board of 23 × 47.5 mm with 12 parts on 39 nets, routed with 138 tracks and 9 vias.
It is built around the DHT22 and BC547. Its parts include 4 ICs, 3 resistors, 2 connectors, 1 diode and 1 transistor.
Minor Project -- Department of Electronics and Computer Engineering, Thapathali Campus, Institute of Engineering (IOE), Tribhuvan University. Submitted in partial fulfillment of the Bachelor's degree in Electronics, Communication and Information Engineering (August 2026), under the supervision of Er. Anup Shrestha, by Amir Bhattarai, Aviral Adhikari, Balram Sharma Kandel, and Bikash BK.
Poultry farming is a major part of Nepal's agricultural sector, and most farms still run open-house systems where the indoor environment tracks whatever the weather outside is doing. During the brooding stage (the first two weeks after hatching) chicks are especially sensitive to temperature swings, humidity, and ammonia buildup from droppings -- conditions farmers today mostly manage by manual observation and experience, which means unfavorable changes can go unnoticed until they've already hurt the flock.
This project came out of discussions around the bird-flu outbreaks in Nepal in 2026. Actually detecting or preventing disease was out of scope for a minor project, but keeping a poultry house's environment inside a safe band is a problem we could tackle directly: continuous IoT sensing, an on-device ML model that forecasts where temperature and ammonia are heading (not just where they are), and automated fan/heater control that reacts before a threshold is crossed rather than after.
That's what this repository is: the full system, not just the dashboard --
hardware/esp32/ -- an ESP32 sensor node reading temperature, humidity
and ammonia (DHT11 + MQ-137), driving the fan/heater relays.hardware/esp32s3_master/ -- an ESP32-S3 master node that receives
those readings over ESP-NOW and runs an on-device TFLite Micro model to
forecast the next reading and flag an ammonia-spike probability, before
handing everything to the backend.hardware/kicad/ -- the KiCad schematic and PCB for the sensor node.telemetry/ -- the Django backend: ingestion API, server-side rule
classifier, and the live dashboard (charts, actuator control, console
feed, historical export).docs/ -- the written report and the proposal/final defense decks
submitted for the degree.See Documentation & Reports for the full report and defense decks, and Designs for the PCB.
Django backend, Edge-AI-ready JSON REST API, server-side environmental classifier, a two-board ESP-NOW hardware pipeline (ESP32 sensor node + ESP32-S3 master node running an on-device TFLite Micro forecast/spike model), a standalone sensor simulator for development without hardware, and a standard Bootstrap 5 dashboard (dual-line forecast charts, actuator control, live console feed, historical reports/CSV export; Bootstrap and Chart.js are both vendored locally for air-gapped operation).
sensor_simulator.py ──HTTP POST──> /api/telemetry/submit/
(Virtual sensor, │ validate -> classify -> persist
5 s cadence, ▼
random walk + PoultryTelemetry (SQLite, indexed timestamp)
anomaly injection) │
▼
dashboard (browser) ──HTTP GET──> /api/telemetry/historical/?hours=N
(5 s polling loop feeds metrics grid, charts, audit log)Physical hardware replaces the simulator with a two-board pipeline (the Django/dashboard side above is unchanged either way):
hardware/esp32/ (DevKit V1, sensor node) --ESP-NOW--> hardware/esp32s3_master/ (ESP32-S3, master node)
DHT11 + MQ-137 + fan/heater TFLite Micro forecast + spike model
^ |
`------------ ESP-NOW (classification) <-------' --WiFi/HTTP--> /api/telemetry/submit/The master node is the only board that talks to Django; the sensor node only
ever exchanges fixed-size binary structs with the master over ESP-NOW. See
hardware/esp32/README.md and hardware/esp32s3_master/README.md for the full pipeline,
wiring, and the MAC-address pairing procedure the two boards need before
they can talk to each other.
| Component | Path |
|---|---|
| Data model + classification enum | telemetry/models.py |
| Pure classifier decision framework + spike-risk threshold | telemetry/classifier.py |
| API views (submit / historical) + dashboard shell | telemetry/views.py |
| URL map | telemetry/urls.py, config/urls.py |
| Virtual sensor client (dev/demo, no hardware needed) | sensor_simulator.py |
| ESP32 sensor-node firmware (DHT11 + MQ-137, ESP-NOW, actuator loop) | hardware/esp32/src/main.cpp, hardware/esp32/include/config.h |
| ESP32-S3 master-node firmware (ESP-NOW receive, TFLite Micro inference, WiFi/HTTP to Django) | hardware/esp32s3_master/src/main.cpp, hardware/esp32s3_master/include/config.h |
| Dashboard template | telemetry/templates/telemetry/dashboard.html |
| Console stylesheet / client runtime | telemetry/static/telemetry/dashboard.css, dashboard.js |
| Unit tests (classifier + API + forecast + spike-risk contracts) | telemetry/tests.py |
ammonia_level > 15.0 -> CRITICAL_AMMONIA (dark red background, white text)temperature > 35.0 (live reading OR the Edge-AI forecast alone) -> HEAT_STRESS_WARNING (orange border, orange text) -- no humidity conditiontemperature < 18.0 -> LOW_TEMP_ALERT (deep blue text, light blue accents)OPTIMAL_ENVIRONMENT (charcoal grid, solid green indicator dot)Classification is computed server-side at ingestion, before the INSERT, so every stored row is complete and immutable. Thresholds are exposed in the historical API response so the front end never hardcodes them.
POST /api/telemetry/submit/
{
"temperature": 29.4,
"humidity": 61.2,
"ammonia_level": 8.7,
"predicted_temperature": null,
"predicted_ammonia": null,
"predicted_spike_probability": null
}Returns 201 with the persisted record including predicted_class.
Forecast channels (predicted_temperature, predicted_ammonia,
predicted_spike_probability) are optional and nullable: absent key, explicit
null, and numeric value are all accepted, since the ESP32-S3 master node may not
be linked yet. When numeric, predicted_temperature/predicted_ammonia are
bounds-checked against the same physical envelope as their live counterparts,
and predicted_spike_probability (the master's TFLite Micro spike-classifier
output) is bounds-checked to [0, 1]. All three serialize back as JSON null
when absent, so chart clients can rely on key presence. Classification is
always driven by live readings only; forecasts and spike risk are advisory
overlays. Payloads with missing live fields, non-numeric values, or readings
outside physical/probability envelopes are rejected with 400.
GET /api/telemetry/historical/?hours=24
Returns records in the trailing window, ascending chronologically, plus the active
threshold set — ready for direct ingestion by chart libraries.
Two terminals.
Terminal 1 — backend and dashboard:
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
# Dashboard (this machine): http://127.0.0.1:8000/
# Dashboard (other devices, e.g. a phone on the same WiFi): http://<this-machine's-LAN-IP>:8000/Binding 0.0.0.0 (not the default 127.0.0.1) matters if you're using the
physical ESP32-S3 master node -- it needs to reach this over WiFi, and it
finds the LAN IP itself via UDP broadcast discovery (see
hardware/esp32s3_master/README.md), so there's no IP to hardcode on either
side. ALLOWED_HOSTS is left open ("*") in config/settings.py for the
same reason -- this is a dev-only server, never expose it beyond a trusted
LAN.
Terminal 2 — virtual sensor:
python sensor_simulator.py
# Edge-AI forecast emulation is ON by default so the KPI forecast lines,
# dashed chart series, console (Pred: ...) markers, and the AI spike-risk
# card all have live numbers. To transmit null forecasts/spike-risk
# (matching the deployment state before the ESP32-S3 master node is linked):
python sensor_simulator.py --no-edge-aiThe simulator transmits every 5 seconds using an Ornstein-Uhlenbeck-style random walk (Gaussian step + mean reversion) per channel, and superimposes two anomaly generators: a triangular thermal spike exceeding 37 C every 2 minutes, and an ammonia accumulation ramp that climbs past 30 PPM until a simulated ventilation fan engages and extracts it back to baseline.
python manage.py test telemetryCovers classifier rule precedence (ammonia dominance, heat-stress from live reading or forecast alone, low-temperature boundary), ingestion validation, nullable forecast-channel contracts (absent key, explicit null, populated, invalid type), and historical ordering/threshold contracts.
Two firmware projects ship the physical pipeline; both must be flashed and paired (by MAC address) for the hardware to work end-to-end.
hardware/esp32/ -- ESP32 DevKit V1 sensor node. Reads DHT11 on GPIO4 and
MQ-137 on GPIO34 every 5 s, and sends the readings over ESP-NOW to the
master node (no HTTP, no JSON on this board). Drives an ON/OFF fan relay
(GPIO32) and an ON/OFF heater relay (GPIO25) from the classification the
master relays back. See hardware/esp32/README.md for the pin map and
MQ-137 calibration
procedure.hardware/esp32s3_master/ -- ESP32-S3 master node. Receives sensor readings
over ESP-NOW, runs an on-device TFLite Micro model to forecast the next
temperature/ammonia reading and an ammonia-spike probability, then POSTs
the combined record to Django using the same JSON contract the Python
simulator uses. Relays Django's classification back to the sensor node
over ESP-NOW. See hardware/esp32s3_master/README.md for the model details, the
Arduino IDE flashing steps, and the MAC-pairing procedure required before
either board can talk to the other.Quickstart (flash the master first -- you need its printed MAC address to configure the sensor node):
cd hardware/esp32s3_master
# Arduino IDE: install libraries per README.md, edit config_master.h
# (WIFI_SSID, WIFI_PASSWORD, API_BASE_URL, SENSOR_NODE_MAC_ADDR),
# then upload esp32s3_master.ino and note the printed "Receiver MAC".
cd ../esp32
# Edit include/config.h: WIFI_SSID, WIFI_PASSWORD (same network as the
# master), MASTER_MAC_ADDR (from the step above).
pio run # Compile
pio run -t upload # Flash over USB
pio device monitor # Serial diagnostics at 115200 baud
# Copy this board's printed MAC back into hardware/esp32s3_master/config_master.h's
# SENSOR_NODE_MAC_ADDR and reflash the master.The virtual simulator and the physical firmware pipeline are contract- compatible: both ultimately POST the same JSON payload shape to Django, so the backend and dashboard cannot tell them apart. The Python simulator remains useful for CI, demos, and development without hardware in the loop.
Two tab-switched views share a single polling loop, so the console tail accumulates in the background even while the user is on the Overview.
AI Forecast: 27.8 degC, AI Forecast: 8.4 ppm. When the ESP32-S3
master node's link is inactive the line reads AI Forecast: pending.Master node: pending until the master node is linked.spanGaps: false,
so null forecast points render as gaps and a fully-null channel is simply
invisible while remaining mounted), plus a dashed threshold baseline.Dedicated full-page console. Append-only tail keyed by record id; each new
ingestion appends one line in the format
[YYYY-MM-DD HH:MM:SS] INGESTION SUCCESS -> T: 27.4C (Pred: 27.8C) | RH: 60.2% | NH3: 8.1ppm (Pred: 8.4ppm) | STATE: OPTIMAL | SPIKE_RISK: 14%
with text tinted by classification. When a forecast channel is null the
inline marker reads (Pred: n/a); the SPIKE_RISK segment is omitted
entirely (not n/a) when the master node hasn't reported a probability yet.
Includes a rolling 200-line buffer and a pause-scroll control. The server
emits the same line via the telemetry.ingest logger, so journalctl and
the browser can be cross-referenced without translation.
KiCad schematic + PCB for the ESP32 sensor node live in hardware/kicad/
(kicad.kicad_pro, .kicad_sch, .kicad_pcb, .kicad_prl -- open the
.kicad_pro in KiCad 9). It lays out the ESP32 DevKit V1 footprint alongside
the DHT11, MQ-137, fan/heater relay drive, and terminal-block wiring
described in hardware/esp32/README.md.

| Document | Path |
|---|---|
| Minor project report (full, 81 pages) | docs/minor_project_report.pdf |
| Proposal presentation | docs/presentations/proposal_presentation.pdf |
| Final defense presentation | docs/presentations/final_presentation.pdf |
| Hardware & firmware architecture deep-dive | HARDWARE_DOCUMENTATION.md |
| Name | Roll No. |
|---|---|
| Amir Bhattarai | THA080BEI005 |
| Aviral Adhikari | THA080BEI011 |
| Balram Sharma Kandel | THA080BEI012 |
| Bikash BK | THA080BEI015 |
Supervised by Er. Anup Shrestha, Department of Electronics and Computer Engineering, Thapathali Campus, Institute of Engineering, Tribhuvan University.
MIT -- see LICENSE.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | 12V-input | TerminalBlock:TerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mm | J1 |
| 1 | 1K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R4 |
| 1 | 1N4007 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1 |
| 1 | 200 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R5 |
| 1 | BC547 | Package_TO_SOT_THT:TO-92_Inline | Q1 |
| 1 | Conn_01x03_Pin | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | J2 |
| 1 | DCDC_StepDown_LM2596 | TerminalBlock:TerminalBlock_MaiXu_MX126-5.0-04P_1x04_P5.00mm | U4 |
| 1 | DHT22 | Sensor:Aosong_DHT11_5.5x12.0_P2.54mm | U3 |
| 1 | Fan_4pin | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | M1 |
| 1 | Heater | TerminalBlock:TerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mm | R1 |
| 1 | MQ-137 | Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_Vertical | U2 |
| 1 | ~ | ESP32_Footprint:ESP32_30pin | U1 |

virgile-tchidehou/smart-soja
An autonomous IoT-based mobile system for soybean pre-processing, integrating embedded systems, industrial automation, solar energy and cloud connectivity.

manhoosbilli1/Incubator_basic_esp32_modular_1_sided
This contains an incubator pcb i've made for a client. his needs were specific so only added what he needed. a complete and complex version can be found in capibator organization.

mFulmini/engineer
Tutaj znajduje się część pracy inżynierskiej w postaci oprogramowań jednostek brzegowych, rysunków, schematów elektrycznych oraz poglądowych zrzutów ekranu.


Ardumower/ardumower
Develop an open source robotic lawn mower (HW+SW reference platform)

mcbittech/souliss-smart-thermostat-WiFi
ESP8266 WiFi Smart Thermostat based on Souliss IoT Framework

justinmklam/iot-sourdough-starter-monitor
Tracking the fermentation of sourdough starter over the cloud.

MakersAsylumIndia/M19O2
M19O2 open source hardware Oxygen Concentrator based on the Pressure Swing Adsorption cycle aka Skarstorm cycle
It measures 23 × 47.5 mm and has 2 copper layers, 1.6 mm thick.
12 parts, built around the DHT22 and BC547. 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 AnonCreed/smart-poultry-edge-ai repository on GitHub, at the commit this page was made from: the board is hardware/kicad/kicad.kicad_pcb and its schematic hardware/kicad/kicad.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).