Cheap C-Media (?) sound card
This USB sound card that presents itself as C-Media is one of the cheapest sound cards available with price $1.1-$2 depending on vendor.
Device markings: HX2010-0705, production date 40th week of 2013 (or later?).
Device enumerates as composite device: sound card + HID input. HID input
part is used for audio volume and mute control and it functionality is slightly
broken - same as with multimedia keyboard it controls default sound card settings,
not necessary settings for this specific device.
USB descriptor dump:
VID=0x0D8C PID=0x000C Product string: C-Media USB Headphone Set Audio Device Class + HID (composite device)
Judging by the descriptors chip inside is identical as in previously described "C-Media" sound card version without any control keys.
Unlike the previous "C-Media" USB sound card I've tested and similar card from
this thread it was easy to find
point where DC signal component is not blocked:
Notes:
- audio input is mono and two "live" contacts of mic jack are physically shorted together; DLL is intented to
be generic (handle stereo cards also), but 2nd channel can be disabled (i.e. hidden) in GUI:
- according to device properties reported by Win7 it offers 44100 and 48000 Hz sampling
- there is 2.23V voltage (DC offset for ADC) on the C6; output impedance of this offset source is relatively high - short-circuit current is 20uA; adding 120k resistor in series reduces it to 8uA
- resistor in series (I've used 120k and software is calibrated for it by default) seems like the cheapest way to extend measured voltage range to 0-6V; noise measured in this configuration = 20mVpp
- make sure to disable AGC and set fixed volume (by default plugin is calibrated for Volume = 0) for sound input associated with card (Win7 below):
- C6 capacitor has to be desoldered - its measured capacity is 80nF and it is connected with power supply for mic thus it would severely limit usable frequency range if we'd use additional resistor in series
Beware that with this simple setup oscilloscope input would be equivalent to 2V voltage source with 250k resistance in series. It may be not suitable for circuits with e.g. weak pull-ups. Input buffer would fix it but I'm not considering it economically justified as base STM32F103 board that doesn't have this problem (and is usable with miniscope v2c firmware/DLL) costs ~$4.
Other approach to building input stage: http://www.epanorama.net/newepa/2012/05/08/usb-soundcard-to-digital-storage-oscilloscope (I haven't tested it yet but it's simple and looks promising).
Don't judge a book by its cover (thanks to Daniel Montalvo) - it looks like othes type of sound card is sharing almost the same package:
I'm not sure at the moment if it is able to process DC voltage. Since case is easy to open I think it might be worth asking seller for PCB photo before buying particular card.
Calibration and settings window:
Settings window allows to define voltage per bit and offset (in raw units) that would be applied to raw data.
Default calibration settings are intented to result 0-6V range (*) when connected with 120k resistor in series and setting Volume to 0 in Windows 7.
For fine/final calibration use separate calibration function available in GUI (allowing calibrating each channel separately).
* Actually negative voltages can be measured also
Example traces:
complex waveform (generated with miniscope v2d AWG):
20Hz square
4kHz square (as a rule of thumb digital oscilloscopes are useful up to 1/10th of sampling frequency)
Download:
- Initial release:
dsoundscope.dll + miniscope v4 (binaries)
dsoundscope.dll (source) - Version 1.2
dsoundscope.dll + miniscope v4 (binaries)
dsoundscope.dll (source)- quick fix for crash when using sampling buffer size that is not multiple of 1/10th of sampling speed (1/10th of sampling speed is buffer size supplied to DirectSound); it is causing continuity loss (visible when recording) so using buffer sizes matching sampling grid is recommended at the moment (e.g. 4410 or 8820 for 44100 sampling)
- device settings: "Enable extra logging" (enabled by default - relatively heavy logging showing timing for data flow)
- Version 1.3
dsoundscope.dll + miniscope v4 (binaries)
dsoundscope.dll (source)- fixed data loss on frame boundary when buffer size was not multiple of 1/10th of base sampling speed; simpler and more flexible (sampling buffer vs DS buffer) DirectSoundScope::DataRcvCb() function
- updated GUI to miniscope 4.00.17
Back to DsoundScope
See also:
- miniscope v4 - oscilloscope GUI. Downloading it is required to build library from sources (which requires Turbo C++ Explorer or similar "Borland" IDE - I haven't made MinGW version of library at the moment)
- miniscope v2d - STM32F3 PC/USB oscilloscope with arbitrary waveform generator which I\'ve used in these tests