WIO PicoW Stepper 2 Hall
Introduction
This StepMotor option can be used for example:
- Railway crossing gate
- Bascule bridge
- Engine shed door
In short: A movement between two defined points.
Note: This is not implemented for 3W Fast.
Setup
WIO
I/O
Port | Type | WIOpicoW-01 | 4W | 3W |
---|---|---|---|---|
1 | Output | I/O1-3 | IN1 | CLK+ |
2 | Output | I/O1-4 | IN2 | DIR+ |
3 | Output | I/O1-5 | IN3 | ENABLE+ |
4 | Output | I/O1-6 | IN4 | - |
5 | Input | I/O1-7 | Hall 1 | |
6 | Input | I/O1-8 | Hall 2 | |
7 | Input | I/O1-9 | Emergency break button | |
8 | Output | I/O1-10 | Warn LED on running motor |
Swap Hall 1 and 2 if the movement is in the wrong direction.
Extra
Output
In this example the WIO NodeID is 34.
Movement
Parameter on/off is the approximately count of steps needed to travel from Hall 1 to Hall 2.
The delay determines the stepper speed. Use a high value at initial testing.
The WIO will report the number of steps wenn it reaches a Hall sensor.
accessory event 34:0 val=1 type=4 aspect=1994 slave=0
This aspect value can be used to finetune parameter on/off to get a smooth end stop.
In the example above 2000 would be a good value.
Optionally two output objects can be used for up and down.
Both outputs should be set as Push button and one with zero in parameter off and the other with zero in parameter on.
----| hallX ON |--------------------- gate open|------<-->------|closed |---- hallY ---------------------| ON
Stop
This is a kind of emergency break in case something goes wrong to prevent damage.
Value on must be set to 9.
Parameter on/off can be left to zero.
The output behaviour can be set to Push button.