-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I usually control stepper motors. These seem to be missing in Wokwi. I can see a few challenges to implement them
1: Visual apperance - Similar to the Servo, with a shaft where the angular position is visible, like an arrow glued on.
2: Angular position - accuracy/resolution. Steppers can have lots of steps, a small readout of the actual step it is on would be nice. Can be in the visual model or mouseover display.
2a: partial steps - steppers can be halfstepped so such a readout should be with decimal. (Implementation of detecting halfstep might be tricky)
3: Stepper types - bipolar (4 wire), unipolar(5 or 6 wire), are most common(?) but there are several. That means at least two fundamental different devices, in how they react to electrical connections. The visual representation might be different, possibly weakly indicating 2 bipolar coils or 4 unipolar coils.
4: Stepper resolution - An attribute is number of steps/revolution.
5: Gearing, and other mechanical - must be ignored, or you need to write a physics simulator, too. A geared stepper would simply have more steps to complete a revolution.
5a Possibly exception, but as a new device - Stepper with a linear actuator. (like potentiometer and slide potentiometer)
6: Electrical - in the simplified Wokwi simulation the Arduino drives coils directly - no backemf diodes, no transistor/FET, no 12V, no overcurrent etc. Nor do they have limits on steps/second and other RealLife trivia.
7: Driverchips - usually (bipolar) steppers are driven with a chip. In essence they have a Direction and Step input. A suggestion is a Stepper-with-driver device, where the chip is "integrated" (visually as a black pimple on side :-) ) Input lines are the Step, Direction (and possibly Enable ...)
7a: Where chips offer half/quarter steps, one simply uses double/quadruple the step/revolution of the stepper as a simulation.
Simplification: Steppers need only step on transition when coils get correct +/- (fullstep) compared to previous state.
Oh ... and then there are the libraries for Steppers, with/without chips.