Close

From Idea to First Prototype

A project log for PicoPew

A PewPew shield for the TinyPICO

christian-waltherChristian Walther 09/04/2019 at 20:100 Comments

Impressed by the engineering that went into them, the first-class MicroPython support, and the sheer tininess, I had ordered some TinyPICO ESP32 development boards from Unexpected Maker’s CrowdSupply campaign. But what to actually do with them, other than sinking them into the drawer of cool but eternally unused microcontroller boards? In the weeks before EuroPython 2019, with my head full of PewPew as I was going to help @de∫hipu run PewPew workshops there, the answer was obvious: Make a PewPew shield for them! I had never designed a PCB more complex than a bristlebot kit, so this might be a nice exercise, not totally uncharted terrain but not without challenges either.

The easiest way of doing this would be to copy the circuit of the PewPew Lite FeatherWing. The problem with that is that the Holtek HT16K33 LED matrix driver used there only exists in a relatively large SOP-28 package. It fits between the pins of the Feather, but not between those of the TinyPICO (and not those of the LED matrix either), making it impossible to build an appropriately tiny device with it.

Looking for alternatives, I turned to @de∫hipu’s excellent article and was intrigued by the ISSI IS31FL3733 that he had also used in his PewPew Pro. It comes in an eTQFP-48 package that is reasonably small but hopefully still within my soldering skills. Beyond the capabilities required for a PewPew, it would offer 256 shades of brightness for each individual LED, multiplied by 256 levels of global brightness. It however lacks the key scanning feature of the Holtek chip, but I wondered whether its capability of detecting shorted LEDs could be misused for that. So I ordered some of these chips from Mouser.

For the LED matrix, I was thinking of using the same 20 mm red/green one as in the PewPew Lite, which I much prefer to the monochrome displays of PewPew Standalone devices, because the colors are easier to distinguish. 4 shades of the same color have advantages too, such as allowing antialiasing, but with the ISSI driver I would get the best of both worlds. I briefly went looking for even smaller bi-color matrices, or RGB ones of the same size, but could not find any. When the KYX-788AHG ordered from AliExpress arrived, the first thing I noticed was that, just like on the ones I had gotten from Radomir on PewPews, their pin spacing was not actually 2.5 mm as specified, but around 2.4 mm instead, making them hard to squeeze into 2.5 mm (or even 2.54 mm) holes. The larger spacing of 7.5 mm was accurate though.

To test my understanding of how to use the ISSI LED driver, I mounted one of them on an adapter board and wired it up to a matrix and to an ESP8266 Feather HUZZAH board running MicroPython. Figuring out how to control the LEDs that way was not hard with the help of the data sheet and the MicroPython REPL, but I ran into two problems:

  1. One of the LEDs would always stay off, the green one in the upper right corner. The LED itself was fine, it could not be the wiring because that would affect whole rows or columns, and an off-by-one error in my code could be ruled out because the way I assigned rows and columns, the respective bits were located in the middle of the buffers, not at the edge. I finally concluded that I had probably fried some memory cell with my clumsy soldering, but I was unable to figure out whether it was in the LED On/Off bitmap or in the PWM buffer, because the registers are write-only.
  2. Whenever I turned on too many LEDs at once at a certain brightness, the chip would just reset, turning the display black and requiring me to redo the whole initialization sequence. The numbers were somewhat random and varied with whether I supplied power from the 3.3 V or 5 V output of the microcontroller board or from a bench power supply, and there was also no clear pattern to how much current I could draw before the reset – but in all cases I was never able to turn on all LEDs at full brightness. It turned out that the cause was my neglecting to add the decoupling capacitors shown in the reference circuit at every power pin – once I added one 1 µF ceramic SMD capacitor (the closest thing I had lying around) across the supply, the symptom disappeared and I could run all LEDs at full brightness at once. With the 22 kΩ current control resistor I chose, the full brightness was quite bright and consumed a total of about 350 mA.

This is the first in a series of catch-up posts on the past history of the project, more to come!

Discussions