{"product_id":"motor-2040","title":"Motor 2040 - Quad Motor Controller","description":"\u003cp\u003eA compact 4 channel motor+encoder controller, powered by RP2040. It has RGB and per-motor indicator LEDs plus built in voltage and current sensing.\u003c\/p\u003e\n\u003cp\u003eMotor 2040 is a \u003cstrong\u003estandalone motor controller\u003c\/strong\u003e for driving motors with encoders attached. \u003cstrong\u003eEncoder motors\u003c\/strong\u003e can provide feedback to the controller, enabling more precise control over position and velocity - perfect for building a four wheel drive robot rover or buggy (add \u003ca href=\"\/en-eu\/products\/mecanum-wheels-pack-of-4\" target=\"_blank\"\u003emecanum omniwheels\u003c\/a\u003e to go sideways!). We've built the RP2040 chip right into Motor 2040 so you don't need separate microcontroller and driver boards, keeping everything tidy and lightweight.\u003c\/p\u003e\n\u003cp\u003eWhy limit yourself to vehicular constructs though, you could use it as the brains of any project that involves motors: elaborate pulley systems, 1:12 replicas of It's A Small World or even customisable dials with haptic feedback and programmable endpoints.\u003c\/p\u003e\n\u003cp\u003eMotor 2040 comes with many useful built-in bells and whistles, such as:\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eAn\u003cstrong\u003e addressable RGB LED \u003c\/strong\u003e(AKA Neopixel) for visual feedback and status reports.\u003c\/li\u003e\n\u003cli\u003eA pair of\u003cstrong\u003e mono indicator LEDs on each motor channel\u003c\/strong\u003e to show you when and in what direction a motor is moving. This helps visualise what your code is doing and means you can prototype without having motors plugged in!\u003c\/li\u003e\n\u003cli\u003eA \u003cstrong\u003eQW\/ST connector\u003c\/strong\u003e to make it easy to attach \u003ca href=\"\/en-eu\/collections\/qwiic\" target=\"_blank\"\u003eQwiic\u003c\/a\u003e or \u003ca href=\"\/en-eu\/collections\/stemma-qt\" target=\"_blank\"\u003eSTEMMA QT\u003c\/a\u003e breakouts - great for adding some sensor smarts.\u003c\/li\u003e\n\u003cli\u003eSome neat \u003cstrong\u003evoltage\/current\/fault sensing features\u003c\/strong\u003e to help prevent motor mishaps.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eIt's supported by a well documented C++\/MicroPython motor and encoder library with lots of examples to show you how to use the individual features (and everything together).\u003c\/p\u003e\n\u003ch2\u003eMotor 2040 and MMME shims\u003c\/h2\u003e\n\u003cp\u003eWe've designed Motor 2040 to interface easily with our new \u003ca href=\"\/en-eu\/products\/micro-metal-motor-encoder\" target=\"_blank\"\u003eMMME (Micro Metal Motor Encoder)\u003c\/a\u003e shims which can be used to upgrade our standard \u003ca href=\"\/en-eu\/products\/micro-metal-gearmotor-extended-back-shaft\" target=\"_blank\"\u003eMicro Metal Motors\u003c\/a\u003e into fancy encoder motors. We also sell \u003ca href=\"\/en-eu\/products\/micro-metal-gearmotor-with-micro-metal-motor-encoder\" target=\"_blank\"\u003emotors with MMMEs pre-attached\u003c\/a\u003e, if you want to skip the soldering.\u003c\/p\u003e\n\u003cp\u003eOnce your motor has an MMME attached to it you can plug it into Motor 2040 with a \u003ca href=\"\/en-eu\/products\/jst-sh-cable-6-pin\" target=\"_blank\"\u003e6 pin JST-SH cable\u003c\/a\u003e. Convenient!\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eMotors, shims and cables are sold separately.\u003c\/strong\u003e\u003c\/p\u003e\n\u003ch2\u003eFeatures\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003ePowered by RP2040 (Dual Arm Cortex M0+ running at up to 133Mhz with 264kB of SRAM)\u003c\/li\u003e\n\u003cli\u003e2MB of QSPI flash supporting XiP\u003c\/li\u003e\n\u003cli\u003e2 Dual H-Bridge motor drivers (DRV8833)\u003c\/li\u003e\n\u003cli\u003e4 JST-SH connectors (6 pin) for attaching motors\u003c\/li\u003e\n\u003cli\u003eWide voltage range for motors and logic (2.7V to 10V)\u003c\/li\u003e\n\u003cli\u003eOn-board 3V3 regulator with input up to 13.2V (max regulator current output 150mA)\u003c\/li\u003e\n\u003cli\u003eOnboard voltage, current and fault sensing\u003c\/li\u003e\n\u003cli\u003ePer motor current limiting (0.5A) *\u003c\/li\u003e\n\u003cli\u003ePer motor direction indicator LEDs **\u003c\/li\u003e\n\u003cli\u003eAddressable RGB LED\/Neopixel\u003c\/li\u003e\n\u003cli\u003eReset and BOOT button (the BOOT button can also be used as a user button)\u003c\/li\u003e\n\u003cli\u003eUSB-C connector for programming and power (3A max)\u003c\/li\u003e\n\u003cli\u003eQw\/ST (Qwiic\/STEMMA QT) connector for breakouts\u003c\/li\u003e\n\u003cli\u003eFully-assembled\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/github.com\/pimoroni\/pimoroni-pico\" target=\"_blank\"\u003eC++\/MicroPython libraries\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/files\/motor2040_schematic.pdf?v=1655385574\" target=\"_blank\"\u003eSchematic\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca rel=\"noopener noreferrer\" href=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/files\/motor_2040_drawing.png?v=1655393482\" target=\"_blank\"\u003eDimensional drawing\u003c\/a\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003eSoftware\u003c\/h2\u003e\n\u003cp\u003eBecause it's a RP2040 board, Motor 2040 is firmware agnostic! You can program it with C\/C++, MicroPython or CircuitPython.\u003c\/p\u003e\n\u003cp\u003eOur \u003cstrong\u003eC++\/MicroPython\u003c\/strong\u003e libraries will help you get the most out of Motor 2040, they're packed with powerful features for working with motors. You'll get best performance using C++, but if you're a beginner we'd recommend using our batteries included MicroPython build for ease of getting started.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"https:\/\/github.com\/pimoroni\/pimoroni-pico\/releases\" target=\"_blank\"\u003eDownload Pirate brand MicroPython\u003c\/a\u003e (you'll need the 'pico-vx.x.x' image)\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/github.com\/pimoroni\/pimoroni-pico\/tree\/main\/micropython\/modules\/motor\" target=\"_blank\"\u003eMicroPython API documentation\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/github.com\/pimoroni\/pimoroni-pico\/tree\/main\/micropython\/examples\/motor2040\" target=\"_blank\"\u003eMicroPython examples\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/github.com\/pimoroni\/pimoroni-pico\/tree\/main\/examples\/motor2040\" target=\"_blank\"\u003eC++ examples\u003c\/a\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eYou can also use \u003cstrong\u003eCircuitPython\u003c\/strong\u003e on your Motor 2040, if you want access to all the nice conveniences of Adafruit's ecosystem.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"https:\/\/circuitpython.org\/board\/pimoroni_motor2040\/\" target=\"_blank\"\u003eDownload CircuitPython for Motor 2040\u003c\/a\u003e (coming soon)\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/learn.adafruit.com\/welcome-to-circuitpython\" target=\"_blank\"\u003eGetting Started with CircuitPython\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/github.com\/pimoroni\/pico-circuitpython-examples\/tree\/main\/motor2040\" target=\"_blank\"\u003eCircuitPython examples\u003c\/a\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eIf you'd like to program Motor 2040 from an Android phone then you could try the \u003ca href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.smartphoneremote.androidscriptfree\" target=\"_blank\"\u003eDroidScript\u003c\/a\u003e app, available on Google Play.  You'll need a \u003ca href=\"\/en-eu\/products\/usb-c-to-usb-c-cable\" target=\"_blank\"\u003eUSB-C cable\u003c\/a\u003e and a recent version of our MicroPython firmware installed on the board.\u003c\/p\u003e\n\u003ch2\u003eConnecting Breakouts\u003c\/h2\u003e\n\u003cp\u003eIf your breakout has a QW\/ST connector you can plug it in directly with a \u003ca href=\"\/en-eu\/products\/jst-sh-cable-qwiic-stemma-qt-compatible\" target=\"_blank\"\u003eJST-SH to JST-SH cable\u003c\/a\u003e, or you can connect older I2C Breakout Garden breakouts with a \u003ca href=\"\/en-eu\/products\/jst-sh-cable-qwiic-stemma-qt-compatible\" target=\"_blank\"\u003eJST-SH to JST-SH cable\u003c\/a\u003e coupled with a \u003ca href=\"\/en-eu\/products\/stemma-qt-qwiic-to-breakout-garden-adapter\" target=\"_blank\"\u003eQw\/ST to Breakout Garden adaptor\u003c\/a\u003e.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"https:\/\/github.com\/pimoroni\/pimoroni-pico\" target=\"_blank\"\u003eList of breakouts\u003c\/a\u003e currently compatible with our C++\/MicroPython build.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003ePowering Motor 2040\u003c\/h2\u003e\n\u003cp\u003eMotor 2040 can be powered either by plugging the board into a USB-C power source (like a PC or \u003ca href=\"\/en-eu\/products\/nanowave-3-5000mah-usb-c-a-power-bank\" target=\"_blank\"\u003epower bank\u003c\/a\u003e) or by connecting a \u003ca href=\"\/en-eu\/products\/battery-holder-3xaa-with-cover-and-switch\" target=\"_blank\"\u003ebattery pack\u003c\/a\u003e to the EXT PWR or VSYS connections. On an unmodified board, \u003cstrong\u003eyou should only have one power source connected at a time\u003c\/strong\u003e, to avoid back-powering your computer or battery.\u003c\/p\u003e\n\u003cp\u003eIf you want to have two power sources connected at the same time, Motor 2040 has two traces on its underside that you can cut to do this safely.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eCut EXT PWR to VSYS\u003c\/strong\u003e if you want to provide your motors with a separate power supply (up to 10V) from that used to power the rest of the board. Board power (up to 13.2V) will need to be provided either by USB 5V or VSYS.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eCut USB 5V to VSYS\u003c\/strong\u003e if you want to run the board entirely off a separate power supply, without worry of back-powering your computer. Note that this also means the board will not turn on when only connected by USB.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eBelow is a simplified circuit diagram showing the power wiring:\u003c\/p\u003e\n\u003cp\u003e\u003cimg style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/files\/motor2040_power_diagram_1_600x600.png?v=1654859595\" alt=\"Diagram showing the cuttable power traces on Motor 2040\"\u003e\u003c\/p\u003e\n\u003ch2\u003eNotes\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003eMeasurements: 52mm x 38mm x 7.7mm (L x W x H). The mounting holes are M2.5 and 2.7mm in from each edge.\u003c\/li\u003e\n\u003cli\u003e* The current limit of each motor can be disabled by soldering the \"high current\" pads on the rear (doing this will also disable the current monitoring). The maximum supported output current when unlimited is 1.2 A continuous (2 A peak) per motor.\u003c\/li\u003e\n\u003cli\u003e** The direction indicators for each motor can be disabled by cutting the \"motor LED\" traces on the rear.\u003c\/li\u003e\n\u003cli\u003eThe pinout of the JST-SH motor connectors is M+, M-, 3v3, A, B, GND.\u003c\/li\u003e\n\u003cli\u003eMotor 2040 has some extra broken out headers that adventurous roboticists might find useful (note that these are unpopulated and so will require soldering):\n\u003cul\u003e\n\u003cli\u003e2 sets of headers for connecting analog sensors\u003c\/li\u003e\n\u003cli\u003e1 set of headers for connecting a serial device, or an 3.3V ultrasonic distance sensor\u003c\/li\u003e\n\u003cli\u003eUnpopulated screw terminals for supplying external power (10A max continuous current)\u003c\/li\u003e\n\u003cli\u003eExposed analog, Breakout Garden and debug pins\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003eAbout RP2040\u003c\/h2\u003e\n\u003cp\u003eRaspberry Pi's RP2040 microcontroller is a dual core ARM Cortex M0+ running at up to 133Mhz. It bundles in 264kB of SRAM, 30 multifunction GPIO pins (including a four channel 12-bit ADC), a heap of standard peripherals (I2C, SPI, UART, PWM, clocks, etc), and USB support.\u003c\/p\u003e\n\u003cp\u003eOne very exciting feature of RP2040 is the programmable IOs which allow you to execute custom programs that can manipulate GPIO pins and transfer data between peripherals - they can offload tasks that require high data transfer rates or precise timing that traditionally would have required a lot of heavy lifting from the CPU.\u003c\/p\u003e","brand":"Pimoroni","offers":[{"title":"Default Title","offer_id":39884997853267,"sku":"PIM618","price":23.95,"currency_code":"EUR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/products\/motor-2040-1_1ce53b9e-8c9c-4554-8f1b-675027bf632d.jpg?v=1655198615","url":"https:\/\/shop.pimoroni.com\/en-eu\/products\/motor-2040","provider":"Pimoroni Ltd","version":"1.0","type":"link"}