1

Topic: Stepper Control

I’m really liking the IDE. Does anyone have a tutorial or file on stepper motor control?

2

Re: Stepper Control

This is example of driving low power (<100mA) 12V bipolar stepper motor with CANNY 7

Post's attachments

sbp.png, 27.97 kb, 732 x 215
sbp.png 27.97 kb, 359 downloads since 2018-12-01 

Attachment icon step_motor_bipolar.cfd 2.11 kb, 215 downloads since 2018-12-01 

3

Re: Stepper Control

This is for unipolar

Post's attachments

step_motor_im.png, 32.79 kb, 793 x 346
step_motor_im.png 32.79 kb, 355 downloads since 2018-12-01 

Attachment icon step_motor_unipolar.cfd 3.36 kb, 242 downloads since 2018-12-01 

4 (edited by CANspeed 03-12-2018 07:00:40)

Re: Stepper Control

Thank you.  I'm a novice, but own my own electronics company and have a decent understanding, but still learning.  I'm interested in the bipolar stepper operation for reading a CAN message.  I'm lighting the green LED above 40mph right now but want to take it further using a bipolar stepper.  My goal is to operate a stepper from CAN data. How would I apply it to this sketch?  Know a position after decreasing for a period to reach its stop point at start up? The sketch below turns the green light on at 40mph.  Lets say max stepper range is 180 degrees. How do I assemble these sketches to make an operational speedometer?

Post's attachments

Attachment icon Canny 1.cfd 1.05 kb, 230 downloads since 2018-12-03 

5

Re: Stepper Control

You did not report how many degrees the speedometer turns in one step of the motor. Anyway, I think that your algorithm should consist of two parts - the initial calibration and the main part. When calibrating, the speedometer motor must go through the whole scale forth and back in order to accurately set to zero. The main part of the algorithm will be a simple regulator, where the speedometer will tend to the real speed obtained from the network. Try starting with calibration part. Take a look at the Сounter: http://wiki.cannylogic.com/index.php?title=Counter Try to build your diagram based on it and run it in CannyLab's Simulator.
I will try to implement part of the regulator algorithm in my spare time.

6 (edited by CANspeed 06-12-2018 06:53:16)

Re: Stepper Control

I will be working to understand.  The stepper I'm using just needs to move counter clockwise for a period of time to find a 0 calibration point.  It normally bangs against the stop for a moment at startup to find 0.  Thank you very much for your help.  Here's some specs on the stepper.
- Wide working voltage: 5~10V.
- Low current consumption: less than20mA, 5V, 2X100mW.
- High μ-step resolution: 1/12°.
- Directly driven by a μ-controller.

7

Re: Stepper Control

Please, take a look at the attached diagram.
Also, you need to power CANNY 7 from 9VDC adapter for safely drive 5~10VDC motor with it.

Post's attachments

Attachment icon step_motor_bipolar_speed1.cfd 6.64 kb, 255 downloads since 2018-12-07 

8 (edited by CANspeed 09-12-2018 21:42:27)

Re: Stepper Control

That's awesome thank you.  In an effort to understand the pieces, I have some questions.   What fields do I adjust to set my parameters for range of motor and range of values? How do I make the motor move counter clockwise for a period at startup?  The motor currently moves back and forth, but just needs to move counter clockwise against the motor stop to calibrate the first time.  Thanks for all of your help I really like the IDE and look forward to understanding it more.  Thanks Again!

9

Re: Stepper Control

The diagram attached above provides for movement only counter clockwise during initialization.
Does this diagram work differently for you? If so, could you show the video?

10

Re: Stepper Control

I don't have everything with me to make vid at the moment. I will try some fly-back diodes and post a video tomorrow if they don't solve the issue.