# Sugar二期 太陽能電源管理模組

<figure><img src="https://879637118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2Fxx85CMzqWTORAUqLrXc1%2Fsolar.png?alt=media&#x26;token=4417f5ce-88f0-48c9-b282-d0a8cad45444" alt=""><figcaption></figcaption></figure>

太陽能電源管理模組是一個可以將太陽光轉換成為電力的模組，模組可以作為太陽能充電器，透過太陽能替模組的18650電池充電。更可以透過Micro:bit或未來板等主控板開啟或關閉太陽能板的輸出或休眠時間，模組亦搭載有實時時間模組，可以做到報時功能。

## 模組參數

* 太陽能板尺寸: 80 x 40 x 32.5 mm
* 重量: 646g(太陽能板+模組)
* 類型：I2C 模組
* 太陽能板: 6V 6W 單晶硅

## 硬件接線

<figure><img src="https://879637118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FwIFkE69kJP3CEYlTNbE3%2Fsolarmodule_wiring_edu.png?alt=media&#x26;token=f82e8806-7dcf-403f-a1bf-43d077f93882" alt=""><figcaption></figcaption></figure>

### 參考接線

{% hint style="info" %}
使用太陽能電源模組給Robotbit與未來板供電示範接線
{% endhint %}

<figure><img src="https://879637118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FGX30tLy3MkMRyVsirxbX%2Fsolar_wiring.jpg?alt=media&#x26;token=6968f1af-bd8d-49e3-a710-dde07470c9e7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
請將電源開關撥到ON的位置
{% endhint %}

<figure><img src="https://879637118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FO3CsjImhX2mcGCdK9IYQ%2Fsolarmodule_transparent2.png?alt=media&#x26;token=7803fb0b-138e-4fd4-9e0d-afea4871a5b6" alt=""><figcaption></figcaption></figure>

## 顯示燈詳解

#### 電源輸出顯示燈

開啟電源輸出時，輸出顯示燈會亮起藍燈。

<div><figure><img src="https://879637118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FJFjh31N0Q8hPe17knz5z%2F20240709_112948.jpg?alt=media&#x26;token=d953b299-0488-4d63-9293-c4364d327642" alt=""><figcaption></figcaption></figure> <figure><img src="https://879637118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FVv5bMbSuqEYkd4Jaa9vI%2F20240709_110504.jpg?alt=media&#x26;token=1e234c91-6109-4c3a-b020-b5c930baa942" alt=""><figcaption></figcaption></figure></div>

#### 電源輸入顯示燈

當鋰電池正在充電時，電源輸入顯示燈會亮起紅燈。

<figure><img src="https://879637118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FsDzzdIcYrmCfUvOQYuo7%2F20240709_110103.jpg?alt=media&#x26;token=a115ae98-b8d0-4dcd-871b-5596fbdf8ec0" alt=""><figcaption></figcaption></figure>

## 參考程式

#### MakeCode編程教學

#### 加載Sugar插件：

#### 在擴展頁直接搜尋sugar (sugar已經過微軟認證，可以直接搜尋)

![](https://kittenbothk.readthedocs.io/en/latest/_images/sugar_search.gif)

#### 你亦可以用插件地址搜尋

Sugar插件：<https://github.com/KittenBot/pxt-sugar>

#### [詳細方法](https://sharinghub.kittenbot.hk/programmingplatforms/makecode/kittenbotandmakecode)

### 電源輸出控制

{% embed url="<https://makecode.microbit.org/_Mpk3PkF1YLVu>" %}

[參考程式](https://makecode.microbit.org/_Mpk3PkF1YLVu)

### 電源輸出休眠

{% embed url="<https://makecode.microbit.org/_RYM4k5L1m7k3>" %}

[參考程式](https://makecode.microbit.org/_RYM4k5L1m7k3)

### 設定實時時鐘

{% hint style="info" %}
注意：當太陽能模組的電源開關被關上或者電源輸出被關上時，實時時鐘的時間會被清除。
{% endhint %}

{% embed url="<https://makecode.microbit.org/_7i10L2HmyDzA>" %}

[參考程式](https://makecode.microbit.org/_7i10L2HmyDzA)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sharinghub.kittenbot.hk/functional_modules/sugar/solar_panel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
