{"product_id":"pistep2-quad-stepper-motor-control-board-for-raspberry-pi","title":"PiStep2 Quad Stepper Motor Control Board for Raspberry Pi","description":"\u003cp\u003eThis neat little board plugs directly into the Raspberry Pi GPIO header and provides 2 or 4 connectors for small stepper motors\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eFully Assembled - No Soldering Required\u003c\/li\u003e\n\u003cli\u003eRaspberry Pi Zero Form Factor - works with all versions of Raspberry Pi with 40pin GPIO connector\u003c\/li\u003e\n\u003cli\u003e\u003cspan\u003eWorks with UniPolar (5-pin) stepper motors. Not with Bipolar (4-pin) motors.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003eStepper motors and Raspberry Pi not included\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eVarious Power Options:\u003c\/strong\u003e\u003c\/p\u003e\n\u003col\u003e\n\u003cli\u003ePowered from the Raspberry Pi 5V\u003c\/li\u003e\n\u003cli\u003eFrom the 2-pin Terminal (whatever voltage is required for the motors)\u003c\/li\u003e\n\u003cli\u003eMicro-USB - 5V only\u003c\/li\u003e\n\u003c\/ol\u003e\n\u003cp\u003e\u003cstrong\u003ePinout is simple:\u003c\/strong\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003ePhysical pins 11, 12, 13, 15 for Motor A (GPIO 17, 18, 27, 22)\u003c\/li\u003e\n\u003cli\u003ePhysical pins 16, 18, 22, 7 for Motor B (GPIO 23, 24, 25, 04)\u003c\/li\u003e\n\u003cli\u003ePhysical pins 33, 32, 31, 29 for Motor C (GPIO 13,12,6,5)\u003c\/li\u003e\n\u003cli\u003ePhysical Pins 38, 37, 36, 35 for Motor D (GPIO 20,26,16,19)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eEach pin has an associated white LED so you can see the stepper signals going through\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003ePower Supply Alternatives\u003c\/strong\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eJumper VCC-VSTP \u003c\/strong\u003e(default). Power from the motors is taken from the Raspberry Pi 5V line\n\u003cul\u003e\n\u003cli\u003eMicro-USB into Raspberry Pi. 5V for the Pi and the stepper motors goes through a poly-fuse which can trip if 2 motors are used simultaneously\u003c\/li\u003e\n\u003cli\u003eMicro-USB into the PiStep board. 5V for both the Pi and the stepper motors is provided directly from the 5V USB input so no problems with 2 motors at once\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eJumper VSTP-VIN\u003c\/strong\u003e. Power for the motors is provided from the 2-pin screw terminal, so can be any voltage that the steppers can handle. Ensure you use the correct polarity! We recommend to keep it below 12V. You will find that the stepper motors can go up to 9V and will be able to step faster, the higher the voltage that is applied, but there will be some deterioration of the life of the stepper motor at a higher voltage.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003ePython Programming\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003ePlease see the excellent \u003ca href=\"http:\/\/www.raspberrypi-spy.co.uk\/2012\/07\/stepper-motor-control-in-python\/\" target=\"_blank\"\u003eexample here for \u003c\/a\u003esome pointers. You will need to change the pin numbers as above and also change the speed so it steps at a visible rate. You may also want to remove the print statements to speed it up. The lines in Red below are changed from the original to operate Motor A.\u003c\/p\u003e\n\u003cp\u003e# Use BCM GPIO references\u003cbr\u003e# instead of physical pin numbers\u003cbr\u003eGPIO.setmode(GPIO.BCM)\u003c\/p\u003e\n\u003cp\u003e# Define GPIO signals to use\u003cbr\u003e# Pins 18,22,24,26\u003cbr\u003e# GPIO24,GPIO25,GPIO8,GPIO7\u003cbr\u003eStepPins = [17,18,27,22]\u003c\/p\u003e\n\u003cp\u003e# Set all pins as output\u003cbr\u003efor pin in StepPins:\u003cbr\u003e  print \"Setup pins\"\u003cbr\u003e  GPIO.setup(pin,GPIO.OUT)\u003cbr\u003e  GPIO.output(pin, False)\u003c\/p\u003e\n\u003cp\u003e# Define some settings\u003cbr\u003eStepCounter = 0\u003cbr\u003eWaitTime = 0.01\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eScratchGPIO Programming\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThese pins are identical to those required by \u003ca href=\"http:\/\/cymplecy.wordpress.com\/scratchgpio\/\" target=\"_blank\"\u003eScratchGPIO\u003c\/a\u003e and therefore can easily be driven using simple Scratch commands:\u003c\/p\u003e\n\u003cp\u003e\u003cimg src=\"http:\/\/www.4tronix.co.uk\/rpi\/pistep_07.gif\" data-mce-fragment=\"1\" data-mce-src=\"http:\/\/www.4tronix.co.uk\/rpi\/pistep_07.gif\"\u003e Set motor type for Scratch to be Stepper motor\u003c\/p\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cp\u003e\u003cspan\u003e\u003cimg src=\"http:\/\/www.4tronix.co.uk\/rpi\/pistep_05.gif\" data-mce-fragment=\"1\" data-mce-src=\"http:\/\/www.4tronix.co.uk\/rpi\/pistep_05.gif\"\u003e \u003c\/span\u003eSet the position of the stepper motor A\u003c\/p\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cp\u003e\u003cspan\u003e\u003cimg src=\"http:\/\/www.4tronix.co.uk\/rpi\/pistep_06.gif\" data-mce-fragment=\"1\" data-mce-src=\"http:\/\/www.4tronix.co.uk\/rpi\/pistep_06.gif\"\u003e \u003c\/span\u003eSet the speed of the stepper motor A\u003c\/p\u003e","brand":"4tronix","offers":[{"title":"Default Title","offer_id":25353548295,"sku":"4TR-PISTEP2Q","price":12.95,"currency_code":"EUR","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/products\/IMG_0178.JPG?v=1469007098","url":"https:\/\/shop.pimoroni.com\/en-eu\/products\/pistep2-quad-stepper-motor-control-board-for-raspberry-pi","provider":"Pimoroni Ltd","version":"1.0","type":"link"}