Skip to the content
2 layers82 × 96.5 mmSmart Garden, the printed circuit board in 3D

c - main() ├── initall() ├── while(1) ├── checkclapswitch() ├── checkobstaclesensor() ├── checkdhtandupdatedisplay() └── updateuptimedisplay()

Size
82 × 96.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
30
Nets
34
Pads
101
Tracks, vias
249, 20
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
27 May 2025
Updated
30 May 2025

Overview

Smart Garden is an open-source printed circuit board by anhphamlnd, from the anhphamlnd/Smart_Green_Garden_Project repository on GitHub. It is a 2-layer board of 82 × 96.5 mm with 30 parts on 34 nets, routed with 249 tracks and 20 vias.

It is built around the ATMEGA328P-PU and DHT11. Its parts include 6 capacitors, 6 resistors, 6 connectors, 3 diodes and 2 ICs. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

Smart_Garden_Project

🌱 Smart Garden v2.1 (AVR)

ĐẶT VẤN ĐỀ

Khái quát

Trong thời đại công nghệ, việc ứng dụng các hệ thống thông minh sử dụng cảm biến đang trở thành xu hướng phổ biến. Các cảm biến được tích hợp giúp thu thập dữ liệu về nhiệt độ, ánh sáng, chuyển động, và nhiều thông tin khác. Từ đó, vườn rau có thể tự động điều khiển, mang lại sự tiện nghi, an toàn và tiết kiệm năng lượng.

Lý do chọn đề tài

Việc thiết kế hệ thống vườn thông minh sử dụng các cảm biến là một đề tài có nhiều tiềm năng ứng dụng trong thực tế. Các lý do chính khiến đề tài này được lựa chọn bao gồm: Nhu cầu ngày càng tăng về sự tiện lợi, an toàn và tiết kiệm năng lượng trong quá trình sản xuất; Tiềm năng thị trường lớn cho các giải pháp nông nghiệp thông minh sử dụng cảm biến có giá thành hợp lý và dễ ứng dụng; Phù hợp với thời gian nghiên cứu và mục tiêu môn học đề ra.

👨‍💻 MCU: ATmega328P

🧠 IDE: CodeVisionAVR

📅 Dự án cuối kỳ — Hệ thống vườn thông minh bán tự động


📌 Tính năng chính

  • 👏 Điều khiển LED bằng 2 tiếng vỗ tay (KY-037)
  • 🚪 Mở cổng servo khi phát hiện vật cản (FC-51)
  • 🌡️ Đo và hiển thị nhiệt độ/độ ẩm bằng DHT11
  • 📟 Hiển thị thông tin trên màn hình OLED SSD1306
  • 🚨 Cảnh báo nhiệt độ cao bằng buzzer
  • ⏱️ Hiển thị thời gian hoạt động hệ thống (uptime)

⚙️ Phần cứng sử dụng

Thiết bịMô tả
ATmega328PVi điều khiển chính
DHT11Cảm biến nhiệt độ và độ ẩm
KY-037Cảm biến âm thanh (vỗ tay)
FC-51Cảm biến vật cản hồng ngoại
Servo SG90Đóng/mở cổng thông minh
OLED SSD1306 (I2C)Hiển thị dữ liệu
BuzzerCảnh báo nhiệt độ cao
LEDPhản hồi khi vỗ tay

🧠 Mô tả chi tiết hoạt động

1. 👏 Vỗ tay bật/tắt đèn

  • Khi phát hiện 2 tiếng vỗ tay liên tiếp, hệ thống bật/tắt LED.
  • Debounce chống nhiễu âm thanh được tích hợp.

2. 🚪 Cảm biến vật cản mở cổng

  • FC-51 phát hiện người/động vật → điều khiển servo mở cửa trong 5 giây → tự đóng.

3. 🌡️ Đo nhiệt độ và cảnh báo

  • Dữ liệu nhiệt độ/độ ẩm được đo mỗi 2 giây.
  • Nếu nhiệt độ vượt ngưỡng (mặc định >38°C), buzzer phát cảnh báo chớp nháy.

4. 📟 OLED hiển thị

  • Thông tin được cập nhật:
    • Nhiệt độ
    • Độ ẩm
    • Trạng thái cảnh báo
    • Uptime tính theo giờ:phút:giây

🧾 Sơ đồ kết nối (Pinout)

Thiết bịATmega328P Pin
KY-037PD4 (Digital)
FC-51PD5 (Digital)
DHT11PD6 (Digital)
ServoPD3 (OC2B PWM)
OLED (SCL)PC5 (A5)
OLED (SDA)PC4 (A4)
BuzzerPB0 (Digital)
LEDPB1 (Digital)

Chi tiết hoạt động của dự án

Khi bắt đầu chương trình

https://github.com/user-attachments/assets/0a29f42b-ba93-440f-8400-c172d5bd55a2

Khối mở cửa

https://github.com/user-attachments/assets/b30ab63e-868c-456a-b049-d4f57b4c9ab6

Khối bật tắt đèn khi clap 2 lần

https://github.com/user-attachments/assets/f04b529f-8dd0-40fd-a486-890ce29304f3

Cảnh báo khi nhiệt độ > 38 độ C

https://github.com/user-attachments/assets/04ab473f-949c-4921-8430-c594595824e2

💻 Cấu trúc chương trình

c
- main()
  ├── init_all()
  ├── while(1)
       ├── check_clap_switch()
       ├── check_obstacle_sensor()
       ├── check_dht_and_update_display()
       └── update_uptime_display()

Parts

30
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_3.2mm_M3_DIN965H1, H2, H3, H4
3100nFCapacitor_THT:CP_Radial_D4.0mm_P1.50mmC1, C2, C6
3Conn_01x04_SocketConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ2, J4, J6
3LEDLED_THT:LED_D4.0mmD1, D2, D3
2220Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalR5, R6
222pFCapacitor_THT:CP_Radial_D4.0mm_P1.50mmC4, C5
10.1uCapacitor_THT:CP_Radial_D4.0mm_P1.50mmC3
110kResistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalR4
116MHzCrystal:Crystal_HC49-U_VerticalY1
11KResistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalR2
11MResistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalR3
15.1KResistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalR1
1ATmega328P-PPackage_DIP:DIP-28_W7.62mm_SocketU2
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1Conn_01x03_SocketConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ3
1Conn_02x03_Top_BottomConnector_PinSocket_2.54mm:PinSocket_2x03_P2.54mm_VerticalJ1
1DHT11Sensor:Aosong_DHT11_5.5x12.0_P2.54mmU1
1SW_PushButton_Switch_THT:SW_PUSH-12mmSW1
1USB_BConnector_USB:USB_B_Lumberg_2411_02_HorizontalJ5

Similar boards

  • 2 layers61.3 × 87 mmTemp, the printed circuit board in 3D

    Temp

    AvishkaVishwa/Microcontroller-Design-Project-Temperature-Monitoring-System

    This project is a temperature display and alarm system designed for educational purposes as part of the IA 2209 - Microcontroller Laboratory course.

    38 parts4
  • 2 layers50 × 100.1 mmSmart window, the printed circuit board in 3D

    Smart window

    tobiadetula/smart-window

    detailing my final year project

    68 partsApache-2.0
  • 2 layers96 × 73 mmEnvironment Controller KiCad THT, the printed circuit board in 3D

    Environment Controller KiCad THT

    ArtoLabs/Sensi-pot

    Collection of modules for indoor/outdoor gardening automation and environmental control

    49 parts3MIT
  • 2 layers96.6 × 82.8 mmStarbie, the printed circuit board in 3D

    Starbie

    SharKingStudios/Starbie

    Half-Life Week 1 Example Project

    11 parts28MIT
  • 2 layers100 × 50 mmConveyor belt pcb, the printed circuit board in 3D

    Conveyor belt pcb

    lansidev/conveyor-belt

    Miniature 3D printed conveyor belt for simulation and fun working with sensors, all controllable with Raspberry Pi

    22 parts9MIT
  • 2 layers93 × 20 mmWiFi VFD, the printed circuit board in 3D

    WiFi VFD

    ciisaichan/WiFi-VFD

    开源的ESP8266驱动VFD屏电路,支持BiliBili粉丝数、时间、温度、湿度

    23 parts8MIT
  • 2 layersOpenMQTTGatewayPCB, the printed circuit board in 3D

    OpenMQTTGatewayPCB

    ebrithiljonas/OMG_PCB

    All in One PCB for the OpenMQTTGateway Project

    36 parts7GPL-3.0

Questions

How big is the Smart Garden PCB?

It measures 82 × 96.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Smart Garden use?

30 parts, built around the ATMEGA328P-PU and DHT11. 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.

Where can I download the Smart Garden KiCad files?

From the anhphamlnd/Smart_Green_Garden_Project repository on GitHub, at the commit this page was made from: the board is Thiết kế PCB/Smart_Garden.kicad_pcb and its schematic Thiết kế PCB/Smart_Garden.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Smart Garden design in my own project?

Its repository states no licence, so its author keeps all rights: ask anhphamlnd before reusing the design.