# ESP32 PlayStation Controller

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/129/459/medium800/hacks_psx-8576.jpg?1713911950)

https://youtu.be/1pIzLQEEc3I

The original PlayStation controller is great, but it's wired for use with a PlayStation. This guide shows how to cut the cord and convert it to a wireless Bluetooth gamepad for your computer gaming needs.

An Adafruit ItsyBitsy ESP32 and Arduino software make it all possible, and a LiPo battery and built-in charger keep it powered.

## Parts
Featured
### Adafruit ItsyBitsy ESP32 - PCB Antenna - 8 MB Flash / 2 MB PSRAM

[Adafruit ItsyBitsy ESP32 - PCB Antenna - 8 MB Flash / 2 MB PSRAM](https://www.adafruit.com/product/5889)
What's smaller than a Feather but larger than a Trinket? It's an&nbsp; **Adafruit ItsyBitsy ESP32** , a powerful processor PCB with a plethora of pins! It features the&nbsp;ESP32 Pico module, an FCC-certified module that contains&nbsp;an&nbsp; **ESP32 chip with...**

In Stock
[Buy Now](https://www.adafruit.com/product/5889)
[Related Guides to the Product](https://learn.adafruit.com/products/5889/guides)
![Angled shot of black, rectangular microcontroller.](https://cdn-shop.adafruit.com/640x480/5889-05.jpg)

Featured
### Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy

[Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy](https://www.adafruit.com/product/2124)
If you have an ItsyBitsy or Pro Trinket you probably know it's the perfect little size for a portable project. This LiPoly backpack makes it really easy to do! Instead of wiring 2 or 3 boards together to make a charging system, this little PCB sits on top of the PCB and allows a...

In Stock
[Buy Now](https://www.adafruit.com/product/2124)
[Related Guides to the Product](https://learn.adafruit.com/products/2124/guides)
![Angled Shot of the Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy.](https://cdn-shop.adafruit.com/640x480/2124-09.jpg)

Featured
### Lithium Ion Polymer Battery - 3.7V 350mAh

[Lithium Ion Polymer Battery - 3.7V 350mAh](https://www.adafruit.com/product/2750)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 350mAh for a total of about 1.3 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2750)
[Related Guides to the Product](https://learn.adafruit.com/products/2750/guides)
![Angled shot of a rectangular lipo battery with a 2-pin JST connector. The battery specs are listed on the body: 3.7V 250mAh.](https://cdn-shop.adafruit.com/640x480/2750-05.jpg)

Featured
### Simple USB C Socket Breakout

[Simple USB C Socket Breakout](https://www.adafruit.com/product/5180)
This Simple USB Type C breakout is kinda interesting,&nbsp;[it looks similar to this USB Type C SMT Inline Breakout Board](https://www.adafruit.com/product/4396), but it's an 'inline' style with pads for soldering to the common USB 1.1/2.0 connections. We see this lil...

In Stock
[Buy Now](https://www.adafruit.com/product/5180)
[Related Guides to the Product](https://learn.adafruit.com/products/5180/guides)
![Angled shot of USB C socket breakout.](https://cdn-shop.adafruit.com/640x480/5180-01.jpg)

Featured
### Rainbow "Wire Wrap" Thin 30 AWG Prototyping & Repair Wire

[Rainbow "Wire Wrap" Thin 30 AWG Prototyping & Repair Wire](https://www.adafruit.com/product/4730)
This stuff is called "wire-wrap wire" because it used to be used for wire-wrapping high-speed digital circuits on a special kind of contact board. It's pretty rare to see wire-wrapping in these days of low-cost PCB fabrication, but the wire is still really handy for prototyping...

In Stock
[Buy Now](https://www.adafruit.com/product/4730)
[Related Guides to the Product](https://learn.adafruit.com/products/4730/guides)
![Large spool of Rainbow Wire Wrap Thin Prototyping & Repair Wire](https://cdn-shop.adafruit.com/640x480/4730-00.jpg)

## PlayStation Controller

Use an original Sony PlayStation controller model model SCPH-1080 -- the kind before the dual analog analog sticks or rumble motors were added. These can be had for around $10 at a retro gaming store or online auction.

![hacks_psx-2b.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/460/medium640/hacks_psx-2b.jpg?1713912319)

# ESP32 PlayStation Controller

## Arduino IDE Setup

You need to install the right USB-to-serial driver for your chip in addition to the Arduino IDE. If you are unsure which is the right one, install both!

### Install Arduino IDE

The first thing you will need to do is to download the latest release of the Arduino IDE. You will need to&nbsp;be using&nbsp; **version 1.8** &nbsp;or higher for this guide

[Arduino IDE Download](http://www.arduino.cc/en/Main/Software)
### Install CP2104 / CP2102N USB Driver

The USB-to-Serial converter that talks to the ESP32 chip itself will need a driver on your computer's operating system. The driver is available for Mac and Windows. It is already built into Linux.

[Click here to download the CP2104 USB Driver](http://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
### Install CH9102 / CH34X USB Driver

Newer ESP32 boards have a different USB-to-serial converter that talks to the chip itself, and will need a driver on your computer's operating system. The driver is available for Mac and Windows. It is already built into Linux.

If you would like more detail, check out [the guide on installing these drivers](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips).

[Click here to download the Windows driver](http://www.wch-ic.com/downloads/CH341SER_ZIP.html)
[Click here to download the Mac driver](http://www.wch-ic.com/downloads/CH34XSER_MAC_ZIP.html)
### Install ESP32 Board Support Package

After you have downloaded and installed **&nbsp;the latest version of Arduino IDE** , you will need to start the IDE&nbsp;and navigate to&nbsp;the&nbsp; **Preferences** &nbsp;menu. You can access it from the&nbsp; **File** &nbsp;menu in&nbsp;_Windows_&nbsp;or&nbsp;_Linux_, or the&nbsp; **Arduino** &nbsp;menu on&nbsp;_OS X_.

![](https://cdn-learn.adafruit.com/assets/assets/000/101/639/medium800/esp32_s2_arduino_ide_setup_flora_prefs.png?1618870383)

A dialog will pop up just like the one shown below.

![](https://cdn-learn.adafruit.com/assets/assets/000/101/640/medium800/esp32_s2_arduino_ide_setup_flora_Screen_Shot_2015-05-07_at_9.07.21_AM.png?1618870405)

We will be adding a URL to the new&nbsp; **Additional Boards Manager URLs** &nbsp;option. The list of URLs is comma separated, and&nbsp;_you will only have to add each&nbsp;URL once._&nbsp;New Adafruit boards and updates to existing boards&nbsp;will automatically be picked up&nbsp;by the Board Manager each time&nbsp;it is opened. The URLs point to index files that the Board Manager uses to build the list of available & installed boards.

To find the most up to date list of URLs you can&nbsp;add, you can visit the list of&nbsp;[third party board URLs on the Arduino IDE wiki](https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls#list-of-3rd-party-boards-support-urls). We will only need to add one URL to the IDE in this example, but&nbsp;_ **you can add multiple URLS by separating them with commas** _. Copy and paste the link below into the&nbsp; **Additional Boards Manager URLs** &nbsp;option in the Arduino IDE preferences.

`https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json`

![](https://cdn-learn.adafruit.com/assets/assets/000/101/641/medium800/esp32_s2_arduino_ide_setup_Screen_Shot_2021-04-19_at_3.14.19_PM.png?1618870509)

If you have multiple boards you want to support, say ESP8266 and Adafruit, have both URLs in the text box separated by a comma (,)

Once done click&nbsp; **OK** &nbsp;to save the new preference settings.

The next step is to actually install the Board Support Package (BSP). Go to the **Tools → Board → Board Manager** &nbsp;submenu. A dialog should come up with various BSPs. Search for **esp32**.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/162/medium800/esp32_s2_arduino_ide_setup_Screen_Shot_2021-12-09_at_9.58.40_AM.png?1639072797)

Click the **Install** button and wait for it to finish. Once it is finished, you can close the dialog.

In the **Tools → Board** submenu you should see **ESP32 Arduino** and in that dropdown it should contain the ESP32 boards along with all the latest ESP32 boards.

Look for the board called Adafruit ItsyBitsy ESP32.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/044/medium800/adafruit_products_board.jpg?1708984737)

The upload speed can be changed: faster speed makes uploads take less time but sometimes can cause upload issues. **921600** should work fine, but if you're having issues, you can drop down lower.

# ESP32 PlayStation Controller

## Controller Circuit

![](https://cdn-learn.adafruit.com/assets/assets/000/129/479/medium800/hacks_PSX_pcb_diagram.jpg?1713916405)

The PlayStation controller PCB uses conductive pads that short to ground when the buttons are pressed. Using a continuity tester, I diagrammed these traces and the copper test points we will use to wire the buttons to the microcontroller.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/480/medium800/hacks_psxfritz.jpg?1713918336)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/481/medium800/hacks_psxschem.jpg?1713918346)

You can see from the above diagrams that we'll wire up most of the PlayStation controller buttons to GPIO pins on the ItsyBitsy ESP32. The R2 trigger button will be wired to the Reset button, and the L2 is left unused. (You could chose to wire it and adjust the Arduino sketch if you like.)

# ESP32 PlayStation Controller

## Code the Controller

Copy the example below and paste it into the Arduino IDE.

You must&nbsp;change the&nbsp; **`ssid`** &nbsp;and&nbsp; **`password`** &nbsp;in the example code to your WiFi SSID and password before uploading this to your board. This is only necessary if you plan to use the over-the-air (OTA) update feature, otherwise you can leave these alone.

You can also change the `sleepSeconds` value if you want your controller to go into deep sleep sooner or later than the default 30 seconds.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/458/medium800/hacks_codetochange.jpg?1713911729)

Once you've made these changes, upload the code to your ItsyBitsy ESP32.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/PlayStation_BLE/PlayStation_ESP32_BLE_Gamepad.ino

## Gamepad

You'll use the BleGamepad library to create the gamepad object:

`BleGamepad bleGamepad("ItsyController", "Adafruit", 100); // name, manufacturer, batt level to start`

You can pick your own string for the name, so in this case "ItsyController" will show up on your computer or other device during pairing. The battery level feature is not used in this project.

## Deep Sleep

Deep sleep mode saves on battery consumption by turning off the ESP32's processor, WiFi and Bluetooth radios, while keeping the Ultra Low Power co-processor (ULP) active, checking for the wake-up call.&nbsp;

Wake up sources can include a timer, cap touch pin, and external sources, a.k.a. buttons. We'll use the PlayStation's start button as our wake up source.

The way the code works is to keep track of when buttons are pressed and if none has been touched for thirty seconds (or whatever `sleepTime` you pick), the server and WiFi radio are stopped, and then `esp_deep_sleep_start();` is called.

```auto
if (millis() - last_button_press > sleepTime) {
          server.stop();
          delay(300);
          esp_wifi_stop();
          delay(300);
          esp_deep_sleep_start();
        }
```

## Wake Up

While in deep sleep, the ULP can keep an eye on any of the real time clock (RTC) GPIO pins. On the ItsyBitsy ESP32 this is any of the following pins: `13, 12, 14, 33, 32, 27, 15, 36, 37, 38, 4, 26, 25`.

We'll use pin 4, which is the one the start button is connected to:

`esp_sleep_enable_ext0_wakeup(GPIO_NUM_4,0);`

The '`0`' indicates that wake up will happen when the indicated pin 4 goes low.

## Web Update

If you want to update the code after you've closed up your controller, you can use the over-the-air (OTA) web update.&nbsp;

Point your browser at the ItsyBitsy's server at [http://esp32.local](http://esp32.local) and login with:

- username = admin
- password = admin

Follow the info in [this guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/ota_web_update.html) on compiling and uploading your firmware.

# ESP32 PlayStation Controller

## Convert the Controller

These are the main steps you'll do for the conversion:

- open up the controller
- remove wired connector cable and the original IC
- solder wires from the button test points to the ItsyBitsy ESP32
- cut a little bit of plastic to fit the USB connector for charging
- optionally, drill a couple of holes to see the status LEDs

### Open the Controller

Unscrew the eight screws with a Philips #1 screwdriver and set them in a safe place.

Open the controller by lifting up the back shell.

Remove the main PCB and shoulder button boards, then set the case and rubber button pads aside.

![hacks_psx-8401.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/461/medium640/hacks_psx-8401.jpg?1713913248)

![hacks_psx-8402.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/462/medium640/hacks_psx-8402.jpg?1713913262)

![hacks_psx-8403.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/463/medium640/hacks_psx-8403.jpg?1713913282)

![hacks_psx_inn.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/464/medium640/hacks_psx_inn.jpg?1713913897)

### LED Holes

You can drill a small hole if you like in the back of the case so you can see the indicator NeoPixel LED.

A hole in the inner side of the right grip in the back of the case can be used to see the charger LED status.

You could optionally get fancy and fashion some light pipes from clear plastic. The best bet is usually to scavenge light pipes from old, broken hardware.

![hacks_psx-8478.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/501/medium640/hacks_psx-8478.jpg?1713921443)

![hacks_psx-8479.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/502/medium640/hacks_psx-8479.jpg?1713921453)

![hacks_psx-8481.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/503/medium640/hacks_psx-8481.jpg?1713921476)

![hacks_psx-8592.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/541/medium640/hacks_psx-8592.jpg?1713932884)

![hacks_psx-8593.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/542/medium640/hacks_psx-8593.jpg?1713932899)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/469/medium800/hacks_psx-2-2.jpg?1713915719)

### Desolder Cable

Flip the PCB over and desolder the six pins that connect the cable to the PCB. It's helpful to use some extra flux or fresh solder, heat up each joint and then use a solder sucker to, well, suck up the solder.

You can also desolder and remove the large electrolytic capacitor to free up some space.

We'll use these holes for routing wires, so it's good to get them nice and free of solder.

![hacks_psx-8405.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/465/medium640/hacks_psx-8405.jpg?1713915567)

![hacks_psx-8407.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/466/medium640/hacks_psx-8407.jpg?1713915614)

![hacks_psx-8406.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/467/medium640/hacks_psx-8406.jpg?1713915625)

![hacks_psx-8408.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/468/medium640/hacks_psx-8408.jpg?1713915633)

### IC Removal

This is also a good time to desolder and remove the original IC controller chip from the PCB.

You can see from these pictures that I had already wired the buttons pads when I realized the IC needed to be removed, otherwise I was seeing spurious button presses occur as the IC was being accidentally powered in unintended ways.

![hacks_psx-8445.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/483/medium640/hacks_psx-8445.jpg?1713918830)

![hacks_psx-8444.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/485/medium640/hacks_psx-8444.jpg?1713918850)

### Wiring

This is the most fiddly part. Wiring the buttons and ground from the PCB to the ItsyBitsy GPIO pins.

Cut a six inch length of the rainbow hookup wires, strip one end, solder to the appropriate solder point, and then route it through a PCB hole to the other side where you'll feed the wire through the matched ItsyBitsy GPIO pad.

I ran all of the wires through the pads as shown before cutting, stripping, and soldering them to the ItsyBitsy in order to get the routing and lengths right.

Consult the wiring diagram and PCB overlay shown below.

![hacks_psx-8438.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/490/medium640/hacks_psx-8438.jpg?1713920800)

![hacks_psx-8443.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/489/medium640/hacks_psx-8443.jpg?1713920784)

![hacks_psx-8447.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/491/medium640/hacks_psx-8447.jpg?1713920901)

![hacks_psx-8449.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/492/medium640/hacks_psx-8449.jpg?1713920925)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/487/medium800/hacks_PSX_pcb_diagram.jpg?1713920715)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/488/medium800/hacks_psxfritz.jpg?1713920752)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/493/medium800/hacks_psx-8449.jpg?1713920969)

### Shoulder Buttons

Here are some detailed photos of the shoulder button wiring. I used Kapton tape to dress these wires as shown.

Note the R2 trigger button wiring from the extension PCB to the ItsyBitsy reset pin.

![hacks_psx-8450.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/494/medium640/hacks_psx-8450.jpg?1713921001)

![hacks_psx-8451.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/495/medium640/hacks_psx-8451.jpg?1713921010)

![hacks_psx-8452.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/496/medium640/hacks_psx-8452.jpg?1713921018)

![hacks_psx-8472.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/497/medium640/hacks_psx-8472.jpg?1713921107)

![hacks_psx-8473.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/498/medium640/hacks_psx-8473.jpg?1713921114)

### LiPo Charger

Prep the charger by soldering 6" lengths of wire as shown. Once the controller is partly assembled in the shell we'll solder the other ends to the **BAT** , **G** , and **USB** pins on the ItsyBitsy.

![hacks_psx-8453.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/500/medium640/hacks_psx-8453.jpg?1713921398)

![hacks_psx-8455.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/529/medium640/hacks_psx-8455.jpg?1713932080)

![hacks_psx-8456.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/530/medium640/hacks_psx-8456.jpg?1713932091)

![hacks_psx-8457.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/531/medium640/hacks_psx-8457.jpg?1713932104)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/532/medium800/hacks_psx-8458.jpg?1713932126)

### USB Power Extension

You'll add a USB-C jack to the top of the controller to charge the battery.

Solder wires from USB jack breakout **G** to **ground** on the ItsyBitsy, and breakout **V** to **USB** pin on the ItsyBitsy.

Trim some plastic from the case to accommodate the breakout jack.

![hacks_psx-8583.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/504/medium640/hacks_psx-8583.jpg?1713931197)

![hacks_psx-8584.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/505/medium640/hacks_psx-8584.jpg?1713931391)

![hacks_psx-8585.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/506/medium640/hacks_psx-8585.jpg?1713931409)

![hacks_psx-8428.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/526/medium640/hacks_psx-8428.jpg?1713931688)

![hacks_psx-8430.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/527/medium640/hacks_psx-8430.jpg?1713931698)

![hacks_psx-8586.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/533/medium640/hacks_psx-8586.jpg?1713932179)

### Attach USB Breakout

Use a bit of CA glue to affix the USB breakout to the controller PCB.

You can add some tape to insulate the exposed contacts from accidental shorts.

![hacks_psx-8587.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/534/medium640/hacks_psx-8587.jpg?1713932266)

![hacks_psx-8589.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/535/medium640/hacks_psx-8589.jpg?1713932277)

Warning: The USB port is for charging only, not data. You'll be able to use over-the-air (OTA) firmware updates over WiFi should you ever want to adjust the code once the controller is closed back up.

### Close the Controller

Carefully close the shell and screw it back together with the eight Philips screws.

Your controller is ready for play! See the next page in the guide for details on pairing and use.

![hacks_psx-8568.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/536/medium640/hacks_psx-8568.jpg?1713932399)

![hacks_psx-8574.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/537/medium640/hacks_psx-8574.jpg?1713932409)

![hacks_psx-8575.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/538/medium640/hacks_psx-8575.jpg?1713932417)

![hacks_psx-8576.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/539/medium640/hacks_psx-8576.jpg?1713932426)

### Charge It

Plug in a USB C cable to charge.

![hacks_psx-8595.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/540/medium640/hacks_psx-8595.jpg?1713932631)

# ESP32 PlayStation Controller

## Use the Controller

Tap the Start button on the controller to wake it up -- there is no on/off switch, but that's OK, the battery should last about six months between charges thanks to deep sleep mode.

Pair it with your computer or mobile device in the Bluetooth settings.

Use a gamepad tester, such as&nbsp;[https://hardwaretester.com/gamepad](https://hardwaretester.com/gamepad) to check the buttons are all working as expected.

In your game or emulator, map the controls however you like.

Have fun!

![](https://cdn-learn.adafruit.com/assets/assets/000/129/547/medium800/hacks_ble.jpg?1713934569)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/548/medium800/hacks_tester.jpg?1713934746)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/549/medium800/hacks_mage.jpg?1713935019)

https://youtu.be/1pIzLQEEc3I

# ESP32 PlayStation Controller

## Power Profiling

![](https://cdn-learn.adafruit.com/assets/assets/000/129/543/medium800/hacks_psx-8566.jpg?1713932955)

In order to estimate battery life for both active use and deep sleep, the Nordic PPK came in very handy! It provides power to the ItsyBitsy ESP32 and can very accurately measure the current used.

Featured
### Nordic nRF-PPK2 - Power Profiler Kit II

[Nordic nRF-PPK2 - Power Profiler Kit II](https://www.adafruit.com/product/5048)
The **Power Profiler Kit II** &nbsp;is a standalone unit, which can measure and optionally supply currents all the way from sub-uA and as high as 1A on all Nordic DKs, in addition to external hardware. [As we've featured on...](https://www.youtube.com/watch?v=60q8QCiYhjc)

In Stock
[Buy Now](https://www.adafruit.com/product/5048)
[Related Guides to the Product](https://learn.adafruit.com/products/5048/guides)
![Angled shot of Nordic nrF Power Profiler board.](https://cdn-shop.adafruit.com/640x480/5048-00.jpg)

To profile your project, follow [this guide page](https://learn.adafruit.com/wifi-mailbox-notifier/power-analysis).

### Active Current Draw

In active use with the BLE connection and buttons being pressed, the controller draws ~123mA, you can see this in the selected average in the Nordic PPK graph below.

This translates to about three hours of play from the 350mAh LiPo battery.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/544/medium800/hacks_ppk-20240422T043557.png?1713933191)

### Deep Sleep Draw

After 30 seconds of inactivity, the controller is programmed to go into deep sleep. Here it draws an impressively low current, about 0.077mA. This translates to an impressive six months of deep sleep time!

![](https://cdn-learn.adafruit.com/assets/assets/000/129/545/medium800/hacks_ppk-20240422T043607.png?1713933485)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/546/medium800/hacks_dkbat.jpg?1713933555)

## Initial Not-So-Deep Sleep

When I first profiled the power I was seeing pretty high power consumption during what should have been deep sleep -- around 1.8mA.

After many attempts at cutting out code sections and scouring the [documentation](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_wifi.html), I discovered I needed to not only send the `esp_deep_sleep_start()` command, but also explicitly turn off the WiFi radio with `esp_wifi_stop()`&nbsp;

With this magical combo in place the ItsyBitsy fell into a wonderful slumber, sipping a mere 0.077mA as it slept 😴.

![hacks_ppk-20240416T223655.png](https://cdn-learn.adafruit.com/assets/assets/000/129/550/medium640/hacks_ppk-20240416T223655.png?1713979905)


## Guide Products

### Adafruit ItsyBitsy ESP32 - PCB Antenna - 8 MB Flash / 2 MB PSRAM

[Adafruit ItsyBitsy ESP32 - PCB Antenna - 8 MB Flash / 2 MB PSRAM](https://www.adafruit.com/product/5889)
What's smaller than a Feather but larger than a Trinket? It's an&nbsp; **Adafruit ItsyBitsy ESP32** , a powerful processor PCB with a plethora of pins! It features the&nbsp;ESP32 Pico module, an FCC-certified module that contains&nbsp;an&nbsp; **ESP32 chip with...**

In Stock
[Buy Now](https://www.adafruit.com/product/5889)
[Related Guides to the Product](https://learn.adafruit.com/products/5889/guides)
### Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy

[Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy](https://www.adafruit.com/product/2124)
If you have an ItsyBitsy or Pro Trinket you probably know it's the perfect little size for a portable project. This LiPoly backpack makes it really easy to do! Instead of wiring 2 or 3 boards together to make a charging system, this little PCB sits on top of the PCB and allows a...

In Stock
[Buy Now](https://www.adafruit.com/product/2124)
[Related Guides to the Product](https://learn.adafruit.com/products/2124/guides)
### Lithium Ion Polymer Battery - 3.7V 350mAh

[Lithium Ion Polymer Battery - 3.7V 350mAh](https://www.adafruit.com/product/2750)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 350mAh for a total of about 1.3 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2750)
[Related Guides to the Product](https://learn.adafruit.com/products/2750/guides)
### Simple USB C Socket Breakout

[Simple USB C Socket Breakout](https://www.adafruit.com/product/5180)
This Simple USB Type C breakout is kinda interesting,&nbsp;[it looks similar to this USB Type C SMT Inline Breakout Board](https://www.adafruit.com/product/4396), but it's an 'inline' style with pads for soldering to the common USB 1.1/2.0 connections. We see this lil...

In Stock
[Buy Now](https://www.adafruit.com/product/5180)
[Related Guides to the Product](https://learn.adafruit.com/products/5180/guides)
### Rainbow "Wire Wrap" Thin 30 AWG Prototyping & Repair Wire

[Rainbow "Wire Wrap" Thin 30 AWG Prototyping & Repair Wire](https://www.adafruit.com/product/4730)
This stuff is called "wire-wrap wire" because it used to be used for wire-wrapping high-speed digital circuits on a special kind of contact board. It's pretty rare to see wire-wrapping in these days of low-cost PCB fabrication, but the wire is still really handy for prototyping...

In Stock
[Buy Now](https://www.adafruit.com/product/4730)
[Related Guides to the Product](https://learn.adafruit.com/products/4730/guides)
### Nordic nRF-PPK2 - Power Profiler Kit II

[Nordic nRF-PPK2 - Power Profiler Kit II](https://www.adafruit.com/product/5048)
The **Power Profiler Kit II** &nbsp;is a standalone unit, which can measure and optionally supply currents all the way from sub-uA and as high as 1A on all Nordic DKs, in addition to external hardware. [As we've featured on...](https://www.youtube.com/watch?v=60q8QCiYhjc)

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

## Related Guides

- [Adafruit ItsyBitsy ESP32](https://learn.adafruit.com/adafruit-itsybitsy-esp32.md)
- [Camera LED Ring Light](https://learn.adafruit.com/camera-ring-led-light.md)
- [Which CircuitPython Board is Right for You?](https://learn.adafruit.com/choose-your-circuitpython-board.md)
- [HalloWing Light Paintstick](https://learn.adafruit.com/hallowing-light-paintstick.md)
- [MakeCode Arcade: Sparky Invaders](https://learn.adafruit.com/makecode-arcade-sparky-invaders.md)
- [NeoPixel LED Heart Necklace](https://learn.adafruit.com/neopixel-led-heart-necklace.md)
- [Color Mixing QT Py Cuff Bracelet](https://learn.adafruit.com/color-mixing-qt-py-cuff.md)
- [Fiber Optic Whip](https://learn.adafruit.com/fiber-optic-whip.md)
- [Feather TFT STEMMA Case](https://learn.adafruit.com/feather-tft-stemma-case.md)
- [Introducing ItsyBitsy M0 Express](https://learn.adafruit.com/introducing-itsy-bitsy-m0.md)
- [Adafruit ItsyBitsy RP2040](https://learn.adafruit.com/adafruit-itsybitsy-rp2040.md)
- [CLUE Altimeter](https://learn.adafruit.com/clue-altimeter.md)
- [LO-LA59 Droid](https://learn.adafruit.com/lola-droid.md)
- [Fisher-Price USB Foot Pedal](https://learn.adafruit.com/fisher-price-usb-foot-pedal.md)
- [Super Nintendo USB Controller](https://learn.adafruit.com/super-nintendo-usb-controller.md)
- [Glowing Viking Rune wayFinder](https://learn.adafruit.com/glowing-viking-rune-artifact.md)
