Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

USB Audio Device - FINALLY WORKS!!


  • Please log in to reply
117 replies to this topic

#21 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 March 2012 - 09:08 AM

MiniBoards are available with 2 or 4 copper layers. The size of these boards must be exactly 3.8 x 2.5 inches and each order include 3 identical PCBs is only $51.00 plus about $10.00 for shipping 2nd day delivery. PCBs with full screen component print and soldering mask is about $25.00 more.

They offer a very fast service but at the expence of pricing. The board I need would be 390$ plus shipping for 2 boards while I only payed 62$ at BatchPCB including shipping and print on both sides.

#22 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 24 March 2012 - 11:43 AM

Is it going to work first go? No mods. Of course it is!
STEFF Shield High Powered Led Driver shield.

#23 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 March 2012 - 02:46 PM

Is it going to work first go? No mods. Of course it is!

Inprobable not but not impossible. The wait is frustrating.

#24 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 March 2012 - 10:15 PM

Wee, my BatchPCB order has been panelized and is now being processed. Hopefully, I won't have to wait the full four weeks after all... Meantime, I'll better get busy ordering components!

#25 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 02 April 2012 - 08:26 PM

While still waiting for the first PCBs to arrive (which shouldn't be very long now), I've put together some additional information to reflect some of the design decisions I've made:

  • RS232 TX and RX are broken out to support communication with periphal device(s) like a TCP/IP remote controller or another Netduino
  • TTL level TX and RX are broken out to support in-circuit programming and debugging
  • Both I2C and SPI pins are broken out to support add-ons like a display or whatever
  • Netduino !RESET pin is broken out
  • Both 3.3V and 5.0V power are broken out and can be used to power add-ons
  • One analogue pin has been broken out. This was the only Netduino pin left and could be used, either as "chip select" for the SPI interface or as analogue input to support an add-on such as a VU-meter from the amplifier. I might add some kind of OP construct on the amplifier to output a signal that can be digitized by this analogue pin.
  • TTL level S/P-DIF is broken out to support an add-on in the form of a coaxial or toslink (optical) output that can be sent to a receiver with digital input
  • Software events to detect if and when USB audio reception is established
  • Software events to detect if and when headphones are inserted/ejected
  • Software means of powering down the amplifier
  • Software means of attaching/detaching from USB audio
  • Software means of toggling between amplifier and S/P-DIF output
  • On-board RGB led for indication of power and blinking upon IR activity (red) , USB attached (green) and S/P-DIF enabled/disabled (blue)
  • Software means of adjusting subwoofer output level (internal cut-off frequency is fixed at 300Hz 130Hz)
  • On-board jumper for the internal I2S data line - this can be intercepted and fed to a DSP to implement sound pre-processing such as re-verb or other room effects, etc
  • Decided to use the integrated headphone amplifier, this has 12mW output power which is really enough for every day use (50mW could probably damage your ears)
  • External power supply for the amplifier is 10-26V (3A) and not 8-26V as previously stated
I've been testing the prototype for some time and with real floor speakers (or satellites and an active subwoofer), I think you will be surprised to learn how well it actually sounds Posted Image

When come to think of, this thing can actually transform any old laptop to a hi-fi stereo system that can be used at parties or even at the beach since you could power the amplifier with batteries because it has an efficiency close to 90%. This also means there's virtually no heat dissipation which allows for a really small enclosure. For example, it would easily fit inside one of the two speakers - and tada, you've built you own set of USB speakers.

A pretty cool thing about this is that you can tweak it and develop your own software to do pretty much anything within the limits of its abilities which are not few and can be further extended by h/w add-ons made by you or somebody else.

#26 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 03 April 2012 - 12:44 PM

It sounds really good? I like the sound of that. It's also good that you have had time to test and tweak things, this might take a lot of the headache out for us D class amp usb audio newbies. Is there an easy way to break into the Audio before the D amp? I might want to provide a more traditional set of Audio inputs as well. May the boards come soon.
STEFF Shield High Powered Led Driver shield.

#27 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 03 April 2012 - 01:10 PM

Is there an easy way to break into the Audio before the D amp? I might want to provide a more traditional set of Audio inputs as well.

This particular D amp accepts pure digital audio via I2S only so you won't be able to use an external analogue source for input.

However, there will be a set of jumpers for the four I2S lines before the D-amp to allow for an add-on. Such an add-on could contain a stereo audio ADC with I2S output to be switched via an I2C controlled multiplexer with the signal coming from the USB audio device. This way you could choose between different audio soruces using the remote.

If you want to fit the board inside your NAD chassis, you probably don't want to solder the RGB led, the headphone jack and the other connectors directly onto the board. Rather you'd want to use wires and install these parts in the front panel of your chassis.

#28 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 03 April 2012 - 01:25 PM

Doesn't matter so much music can come out of PC anyway. Digital Radio, mp3s, movies. I probably don't need any more.
STEFF Shield High Powered Led Driver shield.

#29 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 03 April 2012 - 07:07 PM

That was my thought too. Originally, I was planning on doing something similar with this old music player project of mine:
http://forums.netdui...using-the-mini/

But then I thought a USB audio device would be more self comprising and versatile. A music player like that could instead become a multiplexed source add-on. That old project has evolved somewhat since then and now outputs 16bit @ 192kHz over I2S. Also, it has analogue line stereo input sampled @ 48kHz so such an add-on could allow for the analogue input you were thinking about.

#30 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 03 April 2012 - 10:46 PM

What about standard HDMI inputs? Do have any idea if it is feasible to add them?
STEFF Shield High Powered Led Driver shield.

#31 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 04 April 2012 - 10:19 AM

Definitely possible but I believe HDMI is kind of tricky. Not just to solder on a PCB but also because there's some kind of bi-directional negotiation protocol involved between a source and target. The audio is probably just a regular S/P-DIF signal and if so, you should be able to extract it directly from the physical connector. However, it could be that the protocol applies to audio as well and then you would need some intelligence there too. Otherwise you could have one male and one female connector simply running the HDMI signals through while picking up the audio. Maybe you know how HDMI works? EDIT: And then of course, you'd need an S/P-DIF receiver in order to produce an I2S signal that can be fed to the input multiplexer of the amp. This part I have a design for.

#32 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 04 April 2012 - 10:40 AM

I know nothing about hdmi, but I think in the near future I am going to learn.
STEFF Shield High Powered Led Driver shield.

#33 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 04 April 2012 - 11:46 AM

Posted ImageSadly, the audio data is not simple s/p-dif but interleaved in the general data stream of packets:
http://en.wikipedia.org/wiki/HDMI#TMDS
Too fast and too complex for a Netduino to handle but I guess there are dedicated receiver implementations on silicon. Turns out that negotiation uses regular i2c @ 100 kHz though.

#34 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 04 April 2012 - 12:24 PM

I guess it comes down to the fact that the pc is the most versatile source of sound anyway, it can take in a hdmi input and push it down the usb probably.
STEFF Shield High Powered Led Driver shield.

#35 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 04 April 2012 - 07:05 PM

Just got word my PCBs have shipped Posted Image
Probably takes another week before I get them though.

EDIT: Maybe one should consider replacing the DIP24 socket with a Go!Bus interface but I still love the mini for its lack of size.

#36 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 12 April 2012 - 05:55 PM

The PCBs finally arrived and they look really good:
Attached File  pcb.JPG   116.43KB   53 downloads
As you can see, density is quite low so it might be possible to fit the amplifier onto the same board.
I was really lucky and got 4 boards for the price of 2 since they probably couldn't fill the panelPosted Image

First off, I'm going to do some basic conductance tests to see if ground planes are connected, etc. I'm very excited to see if it actually works!

#37 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 12 April 2012 - 08:05 PM

Everything seems okay so I began populating the board:
Attached File  being_populated.JPG   192.87KB   78 downloads
Some parts are soldered while others are just loosely fitted to see how it looks. As you can see, the tantalum capacitors are smaller than their footprints and I will probably have to enlarge the holes for the pins of the power jack.
The Netduino mini looks big Posted Image

Going to Hungary for the weekend but I can't wait to get home againPosted Image

#38 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 17 April 2012 - 12:40 AM

The PCB is now fully populated and I've began testing the unit.

Guess what? It doesn't fully work.
  • The mini works
  • Remote control works
  • Headphone detector works
  • USB audio chip does not work
After a while, the usb chip seem to get hot, no magic smoke but it smells. This also goes for the 3.3V regulator and this is strange since the usb chip does not (or should not) feed from the regulator but directly from the USB bus (it has an internal regulator).

I have to analyze this some more, do some more measurements and run more tests. I was actually hoping for it to work straight away but that obviously turned out to be over-optimisticPosted Image

#39 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 17 April 2012 - 12:20 PM

After a while, the usb chip seem to get hot, no magic smoke but it smells


That's no good.
I know almost nothing about your schematic and I know you probably already know this stuff, but I will throw in my 20 cents anyway just in case there is something that could help.


It sounds like a short somewhere, hopefully not in one of the main chips.
Assuming your circuit design is good.

You can short pins with static.
Or maybe its in the pcb
or your soldering is probably crap (just kidding).

Do you have a current limited voltage supply?
If it is a short you can turn it on at a lower than normal voltage, so you get some abnormal current, say 300mA, but just enough so nothing new is cooked.
And if you have an accurate multimeter you can trace millivolts to find where the short is.

Good luck, (I'm also giving you a bit of moral support just in case the above doesn't help.)
STEFF Shield High Powered Led Driver shield.

#40 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 17 April 2012 - 12:38 PM

I know you probably already know this stuff, but I will throw in my 20 cents anyway just in case there is something that could help.

I am by no means an expert in electronics so I'll try any and all suggestions I can get. My own guess is that there is an errounous trace somewhere in the PCB design. Fortunately I got three more (unpopulated) boards to measure on so it should be possible to track it down. I will try this approach first.

If only I had added som test points....

or your soldering is probably crap (just kidding).

Could very well be. It's kind of hard to verify clearence against a light around the chip because I've got dual ground planes obstructing the light so I might have shorted some pins while soldering.

Good luck, (I'm also giving you a bit of moral support just in case the above doesn't help.)

Thanks, I'll report back on my findings.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.