Testing the new PiHat v2

The lead up and weekend just vanished in a host of trials and tribulations, but in the process, the PiHat v2 successfully went through a number of bring up tests and the overall results from the board iteration were better than expected.

Initial quick checks to ensure that electrically the new PCB was OK and this following SMT and TH population, the board was inspected to ensure the correct voltages were provided, and they were.

The next stage was to update my v1 test code and talk to the Matrix FMS6501 via I2C, which worked very well. No matrix switching issues noted from all ten inputs (6 RCA, 3 Pi and OSD), and six outputs (4 RCA, DTMF and OSD), including combinations of inputs to multiple outputs.  Software switching performance was OK, impedance checking was OK and so was a good result.

DTMF Decode was next on the check list and taking its input from the I/O connector, AVIn6, or via the matrix OUT8, performance on low and high level audio DTMF tones, or noisy received signal, decoded as expected.

The ability to optionally switch any input to the DTMF decoder increases its flexibility, especially for repeater use.  The PCB has a solder pad which enables this feature.

PiHat v2 has introduced on-board on screen display, OSD and Video Sync detectors.  The three MAX7461 detectors all operated and triggered the GPIO as planned upon a video signal on AV1 to AV3.  This feature allows any video signal to be placed on an input and the matrix can then automatically switch, or scan, as needed, all under software control.

The manual matrix selection of inputs/outputs is still provided under software control using through the I/O connector.

A challenged for PiHat v2 was to include OSD and make this as flexible as possible using the video matrix switch which easily allows selection of what input goes to it and also what output it can be switched too.  The testing of this required a couple of stages and lots of English tea!

With so much existing support for the MAX7456 within Arduino libraries and little from the Raspberry side, my first step was to get this running on an Arduino using a spare one in my workshop lab.

This MAX7456 chip is new territory and bring up was a learning curve, so getting a bare OSD chip talking via SPI broke the back of this using an Uno and a hacked OSD board.  Once the software was working, I then progressed to building a test bed to allow the PiHat to connect to an Arduino, rather than a Pi.  This route to testing also meant that any GPIO casualties would be targeted at a cheap Arduino!.

As controlling the Matrix and OSD via the Arduino came together well, this then progressed to building a Pi test bed for mixed Arduino (OSD) and Pi (Matrix). Other than a minor track error for chip select (which has fed to a board tweak), the OSD worked perfectly and allowed finalising of the SAG capacitors in the OSD output.  Changes to OSD could benefit using the MAX7456 reset on a GPIO when using the PiHat in remote locations, so this will be added to the tweak too.

As you can see, a number of stages took place, principally as the OSD chip works at 5v and the Pi GPIO at 3v3, I needed to prove that interfacing the two would work well on the Arduino at 3v3 and then the Pi – and it did!.   In fact, the Arduino worked so well, that I now have a design in mind for a compact PiHat piggy back board, so users, and repeaters, have the option of alternatively easily using an Arduino to control all PiHat functions – let me know what you think.

The final round of testing was to write some software to let the Raspberry Pi take full control of the PiHat, configuring under software, the matrix switch, DTMF decoder, video detectors and OSD display.

One of the initial Raspberry Pi OSD testing was to modify and run some old software found from Paul Theunissen – PA5PT website (thanks!).  I then expanded on this theme and now I have a fully working PiHat v2 on the Raspberry Pi 3, the open source software can develop with ease, knowing the hardware is all good.

The synopses of pulling the resources together from the weekend proved very positive and pleased with the PiHat v2 board design as it lends itself to so many applications, not only for ATV repeater use but home/portable stations, radio control FPV and security CCTV.

Finally, thanks to my 5 Year old Daughter Kiana, who is learning to solder surface mount and kept the iron warm for when I needed it..


Please feel free to share our product love through the below

HAMKit | Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *