Popis
ULN2003 DC 5V 4 Phase 5 Wire Stepper Motor + Driver Board for Arduino
Popis: ULN2003 je krokový motor s ovládačom, vhodný pre Arduino projekty.
Vlastnosti:
- Prevádzkové napätie: 5V DC
- 4 fázy, 5 vodičov
- Maximálne prúdové zaťaženie: 600V AC / 1mA / 1S
Špecifikácie:
Parameter | Hodnota |
---|---|
Prevádzkové napätie | 5V DC |
Počet fáz | 4 |
Počet vodičov | 5 |
Max. prúdové zaťaženie | 600V AC / 1mA / 1S |
Príklady použitia:
- Použitie v 3D tlačiarniach na ovládanie pohybu osí
- V robotike na pohyb mechanických častí
- V automatizácii domácnosti pre ovládanie rôznych zariadení
Príkladový kód pre Arduino:
Vyžaduje sa práca s knižnicou Stepper.
#include const int stepsPerRevolution = 200; // počet krokov na jeden obrat motora // inicializácia inštancie Stepper Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); void setup() { // nič sa nevykonáva v setup } void loop() { // otáčanie motora doprava myStepper.step(stepsPerRevolution); delay(500); // otáčanie motora doľava myStepper.step(-stepsPerRevolution); delay(500); }
Príkladový kód pre ESPHome:
stepper: - platform: a4988 id: my_stepper step_pin: D0 dir_pin: D1 max_speed: 250 steps/s # Optional: sleep_pin: D2 acceleration: inf deceleration: inf
stepper: - platform: a4988 # ... dir_pin: number: D1 inverted: true
stepper: - platform: uln2003 id: my_stepper pin_a: D0 pin_b: D1 pin_c: D2 pin_d: D3 max_speed: 250 steps/s # Optional: acceleration: inf deceleration: inf
on_...: then: - stepper.set_target: id: my_stepper target: 250 # Templated - stepper.set_target: id: my_stepper target: !lambda |- if (id(my_binary_sensor).state) { return 1000; } else { return -1000; }
Warning
This turns the stepper to an absolute position! To have the servo move relative to the current position, first reset the current position and then set the target to the relative value.
on_...:
then:
# Move 150 steps forward
- stepper.report_position:
id: my_stepper
position: 0
- stepper.set_target:
id: my_stepper
target: 150
on_...: then: - stepper.report_position: id: my_stepper position: 250 # It's best to call set_target directly after report_position, so that the stepper doesn't move - stepper.set_target: id: my_stepper target: 250 # Templated - stepper.report_position: id: my_stepper position: !lambda |- if (id(my_binary_sensor).state) { return 0; } else { return -1000; }
on_...: - stepper.set_acceleration: id: my_stepper acceleration: 250 steps/s^2
on_...: - stepper.set_deceleration: id: my_stepper deceleration: 250 steps/s^2
number: - platform: template name: Stepper Control min_value: -100 max_value: 100 step: 1 set_action: then: - stepper.set_target: id: my_stepper target: !lambda 'return x;' stepper: - platform: ... # [...] stepper config id: my_stepper
lambda calls
From lambdas, you can call several methods on stepper motors to do some advanced stuff (see the full API Reference for more info).
set_target
: Set the target position of the motor as an integer.// Argument is integer (signed int) // Set the (absolute) target position to 250 steps id(my_stepper).set_target(250);
report_position
: Report the current position as an integer.// Report the (absolute) current position as 250 steps id(my_stepper).report_position(250);
current_position
: Get the current position of the stepper as an integer.int pos = id(my_stepper).current_position;
target_position
: Get the set target position of the stepper as an integer.int pos = id(my_stepper).target_position;
![ESP8266 NodeMCU Stepper Motor (28BYJ-48 and ULN2003 Driver) | Random Nerd Tutorials](https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2021/08/ESP8266-Stepper-Motor-Schematic-Diagram-Wiring.png?resize=828%2C446&quality=100&strip=all&ssl=1)
ULN2003 DC 5V 4fázový 5vodičový krokový motor + doska ovládača pre Arduino 600V AC / 1mA / 1S
Výkon: Nízky
Značka Power: OEM
Použitie: Modulačná dióda
Štruktúra: PNP
Špeciálna funkcia: Kontaktná dióda so spoločným bodom
Frekvencia: Vysoká
Typ frekvencie: Drive IC
Konštrukcia: Epitaxný typ
Materiál: silikónová inštalácia
Štýl: Plug-in
Funkcia: Výkonová trióda
Číslo modelu: ULN2003
Krokový uhol krútiaceho momentu: 5,625°/64DC
Odpor: 200Ω±7% (25℃)
Izolačný odpor: >10MΩ (500V)
Dielektrická sila: 600 V AC / 1 mA / 1
Stupeň izolácie: Abez zaťaženia
Ťahová frekvencia: >600Hz
Vyťahovacia frekvencia naprázdno: >1000Hz
Uťahovací moment: >34,3 mN.m
Nárast teploty: <40K (120Hz)
Menovité napätie: DC 5V
4-fázový
Pomer redukcie: 1/64