The ported code from the version 1 project, along with all the modifications to the development platform, removal of no longer needed functionality, new pin configuration, new chips and revised functionality is now compiling and linking, so it can be uploaded to the board to make it work and allow more exercising of the hardware.  Much of the new components is still not there though, no GPS module integration as that needs a UART driver to be written, no front panel control, no power module control, just the core. 

What this does provide though is network connectivity over WiFi, which enables Over the Air (OTA) firmware updates, a command line interface over the USB UART on the ESP32, this in  turn allows for proper diagnostic messages. Both of these make development a lot easier to do. 

Development proceeds well and with many of the bugs being due to changes to the new hardware, but lots of the previous functionality comes across and seems to work fairly well.  Testing though, needs some input stimulus to emulate the chicken coop, so we need a test harness. This is simply a folded piece of aluminium with some buttons, switches, LED's and a motor connected to it, it connects to the standard headers on the main unit.

 

Once that phase of development is working, work could proceed on writing other missing components. The following picture shows the device driver for the dual UART being developed, with some support from the Saelae logic analyser and a USB to UART adapter. There are two ports on each device, one goes to the GPS receiver, the second is a UART connector. A second chip provides a serial interface on each of the expansion sockets.

 

The picture also shows a prototype of the diagnostic display, which has an 0.96 inch OLED display and rotary encoder on it, this allows for much of the local diagnostic interface to operate as it did in the previous v1 design. The difficulty though is that these displays are small and get dimmer over time as the OLED fails and I was down to my last one in the bits box. 1.8 inch TFT displays were dirt cheap, larger, had more colours and could be dimmed, so I added a new upgrade task to the project tracker to modify the board and replace the display with a TFT. 

You may also note a couple of additional bodge wires on the PCB (near the middle) and at the top near the external module connectors, the latter being part of two overlapping faults, one of which resulted in the magic smoke being released by the line driver IC's on the remote modules as they had their connector layouts reversed during layout and I failed to notice that during assembly, so power was reversed and that's never a good thing. The second fault was a reversal of the driver pins on the differential line driver and that resulted in the remote I2C links not operating. Again, these were fixed with the tried and tested way and were entered on the project defect tracker and fixed in the updated PCB layouts.