Software running on micro controller units (MCU) is considered firmware. The document guides you from obtaining the hardware to make the comm and driver panel work.

  1. Firmware
    1. Prerequisites
    2. Turn Arduino into In-circuit Serial Programmer (ISP)
    3. Troubleshooting
  2. Programming a comm panel
    1. Connect comm board
    2. Flash comm board firmware
    3. Checklist for flashing comm firmware
  3. Programming a driver panel
    1. Connect driver board
    2. Flash driver board firmware
    3. Checklist for flashing driver firmware

Firmware

The driver and comm board use a total of five micro controller units (MCUs). To program these five ATmega328, you will need the programmer explained in the acquisition step. This text explains, how an Arduino can be used as a “In-circuit Serial Programmer” (ISP) to flash the firmware to the driver and the comm board.

Prerequisites

You will need the following parts:

Install the custom version of the Arduino IDE on your computer. This IDE has the PanelsG4 board added as a target. The Windows version of Arduino-1.6.5 is provided as an asset to “Customized Arduino IDE” release on github.

Turn Arduino into In-circuit Serial Programmer (ISP)

To flash the firmware to the panel MCUs, the Arduino will act as a programmer. For this the Arduino requires a special firmware, which is provided as “example” code. Follow these steps to turn the Arduino into an ISP.

  1. Connect Arduino (Make sure programmer shield is off it will prevent programming)
  2. Open Arduino IDE.
  3. Go to Tools ­→ Board and select Arduino UNO.
  4. Go to Tools ­→ Port and select correct Port
  5. Go to File ­→ Examples select ArduinoISP
  6. Verify (check button) and Upload (right point arrow button).

These steps should be similar to what is described in an Arduino tutorial online.

Troubleshooting

There is no verbose output that helps debugging problems, but one of the three following steps solved most problems in the past:

  1. Make sure that the Arduino firmware has not been corrupted. Flashing the ISP firmware to the Arduino again solved many unexplained problems.
  2. Make sure you driver and comm boards are connected in the correct way. It’s easy to mix up polarity which, in the worst case, can corrupt a panel but is often solved by using the correct polarity.
  3. Makes sure only one subdevice is selected on the driver board. Multiple selections can lead to unexpected results.

Programming a comm panel

Each comm board needs to be programmed.

The following has to be done only once for all comm boards: In the the Arduino IDE and go to Tools ­→ Board and select PanelG4. In Tools ­→ Programmer you need to select Arduino as ISP (not ArduinoISP).

Connect comm board

How to connect a comm shield

To program the ATMega328 on a comm board, connect the board to the comm shield board in a way, that you can see the components on both boards (also see image). There is no need to connect the external power supply, power is provided through the Arduino shield.

Flash comm board firmware

Once the comm board is attached to the comm shield, you can connect the comm shield to the Arduino shield with the ribbon cable. Make sure to disconnect the ribbon cable when changing the comm boards.

With the Arduino IDE open, select Tools ­→ Burn Bootloader to write the boot loader to the comm board’s MCU. With the correct comm.ino open (the latest version is in the GitHub repository linked to this page (see link in the left bottom of the page) at hardware_v0p2/comm/), select Sketch ­→ Upload Using Programmer. Now the comm board should be fully functional. Disconnect the ribbon cable before programming the next comm board.

Checklist for flashing comm firmware

  1. Connect Arduino shield to the computer1
  2. Open Arduino IDE
  3. Go to Tools ­→ Board and select PanelG4
  4. Go to Tools ­→ Programmer and select Arduino as ISP (not ArduinoISP!!!)
  5. Disconnect ribbon cable between comm shield board and Arduino shield
  6. Attach comm board to the comm shield board
  7. Connect the comm shield board to Arduino shield via ribbon cable2
  8. Go to Tools ­→ Burn Bootloader
  9. Open the comm.ino sketch
  10. Go to Sketch ­→ Upload Using Programmer to upload sketch to comm board
  11. For the next comm board continue at step 5

Programming a driver panel

The following steps have to be done for each individual driver board.

The following has to be done only once for all driver boards: In the the Arduino IDE and go to Tools ­→ Board and select PanelG4. In Tools ­→ Programmer you need to select Arduino as ISP (not ArduinoISP).

Connect driver board

How to assemble a driver shield

The first step is to connect the driver board to the driver board shield. The correct orientation of the driver is when the two triangles printed on the board point away from the connector (up in the picture). This will also mean, that the upper edge of the shield and the driver are well aligned and the lower edge of the driver aligns with the printed line on the shield. Make sure you double check the orientation as there is a chance of breaking the driver. There is no need to connect the external power supply, power is provided through the Arduino shield.

Flash driver board firmware

Dip switch selecting subdevice 1

Once the driver is attached to the driver shield, you can connect the driver shield to the Arduino shield with the ribbon cable. Make sure to disconnect the ribbon cable when changing the driver board.

Select one of the four subdevices to be programmed by moving one of the dip switches away from the panel and the other three towards the panel. In the picture on the right, subdevice number 4 is selected through the dip switch on the left. Select Tools ­→ Burn Bootloader to write the boot loader to the ATMega. With the correct driver.ino sketch opened, select Sketch ­→ Upload Using Programmer to upload sketch to panel. Currently the latest version of the driver sketch is in the associate GitHub repository (see link in the bottom left of the page) at hardware_v0p2/driver/.

Repeat the steps for “Flash Firmware” for the other three subdevices on the same driver panel.

Checklist for flashing driver firmware

  1. Connect Arduino shield to the computer1
  2. Open Arduino IDE
  3. Go to Tools ­→ Board and select PanelG4
  4. Go to Tools ­→ Programmer and select Arduino as ISP (not ArduinoISP!!!)
  5. Connect a driver board to the driver shield board2
  6. Connect driver shield to the Arduino shield via ribbon cable1
    1. Select subdevice using dip switch. Away from the panel means “on”, ­only one should be up at a time3.
    2. Go to Tools ­→ Burn Bootloader
    3. Open the driver.ino sketch
    4. Go to Sketch ­→ Upload Using Programmer to upload sketch to panel.
    5. Repeat from step a) for other subdevices
  7. Disconnect ribbon cable
  8. Repeat from step 5 for each driver board

  1. Always remove ribbon cable before removing and attaching new driver subpanel as sometimes attaching a panel without doing so will corrupt the ArduinoISP program on the Arduino Uno  2 3

  2. Note, you do not need external power supply the Arduino will provide power.  2

  3. To fully program the driver you need to program all four ATmega328’s, which means programming the bootloader and firmware for all four dip switch “on” positions, one at a time.