Biraz alışılmadık bir konu. Çıraklarımız için bir eğitim düzeneği yapıyorum: ucunda renk sensörü bulunan küçük bir Lego Technic konveyör. Gerçek bir makineye dokunmadan, bir Hermetry kartında bir “hat” görebiliyorlar (sayılan parçalar, çalışan konveyör, sıkışma alarmı). Raspberry Pi 4 sistemi yönetiyor ve v1/telemetry konusuna yayın yapıyor.Elimde şunlar var: dört eski Power Functions motoru (ikisi M, ikisi L, 9 V olanlar) ve oğlumun, düz konnektörlü yeni motorlara sahip seti.İlk denemem, bir GPIO pininden sürülen bir BC337 transistörü ve Pi’nin 5 V pinine bağlı bir PF M motoruydu; serbest dönuş diyodu da takılıydı. Motor bir kez seğirdi ve Pi yeniden başladı. İkinci denemede aynısı oldu. Motorları bir lojik besleme kaynağından sürmemem gerektiğini bilecek kadar otomasyon mühendisiyim, ama Lego ölçeğinde bunu atlatabileceğimi düşündüm.Bunun için insanlar ne kullanıyor? Hız kontrolünü ve “sıkışma” sinyali için mümkünse bir konum geri beslemesini istiyorum.
Slightly unusual one. I’m building a training rig for our apprentices: a small Lego Technic conveyor with a colour sensor at the end, so they can see a “line” on a Hermetry board (parts counted, conveyor running, a jam alarm) without touching a real machine. Raspberry Pi 4 runs the show and publishes to v1/telemetry.
Motors I have: four old Power Functions motors (two M, two L, the 9 V ones) and my son’s set with the newer motors that have the flat connector.
First attempt was a BC337 transistor from a GPIO pin with one PF M motor on the Pi’s 5 V pin, flyback diode included. The motor twitched once and the Pi rebooted. Second attempt the same. I’m an automation engineer so I know better than to drive motors off a logic supply, but at Lego scale I thought I’d get away with it.
What do people use for these? I’d like speed control and ideally some position feedback for a “jam” signal.