顯示具有 Circuits 標籤的文章。 顯示所有文章
顯示具有 Circuits 標籤的文章。 顯示所有文章

Tinkercad Circuits:避障自走車 Obstacle avoidance Car

 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

本文將使用TinkerCAD Circuits來示範超音感測器 HC-SR04(Ultrasonic sensor)的應用:「避障自走車」。讀者也可參考本部落格的其他超音感測器的應用文章

This tutorial uses a HC-SR04 ultrasonic distance sensor to do an obstacle avoidance car. Before assembling the hardware, the simulation could be done with TinkerCAD circuits.

材料(Materials):
1. Arduino UNO R3 板子 x 1
2. 光感測器模組 HC-SR04 ultrasonic distance sensor x 1
3. 直流馬達 DC motor x 2
4. 杜邦線 jumper wire x 8
5. 麵包板 small breadboard x 1

電路(Circuit):

Trig pin is connected to Arduino UNO pin 12.
Echo pin is connected to Arduino UNO pin 13.
One DC motor is connected to Arduino UNO pin 5 and pin 6.
The other DC motor is connected to Arduino UNO pin 10 and pin 11.

程式碼(The Code):

示範影片(Demo Video):




範例連結(Example Link):
https://www.tinkercad.com/things/8U8fwcfgTbf

Tinkercad Circuits:在LCD上顯示英文姓名(Display name on LCD)

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

This tutorial uses an LCD to show someone's name on the screen. This project is based on TinkerCAD LCD sample code.
本文使用 LCD 來顯示英文姓名。此範例是修改 TinkerCAD Circuits 的內建範例。

材料(Materials):
1. Arduino UNO R3 板子 x 1
2. 可變電阻 Potentiometer x 1
3. 16 x 2 LCD 模組 x 1
4. 杜邦線 jumper wire x 22
5. 麵包板 small breadboard x 1
6. 220歐姆電阻 220 ohm resistor x 2

電路(Circuit):

程式碼(The Code):

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12115432);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(162);
  
  // Print a message to the LCD.
  // **** Your english name here ****
  lcd.print("Holan");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(01);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

示範影片(Demo Video):

Python 動手做「Micro:bit」Unit 2:按按看

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

本篇文章會使用Mu Code Editor來開發micro:bit的應用程式,Mu Code Editor是一個給Python初學者的撰寫Python程式碼的軟體工具,此軟體的操作方式可參考Mu Code Editor官方的教學文章:https://codewith.mu/en/tutorials/

此文的上一篇為 Python 動手做「Micro:bit」Unit 1:點亮 LED

按鈕(Buttons)的原理與應用(Behind the MakeCode Hardware - Buttons on micro:bit)


我們將要製作的功能如下:
1. 按下按鈕 A 時,顯示大寫的字母 A。
2. 按下按鈕 B 時,顯示大寫的字母 B。
3. 按下按鈕 A + B 時,顯示愛心(Heart)。

功能的結果如圖:
按下按鈕 A
按下按鈕 B
按下按鈕 A + B


https://makecode.microbit.org/ 上的Blockly設計程式如下:

那先來試試用 https://makecode.microbit.org/ 上所提供的Blockly程式轉換功能,請轉換成 Python:

將上圖的程式碼複製到Mu Code Editor

讀者可以試著將此程式燒錄到 Microbit 板子上,程式執行結果可能不如預期喔。參考 https://microbit.org/get-started/user-guide/python/#buttons 與 https://microbit-micropython.readthedocs.io/en/v2-docs/tutorials/buttons.html 後,請讀者試著執行下面程式碼:
1
2
3
4
5
6
7
8
9
from microbit import *

while True:
    if button_a.is_pressed() and button_b.is_pressed():
        display.show(Image.HEART)
    elif button_a.is_pressed():
        display.show("A")
    elif button_b.is_pressed():
        display.show("B")

此程式結果有沒有如預期呢?

簡易遙控車DIY

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

本篇內的材料是由雲造 YUM(雲造臉書社團連結:https://www.facebook.com/groups/yunlinmaker)與喬智創意樂高機器人(https://www.facebook.com/george20140119)所提供的。

在自製遙控車之前,先用 TinkerCAD 認識馬達(範例https://www.tinkercad.com/things/0VDNKWqDK1i),要了解的項目有:
  1. 正負極與馬達旋轉方向的關係。
  2. 電壓與馬達旋轉速度的關係。





主要材料清單如下:
  • 三號(AA) 1.5V 電池六顆。
  • 四通遙控板組低頻裸片一套。
  • arduino 智能小車底盤套件一套。
  • 小型麵包板一塊。
  • 魔鬼氈。
  • 氣球。
  • 膠帶、雙面膠帶。
將天線區分為接收端發送端
用螺絲與螺帽將天線固定。

首先測試無線遙控板組:

用魔鬼氈將電池固定好以及接線好後,Arduino小車完成了,圖如下,此部分沒拍影片。

接著換全聯買的葡萄塑膠盒,用魔鬼氈將馬達與電池盒固定在盒子上,用雙面膠或膠帶將氣球固定住來當萬向輪: 

葡萄塑膠盒小車影片:

給小朋友玩後,小朋友覺得塑膠盒版本的小車比較有趣!!!了解原理後,就可以試試其他遙控車,例如遙控風力獸、mbitbot小車等。


遙控風力獸


遙控mbitbot小車


Python 動手做「Micro:bit」Unit 1:點亮 LED

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

本篇文章會使用Mu Code Editor來開發micro:bit的應用程式,Mu Code Editor是一個給Python初學者的撰寫Python程式碼的軟體工具,此軟體的操作方式可參考Mu Code Editor官方的教學文章:https://codewith.mu/en/tutorials/

LED的原理與應用(Behind the MakeCode Hardware - LEDs on micro:bit)


Micro:bit 用 25顆的 LEDs 來顯示一些圖形,例如愛心、笑臉等。 

第一個範例就使用micro:bit線上 Python Editor 的範例。程式碼如下:
1
2
3
4
5
6
7
# Write your code here :-)
from microbit import *

while True:
    display.scroll('Hello, World!')
    display.show(Image.HEART)
    sleep(2000)

範例結果影片:


此外https://makecode.microbit.org/ 裡的tutorials也有提供 Python 的自學課程,例如點選 Flashing Heart ,再點選 Python 後,就可以練習用 Python 來做閃爍的愛心了。



雲造研習紀錄:USB手搖充電式手電筒

2020/09/19 小編參加雲造所舉辦的研習【USB手搖充電式手電筒】,此文為小編的筆記與心得記錄。

【USB手搖充電式手電筒】介紹影片:



材料與電路圖:



單獨檢測個別電子材料,這很重要,因為等焊接好後,再來檢測有沒有問題時,就已經太遲了。

小編的成品








心得:小編的焊接技巧尚需加強。此課程適合給已經懂點電路的學生喔!

Tinkercad Circuits:不用Arduino來控制三色LED燈(RGB LED without Arduino)

若您覺得文章寫得不錯,請點選網誌上的廣告,來支持小編,謝謝。

本文要在不使用 Arduino 下,來控制 RGB LED 燈的顏色。TinkerCAD Circuit 範例網址:https://www.tinkercad.com/things/8PDEwFnhgLM

材料:
  1. RGB LED 一顆
  2. Power Supply 三台
  3. 1K Resistor 三條



電路接線:



Demo 影片:


Tinkercad classroom 使用說明

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

筆者在2019暑假時,使用了 TinkerCAD 給幾個高中生班級學習3D建模。會使用TinkerCAD Classroom的原因是:
  1. 高一新生沒有全部的人都有Google或臉書等帳號可用。
  2. 電腦教室是公用的,不想遇到有學生忘記登出又忘記關機,而讓帳號給下一人知道。
  3. TinkerCAD有 3D建模、Arduino線上模擬器與積木式程式設計可用。
那要如何使用 TinkerCAD Classroom 呢?首先至官網 https://www.tinkercad.com/ 登入,登入後點選 Classes ,接著按下 建立新課程



輸入課堂名稱年級科目


在課程的清單中會看到建立出來的課程

點選該課程就會進入課程資訊畫面,在此處可以按下 加入學生 來新增學生

加入學生的畫面中有個 Paste a list of students 按鈕,可用來一次增加多位學生

例如底下例子,一行是一位學生的名稱。

之後提供學生 課程代碼 與 暱稱,就可以登入TinkerCAD Classroom了。


點選 課程代碼 按鈕可看到底下的學生須知資訊:

至此學生就可以開始使用TinkerCAD上的功能,而老師部分則是可以看到每位學生的作品,但還沒有評分與繳交作業等的功能,不過這部分可搭配 Google Classroom來使用就可以了,只是Google Classroom需要Google帳號才能使用(苦笑...)。 期待TinkerCAD Classroom會有額外的功能出現吧。

小記:筆者在2019暑假八月使用時,TinkerCAD Classroom 尚未有  Paste a list of students 功能呦。

Q腳獸試玩

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

筆者手上的這套是由喬智創意機器人所提供的。要組好Q腳獸的材料如下:
  1. BBC micro:bit 開發板體驗包套件組
  2. MbitBot 多功能板
  3. Q腳獸材料包
  4. 聚合物鋰電池-1000mAh 3.7V

筆者依照「micro:bit X MbitBot 創造Q腳獸(一)」來組裝,未拆封的零件包如下圖:

組裝過程的一些照片如下:

Q腳獸組裝好後如下圖所示:


接著依照「趣玩MbitBot 單元(一) 用micro:bit 動起來!」與「micro:bit X MbitBot 創造Q腳獸(二)」來實作前進的功能,筆者的測試影片如下:

再來就是後退、左轉、右轉等功能。完整程式碼如下:

Demo 影片:


以上都是用積木式的方式來寫程式,但筆者想用Python來控制,此部分留待下次的文章囉。

Tinkercad Circuits:Temperature controlled fan(溫控電風扇)

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

前言(Preface):
炎炎夏日,不想手動調整電風扇,那就自己做個智慧型的風扇吧!只要用溫度感測器以及控制馬達的電子材料就可以完成隨著溫度變化自動調整風扇速度的「智慧風扇」了。
Do you want a smart electric fan? Let's try to build one with Arduino!

材料(Materials):
  • Arduino UNO R3 板子 x 1
  • 麵包板 Breadboard small x1
  • 直流馬達 DC motor x1
  • 溫度感測器 Temperature sensor x1
  • 杜邦線 jumper wire x 11
  • nMOS Transistor(MOSFET) x1
  • 10K歐姆電阻 x1


電路(Circuit):

The temperature sensor Vout pin is connected to arduino pin A3.
The MOSFET gate pin is connected to arduino pin 6.


程式碼(The Code):


示範影片(Demo Video):


範例連結(Example Link):
https://www.tinkercad.com/things/4GAVQvmKai0

Tinkercad Circuits:Ultrasonic 倒車雷達(Parking sensor simulation)

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

此文將本部落格「Tinkercad Circuits:Ultrasonic 自動照明」一文做修改,改成「倒車雷達」的模擬。距離越遠,燈泡亮度變暗,蜂鳴器聲音頻率變小;距離越近,燈泡亮度變亮,蜂鳴器聲音頻率變大。
This article modifies this blog post:"Tinkercad Circuits:Ultrasonic 自動照明" to simulate a parking sensor.

材料(Materials):
  • Arduino UNO R3 板子 x 1
  • 距離感測器模組 Ultrasonic x 1
  • 燈泡 light bulb x 1
  • 杜邦線 jumper wire x 7
  • 壓電式蜂鳴器 Piezo x 1
電路(Circuit):

The ultrasonic SIG pin is connected to arduino pin 12.
The Piezo positive pin is connected to arduino pin 10.
One of the light bulb is connected to arduino pin 5.

程式碼(The Code):


示範影片(Demo Video):


範例連結(Example Link):
https://www.tinkercad.com/things/1ueL7ExE7Ue

Tinkercad Circuits:Light the light bulb(光控燈泡)

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

本部落格有光控系列文章:
  1. Tinkercad Circuits:光控自走車 Light-Controlled Car
  2. Tinkercad Circuits:NeoPixel Ring 光控燈
  3. mBlock 單元五:使用光敏電阻控制 LED 燈亮度 ( mBlock Unit 5: Controlling a LED lightness with a photoresistor )
  4. mBlock 單元十三:光感應開門系統 ( mBlock Unit 13: Light-responsive Door )
  5. mBlock 單元十五:追光自走車 ( mBlock Unit 15: Light-Tracking Car )

皆使用光敏電阻來做控制應用,但都需要寫程式以及一個控制器才能做出來,於是筆者開始想用在沒有寫程式與控制器的限制下來設計一些電路,於是來設計光控燈泡、光控LED燈、光控三色LED燈的電路。

展示影片:





Tinkercad Circuits 光控燈泡範例網址:https://www.tinkercad.com/things/jYCvGfbCJP6
Tinkercad Circuits 光控LED範例網址:https://www.tinkercad.com/things/kcI7v8cMhqp 
Tinkercad Circuits 光控三色LED範例網址:https://www.tinkercad.com/things/2myYh8lmwwZ

Tinkercad Circuits:Bi-direction motor(馬達正反轉)

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

最近有人給筆者看了電動升降機的影片:


並且詢問筆者如何設計馬達正反轉的電路,於是筆者請教Google大神,在instructables網站找到了「Simple Bi-directional Switch」一文,此文提供的電路設計如下:


於是筆者用TinkerCAD Circuit設計類似的電路來模擬,結果影片如下:


TinkerCAD Circuit範例網址:https://www.tinkercad.com/things/kVcD0hBA108

Tinkercad Circuits:Three Responder(搶答器)

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

本文使用TinkerCAD Circuits來示範 LED、按鈕(PushButton)、壓電式蜂鳴器(Piezo)的綜合應用:「搶答器」,每個按鈕有對應的LED燈與聲音。
This is an application: "Three Responders system". The application uses LEDs, push buttons and a piezo to implement the system. Each push button has its own tone and turn on a LEDs when the push button is pressed.

材料(Materials):

  • Arduino UNO R3 板子 x 1
  • 杜邦線 jumper wire x 14
  • LED x 3
  • 小型麵包板 small breadboard x 1
  • 100歐姆電阻 100 ohm resistor x 1
  • 220歐姆電阻 220 ohm resistor x 3
  • 10K歐姆電阻 10K ohm resistor x 3
  • 壓電式蜂鳴器 Piezo x 1
  • 按鈕 PushButton x 3


電路(Circuit):
Push buttons are connected to Arduino UNO A2, A1, and A0.
LEDs are connected to Arduino UNO pin 9, 10, and 11.
Piezo is connected to Arduino pin 8.

程式碼(The Code):


示範影片(Demo Video):


範例連結(Example Link):
https://www.tinkercad.com/things/hEVABPuN1g7