Software

Software and Firmware Hosts

We have both software and firmware, each running on different devices and each with their own purpose. The software lives on the RaspberryPi development board and controls the entirety of the system. The RaspberryPi is meant to replace a full laptop and is the only user-facing portion of our system. The firmware lives on the STM32 microcontroller which lives on our custom PCB. Its only job is to run the CCD and communicate the data back to the RaspberryPi.

Software Block Diagram

Our software has four primary states shown on the left. We start in the sleeping state to avoid unnecessary power consumption. On wake, the system allows the user to set timing and integration values before running. The RaspberryPi will turn on the laser, power the PCB, and send over SPI, using the Ottery-CLI, the timing and integration values to the PCB firmware. The firmware will send CCD data back to the RaspberryPi, which will automatically be written to a file. The RaspberryPi will do some signal processing and output a plot of intensity by pixel number to the user. Upon completion of the run, the RaspberryPi will disconnect power from the PCB and go into sleep mode.

Firmware Block Diagram

The firmware starts by sending a signal to the RaspberryPi over SPI to indicate it is ready to receive timing and integration values. It then waits for those values to come in over SPI, after which it runs the CCD using those values. It then reads in the CCD output through the ADC to get digital values. While there are still more integrations to run, it will keep capturing data averaging them. On the final integration, it will send the data back to the RaspberryPi over SPI. The data is sent as a file of pixel number by intensity values. After the data is finished sending, the MCU will send over SPI a ready signal, indicating to the RaspberryPi that it is reading for timing and integration values.