Skip to content
DevMajedPublic

About

Browser-based mixed-signal instrument: 8-channel FPGA logic analyzer and STM32 oscilloscope with local Wi-Fi control.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

NoScope

CI

An FPGA logic analyzer and STM32 oscilloscope, controlled from a browser.

Eight digital channels, one analog channel, shared-trigger captures and a touch-friendly interface over local Wi-Fi. Built with a Digilent Basys 3 and an STM32 B-L475E-IOT01A2. Open the instrument on an iPad, laptop or desktop without a cloud service or a PC bridge in the standalone data path.

Created by Majed Alharbi.

How it works

flowchart LR
    D["Digital inputs D0-D7"] --> F["Basys 3 FPGA"]
    A["Analog input A0"] --> S["STM32 ADC + gateway"]
    F -->|"Digital records + trigger"| S
    S -->|"Capture commands"| F
    S <-->|"Onboard Wi-Fi / HTTP"| B["Browser"]
Loading
Component Responsibility
FPGA Samples eight digital inputs into circular block RAM, detects a selected edge, retains pretrigger/post-trigger history and transfers the frozen record over UART.
STM32 Samples A0 with its timer-paced 12-bit ADC and DMA, coordinates mixed captures, retrieves FPGA records and serves the embedded webpage through its onboard ISM43362 Wi-Fi.
Browser Configures acquisition, checks received records, displays waveforms, calculates measurements, decodes digital protocols and exports captures.

The FPGA provides a dedicated digital capture engine while the STM32 handles analog acquisition and networking. A simpler analog-only instrument could use the STM32 alone; this design adds programmable, parallel digital acquisition and hardware triggering.

Acquisition and display refresh are separate: each device captures into memory first, then the completed record is transferred. This is a bounded-capture instrument, not continuous raw streaming.

Features

  • Mixed-signal view: eight digital traces and one analog trace with separate sample-rate and trigger metadata.
  • Hardware triggering: rising/falling edge on any digital input, immediate mode and configurable pretrigger history.
  • Run and Single: short 64/256/512-sample Wi-Fi previews, with up to 4096 samples per source for full Single captures.
  • Measurements: digital frequency, period, high/low pulse width and duty cycle; analog frequency, minimum, maximum, peak-to-peak, mean and total RMS.
  • Protocol decoding: UART 8N1, SPI mode 0 and I2C on selectable digital channels.
  • Touch controls: pan, zoom, fit-to-capture and a focused waveform view.
  • Exports: CSV, digital VCD, JSON, waveform PNG and a 1600 x 900 capture card with measurement provenance.
  • Local operation: self-contained browser assets, saved controls, USB fallback and explicit simulation mode. Disconnected hardware never falls back to generated samples.
  • Checked transfers: framed records with CRCs, metadata validation and tokenized preview retries that cannot duplicate an acquisition.

Hardware and wiring

You need a Basys 3, an STM32 B-L475E-IOT01A2, five jumper wires, appropriate USB power and a browser on the same 2.4 GHz WPA2 LAN. No ESP32 is required.

For standalone operation, set Basys SW0 = 1 and connect:

Basys 3 STM32 Arduino connector Function
JB1 / RX D1 / TX Commands from STM32 to FPGA
JB2 / TX D0 / RX Replies and digital samples from FPGA
JB3 D2 FPGA trigger event
JB4 D4 Analog-ready status from STM32
JB5 or JB11 / GND GND Common reference

Digital inputs D0-D7 use Basys JA1, JA2, JA3, JA4, JA7, JA8, JA9 and JA10. The analog input is STM32 A0 / CN4 pin 1. The ready line is a status indication, not a hardware ARM interlock. SW1 is unused.

Use only known, conditioned low-voltage signals within the actual 3.3 V logic/ADC rails. These are raw board inputs without a commercial oscilloscope front end. No negative, 5 V, mains or unknown inputs. Power each board through its intended connector and do not join their supply outputs. Turn the signal source off before moving leads.

See the complete wiring guide for MCU/package pins and connector orientation.

Getting started

The initial toolchain is Windows PowerShell, Python 3.11+, Node.js 24, Vivado 2024.1, STM32CubeL4 1.18.1, an ARM GNU toolchain, CMake, Ninja and STM32CubeProgrammer. The STM32 build also supports an LLVM fallback. Vendor SDKs are installed separately.

1. Build the browser

From the repository root:

python -m pip install -r software/requirements.txt
cd web
npm.cmd ci
npm.cmd test
npm.cmd run build
cd ..

On shells other than PowerShell, use npm in place of npm.cmd.

2. Load the FPGA

Program fpga/release/noscope_top.bit through Vivado, or rebuild it using the FPGA instructions. A JTAG-loaded image is volatile: keep the Basys powered or reload it after power loss. Persistent configuration-memory boot has its own setup guide.

3. Configure and flash the STM32

Wire the gateway, keep both boards powered and close serial monitors, the PC bridge and CubeProgrammer before running setup. Setup discovers the connected STM32 ST-LINK COM port:

python scripts/setup_device.py --open

Setup prompts for Wi-Fi settings locally, embeds the built webpage, builds and validates the firmware, programs the board, discovers its local address and opens the browser after checking the gateway identity. Join the iPad to the same LAN and open that address.

Wi-Fi settings stay in an ignored local header. Configured STM32 binaries contain those settings too: do not commit or publish them. See setup and recovery and the STM32 build guide for tool paths, USB-only builds, reuse and LLVM options.

4. Take a first capture

Begin with 100 kS/s digital, 100 kS/s ADC, Immediate mode and decoding off. Use Single to check a full capture, then Run preview with 256 samples. For mixed edge triggering, select a changing digital input and verify the trigger wire. Keep only one active capture controller connected.

The displayed rates come from capture metadata. UPDATE Hz and LAST CYCLE describe browser refresh and transfer timing, not sampling bandwidth.

USB bridge and simulation

For wired acquisition, set SW0 = 0, retain the USB data connections and use the Python bridge:

python -m software.bridge doctor
python -m software.bridge --auto

Open http://127.0.0.1:8000. Combined USB operation still requires the trigger and ground wires. See the bridge guide for explicit ports and LAN binding.

To explore the interface without hardware, select simulation deliberately:

python -m software.bridge --demo

Synthetic captures are labeled. They are never presented as instrument measurements.

Performance and validation

Area Current scope
Digital capture Eight bits per sample, 64-4096 samples, selectable divider from a 100 MHz FPGA clock; up to a 100 MS/s setting.
FPGA implementation Routed 100 MHz timing met: WNS +0.207 ns, WHS +0.119 ns; one RAMB36 capture buffer. External bandwidth and timing accuracy are not calibrated.
Analog capture One 12-bit channel, 64-4096 samples; firmware accepts 100-200,000 S/s. Nominal 3.300 V reference until calibrated.
Readout UART at 115200 baud, then local Wi-Fi HTTP. Full records take longer to transfer than to acquire; Run preview reduces record size.
Mixed alignment A shared trigger event with independent clocks. Analog/digital alignment is approximate and uncalibrated.
Physical status Digital, analog and standalone mixed Wi-Fi captures have operated on hardware. Sustained operation of the latest responsive-preview firmware remains to be verified.

The latest source passes 87 browser tests, six native firmware suites, 77 Python bridge tests, 26 setup/image tests and both self-checking FPGA simulations. The Cortex-M4 firmware compiles and links with checked flash/RAM bounds. One live-socket test suite is skipped where socket access is unavailable. See verification details for scope and physical acceptance checks.

Protected analog inputs, calibrated bandwidth/accuracy, analog voltage-threshold triggers, additional channels and access-point mode remain future work.

Project layout

Path Contents
fpga/ SystemVerilog capture engine, UART protocol, constraints, simulations and public FPGA artifacts
firmware/stm32/ ADC acquisition, gateway firmware, Wi-Fi I/O and native tests
web/ React/TypeScript instrument interface, rendering, measurements and decoding
software/ Python USB bridge and device discovery
protocol/SPEC.md Binary framing, capture metadata and HTTP transport contract
scripts/ Setup, packaging and build tooling
docs/ Architecture, wiring, bring-up and verification guides

Read the architecture for capture sequencing, timing, memory and transport details.

Development

See CONTRIBUTING.md for local checks and the CI workflow. Third-party runtime and SDK details are listed in THIRD_PARTY_NOTICES.md.

Copyright (c) 2026 Majed Alharbi.

About

Browser-based mixed-signal instrument: 8-channel FPGA logic analyzer and STM32 oscilloscope with local Wi-Fi control.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages