Project Overview
"Iso-Scope" is a rigorous implementation of High-Speed Signal Forensics and Isochronous USB Orchestration. By pushing the SAMD21G18 microcontroller (found in Arduino Zero/MKR) to its $350\text{kSps}$ 12-bit ADC limit, this project overcomes the traditional "Bulk Transfer" bottlenecks that plague standard USB-to-Serial devices. The system features a native C++ DLL bridge to the WinUSB.sys driver, enabling a continuous $1023\text{ bytes/ms}$ stream of time-stamped telemetry. The final payload is visualized through an OpenGL-accelerated HMI, providing real-time waveform diagnostics with sub-millisecond latency.
Technical Deep-Dive
- Isochronous USB Telemetry Forensics:
- The Protocol Bottleneck Diagnostics: Most Arduino oscilloscopes use "Bulk Transfer", which is limited to $64\text{ bytes/ms}$, far too slow for $350\text{kSps}$ $(\approx 33,600\text{ bytes per 16ms frame})$. Forensics into the SAMD21 USB-stack allows the implementation of Isochronous Transfer Diagnostics, which reserves a deterministic $1023\text{ byte}$ window in every $1\text{ms}$ frame. This ensures a guaranteed bandwidth rail for streaming data, effectively bypassing the arbitration handshake latency of standard serial links.
- Payload Serialization Harmonics: Every $12$-bit sample is encapsulated with an $8$-bit integrity-byte and a $12$-bit timestamp. The diagnostics involve serializing these components into a bit-packed stream to maximize the isochronous packet utility $(>260\text{ samples per ms})$.
- High-Speed ADC Sampling Analytics:
- The SAMD21 ADC Forensics: To achieve $350\text{kSps}$, the ADC must be configured for "Freerunning Mode" outside the default Arduino abstraction. Forensics into the Sam-D registers $(\text{ADC.CTRLB, ADC.SAMPCTRL})$ ensures that the sampling-clock harmonics are perfectly tuned for 12-bit resolution without sacrificing photonic accuracy on the analog front-end.
- Multi-Threaded Ingestion Diagnostics: The system utilizes a triple-threaded architecture on the host PC: a C# GUI thread for HMI, a C++ WinUSB thread for isochronous ingestion, and an OpenGL thread for GPU-accelerated rendering. This orchestration prevents the slow GUI cycles from inducing overflow-artifacts in the high-speed telemetry stream.
Engineering & Implementation
- OpenGL Coordinate-Mapping Heuristics:
- Vertex-Buffer Forensics: The raw ADC readings $(\text{0-4095})$ and $12$-bit timestamps must be transformed into normalized OpenGL coordinates ${-1, 1}$. The project implements a high-velocity CPU-side normalization loop that prepares vertex-buffer objects $(VBOs)$ for the GPU, ensuring that waveform rendering executes at a solid $60\text{Hz}$ without CPU spikes.
- Photonic Integrity Diagnostics: To ensure the displayed waveform reflects physical reality, the system implements a Timestamp-to-Distance Forensics protocol. By correlating the 12-bit timestamp with the global sample clock, the OpenGL engine can render non-linear sampling events with absolute temporal precision.
- Driver & Firmware Orchestration:
- The implementation requires a custom
WinUSB.infand a firmware-extension for the ArduinoCore. Forensics into the USB descriptor structure allows the board to signal its isochronous capabilities to the Windows host, enabling theWinUSB.sysdriver to establish the deterministic telemetry link.
- The implementation requires a custom
Conclusion
Iso-Scope represents the pinnacle of Modern Logic Analysis. By mastering Isochronous Forensics and SAMD21 ADC Diagnostics, alexisvanbaelen has delivered a powerful, low-latency instrumentation tool that bridges the gap between basic microcontrollers and industrial-grade oscilloscopes.