#Three-channel node- and canvas-based oscilloscope
I couldn’t wait to try out some of the new capabilities of Audulus 4, so I figured I’d try redoing my o-scope. I got a copy of the Lua 5.2 reference manual and got down to it.
The oscilloscope is three-channel, making use of the scope node’s ability to display multiple channels of input. Each channel can be direct or “ac” coupled, with gain/attenuation adjustment to fit the signal on the display. A vertical position control moves each baseline. Signal, gain, and offset for the three channels are all sent as a 9-channel poly signal to the display module.
An external trigger is needed to initiate a sweep. The trigger signal can be “ac-coupled” and the envelope of the signal can be used or it can be directly connected. Gain I can be applied and threshold level can be set to establish a trigger. With the up/down direction switch you can choose to trigger on the leading or trailing edge of the signal.
Sweep can be continuous or it can be set as a single-shot, with the Go button initiating a trace on the next captured trigger, or is can freely run. A “trigger hold off” control can limit how often a trigger is to be captured.
Depending on your preference, you can run the sweep left to right or right to left by setting the “sweep direction” switch.
The sweep is divided into 100 segments, with the time base knob setting how many samples will be in a segment, with a minimum of one sample per segment. The trigger can be delayed or advanced Over a +/- 50 segment range by turning the “trigger position” knob. This allows rough measurements to be made by moving a feature on the waveform to the center line, hitting the “Reset Ref N” button, moving the waveform to the next position, then reading off the measurements.
The display uses the scope node with an overlaying canvas node. The display can be scaled by resizing the scope node and cavas node. If the scope and canvas nodes are set to match, they will remain in alignment.
The canvas node is used to create the green reference lines, the movable blue reference lines (controlled via a knob on the display), the channel markers (a, b, c) and the red/green scaling markers, which follow the setting of the vertical position knob for the corresponding channel.
Oscilloscope scope-node 3-ch-230912.audulus4 (103.3 KB)
| 9/12/23 | First out there
[Version] | [Upload module file here] |[Month/Day/Year] | [Optional notes]