Getting Started
What WaveLink Is
WaveLink is a dual-channel arbitrary function generator and a digital oscilloscope sharing one board, one microcontroller, and — importantly — one analog signal path. It has no front panel. Every control lives in a client application that talks to the board over Bluetooth Low Energy.
It was built for PH 3032 Embedded Systems Laboratory by Kenura Ransana Gunarathna (KRAG Tech), Sri Lanka.
The hardware
| Microcontroller | ATmega32A at 16 MHz |
| Firmware | Bare-metal C++ — no Arduino framework, no operating system, no dynamic allocation |
| Flash used | 25348 bytes (77.4% of 32 KB) |
| SRAM used | 1250 bytes (61.0% of 2 KB) |
| Wireless link | HM-10 Bluetooth Low Energy module on the MCU’s UART |
| Signal converter | Dual 16-bit R-2R ladder DAC via daisy-chained 74HC595 shift registers, SPI at 8 MHz |
| Measurement converters | 16-bit successive-approximation (SAR) using an LM393 comparator, and the ATmega’s internal 10-bit ADC |
There is no operating system and no heap. Every buffer in the firmware is statically allocated, which is why the arbitrary waveform tables are fixed at 256 points on CH1 and 128 on CH2 — SRAM is the scarce resource on this chip.
What it does
As a function generator, it produces sine, square, triangle, sawtooth and haversine waveforms plus one user-uploaded arbitrary shape, on two channels, from 1 Hz to 20 kHz, at 0.93 to 15.15 Vpp with up to ±7.58 V of DC offset. Waveforms are synthesised by direct digital synthesis: a 32-bit phase accumulator stepping a wavetable at 40 kSa/s, through the R-2R DAC and a Sallen-Key low-pass filter that removes the sampling staircase.
As an oscilloscope, it digitises a BNC input through a programmable gain stage — there is no attenuator on the board, so a 10× probe supplies the range — using either the 16-bit SAR path or the internal 10-bit ADC. It captures up to 1000 samples per burst, applies triggering to the captured buffer, and computes 26 automatic measurements.
The one thing you need to understand
The oscilloscope has no front end of its own. It borrows Channel 1’s.
The CH1 signal DAC becomes the SAR comparator’s reference, and relay K5
redirects CH1’s de-amplifier/amplifier potentiometer pack — the very same X9C
wipers that the a and g commands drive for the generator — into the
comparator stage.
Almost every restriction in this manual follows from that single fact: which channel can generate in which mode, why the 16-bit SAR is only available in one mode, why the offset control behaves differently in Dual mode, and why some controls grey themselves out. The Operating Modes section explains this properly, and it is worth reading before you use the instrument in anger.
The three clients
The board exposes one line-oriented ASCII protocol over its BLE UART. Three applications speak it:
| Client | Notes |
|---|---|
| Web app | Runs in a browser with Web Bluetooth. No installation. |
| Desktop app | PyWebView shell around the same UI, with a Python BLE backend and the calibration tooling. |
| Android app | Native mobile client. |
All three drive the same firmware and expose the same capabilities. Anything in this manual that describes “the app” applies to all of them unless stated otherwise. If you want to drive the board directly from a terminal, the Command Reference page documents the wire protocol.
Honest limits
This is a 16 MHz 8-bit microcontroller behind a 115200-baud wireless link, and the manual does not pretend otherwise:
- Generation tops out at 20 kHz (10 kHz per channel when both channels run).
- There is no hardware trigger and no hardware timebase. Triggering is applied to a buffer that has already been captured.
- Capture throughput is limited by the wireless link, not by the converters.
- The instrument is not calibrated against a traceable reference. A separate calibration tool characterises the analog chain against an external oscilloscope, but out of the box the voltages are nominal.
Updated · Full project report (PDF)