Sharpie, part 2: hardware design

February 20, 2025

Welcome back. Last time, we looked at generating video signals for the LS021 display, and I promised---nay, guaranteed---that part 1 would not be the only entry in this series. In this post, I make good on that promise and describe the hardware I'm designing for the Sharpie project.

Basic requirements

Sharpie targets the RP2350 microcontroller. As a result, a basic Sharpie board needs power supplies, the RP2350, a connector for the display, and some way to connect the RP2350 to something else to program it. There are a lot of ways to do this, and my design attempts to balance complexity, power consumption, and capability. I am not going for near-zero power (though I predict that it will be pretty low), nor am I looking to make every unused I/O pin available, and the compromise I've decided on allows this design to fit on a medium-size two-layer board with fairly few parts.

My board design features the following:

The rest of this post will walk through the schematic and PCB design I created around these requirements.

Aside
I am training to be an electrical engineer, but I am not one yet. Most of the work I've done here is based on reference designs and cloudy intuition. I also haven't had this board manufactured, so just like last time, this entire article could wrong. We'll find out for sure when I order the board.

Schematics

Let's start with the schematics, so I can explain what the board is actually doing.

Power

Raw power is provided by the USB-C connector or by the battery. There's no fancy switching here, so only one power source should be connected at one time (kind of like the Pinecil). The USB-C connector has two 5.1kΩ resistors to work in any USB-C port and request 5V at 3A.

Both connectors feed the VCC global power supply. This supply then feeds the three regulators. The 3.3V and 3.2V are both TI TPS7A25xx, a 300 mA linear regulator with 2 μA quiescent current. The 3.3V supply powers the flash (up to 25 mA during chip erase), the RP2350 DVDD (50-100 mA), and RP2350 USB and OTP (maybe 10 mA), for worst-case 135 mA. The 3.2V supply powers the display (microamps) and RP2350 IOVDD (up to 100 mA), for worst-case 100 mA.

The 5V supply is actually a charge pump, and I basically copied the design from Adafruit's 2.7" Sharp display, which also needs 5V. Charge pump efficiency at microamp current load is generally very low, but this part (a Diodes AP3602A) has surprisingly good efficiency at low load compared to other parts. Also, I trust Adafruit's engineering skills more than my own.

Both regulators have the same filter capacitors and are both configured to be always enabled. The PG (power good) is also unused. TI helpfully recommends how to configure unused pins and the Sharpie schematic duplicates those recommendations.

3.2V is generated using the adjustable version of the TPS7A25, again following the voltage divider spec from the datasheet. In particular, the datasheet formulas (page 18) advise a total R1+R2 of 3.3MΩ and R1/R2 of 1.66. The configuration I found gives R1+R2 of 2.64MΩ and R1/R2 of 1.588, which gives an output voltage of 3.209 V---perfectly fine. The R1 and R2 values I chose are also common values, so it's easy to get parts.

The regulator symbols are custom, crafted by moi. The actual chips are a TI custom footprint with a fat GND pad in the center for cooling.

The charge pump circuit, shown below, is effectively identical to Adafruit's design.

Note
Adafruit doesn't actually provide power consumption statistics for that board, which is a bit surprising. Maybe this 5V design is lacking.

Note that the /SHDN pin is pulled low. Not only does the datasheet specify that this pin should not float, we need it to be software controlled because the LS021 expects at least 1 ms delay between the rise of the 3.3V supply and the rise of the 5V supply. Interestingly, the recently released Pebble source code appears to take the same approach, albeit with more complexity because of the Pebble's FPGA and display, which needs 3 voltages instead of the LS021's 2.

RP2350

With the power section completed, the next step is the microcontroller. The RP2350 is also the most complex section of this circuit.

Almost all of Sharpie's RP2350 design, in both schematic and PCB, is heavily based on the "Hardware design with RP2350" document, which tells you how to design and route a board for the RP2350, including recommended parts. The only variation I made on the reference design is the 3.2V separate IOVDD, which only affects the crystal oscillator and the power supply routing on the PCB.

All the power inputs have decoupling capacitors, and the supporting circuitry for the internal regulator is exactly as the hardware design document describes, including the special polarization-marked inductor L1. SW1 is the reset button, because pulling RUN low puts the chip into reset.

As described in the power budget earlier, IOVDD is powered by 3.2V and everything else is supplied by 3.3V, including the QSPI block, the USB/OTP block, and the ADC.

Crystal and flash

The crystal is a 12 MHz crystal, the same model that the hardware design document recommends, with the necessary capacitors and overdrive prevention resistor R15. However: the document's design assumes that IOVDD is 3.3V (RP2350 XIN and XOUT are powered by VDDIO), but Sharpie has IOVDD at 3.2V. The risk of using a lower IOVDD is that the crystal's generated amplitude, which would require using a lower value for R15. I haven't changed the recommended design, because 3.2V is a 3% difference from 3.3V and I think that I'm more likely to cause issues by redesigning the crystal circuit than by using the default circuit at IOVDD = 3.2V.

The flash is a super-common W25Q128, a 16 MB 4-bit SPI flash chip. The circuit here is also as the hardware design document describes, with a pull-up resistor on /CS (apparently needed for some chips and always a helpful thing to include) and a decoupling capacitor. The RP2350 side of /QSPI_CS is also the chip's bootloader pin, connected to SW2 which serves as the bootloader button.

Extra features

The design has three extra features: a User LED and button, a VCC voltage monitor connected to ADC3, and a SWD debug connector compatible with the Pi Debug Probe. None of these are truly necessary (except maybe the debug connector) but they will improve the development experience significantly. The battery monitor has a solder jumper so that you can disconnect it, which might be useful for power optimization.

Display

This is the display connector. The only electronic advice Sharp provides is in the image below the schematic, where they advise using 1uF caps on both power supplies. I'm using the same 1uF capacitors I used on the regulators before, which means that there will be fat 0805 components next to the connector, but that's okay.

The display's 14 signal pins are also broken out on the board to actually make this development board useful for development. We can probe these with an oscilloscope to view the signals that are being sent to the display.

Extra pins

Finally, all four ADC/digital pins from the RP2350 are broken out, next to the 3.2V and 5V supplies and two GNDs. Originally, I intended to break out all remaining pins, but there simply wasn't room to place the footprints and route lines to all 20-some pins. Note that EX_B7 is also the battery monitor pin. 3.2V is exposed because it's IOVDD, and 5V is exposed for no particular reason. 3.3V is not exposed, so checking that the 3.3V supply is working would require probing footprints on the board.

PCB

The schematic is the easy part. For brevity, I won't walk through the entire PCB design, but I will showcase pieces. The complete design is shown below, a two-layer board with parameters adjusted for JLCPCB's manufacturing requirements. Click on the PCB images to view them full size.

In general, the design moves from right to left. On the right are the USB port and the JST battery jack, which power the regulators, which power the RP2350 and the flash, which creates signals for the display, whose connector is on the left side of the board. The four mounting holes are in place to allow for a little plastic spacer to hold the display and provide a safe surface to put the PCB on. The metal side of the display connector faces upward, in the same direction as the display surface, so the spacer will allow the display to sit on top of the PCB and the flex cable will wrap around so that the metal side is touching the contacts of the FPC connector.

Speaking of the FPC connector, the display expects a Molex 503566-2102, or the compatible Kyocera AVX 046844721002846+. I am planning to attach the connector by hand, because JLC has neither in stock, which is why the footprint on the left side of the board has such long pads. Ideally, I can put down some flux, anchor the connector mounting pads, then flow in a little solder on the exposed part of each pad and create a good connection between the connector and the pads. This will be difficult even with good tools and setup but hopefully it's not impossible.

In general, I have tried to follow what seem to be common PCB design recommendations: establish a ground plane on one side of the board, put decoupling capacitors close to their respective chips, keep high-speed traces short, and make good use of filled zones. This is still the first PCB I've ever designed that actually has components on its surface, so I'm trying to be extra careful with the design.

RP2350 section

Once again, I have copied the hardware design document and the provided KiCAD sample as much as possible. This is not a simple chip to design a PCB for, unfortunately.

In particular, Pi Foundation recommends using two rings of power inside the RP2350 footprint: the outer one carries 3.3V, and the inner carries 1.1V from the internal regulator. I modified this slightly to break the outer loop into two parts, one carrying 3.2V and one carrying 3.3V. In the picture above, the horizontal filled zone at the top is the 3.3V carrier and the rest of the outer loop is 3.2V, for the six or seven IOVDD pins around the perimeter of the chip.

This is not a perfect solution. To begin with, there's only one connection point between the inner 3.3V zone and the outer 3.3V zone. There's also an IOVDD pin that must be connected via a trace that runs under the chip to the 3.2V zone, because the 3.3V zone is in the way. Neither of these should be an issue, but they're inelegant and mildly aggravating.

If you look at the full PCB image, you can see two fat traces running from the USB port to the RP2350. I found a StackExchange answer that recommends routing USB full-speed signals as a differential pair of 0.5mm traces at a distance of 0.2mm apart. I had to make the USB pair run under the board for most of its run, and I'm hoping this doesn't affect the signal quality. USB 2.0 is apparently not too sensitive to routing choices.

Power section

The underside of the PCB is a complete GND fill with only a few traces here and there. Anything that needs to access ground (decoupling capacitors, power supplies, connectors, whatever) can simply use a via to pass through the board.

A handful of filled zones support the power supply section. VCC from the battery and USB connect to a large zone that powers the input to every regulator. 3.2V from the TPS7A2501 runs into another zone that ultimately feeds the 3.2V zone inside the RP2350 footprint and the display connector. 3.3V from the TPS7A2533 similarly runs into another zone that powers the top outer zone inside the RP2350 and the external flash chip. 5V is used in just two places, so it doesn't have a filled zone.

Display connector

As previously mentioned, the display connector is fickle and will have to be attached by hand. The absurdly long pads you see above are to enable that (the actual contacts on the connector only stick out a little bit from the body). The connector side with fewer contacts has shorter pads as an experiment, but both sides should have plenty of clearance to make soldering at least possible, if still pretty difficult.

Both display power supplies have decoupling capacitors, because it's probably a good idea. The display doesn't appear to need any other components, so this is all the board has.

Future steps

From here, I have to actually invest in the board manufacturing and assembly, which I expect to be about $30 including parts. I'll give the board one or two more DRC runs and full reviews, including of the BOM, before I call it ready to manufacture.

The passives I selected are mostly 0402 size, with the idea that it's small enough to fit on a nicely sized board but not so small that it's impossible to access or modify if needed.

The next post will happen when I have real electronics in my hand. Stay tuned!