Only data, no BS.

[ Frontpage >

Oscilloscope math channels


Digital Analog Digital Converter (DADC) for PicoScope DSO using Arduino Uno + MCP4725

To achieve 4bit DADC / "virtual MSO" Connect Arduino Uno to MCP4725, and latter to scope analog probe (1X).

Pick suitable range and offset for PicoScope input. For example I did choose +-2V. Analog offset -2.5V. On Arduino mapped DAC to 0...16 values using

dac.setVoltage(map(dLevel, 0, 15, 485, 3560), false);

This gives approx -1.9V to 1.9V on scope.

Define custom probe y=4x+8 with range 0...16 and possibly custom unit D as (D)igit. This will give approx swing of 0.5D to 15.5D

Define math function floor(x) for input channel. I used channel D so defined floor(D).

Define "bit extractor" math functions:

B0 as (cos((-((((floor(D)/(2^(0)))+(atan(1/tan(pi*(floor(D)/(2^(0)))))/pi))-0.5)+(((((-floor(D)-1)/(2^((0)+1)))+(atan(1/tan(pi*((-floor(D)-1)/(2^((0)+1)))))/pi))-0.5)*2))-1)*pi)+1)/2
B1 as (cos((-((((floor(D)/(2^(1)))+(atan(1/tan(pi*(floor(D)/(2^(1)))))/pi))-0.5)+(((((-floor(D)-1)/(2^((1)+1)))+(atan(1/tan(pi*((-floor(D)-1)/(2^((1)+1)))))/pi))-0.5)*2))-1)*pi)+1)/2
B2 as (cos((-((((floor(D)/(2^(2)))+(atan(1/tan(pi*(floor(D)/(2^(2)))))/pi))-0.5)+(((((-floor(D)-1)/(2^((2)+1)))+(atan(1/tan(pi*((-floor(D)-1)/(2^((2)+1)))))/pi))-0.5)*2))-1)*pi)+1)/2
B3 as (cos((-((((floor(D)/(2^(3)))+(atan(1/tan(pi*(floor(D)/(2^(3)))))/pi))-0.5)+(((((-floor(D)-1)/(2^((3)+1)))+(atan(1/tan(pi*((-floor(D)-1)/(2^((3)+1)))))/pi))-0.5)*2))-1)*pi)+1)/2

Fiddle with GUI to achieve readable visual.

In this example discrete 0...15 test ramp is generated by Arduino.
Actual usage would be listening to Arduino digital input channels converted to DAC output.
Any other source/DAC can be used. Any PicoScope DSO, or other device having similar math capability can be used as listener.
End result will depend on source quality, channel noise, channel bit resolution.
In this case test was done in very high noise environment on 8bit PicoScope 2408B.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Contact lab!fyi