Big Easy Stepper Board Coding in Sleep Mode

Hello. First time posting and very new to the Arduino world. I have a stepper Nema 17 Gearbox ratio 19 to 1, SparkFun Big Easy Driver and an Arduino board running the attached .ino file called “Stick-No-Sleep.ino”. When I run the program it works.

Push button and motor turns clockwise 1/4 turn and stops
Push button again and motor turns 1/4 counter clockwise and stops

The problem is the Big Easy Driver when not in use pulls .85amps and heats up. I was told I need to use the Sleep feature when not in use but not sure how to do so.

So what I’m trying to do is, take the sleep terminal from the Big Easy Driver to ground using pin 7 as an OUTPUT. Attached file Stick-Sleep.ino is the attempt adding sleep to pin 7.

Could anyone see what ALL the errors I made?

Thank you :confused:

Stick-Sleep.ino (2.05 KB)

Stick-No-Sleep.ino (1.76 KB)

Stick-Sleep-Version-1.ino (2.04 KB)

pinMode(2, INPUT); //push button
ButtonState = digitalRead(2);

if (ButtonState == LOW){  //LOW means it has been pressed!

How is your button wired? Do you have pullup / pulldown resistor connected? 10,000 steps per second?

Hello JCA34F. Thank you for taking the time looking at my mess. Just woke up and saw your post. Yes. The button has a 10ohm “pull down” resistor. Resistor is on the positive side and button works perfect but can’t get sleep to work.

Thank you again for looking! :slight_smile:

Hello again. I re-uploaded Stick-No-Sleep The copy of Stick-No-Sleep I uploaded last night was the wrong copy. Sorry about that.

The new copy of Stick-No-Sleep I just uploaded does not have OUTPUT 7 and works perfect but does not go to sleep.

So I took Stick-No-Sleep added OUTPUT 7 and Saved As Stick-Sleep

Problem is after adding OUTPUT 7 the motor just hums. Does not turn.

Got it working. Added

if (digitalRead(7) == HIGH){
digitalWrite(7, LOW); //Sleep Mode Test

(See new attachment) Stick-Sleep-Version-1.ino

Push button: motor turns clockwise 1/4 turn, stops and Big Easy Driver goes to sleep
Push button again: motor turns 1/4 counter clockwise, stops and Big Easy Driver goes to sleep