1206128
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title : 智慧盆栽守護者 type : slide slideOptions: transition: slide --- # 智慧盆栽守護者 ## 27蔡宸睿 28蔡雁丞 --- # 壹、動機與目的 ---- 在現代都市生活中,許多人因為工作繁忙,常常忽略了對盆栽的日常照護,導致植物枯萎死亡。本專題旨在設計一套自動監控與澆灌系統,利用土壤濕度感測、自動灌溉與即時回饋的方式,實現「智慧盆栽守護者」的構想,協助使用者輕鬆養護植物,降低植物死亡率。 ---- 本電路特別適用於: - **長期不在家的上班族** - **缺乏植物照護經驗的初學者** - **教學與STEM教育應用場景** 我們的目的是建構一個低成本、可擴充、具有互動性的智慧園藝解決方案。 --- # 貳、設計理念 ---- 本報告整合感測器、灌溉模組、蜂鳴警示、RGB視覺提示等多重輸出裝置,提供以下功能: 1. **即時土壤濕度感測**:避免過度或不足澆水 2. **自動澆灌邏輯**:控制水泵精準啟動與冷卻時間 3. **多重提示輸出**:蜂鳴器、RGB燈可視化資訊 4. **人因工程考量**:訊息清楚明確,顏色與聲音便於使用者辨識 --- # 参、硬體架構 ---- # 架構 | **元件** | **功能** | | -------- | -------- | | Arduino Uno | 控制電路 | | 土壤濕度感測器 | 得到土壤濕度 | | 繼電器 | 控制水泵開關| | 有緣蜂鳴器 | 提醒使用者植物缺水 | | RGB LED | 顯示濕度等級 | ---- ![image](https://hackmd.io/_uploads/SkFwhP6Xlx.png) ---- ## 土壤濕度感測器 ![image](https://hackmd.io/_uploads/BkwIaIpmeg.png) S:data +:5V -:GND ---- ## 繼電器 ![image](https://hackmd.io/_uploads/HkQXMvpmxl.png) $$ V_{out} = \begin{cases} V_{cc_{out}} &\text {if $IN=V_{cc_{in}}$} \\ 0 &\text{if $IN=GND$} \end{cases} $$ ---- ## RGB LED ![image](https://hackmd.io/_uploads/SkdnwDpXee.png) red | common anode | green | blue --- # 肆、程式說明 ---- ## 1.初始化 ```cpp= const int sensorPin = A0; const int relayPin = 8; const int buzzerPin = 9; const int redPin = 5; const int greenPin = 6; const int bluePin = 7; const unsigned long wateringDuration = 3500; const unsigned long wateringCooldown = 10000; unsigned long lastWateredTime = 0; int melody[] = {262, 294, 330, 349, 392, 440, 494, 523}; int noteDurations[] = {4, 4, 4, 4, 4, 4, 4, 4}; ``` ---- ## 1.初始化 ```cpp= void setup() { pinMode(relayPin, OUTPUT); digitalWrite(relayPin, LOW); pinMode(buzzerPin, OUTPUT); pinMode(redPin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(bluePin, OUTPUT); } ``` ---- ## 2.濕度偵測 ```cpp= [|2-3|4] void loop(){ int sensorValue = analogRead(sensorPin); int moisturePercent = map(sensorValue, 0, 400, 0, 100); moisturePercent = constrain(moisturePercent, 0, 100); } ``` ---- ## 3.澆水邏輯 ```cpp= [|3|4-7|8] void loop(){ // ... if (moisturePercent < 20 && millis() - lastWateredTime > wateringCooldown) { digitalWrite(relayPin,HIGH); playMelody(); delay(wateringDuration); digitalWrite(relayPin, LOW); lastWateredTime = millis(); } else { digitalWrite(relayPin, LOW); } } ``` ---- ## 4.播放美妙的音樂 ```cpp= void playMelody() { for (int i = 0; i < 8; i++) { int noteDuration = 1000 / noteDurations[i]; tone(buzzerPin, melody[i], noteDuration); delay(noteDuration * 1.3); } noTone(buzzerPin); } ``` ---- ## 5.發出閃耀的亮光 ```cpp= void loop(){ // ... if (moisturePercent > 70) { setRGB(0, 255, 0); } else if (moisturePercent > 30) { setRGB(255, 255, 0); } else { setRGB(255, 0, 0); } } void setRGB(int r, int g, int b) { analogWrite(redPin, r); analogWrite(greenPin, g); analogWrite(bluePin, b); } ``` --- # 伍、實體展示 --- # 陸、結論與發展 ---- ### 優點 - 可以自動澆灌 - 便宜、構造簡單 - 人性化的提示系統 ---- ### 缺點 - 因素過少(陽光、溫度) - 無法泛用於各種土壤與植物 - 無法遠端通知 ---- ## 未來發展 - 增加WiFi或藍牙模組 - 引用AI模型 - 太陽能電源設計 - 增加其功能 --- # 柒、參考文獻與資料 ---- - [繼電器簡介](https://www.digikey.tw/zh/articles/an-introduction-to-relays) - [繼電器怎麼用? 它讓Arduino可以控制更多好玩的東西!](https://crazymaker.com.tw/arduino-how-to-use-relay/#google_vignette) - [Arduino土壤溼度感測器使用](https://crazymaker.com.tw/arduino-how-to-use-soil-moisture-sensor/)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully