EasyDriverStepper – Enable or Sleep ?

I received the EasyDriverStepper from Sparkfun the other day.  This is a design from Brian Schmalz. As a side note, In Q2 2011, Sparkfun will also supply Brian’s Quad stepperversion that will be based on same board.  Great little component!  It makes it really easy to interact with the outside world from your code. I am driving the stepper from a FEZ (see TinyCLR.com) using C#.  Good stuff.  Makes it really simple to program hardware devices such as this.  To be clear, the EasyDriverStepper (EDS) is the stepper driver which does the low level phase functions (i.e. full, half, quarter, etc.).  The program only has to set CPU pins low/high when it wants to do something like set direction, make a step, sleep, etc.  So the program does not have to control step timing/sync because the EasyDriver does that.  Nice.

I did ask around a bit (with no luck) on what exactly is the difference between Enable and Sleep on this board.  EasyDriver exposes those pins from the A3967 chip.  However, even after reading the chip specs, it is not totally clear how those functions differ from each other.  With some experiments and empirical evidence, I determined the following (please let me know if I am wrong):

Sleep/Wake– Setting sleep pin low, will shutdown or “sleep” the chip. This is like a power down.  The motor current will also be shutoff. On wake (or pin high), it is like a reboot. Everything will be reset and the motor will align to first natural Full step position.  This could cause the motor to twitch a bit as it finds a “Home” on a step. Smile

Enable/Disable – Enable/Disable basically just relates to turning motor power on and off.  Setting “Enable” high will put chip in disabled mode. All it does is turn off current to the motor. The chip maintains it current state, such as step mode and position.  Setting Enable back on only turns the motor current back on.  If the motor has not moved, it should not twitch because the current step position is same as when it left.

When to use which is a better question?
Basically, use Enable when you are starting/stopping normally.  If you don’t need the “holding power” of the stepper to maintain position, then just disable the motor current to save power. For example, driving a robot will have many starts and stops. You should have little to no restart “jerks”.  Use Sleep for longer periods of inactivity or when you must always start from a full step alignment.

Also Note:
1) It is Important to tie all grounds together to the main ground.  If the Fez is powered by the USB, it is not grounded to the ED ground bus and things will not work right. Things like setting stepper mode may not work or only set High but not Low. I spent hours on this issue after reconfiguring and thinking I fried the ED.  My mistake was thinking the Fez must be grounded on USB so it should work – wrong.
– Run a wire from a Fez ground pin to the main ground.
– Also ground the ED board to main ground.
Basically, just make sure to ground both devices to the 12V supply rail that is powering the ED’s VIN.

Now that everything is working good, I plan to post code and pictures of my breadboard setup and code.  I hope to also create a daughter board and mount 4 ED drivers on and some proper motor terminal blocks.

Here is another blog post from Dan Thompson that shows hooking up the EasyDriver v4.2 to an Arduino board.

Misc Stepper Links:
http://www.pololu.com/catalog/product/1201
http://www.schmalzhaus.com/EasyDriver/
http://danthompsonsblog.blogspot.com/2010/05/easydriver-42-tutorial.html
http://www.allegromicro.com/en/Products/Part_Numbers/3967/

Advertisements
This entry was posted in .Net Micro Framework, C# and tagged , , . Bookmark the permalink.