Open-source USB interface: Audio Widget - Page 104 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 31st January 2012, 01:49 AM   #1031
diyAudio Member
Join Date: Apr 2011
Hi Oneoclock,

Excellent results :-)

Btw is the audio-widget still USB powered in your listening tests?

  Reply With Quote
Old 31st January 2012, 02:27 AM   #1032
1audio is offline 1audio  United States
diyAudio Member
Join Date: Mar 2004
Location: SF Bay Area
Blog Entries: 4
I think it looks good. Check the power dissipation to make sure nothing is stressed. Also check the collector current and the base current in Q1 against the datasheet to be sure you are in the max beta range and look at the noise curve for the device. I'll play with it myself tonight.

Of course nothing beats building and testing.
Demian Martin
Product Design Services
  Reply With Quote
Old 31st January 2012, 07:01 AM   #1033
diyAudio Member
Join Date: Apr 2011
For audio-widget Linux users:

1. To enable non-root access to the audio-widget, create this file:

alex@alex-Aspire-4750:/etc/udev/rules.d$ cat 99-softrock.rules

SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="16c0",ATTR{idProduct}=="05dc", MODE="0666", GROUP="softrock", SYMLINK="softrock"
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="16c0",ATTR{idProduct}=="03e8", MODE="0666", GROUP="softrock", SYMLINK="softrock"

After reboot you will have user space privilage. You can either make your user id part of the softrock group, or you change "softrock" to "audio" and make sure your user id is part of the audio group.

2. For user land access to flash the widgets, add this:
alex@alex-Aspire-4750:/etc/udev/rules.d$ cat 99-avrtools.rules
# ICE50:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2101", MODE:="0666"

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2103", MODE:="0666"

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2104", MODE:="0666"

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2105", MODE:="0666"

# STK600:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2106", MODE:="0666"

# AVR Dragon:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2107", MODE:="0666"

# RzUsbStick:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="210a", MODE:="0666"

# QT600:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2114", MODE:="0666"

# QT600P:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2116", MODE:="0666"

# Add support AT32UC3A0128 AT32UC3A0256 AT32UC3A0512
# AT32UC3A1128 AT32UC3A1256 AT32UC3A1512
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2ff8", MODE:="0666"

# Add support AT32UC3A3256
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2ff1", MODE:="0666"

# Add support AT32UC3B0128 AT32UC3B0256 AT32UC3B064
# AT32UC3B1128 AT32UC3B1256 AT32UC3B164
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="03eb",
ATTRS{idProduct}=="2ff6", MODE:="0666"

3. Add the last two lines to:

alex@alex-Aspire-4750:/etc/security$ cat limits.conf
# /etc/security/limits.conf
#Each line describes a limit for a user in the form:
#<domain> <type> <item> <value>
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
# - NOTE: group and wildcard limits are not applied to root.
# To apply a limit to the root user, <domain> must be
# the literal username root.
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
# - chroot - change root to directory (Debian-specific)
#<domain> <type> <item> <value>

#* soft core 0
#root hard core 100000
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#ftp - chroot /ftp
#@student - maxlogins 4
@audio - rtprio 99
@audio - memlock unlimited

This will give your audio software/driver real time priority.

4. This is my pulse/daemon. Change the line of "default-sampe-rate" to your favorite sample rate, eg 44100 or 48000 or 96000 or 192000 etc. Pulse will resample other sample rates to this default rate.

alex@alex-Aspire-4750:~$ cat .pulse/daemon.conf
# This file is part of PulseAudio.
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out. Use either ; or # for
## commenting.

; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

resample-method = speex-float-8
; enable-remixing = yes
; enable-lfe-remixing = no

flat-volumes = no

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 1000000

default-sample-format = s32le
default-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right

default-fragments = 8
default-fragment-size-msec = 8

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0

  Reply With Quote
Old 31st January 2012, 08:53 PM   #1034
diyAudio Member
oneoclock's Avatar
Join Date: Oct 2010
Alexlee188: The circuits are powered directly from USB without problems.

1Audio: From what I've tried the saturation would occur with 20 to 10 Oh. approx. If you could simulate it and check with datasheed would appreciate it if I had been wrong.

2N3604 simulation for peak current of 100 mA: Vbe from 0.66V now go to 0.71V
Ie 0.88mA to 8.8mA
Ib 3uA to 30uA
Vce 0.73 V to 0.74 V
0.65 mW to 6.5 mW.

I have made ​​the circuit with BC560C and BC550C because I have at home.
Gives the same simulations and gives lower noise datasheed specifications.
  Reply With Quote
Old 1st February 2012, 01:13 AM   #1035
1audio is offline 1audio  United States
diyAudio Member
Join Date: Mar 2004
Location: SF Bay Area
Blog Entries: 4
Look at the detailed data sheet for the the 2n3904 and you can learn a lot about optimizing for the device. In this case the source resistance is 1K but the Z is essentially zero. If you look at the noise curves they suggest optimums for different source resistances. The beta curve is pretty flat up to 20 mA.

Jjust to see I tried replacing Q2 with a much bigger device D45H11 (the one in the database) and loading up to 1A. The dissipation goes up but it would all still work and the noise goes down, 20 mW for Q1 and 1.9W for Q2 w/ r3 at 2200 Ohms. Q1 goes up to 25 mW w/ 100 Ohms for R3. They all work so I don't think there is a right answer, there are plenty of options.

Making a shunt from this will be an interesting exercise. Sketch later today.
Demian Martin
Product Design Services
  Reply With Quote
Old 1st February 2012, 01:37 AM   #1036
1audio is offline 1audio  United States
diyAudio Member
Join Date: Mar 2004
Location: SF Bay Area
Blog Entries: 4
Default Shunt regulator

Here is a shunt variation on the basic concepts. Seems to work in the simulations.
Attached Images
File Type: jpg Shunt.JPG (54.0 KB, 391 views)
Attached Files
File Type: asc shunt noise filter.asc (2.6 KB, 18 views)
Demian Martin
Product Design Services
  Reply With Quote
Old 1st February 2012, 08:15 PM   #1037
diyAudio Member
oneoclock's Avatar
Join Date: Oct 2010
For 5mA optimum is R=150 to 200Oh.
For 8mA R=100 can not be far from optimal.

It is very difficult for me measure the noise directly. But I put an indirect measure that can guide relatively in comparison to others about the noise.

Is a Test-J signal wich 229 Hz tone.

Click the image to open in full size.
Blue: DA10 Lavri.
Yellow: New Apogee Duet.
Green: AB1.1 Analog R=100Oh
Red: AB1.1 Analog R=2200Oh
The two AB1.1 low-noise source 1Audio to clock.

With the supply analog of 100Oh is more noise than the original 2200Oh. but is very low noise also and lower impedance than original. The two DAC that I put have the lowest noise measures that I have. I have other measures of diferent DAC models but are worse.

Just as the difference sound between the power source LED and TL431 were important, the difference between 2200Oh. and 100Oh is fundamentally more bass, but is small.

It may be important to people prove the other two versions listen and comment it.

The clock power supply is indisputable 2200Oh versión.

I have done simulations of the Shunt supply. That's interesting.

The ideal is with a constant current source. But starting from 5 V. going to be impossible.

Last edited by oneoclock; 1st February 2012 at 08:37 PM.
  Reply With Quote
Old 1st February 2012, 08:39 PM   #1038
borges is offline borges  Norway
diyAudio Member
Join Date: Dec 2003
Location: Oslo, Norway

this is cool stuff! I'll try to put down a layout on the next prototype board. Two questions:

- Do you mind me putting down SMD transistors? (In my experience, draining tin from through-plated holes may be trickier than dropping a blob of tin on an SMD transistor.)

- Which footprint do you suggest for the capacitors? I'd like it if you could send some digikey links etc.

  Reply With Quote
Old 1st February 2012, 09:28 PM   #1039
diyAudio Member
oneoclock's Avatar
Join Date: Oct 2010
I'm no expert. I've done nothing in SMD, and other practically nothing. I have no experience, just a hobby.

But I would put SMD.

The capacitors are not good. The most simple.
Jamicon TK 470uF 25v.
Jamicon | Electrolytic | Low ESR | High Ripple | Capacitors

Last edited by oneoclock; 1st February 2012 at 09:52 PM.
  Reply With Quote
Old 1st February 2012, 10:56 PM   #1040
1audio is offline 1audio  United States
diyAudio Member
Join Date: Mar 2004
Location: SF Bay Area
Blog Entries: 4
Good start. It looks good. Possibly too good. As you can see measurements at this level are quite challenging. The LF noise may not be a function of the regulator. It could be coming from several places making analysis even more difficult. Even with balanced inputs and careful grounding connections the analyzer can create noise from the extra ground return paths.

The tel-tale on the noise would be the width of the base of the 11.025 KHz tone. To get a meaningful measurement I would set as follows:
1) High sample rate for the analyzer, preferably at a different clock range that the source so they do relate.
2) at least 252K bins. I use 16M bins but it can take an hour for an averaged measurement. Avreage 10 times at least.
3) display with a linear frequency scale. The jitter/phase noise will be symmetrical about 11KHz making real jitter and phase noise easy to see. Zoom way in.
4) make a tst with everything connected but not operating to look for stray noises, grounding problems, system residuals etc.

If the power dissipation for the device is OK SMD should be fine. The parts are getting too small for me to deal with but that should not be an issue if you have the assembly side handled. There are SMD versions of the transistors. The resistors are actually a limitation and most smd resistors are not very good. I don't have a recommendation but I'm sure there are many on this forum elsewhere. For the caps I would look for ones with around 50 mOhm esr. Higher will cause problems. A Digikey search yields a number of options. The through hole parts are cheaper and can be had in small quantities. Search on 470 uF at 10V. Pretty much any part would work. They also have Nichicon audio caps, which may make a difference, but not at that value. They could work at 22 uF or 47 uF on the output.
Demian Martin
Product Design Services
  Reply With Quote


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Async 192Khz USB - the SDR-Widget collaborative project SunRa PC Based 5 26th April 2011 07:38 PM
usb audio interface david12 Equipment & Tools 14 10th October 2010 03:58 AM
Cheap Audio Interface (USB?) to PC agm2003 Instruments and Amps 11 16th September 2007 08:48 AM
Open call for suggestions on Open Source DIY Audio Design gfergy Everything Else 1 15th April 2007 08:33 AM
USB Interface Perfect?- Computer Audio fmak Digital Source 3 4th December 2004 11:24 PM

New To Site? Need Help?

All times are GMT. The time now is 07:06 AM.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright ©1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2