The Swellscope (Custom ADC) ECE342-S25 Group 5

Teensy
Spring 2025

This project is a dual channel oscilloscope run by the Teensy 4.1 with a 240 x 320 resolution LCD display and battery power. The design was built to be portable, with a possible use case of field work or diagnosing signals in an area where a common oscilloscope would struggle to be used. We designed three custom PCBs to complete our project. One was a buck converter, that took a range of input voltages and stepped it down to a useable 5 volt output. Another was our motherboard, which allowed us to integrate the various modules within the system to our microcontroller. The last was our analog frontend with a custom-built ADC. Prior to input into the ADC, the board contains an attenuation stage and a 4th order Sallen Key filter with 120kHz cutoff followed by a voltage controlled amplification stage and a sample and hold stage. The VCA allows us to dynamically control the resolution seen by the ADC, and the sample and hold stage prevents the signal from drifting will a conversion is taking place. The ADC functions using a fast clocked counter and a digital to analog converter. We compare the ramping counter signal output from DAC to the input signal and halt the count process when the signals are equivalent. This allows us to capture a digital representation of the signal. The custom ADC has a sample rate of 250kHz, and an 8 bit resolution, but processes a 9th sign bit, which effectively doubles our resolution. The code defines the complete firmware for a dual-channel digital oscilloscope built around a Teensy 4.1 microcontroller and an ILI9341 TFT display. It continuously acquires analog input signals from two external ADCs, converting these physical measurements into a standardized digital format representing the waveforms. Users can manipulate these signals by applying adjustable gain and performing mathematical operations (like addition or subtraction) between the two channels. The system processes user input from rotary encoders and pushbuttons to control settings such as voltage sensitivity per division, timebase scaling, active channel selection, math functions, and trigger conditions (including normal, rising edge, and falling edge) to stabilize the displayed waveforms. Finally, it renders a graphical user interface on the screen, drawing the captured and processed waveforms against a grid, displaying current settings, and providing pop-up messages for user feedback, while also managing hardware aspects like programmable gain amplifier control and encoder LED indicators. The main issue we ran into was the limitation of the clock rate of the microcontroller and the interfacing with the code and the ADC. We ran into issues with getting to our goal sampling rate, and an improvement we could make would be to design a better ADC clock rate, or refine our code to make sure that we optimize our clock cycles.

8 Lifts 

Artifacts

Name Description
Demo using a two simulated waves Demo showing all functionality of the system using two simulated waves before we connected it to the Input Processing module.   Link
Demo with one channel being processed In this demo, we show a signal generator connected to our channel A interface. The signal comes through, and scaling functionality continues to work.   Link
Enclosure case - Outside Computerized visual of what the 3-D printed case will look like.   Download
Enclosure case - Inside Computerized visual of what the 3-D printed case looks like on the inside, with the PCB layouts and other components.   Download
ADC Schematic Schematic of our custom ADC, allowing for analog signal inputs.   Download
ADC PCB Layout Layout of our ADC and input module PCB.   Download
ADC Math example Simple diagram of how the ADC works.   Download
ADC Flowchart Flowchart of how the ADC works.   Download
Project Summary Summary of what we learned and how we developed the Swellscope.   Download
Presentation Video https://www.youtube.com/watch?v=JuAFDbSll8k   Link
Feedback