Ohmforge Serial Log to Capture
Paste a serial monitor log: numbers become channels with frequency, Vpp, RMS and rise time.
Try an example: ADC logger with millis() time column, 1 Hz sine · Arduino IDE log: temperature and humidity every 250 ms · RC low-pass step response at a fixed 1 kHz (no time stamps)
How it works
Turns a saved serial monitor log into a waveform capture and measures it like an oscilloscope recording. Lines with numbers ("512", "1.5 2.0", "temp:21.5 hum:40") become channels, text lines are skipped. Time comes from the log's time stamps (Arduino IDE, Ohmforge Serial monitor, Tera Term style), from a time column the device prints (millis()) or from a fixed sample rate. You get Vpp, mean, RMS, frequency, duty cycle and rise time per channel, a chart and a CSV that opens in the Capture analyzer.
- Lines and time stamps: the log is split at LF, CR LF or CR. Recognised time stamps are "[2026-11-02 10:15:30.125] …" (Ohmforge Serial monitor; also with T, Z or a UTC offset as Tera Term and other terminals write it), "10:15:30.125 -> …" (Arduino IDE; midnight wraps are followed) and "[12.345678] …" seconds; resolution 1 ms.
- Numbers: like the Arduino serial plotter, a data line holds up to 16 numbers separated by spaces, tabs, commas or semicolons, each optionally labelled "name:value" or "name=value". Unlabelled numbers are named by position (Value 1, Value 2 …); nan, inf and ovf count as missing values. Lines with any other word are text and are skipped.
- Time base: arrival times are the log's time stamps relative to the first data line; lines with the same stamp (one USB packet) are spaced evenly up to the next stamp. A device time column (millis(), micros()) gives exact sample times and must not go backwards. A fixed sample rate gives t = n / fs.
- Measurements are the Capture analyzer's (ohmforge-capture-analyzer): IEEE 181 state levels, 50 % crossings with hysteresis for frequency and duty, 10–90 % rise time, time-weighted mean and RMS. Lines missing a value of a chosen series are left out. There is no spectrum here: open the capture CSV in the Capture analyzer for FFT, THD and SNR.
A serial log is only as good as its timing: arrival-time stamps carry USB and operating-system jitter of a few milliseconds, so frequencies above a few hertz need a device time column or a fixed sample rate. The tool does not connect to any device; use the Serial monitor in Ohmforge for live data.
Sources
Part of Ohmforge
-
Ohmforge Virtual electronics workbench
Draw a circuit, switch it on, and measure it with real-feeling bench instruments.
Related tools
- Ohmforge Oscilloscope Capture Analyzer – Scope CSV or WAV in: Vpp, RMS, frequency, duty, rise time, FFT, THD and SNR out.
- Ohmforge UART, I²C and SPI Protocol Decoder – Decode UART (auto baud), I²C and SPI from logic-analyzer or scope CSV captures.
- Ohmforge Microcontroller Timing Calculator – UART baud error (UBRR, BRR), timer prescalers, PWM resolution, ADC LSB/ENOB and RC delays.
How to use the Ohmforge Serial Log to Capture tool
Turn a saved serial monitor log into channels with frequency, peak-to-peak, mean, RMS, duty cycle and rise time, plus a CSV for the Capture analyzer.
What it is for
Many projects print their sensor readings over a serial port: an Arduino sends temp:21.5 hum:40, an ADC logger sends 1000,512. A serial monitor shows them scrolling by but measures nothing. This tool reads a saved log, turns every line with numbers into one sample and measures the result like an oscilloscope recording.
Messages such as "WiFi connected" are skipped automatically. The tool understands the time stamps of the Arduino IDE (10:15:30.125 -> …), of the Ohmforge Serial monitor and Tera Term ([2026-11-02 10:15:30.125] …) and kernel-style seconds ([12.345678] …). Logs without stamps work too, if you know how many lines per second the device printed. For live data use Instruments → Serial monitor… in the Ohmforge workspace, which records the same way.
Worked example
The first example is an ADC logger that prints millis(),reading every 20 ms; the log's own stamps arrive in 16 ms bursts. With First number of each line is the device time the tool uses the millis() column as the clock. It finds 200 data lines, skips 1 text line and reports 1 Hz, 798 peak to peak (113 to 911) and a mean of 512.1 over 3.98 s at 50 samples per second.
For a custom run I pasted 120 lines in the [ 1.500000] pwm:3.3 batt:4.100 style with two boot messages and set the unit to V. The tool skipped the 2 text lines and found two channels: pwm at 2 Hz with a 30 % duty cycle and a mean of 0.98 V, and batt falling from 4.1 V to 3.981 V, with no frequency because it never repeats. The pwm rise time came out as 40 ms. That is 0.8 times the 50 ms between lines, so it shows the sampling step, not the real edge.
How to read the result
The metrics at the top count data lines and skipped text lines, list the channels and give the duration and the sample rate. The sample rate is calculated from the typical gap between lines. The measurement table has one column per channel: minimum, maximum, peak to peak, mean, RMS, frequency, period, duty cycle and the 10–90 % rise and fall time. The code is the Ohmforge Capture analyzer's.
Unlabelled numbers are called Value 1, Value 2 and so on. The assumptions say which time base was used. Capture CSV downloads the samples as a table that opens in the Capture analyzer, which can also show the spectrum.
Tips and common mistakes
- Arrival times jitter by a few milliseconds because of USB and the operating system. For anything faster than a few hertz, print
millis()ormicros()as the first number. - A device reset restarts millis(). With a time column the tool then stops with "goes backwards". Cut the log at the reset.
- Lines that miss one of the chosen series are left out. A label that appears only now and then is dropped from the default selection, and a warning names it.
- Use Series to use to pick channels by name, for example
pwm, when a log has more than four.
FAQ
Which line formats count as data?
Up to 16 numbers separated by spaces, tabs, commas or semicolons. Each number can have a label, such as temp:21.5, temp: 21.5 or t=21.5. A line with any other word is treated as text.
My log has no time stamps. What now?
Choose Fixed sample rate and enter how many lines per second the device sends. If your sketch prints its own time, choose the time column instead.
Why is the frequency of a slow sensor empty?
Frequency needs at least two rising crossings of the 50 % level. A battery voltage that only falls never crosses it twice.
Is my log uploaded or stored?
It is sent to the tool, processed in memory and not kept. The Serial monitor in the app keeps recordings in the browser tab only.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://ohmforgeseriallogtocapture.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://ohmforgeseriallogtocapture.usefulweb.app/mcp· tool nameohmforge_serial_log_to_capture
Example request
curl -s -X POST https://ohmforgeseriallogtocapture.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'