RotaryCell / build guide
Add the LilyGO connections
Add and label each group separately. The overview and close photographs below show the connector orientation and routing used in the working build.

Four harnesses attach to the LilyGO. From left to right in the photograph:
| Harness | Connections |
|---|---|
| Charging input | 10 cm pair from regulated 5 V and system GND |
| 21700 battery | 10 cm pair from cell positive and cell negative to BATN |
| AG1171 carrier power | 10 cm pair from LilyGO VBAT and system GND |
| AG1171 carrier signals | Four 10 cm conductors for GPIO15 FR, GPIO16 RM, GPIO37 SHK and GPIO21 PD |
Throughout this build, black is negative and yellow identifies unswitched battery positive. The blue wire in the four-conductor signal harness is an orientation marker; compare its position with the completed-board photographs before inserting the contacts into the housing.
The current-carrying red, yellow and black conductors shown here are 24 AWG. The signal-only conductors are 28 AWG. These are the gauges used in the working build; the signal currents themselves are small.
Battery and protected-system power
Connect the prepared 21700 leads to the LilyGO battery-positive and BATN
points formerly used by the holder. The AG1171 carrier receives positive power
from the LilyGO VBAT pad and returns through LilyGO system GND. Its ground
does not connect directly to BATN.

The yellow and black battery leads leave opposite ends of the former holder area. Keeping both at 10 cm provides enough lead to reach the 21700 without leaving a large loop inside the phone.
Audio and tone
The Audio/Reset A4 harness uses the GPIO36 audio signal, GND, SPEK+ and
MIC+.
- Leave
SPEK-insulated and floating. - Connect
MIC-to system ground through the external nonpolar 1 µF capacitor used in the tested build.
SPEK+ and MIC+ from left to right. Identify each conductor by its termination rather than its color.The signal-only conductors in this harness are 28 AWG. Cut and prepare them as follows:
| Connection | Color | Length | Preparation |
|---|---|---|---|
| Common ground | Black | 14 cm | Leave loose for its LilyGO connection |
| GPIO36 tone | Blue | 18 cm | Leave loose for its LilyGO connection |
SPEK+ |
Red | 10 cm | Installed in the two-position SPEK connector |
MIC+ |
Red | 10 cm | Installed in the two-position MIC connector |
SPEK- |
Black | — | Remove this conductor from the SPEK cable |
MIC- |
Black | Start with 10 cm | Leave long initially; cut to fit when soldering the capacitor and ground connection |
Both audio connector branches begin as 10 cm cables. Removing the black
SPEK- conductor leaves the speaker connector intentionally one-sided. The
black MIC- conductor remains in its connector until the harness is installed,
then is trimmed to the required route.

The close view shows the two audio connectors at the end of the controller and the reference capacitor fitted before the wiring is dressed into the carrier.
AG1171 control
The carrier logic harness uses GPIO15 for FR, GPIO16 for RM, GPIO37 for
SHK, and GPIO21 for PD. Record the connector orientation before inserting
the contacts into their housing.
The connector remains outside the controller outline while its individual conductors follow the edge of the board. The 10 cm signal wires are long enough to reach the carrier without adding unnecessary slack. Confirm all four positions with a meter rather than inferring their order from wire colors.
Hardware reset
Connect the A4 reset header by signal name:
| Audio/Reset A4 | LilyGO connection |
|---|---|
U2 pin 1, SW_BAT |
Center terminal of the LilyGO power switch |
U2 pin 2, RAW_BAT |
Battery-side switch pad shown in the installed close-up |
U2 pin 3, RESET |
GPIO35 |
The first two connections bridge the physical power-switch path so the A4 board can remove and restore battery power. Before soldering, use continuity mode to confirm the center terminal and the battery-side pad on your board revision; do not identify either connection by wire color alone.

For the reset harness shown above:
| Signal | Length | Gauge |
|---|---|---|
SW_BAT |
16 cm | 24 AWG |
RAW_BAT |
16 cm | 24 AWG |
GPIO35 RESET |
18 cm | 28 AWG |
The extra 2 cm on the green trigger wire allows it to follow the required route without pulling against the two power-switch conductors.

The two battery-path conductors start at the switch points. The longer GPIO35 trigger lead starts farther down the controller and joins them after following the board edge, which accounts for its additional 2 cm.
Charging
Bring regulated 5 V from the selected rear connector to the LilyGO charging input and system ground. Keep this charging input separate from the AG1171 carrier's battery supply.
Arrange and strain-relieve the new wiring so both USB ports and both QWIIC connectors remain accessible.
Dress the wiring into the carrier
Seat the LilyGO fully in the printed carrier. Route the audio, reset and control conductors through its open channel so they leave together near their destination boards. The shorter power and connector leads only need to clear the carrier edge. Nothing should cross a USB port, press on the power switch or pull against a solder joint when the carrier is set down.
SPEK+ and MIC+, rather than by color.