K, here is where I am...
- Got a Hantek DS02D15 and have been messing with it for about a week. So far liking it a lot. A 4 chan would be nice but for this price...
- Also got an audio to SPDIF (A2S) converter.
- Also got a SPDIF to audio (S2A) converter.
For a verification test I:
- Set the Hantek signal generator to 2KHz @ 2.4v
- Sent the Hantek signal to the A2S.
- The A2S to the S2A.
Scoped the initial signal from the Hantek and the results of the S2A. The initial signal was a sine wave 2KHz @ 2.5v. The scoped signal from the S2A was 2KHz @ 1v, it looked perfect with no artifacts, 2KHz in and 2KHz out.
For the base test, I inserted the T4.1 prototype board between the A2S and the S2A (with an additional optical cable). For this test:
- I updated to your latest audio library (5 min ago).
- Recompiled and loaded a "SPDIF pass through" app (shown below) and confirmed your library was being used (via the compiler msgs).
- Connected Hantek signal generator (sine wave @ 2KHz/2,5v) to A2S
- A2S to T4.1 SPDIF in.
- T4,1 SPDIF out to S2A.
- Scoped initial signal to A2S and signal out of the S2A.
The 2KHz/2.5v in becomes 1.84KHz out (mostly, sometimes jumping to 2KHz every so often) at 1v and with occasional glitches in the signal.
To "verify" the above test I broke out a brand new T4.1, installed pins, plugged it into a breadboard w/ just a SPDIF in and a SPDIF out connector. No other components. Loaded the same program from the prior test, and then ran the test with the following:
- Connected Hantek signal generator (using sine wave 2KHz @ 2.5v) to A2S.
- A2S to T4.1 SPDIF in.
- SPDIF out to S2A.
- Scoped initial signal to A2S and scoped out of the S2A.
The initial audio signal was a sign wave of 2KHz @ 2.5v and the output signal was a sine wave of 2KHz @ 1v, it looked perfect with no artifacts, 2KHz in and 2KHz out.
The only "real" difference between the prototype board and the breadboard is I did not use the resisters/capacitors as part of the SPDIF transmitter/reciever on the breadboard as were shown in the data sheets for them. I must of messed up something there and will need to disassemble and rebuild (ir just remove them). Once done, I will retest to see if I get better results.
I don't understand the loss of frequency...
So it looks like it is currently on my to fix my "hardware". Once I get that settled and the test results are good, I can go back to evaluating the actual audio signal quality as well as your library changes.
Thanks!
Code:
#include <Audio.h>
AudioInputSPDIF3 spdif3In; //xy=193,232
AudioOutputSPDIF3 spdif3Out; //xy=633,316
AudioConnection patchCord1( spdif3In, 0, spdif3Out, 0 );
AudioConnection patchCord2( spdif3In, 1, spdif3Out, 1 );
#define LED 13
void setup( )
{
AudioMemory( 50 );
pinMode( LED, OUTPUT );
}
void loop( )
{
digitalWrite( LED, HIGH ); // turn the LED on (HIGH is the voltage level)
delay( 200 ); // wait for a second
digitalWrite( LED, LOW ); // turn the LED off by making the voltage LOW
delay( 800 ); // wait for a second
}
// eof
baseline image:
glitchy image: