# Wireless Dual Stepper Control with Adafruit IO, Raspberry Pi and Python

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/071/177/medium800thumb/raspberry_pi_ezgif.com-video-to-gif_%283%29.jpg?1550505640)

Easily bring your Raspberry-Pi-controlled stepper motor projects online using the Motor Hat, CircuitPython libraries, and Adafruit IO. You can wirelessly control up to&nbsp;_two&nbsp;_steppers from a single Adafruit IO Dashboard!

If you're building a home automation or robotics project which needs to be connected to the internet - _look no further._

## Adafruit IO

&nbsp;

Adafruit IO is our Internet of Things Platform - _for everyone!_&nbsp; You'll create _feeds_ to store the stepper's configuration: speed, step style, and direction.

To control it all, you'll build an interactive Adafruit IO Dashboard with buttons, switches, and toggles.&nbsp;

![raspberry_pi_Kapture_2019-02-14_at_13.36.50.gif](https://cdn-learn.adafruit.com/assets/assets/000/071/137/medium640thumb/raspberry_pi_Kapture_2019-02-14_at_13.36.50.jpg?1550169620)

## CircuitPython Code

&nbsp;

Adafruit's Circuit Python works on the Raspberry Pi! You will use the&nbsp;[CircuitPython](https://github.com/adafruit/Adafruit_CircuitPython_MotorKit/)&nbsp;[MotorKit](https://github.com/adafruit/Adafruit_CircuitPython_MotorKit/)&nbsp;library to control two stepper motors connected to the DC & Stepper Motor Hat. Connect them to the internet using the&nbsp;[Adafruit IO Python](https://github.com/adafruit/Adafruit_IO_Python)&nbsp;library. With Adafruit IO, you can upload new stepper motor configurations and control the steppers attached to the Raspberry Pi - wirelessly! You can rapidly update your code without having to compile and there's plenty of libraries, examples, and support.

![raspberry_pi_blinkapi.gif](https://cdn-learn.adafruit.com/assets/assets/000/071/167/medium640/raspberry_pi_blinkapi.gif?1550190104)

## Prerequisite Guides

If you're new to Adafruit IO or CircuitPython libraries, take a moment to walk through the following guides to get you started.

- [Circuit Python libraries on Raspberry Pi](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/)
- [Welcome to Adafruit IO](https://learn.adafruit.com/welcome-to-adafruit-io/)

## Parts
### Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit

[Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit](https://www.adafruit.com/product/2348)
Let your robotic dreams come true with the new DC+Stepper Motor HAT from Adafruit. This Raspberry Pi add-on is perfect for any motion project as it can drive up to 4 DC or 2 Stepper motors with full PWM speed control.

**Raspberry Pi and motors are not included. Works with any and...**

In Stock
[Buy Now](https://www.adafruit.com/product/2348)
[Related Guides to the Product](https://learn.adafruit.com/products/2348/guides)
![Angled shot of Adafruit DC & Stepper Motor HAT.](https://cdn-shop.adafruit.com/640x480/2348-07.jpg)

You'll want to pick up&nbsp; **two&nbsp;** of these NEMA-17 size stepper motors.&nbsp;

### Stepper motor - NEMA-17 size - 200 steps/rev, 12V 350mA

[Stepper motor - NEMA-17 size - 200 steps/rev, 12V 350mA](https://www.adafruit.com/product/324)
A stepper motor to satisfy all your robotics needs! This 4-wire bipolar stepper has 1.8° per step for smooth motion and a nice holding torque. The motor was specified to have a max current of 350mA so that it could be driven easily with an <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/324)
[Related Guides to the Product](https://learn.adafruit.com/products/324/guides)
![Angled shot of a Stepper motor - NEMA-17.](https://cdn-shop.adafruit.com/640x480/324-03.jpg)

### Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM

[Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM](https://www.adafruit.com/product/3775)
The Raspberry Pi 3 Model B is the most popular Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 3 better? How about a&nbsp;_faster_ processor, 5 GHz WiFi, and updated Ethernet chip with PoE capability?...

In Stock
[Buy Now](https://www.adafruit.com/product/3775)
[Related Guides to the Product](https://learn.adafruit.com/products/3775/guides)
![Angled shot of Raspberry Pi 3 - Model B+](https://cdn-shop.adafruit.com/640x480/3775-11.jpg)

## Materials
You'll need some extra supplies to finish this project. If you do not have them already, pick some up from Adafruit:

### Part: DC Power Adapter
quantity: 1
Female DC Power adapter - 2.1mm jack to screw terminal block
[DC Power Adapter](https://www.adafruit.com/product/368)

### Part: MicroSD Card with OS
quantity: 1
16GB Card with NOOBS 2.9
[MicroSD Card with OS](https://www.adafruit.com/product/1583)

### Part: Power Supply
quantity: 1
12V 5A switching power supply
[Power Supply](https://www.adafruit.com/product/352)

### Part: Power Supply with MicroUSB 
quantity: 1
5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable
[Power Supply with MicroUSB ](https://www.adafruit.com/product/1995)

# Wireless Dual Stepper Control with Adafruit IO, Raspberry Pi and Python

## Adafruit IO Setup

If you do not already have an Adafruit IO account set up, head over to&nbsp;[io.adafruit.com](http://io.adafruit.com/)&nbsp;to link your Adafruit.com account to Adafruit IO.

## Feeds Setup
The first step is to create a new Adafruit IO feed to hold the stepper motor's number of steps. Navigate to the&nbsp;[feeds page](https://io.adafruit.com/feeds)&nbsp;on Adafruit IO. Then click&nbsp; **Actions&nbsp;-\> Create New Feed** , and name this feed&nbsp; **stepper1steps**.&nbsp;

- If you do not already know how to create a feed, head over to&nbsp;[Adafruit IO Basics: Feeds](https://learn.adafruit.com/adafruit-io-basics-feeds).

![](https://cdn-learn.adafruit.com/assets/assets/000/071/086/medium800/raspberry_pi_stepper1steps_feed.png?1550005983)

You'll also want to create two more feeds to hold the first stepper's direction and the step size:

- **stepper1direction**
- **stepper1stepsize**

Then, create three more feeds (for the _second_ stepper):

- **stepper2steps**
- **stepper2direction**
- **stepper2stepsize**

and one to control the stepper 'Go!' button

- **stepperstart**

## Dashboard Setup
Next, step is to create an interactive dashboard to send data to the stepper motors from the Adafruit IO website.

- If you do not know how to create or use Dashboards in Adafruit IO, head over to the&nbsp;[Adafruit IO Basics: Dashboards](https://learn.adafruit.com/adafruit-io-basics-dashboards)&nbsp;guide.

### Adding Sliders for Stepper Step Amount
To control the amount of steps each stepper takes, add a&nbsp;[slider block](https://learn.adafruit.com/adafruit-io-basics-dashboards/adding-blocks#number-slider-3-7)&nbsp;to the dashboard.

- **Set Choose Feed** &nbsp;to&nbsp; **stepper1steps**
- **Set _Block Title_** &nbsp;to&nbsp; **Stepper 1**
- **Set _Slider Min Value_** &nbsp;to&nbsp; **0**
- **Set _Slider Max Value_** &nbsp;to&nbsp; **100**
- **Set _Slider Step Size_** &nbsp;to&nbsp; **10** &nbsp;- the stepper will step by 10 steps each time the slider is toggled.

![raspberry_pi_block_settings_slider.png](https://cdn-learn.adafruit.com/assets/assets/000/071/088/medium640/raspberry_pi_block_settings_slider.png?1550007931)

After setting up the first slider block, set up a second one attached to the&nbsp; **stepper2steps&nbsp;** feed to control stepper 2.

### Adding Toggle Blocks for Stepper Direction
To control the direction of the stepper, [add a toggle block](https://learn.adafruit.com/adafruit-io-basics-dashboards/adding-blocks#toggle-button-3-11) to the dashboard.

- **Set Choose Feed** &nbsp;to&nbsp; **stepper1direction**
- **Set _Block Title_** &nbsp;to&nbsp; **Direction**
- **Set _Button On Text_** &nbsp;to **Backward**
- **Set _Button Off Text_** &nbsp;to&nbsp; **Forward**

![raspberry_pi_io_toggle_block.png](https://cdn-learn.adafruit.com/assets/assets/000/071/089/medium640/raspberry_pi_io_toggle_block.png?1550008134)

After setting up the first toggle block, set up a second one attached to the&nbsp; **stepper2direction&nbsp;** feed to control stepper 2.

### **Adding Buttons**
To send the stepper motor configurations to the stepper motors - create a momentary push-button block:

- **Set _Choose Feed_** &nbsp;to&nbsp; **stepperstart**
- **Set&nbsp;_Button Text_** &nbsp;to&nbsp; **Go**
- **Set&nbsp;_Press Value_** &nbsp;to **1**
- **Set&nbsp;_Release Value_** &nbsp;to&nbsp; **0**

![raspberry_pi_block-go.png](https://cdn-learn.adafruit.com/assets/assets/000/071/132/medium640/raspberry_pi_block-go.png?1550164474)

Stepper motors can [use four different step styles](https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi/using-stepper-motors#stepping-6-9). Use a [momentary button](https://learn.adafruit.com/adafruit-io-basics-dashboards/adding-blocks#momentary-button-3-9) to configure the style of step.&nbsp;

- **Set Choose Feed** to **stepper1stepsize**
- **Set&nbsp;_Button Text_** &nbsp;to&nbsp; **Single Step**
- **Set&nbsp;_Press Value_** &nbsp;to&nbsp; **STEPPER.SINGLE**
- **Set&nbsp;_Release Value_** &nbsp;to&nbsp; **STEPPER.SINGLE**

![raspberry_pi_step_block.png](https://cdn-learn.adafruit.com/assets/assets/000/071/090/medium640/raspberry_pi_step_block.png?1550008648)

After setting up the first momentary button, you'll want three more. The press/release values should be set accordingly:

- **Double Step** &nbsp;-\>&nbsp; **STEPPER.DOUBLE**
- **Interleave** &nbsp;-\>&nbsp; **STEPPER.INTERLEAVE**
- **Microstep** &nbsp;-\>&nbsp; **STEPPER.MICROSTEP**

You'll also want to **make four more buttons** for the second stepper (stepper2stepsize feed)

![raspberry_pi_STEPPER_BTNS.png](https://cdn-learn.adafruit.com/assets/assets/000/071/091/medium640/raspberry_pi_STEPPER_BTNS.png?1550008827)

Here's an example of a complete dashboard for this project:

![](https://cdn-learn.adafruit.com/assets/assets/000/071/133/medium800/raspberry_pi_stepper_dash.png?1550164746)

If you're an IO Plus user, you can set an image as an dashboard header. If you'd like to use the header created for this guide, right-click the image below to download it.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/138/medium800/raspberry_pi_wifi-stepper-dashboard-header.png?1550170846)

## Saving your IO Keys
You are also going to need your Adafruit IO username and secret API key.

Navigate to your profile and click the&nbsp; **View AIO Key** &nbsp;button to retrieve them. Write them down in a safe place, you'll need them for later.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/085/medium800thumb/raspberry_pi_weather_3d_printing_adafruit_io_username_and_password.jpg?1550005534)

# Wireless Dual Stepper Control with Adafruit IO, Raspberry Pi and Python

## Wiring

Before you start wiring the steppers, there's a bit of soldering and assembly required.

- _If you have not yet soldered the headers and terminal blocks onto the hat,_ [click here for instructions](https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi/assembly).

Warning: 

![](https://cdn-learn.adafruit.com/assets/assets/000/071/135/medium800/raspberry_pi_stepmotordiag.png?1550165223)

With the Motor Hat and the Raspberry Pi **unplugged** , make the following connections between the **DC/Stepper Motor Hat** and **Stepper Motor 1** :

- **Stepper 1 Red** to **Hat M1+**
- **Stepper 1 Yellow** to **Hat M1-**
- **Stepper 1 Green** to **Hat M2+**
- **Stepper 1 Gray** to **Hat M2-**

Make the following connections between the **DC/Stepper Motor Hat** and **Stepper Motor 2** :

- **Stepper 2 Red** to **Hat M3+**
- **Stepper 2 Yellow** to **Hat M3-**
- **Stepper 2 Green** to **Hat M4+**
- **Stepper 2 Gray** to **Hat M4** -

Then, **connect the Female DC Power Adapter to the power terminal block on the hat**.&nbsp;

- _Unsure how to power the&nbsp;Motor Hat?_ [Check out this page for more information](https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi/powering-motors).

# Wireless Dual Stepper Control with Adafruit IO, Raspberry Pi and Python

## Python Code

This guide assumes that you have a Raspberry Pi connected to the Internet with CircuitPython installed.

- If you have not done this yet, [follow this guide and come back to this page when you're set up.](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi)

## Install Python Libraries&nbsp;
Your Raspberry Pi has Python already.

[Visit the Motor HAT setup page to setup your HAT and make sure that works first!](https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi)

Then, installing the library to control the Pi Motor Hat kit is fairly simple:

From a terminal, enter the following to install the [CircuitPython\_MotorKit](https://github.com/adafruit/Adafruit_CircuitPython_MotorKit)&nbsp;library

`sudo pip3 install adafruit-circuitpython-motorkit`

To communicate with Adafruit IO, you'll need to install the [Adafruit IO Python](https://github.com/adafruit/adafruit_io_python) library:

`sudo pip3 install adafruit-io`

## Code Configuration

Before you run the code, you'll need to configure it for your Adafruit IO account.

Open whichever text editor you'd like from the Raspberry Pi's command line (this example uses the&nbsp;`nano`&nbsp;editor) :

`nano adafruit_io_steppers.py`

To edit the file,&nbsp;set the&nbsp;`ADAFRUIT_IO_KEY` variable to the secret Adafruit IO key you saved earlier.

Set the&nbsp;`ADAFRUIT_IO_USERNAME` to your Adafruit IO username.

Then, **save the file** ( **CTRL+X,** &nbsp;followed by **Enter** )

![](https://cdn-learn.adafruit.com/assets/assets/000/071/176/medium800thumb/raspberry_pi_file_edit.jpg?1550257730)

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Adafruit_IO_Stepper_Control/code.py

## Code Usage

From the Raspberry Pi terminal, run the code by typing the following:

`python3 Adafruit_IO_Stepper_Control/code.py`

and **press enter**

The terminal should output that it's checking the GO button, and delaying (to avoid sending too many fetch requests to Adafruit IO)

```
pi@stepper-pi:~ $ python3 dual_steppers.py
checking for GO button press...
Delaying for 1 seconds...
checking for GO button press...
Delaying for 1 seconds...
```

Next, navigate over to the Adafruit IO Dashboard to configure the first stepper.

 **Set the amount of steps by dragging the slider.** The slider was configured to step in 10 step increments. You can re-configure to step more or less it by editing the block element.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/158/medium800thumb/raspberry_pi_set_steps.jpg?1550257730)

 **Set the stepper direction by toggling the switch**. The stepper can either move forward (default) or backward.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/161/medium800thumb/raspberry_pi_stepper_direction.jpg?1550245071)

 **Set the step style by pressing one of the four momentary push-buttons** &nbsp;on the dashboard.&nbsp;

![raspberry_pi_step_style.gif](https://cdn-learn.adafruit.com/assets/assets/000/071/160/medium640thumb/raspberry_pi_step_style.jpg?1550188048)

There are four essential types of steps you can use with your Motor HAT. All four kinds will work with any unipolar or bipolar stepper motor.

1. **Single Steps** &nbsp;- this is the simplest type of stepping, and uses the least power. It uses a single coil to 'hold' the motor in place, as seen in the animated GIF above
2. **Double Steps** &nbsp;- this is also fairly simple, except instead of a single coil, it has two coils on at once. For example, instead of just coil #1 on, you would have coil #1 and #2 on at once. This uses more power (approx 2x) but is stronger than single stepping (by maybe 25%)
3. **Interleaved Steps&nbsp;** - this is a mix of Single and Double stepping, where we use single steps interleaved with double. It has a little more strength than single stepping, and about 50% more power. What's nice about this style is that it makes your motor appear to have 2x as many steps, for a smoother transition between steps
4. **Microstepping** &nbsp;- this is where we use a mix of single stepping with PWM to slowly transition between steps. It's slower than single stepping but has much higher precision. We recommend 8 microstepping which multiplies the # of steps your stepper motor has by 8.

After the first stepper is configured, play with the controls for the second stepper.&nbsp;

**When you're ready, press the green Go Button** to send the presets to the Raspberry Pi and move the stepper motors.&nbsp;

![raspberry_pi_go_btn.gif](https://cdn-learn.adafruit.com/assets/assets/000/071/162/medium640thumb/raspberry_pi_go_btn.jpg?1550188200)

The Raspberry Pi should configure and step the first stepper, then the second (if you configured it).

![](https://cdn-learn.adafruit.com/assets/assets/000/071/165/medium800thumb/raspberry_pi_ezgif.com-video-to-gif_%287%29.jpg?1550257885)

The terminal will also display the values it receives from Adafruit IO as it's stepping.

```
Stepper 1 Configuration
	70 steps
	Step Size:  STEPPER.DOUBLE
	Stepper Direction:  Forward
Steppin!
Stepper 1 Done Stepping

Stepper 2 Configuration
	60 steps
	Step Size:  STEPPER.DOUBLE
	Stepper Direction:  Backward
Steppin!
Stepper 2 Done Stepping
```

When it's done stepping, the stepper driver's code resets the&nbsp;_step amount_ feed to zero. The slider, connected to the _step amount feed_, resets too.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/311/medium800thumb/raspberry_pi_stepping.jpg?1550258496)

## Code Overview
Adafruit IO can receive up to 120 data points a minute, the code aims to minimize the amount of data polling which occurs in the `while True` loop.

First, it checks the stepper status feed, which is linked to the _Go push-button_ on the dashboard. If the code exceeds the amount of requests it can send, it will wait thirty seconds for Adafruit IO to clear the timeout.

```
try: # attempt to poll the stepper status feed
	print('checking for GO button press...')
	stepper_start = aio.receive(feed_steppers_status.key)
except ThrottlingError:
	print('Exceeded the limit of Adafruit IO requests, delaying 30 seconds...')
	time.sleep(30)
```

The code for controlling both stepper motors is similar - but doesn't happen simultaneously (code for the first stepper occurs first).&nbsp;

First, the code checks if the stepper thread is alive (if the stepper is moving or not) and if the stepper status feed (`stepper_start`) was selected (the push-button was pressed). Then, it fetches the value from the Stepper Slider:

```
if not st1.isAlive() and int(stepper_start.value):
	stepper_1_steps = aio.receive(feed_step_1_steps.key)
	stepper_1_steps = int(stepper_1_steps.value)
```

If the value from the stepper slider is set, the code will fetch the stepper's direction and step size from Adafruit IO. Then, it'll call&nbsp;`stepper_worker` and pass in the arguments from the configuration.

```
        if stepper_1_steps &gt; 0: # stepper slider is set
            # Get stepper configuration from io feeds
            stepper_1_direction = aio.receive(feed_step_1_direction.key)
            stepper_1_step_size = aio.receive(feed_step_1_step_size.key)
            print('Stepper 1 Configuration')
            print('\t%d steps' % stepper_1_steps)
            print('\tStep Size: ', stepper_1_step_size.value)
            print('\tStepper Direction: ', stepper_1_direction.value)
            # Set Stepper Direction
            if stepper_1_direction.value == 'Forward':
                move_dir = STEPPER.FORWARD
            elif stepper_1_direction.value == 'Backward':
                move_dir = STEPPER.BACKWARD
            # Stepper 1 Thread
            st1 = threading.Thread(target=stepper_worker, args=(kit.stepper1,
                                                                stepper_1_steps,
                                                                move_dir,
                                                                "Stepper 1",
                                                                stepstyles[STEPPER.SINGLE],))
            st1.start()
```


## Featured Products

### Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit

[Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit](https://www.adafruit.com/product/2348)
Let your robotic dreams come true with the new DC+Stepper Motor HAT from Adafruit. This Raspberry Pi add-on is perfect for any motion project as it can drive up to 4 DC or 2 Stepper motors with full PWM speed control.

**Raspberry Pi and motors are not included. Works with any and...**

In Stock
[Buy Now](https://www.adafruit.com/product/2348)
[Related Guides to the Product](https://learn.adafruit.com/products/2348/guides)
### Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM

[Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM](https://www.adafruit.com/product/3775)
The Raspberry Pi 3 Model B is the most popular Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 3 better? How about a&nbsp;_faster_ processor, 5 GHz WiFi, and updated Ethernet chip with PoE capability?...

In Stock
[Buy Now](https://www.adafruit.com/product/3775)
[Related Guides to the Product](https://learn.adafruit.com/products/3775/guides)
### Stepper motor - NEMA-17 size - 200 steps/rev, 12V 350mA

[Stepper motor - NEMA-17 size - 200 steps/rev, 12V 350mA](https://www.adafruit.com/product/324)
A stepper motor to satisfy all your robotics needs! This 4-wire bipolar stepper has 1.8° per step for smooth motion and a nice holding torque. The motor was specified to have a max current of 350mA so that it could be driven easily with an <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/324)
[Related Guides to the Product](https://learn.adafruit.com/products/324/guides)
### Female DC Power adapter - 2.1mm jack to screw terminal block

[Female DC Power adapter - 2.1mm jack to screw terminal block](https://www.adafruit.com/product/368)
If you need to connect a DC power wall wart to a board that doesn't have a DC jack - this adapter will come in very handy! There is a 2.1mm DC jack on one end, and a screw terminal block on the other. The terminals are labeled with positive/negative assuming a positive-tip configuration...

In Stock
[Buy Now](https://www.adafruit.com/product/368)
[Related Guides to the Product](https://learn.adafruit.com/products/368/guides)
### 16GB Card with NOOBS 3.0

[16GB Card with NOOBS 3.0](https://www.adafruit.com/product/1583)
NooBs 3.0 is the fastest way to have a variety of operating systems on your Pi. Available on a 16G card, you can now boot multiple OS's such as Raspbian, Pidora, RaspBMC, Snappy Ubuntu, etc. There's a boot up menu for selecting which one you like. **This card has NooBs 3.0 on it,...**

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1583)
[Related Guides to the Product](https://learn.adafruit.com/products/1583/guides)
### 12V 5A switching power supply

[12V 5A switching power supply](https://www.adafruit.com/product/352)
This is a beefy switching supply, for when you need a lot of power! It can supply 12V DC up to 5 Amps, running from 110V or 220V power (the plug it comes with is for US/Canada/Japan but you can use any plug adapter for your country, or just replace the cable with a standard 'figure-8'...

Out of Stock
[Buy Now](https://www.adafruit.com/product/352)
[Related Guides to the Product](https://learn.adafruit.com/products/352/guides)
### 5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable

[5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable](https://www.adafruit.com/product/1995)
Our all-in-one 5V 2.5 Amp + MicroUSB cable power adapter is the perfect choice for powering single-board computers like Raspberry Pi, BeagleBone, or anything else that's power-hungry!

This adapter was specifically designed to provide 5.25V, not 5V, but we still call it a 5V USB...

In Stock
[Buy Now](https://www.adafruit.com/product/1995)
[Related Guides to the Product](https://learn.adafruit.com/products/1995/guides)

## Related Guides

- [Adafruit DC and Stepper Motor HAT for Raspberry Pi](https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi.md)
- [Simple Raspberry Pi Robot](https://learn.adafruit.com/simple-raspberry-pi-robot.md)
- [Raspberry Pi Physical Dashboard](https://learn.adafruit.com/raspberry-pi-physical-dashboard.md)
- [Robotic AI Bear using ChatGPT](https://learn.adafruit.com/robotic-ai-bear-using-chatgpt.md)
- [Raspberry Pi LED Matrix Sand Toy](https://learn.adafruit.com/matrix-led-sand.md)
- [Adafruit DRV2605L Haptic Controller Breakout](https://learn.adafruit.com/adafruit-drv2605-haptic-controller-breakout.md)
- [Solderless Robot Toy Xylophone](https://learn.adafruit.com/solderless-robot-toy-xylophone.md)
- [Raspberry Pi E-Ink Weather Station using Python](https://learn.adafruit.com/raspberry-pi-e-ink-weather-station-using-python.md)
- [Single Channel LoRaWAN Gateway for Raspberry Pi](https://learn.adafruit.com/raspberry-pi-single-channel-lorawan-gateway.md)
- [Automatic Naughty Cat Detector using Lobe](https://learn.adafruit.com/naughty-cat-detector-using-microsoft-lobe.md)
- [Mini LED Matrix Audio Visualizer](https://learn.adafruit.com/mini-led-matrix-audio-visualizer.md)
- [Gemma LightTouch](https://learn.adafruit.com/gemma-lighttouch.md)
- [Sensor Plotting with Mu and CircuitPython](https://learn.adafruit.com/sensor-plotting-with-mu-and-circuitpython.md)
- [Bluetooth CLUE Robot Car using CircuitPython](https://learn.adafruit.com/bluetooth-clue-robot-car-using-circuitpython.md)
- [CircuitPython Hardware: Charlieplex LED Matrix](https://learn.adafruit.com/micropython-hardware-charlieplex-led-matrix.md)
