Editing Stepper Motor and ULN2003
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | see https://github.com/zhcong/ULN2003-for-ESP32 | |
− | |||
− | |||
− | |||
− | |||
= Description = | = Description = | ||
Line 11: | Line 7: | ||
Our motor has about 508 steps for 360° (the motor itself has 64 steps but there is a gear train on top) | Our motor has about 508 steps for 360° (the motor itself has 64 steps but there is a gear train on top) | ||
− | + | [[File:Stepper03.JPG|x200px]] | |
− | + | ||
− | + | [[File:Stepper02.JPG|x200px]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
= How to connect it electrically = | = How to connect it electrically = | ||
− | [[File:Stepper- | + | [[File:Stepper-cables01.JPG|x200px]] |
− | |||
− | |||
− | |||
− | |||
[[File:Stepper-cable02.JPG|x200px]] | [[File:Stepper-cable02.JPG|x200px]] | ||
− | = Required Module and Files = | + | == Required Module and Files == |
* We use '''[https://www.sketching-with-hardware.org/files/Stepper.py Stepper.py]''' | * We use '''[https://www.sketching-with-hardware.org/files/Stepper.py Stepper.py]''' | ||
* this is downloaded from https://github.com/zhcong/ULN2003-for-ESP32 | * this is downloaded from https://github.com/zhcong/ULN2003-for-ESP32 | ||
* the original file is at https://github.com/zhcong/ULN2003-for-ESP32/blob/master/Stepper.py | * the original file is at https://github.com/zhcong/ULN2003-for-ESP32/blob/master/Stepper.py | ||
* this is based on: https://github.com/IDWizard/uln2003 by (c) IDWizard 2017,MIT License. | * this is based on: https://github.com/IDWizard/uln2003 by (c) IDWizard 2017,MIT License. | ||
+ | |||
+ | |||
= How to control it in MicroPython = | = How to control it in MicroPython = | ||
Line 45: | Line 34: | ||
from machine import Pin | from machine import Pin | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
In1 = Pin(32,Pin.OUT) | In1 = Pin(32,Pin.OUT) | ||
In2 = Pin(33,Pin.OUT) | In2 = Pin(33,Pin.OUT) | ||
Line 65: | Line 47: | ||
s1.step(509) | s1.step(509) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | |||
= Related Tutorial Videos = | = Related Tutorial Videos = | ||
− | + | <youtube>PEKjvD1uQe4</youtube> | |
− |