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

星期五, 12月 21, 2018

發光樂高路克 與 美國太空筆


最近研究一個小東西,想把樂高的星際大戰路克光劍加上LED發光,這之前就完成了。


但是我想把路克搬到GOGORO 2上面去,之前剛好裝了樂高油缸蓋,帝國風暴兵已經佔領一陣子了,我希望路克上去平衡一下原力。

於是我就在想,這麼小的空間要供電,電池沒辦法太大,所以最好就是只有晚上且騎乘的時候發光就好(白天發光也看不到啊!)。因此我從555  Timer研究起,無奈覺得有點複雜,要達到我想要的功能可能要不止一顆555,還是回頭用我比較熟悉的Arduino吧。

這麼小的體積及簡單的功能用ATtiny13就可以了,用Uno當ISO燒錄器去燒錄ATtiny13也不是甚麼大問題。接著是加上震動偵測模組以及光敏電阻,就可以知道現在是否在騎乘、是否是晚上,用Pro mini加上一些範例,其實這些簡單功能幾十分鐘就完成,接下來就是把程式碼加上Power Saving功能並且轉移到ATtiny13就好了!


但是我突然覺得,挖勒...為了讓路克光劍發光,搞得這麼複雜幹嘛......
做個開關, 晚上騎車前按一下,下車再按一下,不就好了...............................
如此就只需要一個鋰電池、一個開關、一個限流電阻和拿著光劍的路克,完工!
為了避免額外的耗電,最後我把限流電阻改成CRD限流二極體。
最多再加一個USB鋰電池充電模組就好了。





這讓我想到一個故事,太空筆的故事。
傳說中美國太空總署花了好多錢做了一隻太空筆,為的就是可以在太空失重環境下書寫;而蘇聯用一支鉛筆就解決這個問題。這是個震撼人心的故事。

結果事實不是這麼一回事,有興趣的人請自己打開下面連結:
下面連結

總之,我想說的只有一句話:莫忘初衷

星期三, 8月 02, 2017

BLE Lego Train

I've been busy with BLE Lego Train recently. 
8879 Remote control IR Speed Remote Control
8879 Remote control IR Speed Remote Control

Traditionally, we use 8879 Remote control IR Speed Remote Control to control most 4 trains.
But I also want to control auto switch tracks with motor , it's need more and more 8884 REMOTE CONTROL IR RECEIVER.


If I want control 4 train and 4 switch, I need 2 x Remote Control, 8 x IR Receiver, 4 x 88002 Train Motor, 4 x 8883 Medium Motor, 8 x Battery Box, cost $$$$$$$$$$....

The expenditure of motor is unavoid, but I want build more intelligent railway system, a IoT based system, IR is not a good choice.
A BLE based Remote Control is better.
At beginning, I use RFDuino, a Arduino ecology mcu with NRF51822, including Nordic privated Gazell Link Layer protocol(GZll), very easy to exchange data between BLE devices by GZll.
gzll_fig1_star_network.png
GZLL Star Network




This my first prototype:


RFDuino with GZll is good, but only support 8 devices (with host, totally 9 devices), there is not enough expansion capability for me. So I begin to study next prototype.

I found RedBear BLE Nano is a good candidate, acceptable price, and a most important: open source!
RedBear BLE Nano


Open source that mean I can duplicate many BLE Nano compatible device with cheap NRF51822 board.
NRF51822 BLE GT82C01


First I buy a set of RedBear BLE Nano for my 2nd prototype, I use RFDuino as RC host, to treat as a Beacon/Broadcaster. BLE Nano as RC device, to treat as a observer.
BLE Nano can receive advertisement data from Beacon, parse the data and interpreter command to control motor.
Now the path between RFduino and BLE Nano is linked, next step is controlling train motor directly!

iPhone 14 Pro vs Olympus EM10 MkII 中篇

時間來到2022年, 我的S20+因為綠線事件, 立馬被我淘汰了, 同時我也正計畫購入Mini Countryman, 很殘念的是該車系統只支援CarPlay而不支援Android AUTO, 所以我也開始考慮要不要從Android換到Apple陣營. 好, 上面都是題外話, 反...