Formal Wear for the Raspberry Pi

Compact HAT Assembled.jpg

I've made my own HAT for my Model B+ Raspberry Pi. It's dimensions meet the official specifications and includes the slot for the camera cable and the notch for the LCD cable.

My HAT provides me with

  • HAT ID Autoconfigure EEPROM
  • I2C connector
  • Serial Port Connector
  • 2 x PMod SPI Connectors
  • DS1721 I2C Thermometer
  • MCP23017 I2C 16 bit I/O Expander

and soon also support the 1-Wire Interface

The board was designed also alternately host a PSoC. Unlike the lucky few I didn't receive a RPiSoC so I effectively made my own but with "Extras".


Old habits die hard so as per usual I've laid the board manually without the assistance of any schematic capturing.

And then milled and drilled a PCB.

Milled Compact HAT.jpg


Weeded and cleaned it up.

You may notice a bit of over engraving on a couple of tracks. This is a due to PCB substrate warpage but since it is just a prototype it can be easily repaired.


Blank Compact HAT.jpg



Being a prototype, being manually laid out and never being assembled before one does not just solder on all of the components and prey that it works.

That's a sure fire recipe for unmitigated disaster.


The first section assembled and tested was the HAT's ID EEPROM section.

Assembled HAT 1.jpg


Once this was up and working correctly.The next part was the MCP23017 I/O Expander

Assembled HAT 2.jpg


And then the DS1721 Thermometer was added (pictured in the first photo of this article).

All of the devices were accessible from the Raspberry Pi.

HAT Check.jpg



And finally exported GPIO, RS232 and SPI ports were tested and confirmed working.

Although not pictured LEDs and a DSO was connected up to verify correct operation.

Test programs were written in C on the Raspberry Pi. It included test programs to blink LEDs on the GPIO and MCP23017 IO ports.

Then a PSoC4 was connected up to the via the I2C, RS232 and SPI ports and was verified to work correctly.

The 1-Wire Interface will be connected up as soon as the part arrives.