Home New Help Edit

格納庫ハッチオープンジオラマ

Suns & Moon Laboratory




概要

めっちゃかっこいいゴミ箱見つけたのでジオラマにしてみた。

https://twitter.com/mikekoma/status/1411614039218688006

Media




開閉機構
ラジコンサーボからカムを介して、開閉機構を押し上げることでハッチオープン。




解説


ゴミ箱外観


制御基板(ブレッドボード上にArduino)


制御装置
ベースは1x4と2x4
n

モーターブラケットと、カムは3Dプリンターで作成(FLASHFORGE ADVENTURER3メモ)



鋸ガイドは、段ボールで高さ調整



ゴミ箱そのものを重くしておかないと、カムに押されてゴミ箱がうごいてしまうので、鉄アレイで固定。

材料


リス フタ付きゴミ箱 ソロウ ペダルオープンツイン 35L ブラック


DCM鋸ガイド2x4用
https://www.dcm-ekurashi.com/goods/812845

GWSサーボ MICRO/2BBMG/JRタイプ
https://akizukidenshi.com/catalog/g/gM-01725/


Arduino NANO EVERY


ブレッドボード

ジャンパー

1x4

2x4

タッピングネジ
ブラケットを1x4に固定するのに使用

プラスチック用タッピングネジ(Pタイプ 鍋3x12)
サーボをブラケットに固定するところで使用

鉄アレイ

段ボール

メカコレクション マクロスシリーズ マクロスデルタ VF-31F ジークフリード ファイターモード(メッサー・イーレフェルト機)


配線

ちょっと見辛いけどすんません。配線図書く気力がなかった。


ソースコード

ご自由にどうぞ。
スイッチ1個で開閉しています。

nano everyでなくても、サーボを接続するピンをPWMピンにすれば動くと思います。

/* ## Board ARDUINO NANO EVERY https://store.arduino.cc/usa/nano-every ## Arduino Board setting Arduino megaAVR Boards ->Arduino Nano Every ## Author Suns & Moon Laboratory https://www.s-m-l.org twitter @mikekoma ## Lincense MIT License Copyright (c) 2021 Suns & Moon Laboratory Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "Servo.h" #define PIN_SERVO 6 #define PIN_SW 2 #define LO_ANGLE (0+15) #define HI_ANGLE (180-15) Servo myservo; int now_pos = LO_ANGLE; void setup() { myservo.attach(PIN_SERVO); myservo.write(now_pos); pinMode(PIN_SW, INPUT_PULLUP); } void loop() { if (digitalRead(PIN_SW) == 0) { if (now_pos != HI_ANGLE) { while (now_pos < HI_ANGLE) { now_pos++; myservo.write(now_pos); delay(30); } while (digitalRead(PIN_SW) == 0); } } if (digitalRead(PIN_SW) == 0) { if (now_pos != LO_ANGLE) { while (now_pos >LO_ANGLE) { now_pos--; myservo.write(now_pos); delay(30); } while (digitalRead(PIN_SW) == 0); } } }

end

Home New Help Edit
2023-06-07 19:47:14 32400