I was trying to run stepper motor from my raspberry pi model 3 B. I used the following tutorial -


I have followed various other tutorial also but not succeed in any. My connection are these -

My stepper motor is Nema 17 bipolar stepper -

My battery is Lipo battery of ratings - 11.1V & 2200mAh

Problem- Nothing in stepper motor is showing response, no movement nothing.

Checked- when i give voltage to either coil of stepper motor it shows a little deflection implies stepper is working correctly.

The most basic thing is not working like when i put 5V in IN1/2/3/4 i get 0.1V in all the outputs.

Also, I have connected +12 to driver and GND of battery to driver no +5 or GND from rpi is this ok ?? Circuit of motor driver

Where am i wrong??


If the battery is charged, those 12V will be ok. And yes, its better if you power the H-bridge from an external source rather than from the Raspberry Pi.

"The most basic thing is not working like when i put 5V in IN1/2/3/4 i get 0.1V in all the outputs."

Now, if you are not getting any changes on h-bridge's OUT pins like you explained above, then I guess the problem is either on the hardware (verify all the connections and if everything looks ok then you may need another h-bridge), or in your code, so please share it to be able to give you more specific guidance.

Make sure your setting the GPIO pins correctly. If you're using Python this is an example:

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)   #Set to BOARD mode or BCM, depending on your preferences
GPIO.setup(10, GPIO.OUT)   #Using pin number 10 as an output
GPIO.output(10, GPIO.HIGH) #Set state pin
GPIO.output(10, GPIO.LOW)  

GPIO.cleanup()             #It's a good practice to detach the pins before you leave the program

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.