Пример, как можно сделать шаговый двигатель, используя 3D-печать, один подшипник, 8 гвоздей, 6 магнитов и моток медной проволоки.
Чтобы заставить этот двигатель шевелиться, разумеется, используется контроллер Arduino.
Схема включения:
Скетч:
/* 01010000011100100110111101110100011011110010000001000111 3D Printed Stepper Motor Created August 15, 2015 Modified August 15, 2015 by Anthony Garofalo (Proto G) Visit my YouTube channel here: https://www.youtube.com/channel/UCpTuKJrXFwybnpOG7HpTpZw Visit my Instructables page here: http://www.instructables.com/member/Proto+G/ _____ ______ _____ _______ _____ ______ |_____] |_____/ | | | | | | ____ | | \_ |_____| | |_____| |_____| 01010000011100100110111101110100011011110010000001000111 */ int Delay; int reverseSwitch; void setup() { // initialize digital pin 13 as an output. pinMode(9, OUTPUT); pinMode(10, OUTPUT); pinMode(11, OUTPUT); pinMode(12, OUTPUT); pinMode(13, OUTPUT); //led pin for visual pinMode(6, INPUT); //toggle switch is connected to digital pin 6 for reversing direction } void loop() { reverseSwitch = digitalRead(6); if(reverseSwitch == HIGH){//if the reverse switch is high, spin the rotor counter clockwise Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(12, HIGH); digitalWrite(13, HIGH); delay(Delay); digitalWrite(12, LOW); digitalWrite(13, LOW); delay(5); Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(11, HIGH); delay(Delay); digitalWrite(11, LOW); delay(5); Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(10, HIGH); digitalWrite(13, HIGH); delay(Delay); digitalWrite(10, LOW); digitalWrite(13, LOW); delay(5); Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(9, HIGH); delay(Delay); digitalWrite(9, LOW); delay(5); } else{//if the reverse switch is not high, spin the rotor clockwise Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(9, HIGH); digitalWrite(13, HIGH); delay(Delay); digitalWrite(9, LOW); digitalWrite(13, LOW); delay(5); Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(10, HIGH); delay(Delay); digitalWrite(10, LOW); delay(5); Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(11, HIGH); digitalWrite(13, HIGH); delay(Delay); digitalWrite(11, LOW); digitalWrite(13, LOW); delay(5); Delay = analogRead(0); Delay = map(Delay, 0, 1023, 60, 2000); digitalWrite(12, HIGH); delay(Delay); digitalWrite(12, LOW); delay(5); } }
UPD 2015-08-27
Если добавить колечко сигнальных светодиодов — работа шагового двигателя станет ещё нагляднее:
Ссылки
3D Printed Stepper Motor
3D Printed Stepper Motor V1.1
По теме
LogoBot — простой робот для изготовления при помощи 3D-печати
Arduino позволяет вскрыть навесной замок за несколько секунд