SMC

Historically called SMC, the meaning of the acronym has been lost to the ether, but one can speculate as to its origin. Considering it's function is to control and insure the synchronization of the image capture, I would probably argue for something along the lines of Synchronization Management Controller.

As stated, the purpose of the SMC is to synchronize the triggering of the cameras, a task which is the cornerstone of frame-by-frame analysis. The SMC is a homegrown system that includes power distribution electronics and a microcontroller for sensor interface and camera triggering.

Power distribution

The SMC is responsible for providing power to the various systems from a single power source. This is usually either a battery or what is known as plane power, usually in the form of a cigarette lighter plug in the aircraft. For bench testing, the travel kits usually also include an AC-to-DC adapter.

Those power sources can vary in voltage from 10 to 48 volts usually, so the power conversion circuits of the SMC can accommodate input voltages up to 60V. The SMC is then responsible for converting that to the various voltages needed by components on the rig, namely, 24V, 19.5V, 12V and 5V.

This is achieved by a buck-boost converter, the design of which is based on the reference design of the VICOR chip doing the actual level change. This design is implemented in a pair on a separate PCB that is then assembled as a daughter board on the SMC.

Sensor interface

The albatross rig used to be equipped with a laser range finder, the Vectronix LFR3013. This LRF is a UART device. The other sensor on the rig is an inertial navigation unit, a Vectornav VN-200, also a UART device.

To interface with these two devices, the SMC the commonly used dev board Teensy version 4.1 which is based on the iMX RT1060 microcontroller. This is an ARM M7 chip with plenty of flash, and peripherals for all our needs.

Backplane

When talking about the SMC, we usually refer to the complete assembly of a backplane, 3 double vicor daughter boards, and the teensy daughter board. The backplane is a much larger PCB which mainly does signal routing, but some power protection circuitry, namely reverse polarity protection, is also implemented on that board. The reverse polarity protection circuit will short the inputs of the backplane if the input terminals are misconnected, make sure there is a fuse in the loop or things could burn down.

In addition to reverse polarity protection, the backplane also routes several voltage monitoring points to the analog inputs of the microcontroller. Those points are fed through voltage divisors to bring the scale down to the 3.3V windows the ADC operates in, and those divisors, especially on the input, are the main point of limitation for the input voltage range supported by the SMC.

Lastly, the backplane implements an UART to USB cirtuit which allows the SMC to communicate with the computer as a serial device. This implementation was deemed more reliable and controllable than using the USB controller of the microcontroller mainly because of the implementation of the USB peripheral in the RTOS stack chosen.

Software architecture

The software architecture of the SMC is drawn out quite a bit in this diagram but here are the highlights. This software is implemented on top of the Zephyr real-time operating system. Zephyr is essentially used as an abstraction layer simplifying the configuration and management of the hardware peripherals.

SMC logic

SMC class

Generally speaking, the duties of the microcontroller can be split into 5 categories, LRF measurements, INS measurements, power measurements, camera triggering, and communication with the computer. And those are the 5 main classes of the class diagram above.

Starting with the simple components, the Trigger Controller is a simple management class which utilises the hardware timers to achieve precise frequency timing. Two timers are used, one to trigger the rising edge of the pulses and one to trigger the falling edge. The output signals are set in the timer's interrupt service routine. As such, the logic in that routine is kept to a minimal. The class has other methods to register and configure different trigger lines. The configuration allows support of different frequencies, active high or low, falling or rising pulses, long or short pulses, etc. The class also decodes the UART request to set the rate of some trigger.

The Power Monitor is another pretty simple class, this one focussing on the ADC. The class configures and polls the ADC to measure the various voltage points on the backplane. The mainloop periodically takes a measurement and stores it in cache until the PC communication thread queries for a reading. The Power Monitor class is also responsible for the scaling of each channel, and it's corresponding voltage divisor parameters.

The LRF class is responsible for getting measurements with the LRF. The class uses a UART peripheral to communicate with the sensor, a separate thread is spawned in the class' constructor and polls the sensor every half second for a new distance measurement. The measurement is cached for the PC communication thread when needed.

The INS class is a bit more complex than the previous ones. It is also based on serial communication through a UART to the INS, similar to the LRF, but the communication protocol of the INS is a lot more complex. A reading of the INS is triggered using the Trigger Controller so that the images are in sync with a position frame. Upon triggering, the INS will send out a data packet to the SMC. The format and content of that packet can be configured by the user. Additionally, the INS class can send command packets to the SMC either to reconfigure some settings, read out some values, or query additional information.

Lastly, the SMC class is the main interface into the firmware from the computer. The SMC class is responsible for the serial communication to and from the PC. It decodes messages from the computer and dispatches the payload received to various command handlers that are registered with the class. An example of such handler would be the set rate command previously discussed in the Trigger Controller. The SMC class is also responsible for periodically reporting to the computer with the latest telemetry, power readings, and trigger information.