## Analog Digital Analog converter with math channels

Post discussions on projects you are working on
lab!fyi
Newbie
Posts: 0
Joined: Mon Dec 12, 2016 6:58 pm
Contact:

### Analog Digital Analog converter with math channels

Since many of the MSO digital channels are often unused it is possible to construct math channel based ADAC and gain additional analog channel(s). Results will depend on external hardware. Simple and precise power supply measurements could be done even with Arduino Uno.

Using 2205 MSO I have done following so far:

12bit ADAC using Arduino Due as 7MSa/s pattern generator producing 12x12bit sine wave.
Math formula: LowPass((2048*D11+1024*D10+512*D9+256*D8+128*D7+64*D6+32*D5+16*D4+8*D3+4*D2+2*D1+1*D0)/4096, 100000)-0.5
8bit ADAC using Arduino Uno R3 as voltmeter listening to PSU voltage with analog pin & resistive voltage divider:
Math formula: LowPass((128*D7+64*D6+32*D5+16*D4+8*D3+4*D2+2*D1+1*D0)/256, 100000)*14.7
Last number is tweaked according to voltage divider (Do not exceed Arduino 5V input!)
Picture of test setup connected to Arduino Uno and Agilent UT1272A as control provided.
Useful feature is that there is no noise which is often present on just analog channel. Can rig it up to form even 2 additional 8bit analog channels. I have no pattern generator or ADC fast enough to see what is practical bandwidth with all analog and digital channels in use.

Currently I use 100kHz LowPass to remove random peak glitches. When pushing for speed records this should be removed or reset to higher frequency.

If there is time skew due to Arduino processing time you can create time-skewed copies of real analog channels using formula X[T], for example A[-0.000001] should delay analog by 1 microsecond. Least possible step is 1ns AFAIK.

Arduino sketches attached for both scenarios:

Martyn Posts: 3760
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

### Re: Analog Digital Analog converter with math channels

Looks interesting Martyn
Technical Support Manager

lab!fyi
Newbie
Posts: 0
Joined: Mon Dec 12, 2016 6:58 pm
Contact:

### Re: Analog Digital Analog converter with math channels

New improved ADAC and test pattern generators for Arduino Uno & Due:
LowPass((128*D7+64*D6+32*D5+16*D4+8*D3+4*D2+2*D1+1*D0)/256/0.996,15000)*4.8
LowPass((128*D7+64*D6+32*D5+16*D4+8*D3+4*D2+2*D1+1*D0)/256/0.996,15000)-0.5
LowPass((2048*D11+1024*D10+512*D9+256*D8+128*D7+64*D6+32*D5+16*D4+8*D3+4*D2+2*D1+1*D0)/4096/0.9998,175000)*3.33
LowPass((2048*D11+1024*D10+512*D9+256*D8+128*D7+64*D6+32*D5+16*D4+8*D3+4*D2+2*D1+1*D0)/4096/0.9998,175000)-0.5

Note that formulas are not optimized (...4096/0.9998... etc), this to give clear picture what does what.
Last edited by lab!fyi on Thu Jan 12, 2017 1:21 pm, edited 1 time in total.

lab!fyi
Newbie
Posts: 0
Joined: Mon Dec 12, 2016 6:58 pm
Contact:

### Re: Analog Digital Analog converter with math channels

Some screenshots also:

Arduino Uno ADAC listening to signal gen @ 59kSa/s Arduino Uno 2398Hz 8x8bit sine pattern Arduino Due ADAC listening to signal gen @ 687kSa/s, non-time-skewed CH2 for comparison Arduino Due 1456Hz 12x12bit sine pattern