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

#101 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 06 June 2012 - 02:48 AM

Sorry about the delayed reply here guys.
I'm still working on designing the amplifier board but got myself preoccupied with a commercial USB controlled garage door opener device (does not involve the Netduino).

I saw this video about a few tips for do it yourself production. Might be useful.

Thanks, I'll check it out. It's amazing how far DIY can take you these daysPosted Image

can you be so nice and produce one that can play in Germany too !!!!

Yeah, I play some copyrighted music in that video and got notice from Youtube about that just minutes after publishing the vid so they seem to have some kind of bot that checks against copyrighted material (incredible!) but If you can point me to one or more free Mp3s I'll be happy to make another video for you, ok?

Thanks and best wishes!

#102 Magpie

Magpie

    Advanced Member

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

Posted 19 June 2012 - 01:02 PM

Dont get distracted by paying work, spend more time on your hobby projects. When is the full system coming out?
STEFF Shield High Powered Led Driver shield.

#103 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 27 June 2012 - 06:17 PM

Dont get distracted by paying work, spend more time on your hobby projects.

Posted Image

When is the full system coming out?

Yes I'm sorry it's been a while but I'll pick up the USB Audio device as soon as I've finished the garage door controller.

That one too is a USB device and I was actually done a week ago. On the day of delivery I was stupid enough to connect it to my Onkyo receiver (which has a USB port) to see what would happen. I found out straight away that the Onkyo killed my very nice garage door controllerPosted Image Since then I can't get it to work regardless of how many new chips I solder into itPosted Image

#104 piwi

piwi

    Advanced Member

  • Members
  • PipPipPip
  • 114 posts
  • LocationGermany

Posted 28 June 2012 - 05:42 PM

Hi Hanzibal, I've got some copyright free music but can't get it uploaded. It a little bit too much. The file is about 2.85 MB. If you could give me a tip how to get it to ye' I'll be happy to do so :) Cheers, Peter.

#105 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 29 June 2012 - 12:38 AM

I've got some copyright free music but can't get it uploaded. It a little bit too much. The file is about 2.85 MB.

Hi piwi!

Really love your enthusiasm about this, it does not make Jack a dull boyPosted Image

It would be no problem for me to find some free music (mp3 or other) and make a demo video using that, it's only that my daughter sleeps at night (while I don't since that's the only time I have of my own) and I don't want to wake her up (bad thing).

However, now she's fast asleep and I'll try and do something quick, so wait a couple of minutes...

EDIT: The vid is uploading as I speak so be patient.

#106 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 29 June 2012 - 02:16 AM

Piwi, here's the "free muzak" version demo video of the Frankencat USB Audio device. And btw, the word I was looking for was S/P-DIF...silly me.

http://www.youtube.com/watch?v=NZtNg7tMtuY&context=C301fe02ADOEgsToPDskLvEzUHp9kyReYAorSKPVbM

This demo also shows an active subwoofer connected to the Frankencat and demonstrates the subwoofer gain control of the remote along with all the regular navigation controls and how they interact with a music player application on a Windows machine, VLC in this case.

I admit to be looking drunk or something in the video but that's because I get confused from trying to look through the camera and directly onto the board simultaneouslyPosted Image

Cheers!

EDIT: Piwi, if you like me to play a particular song, email it to <nick>_at_gmail.com.

#107 piwi

piwi

    Advanced Member

  • Members
  • PipPipPip
  • 114 posts
  • LocationGermany

Posted 30 June 2012 - 03:58 PM

Hi Hanzibal, this is awesome. :rolleyes: How can i get such a board ? I send the food for your cat. Two flavours. Question, what do you think about the idea to extend it to have it fed by some air play through wifi or xbee or .... ? Just to make a wireless speaker for example, just to put it out on my terrace plug it into some power and stream from pretty much any source available ... I know there are commercial products out there, but where is the fun it that ... except for the parties of course ... Thanks again for the vids. Cheers, Peter.

#108 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 30 June 2012 - 09:42 PM

this is awesome. :rolleyes:

How can i get such a board ?

Thank you very much sir! Well, you get one from me when it's finished Posted Image I'm working on integrating the usb audio board with the amp. The amp used in the vid is about 200 USD which is far too expensive. The final Frankencat would probably be something like 60 USD including PCB(s) and all the parts as a self assembly kit.

I send the food for your cat. Two flavours.

Thanks, I got them and they both play well. I'll make a vid of the smaller one (really nice btw) but it won't tell you much since the sound quality will be limited to that of the iPhone/Youtube-combination, which is poor to say the least.

What I can tell you is that, while a 256kbps mp3 means good quality sound (256 * 1.024 = 262.144 bits per second), it's not much in comparison to the 16bit@48kHz = 2 * 16 * 48.000 = 1.536.000 bits per second (DVD quality) that the Frankencat is theoretically capable of. You can of course play even better stuff on your PC but it would be transcoded into 16bit@48kHz.

The Mp3 music format uses a trick to manage destructive compression (i.e. compression that doesn't result in an exact copy after decompression) with relatively low loss in common user experience. The trick is based on things specific to the function of the human ear which allows the algorithm to skip certain details that most of us can't hear anyway. This and the fact that mp3 normally has a lower bit rate on parts of the song that doesn't drastically change over time while the bit rate increases when the is a lot of variance or energy in the song.

So given a maximum bit rate of 256kbps, the algorithm uses a relatively lower compression ratio on low-variance parts and a higher compression ratio on high-variance parts up to a maximum of 256kbps. I believe this is called variant bit rate (VBR) and there's also something called CBR meaning constant bit rate where bit rate is constant at all times during the song.

I think that the 256kbps file you sent is a VBR, meaning that the maximum bit rate can be 262.144 bits per second.

Question, what do you think about the idea to extend it to have it fed by some air play through wifi or xbee or .... ? Just to make a wireless speaker for example, just to put it out on my terrace plug it into some power and stream from pretty much any source available ...

Personally, I think it's a wonderful idea and I've actually been thinking in that direction too, but it would fit better in old sleeping project of mine:
http://forums.netdui...using-the-mini/

The device in that project operates completely on itself and does not require a PC but plays mp3, Flac, Ogg Vorbis and WAV files stored on SD card. Add a WLAN module, implement Air Play on the mini and fit it all together with an amp inside a speaker!

It's based on a chip that is capable of 16bit@192kHz audio which would yield 6.144.000 bits per second. However, due to the speed limitations of the Netduino (and poor availability of higher bit rate mp3s), I've only managed to play 320kbps mp3 CBR on it. I could probably push it higher but I don't have that kind of files. As most of us don't, the higher speed is of little practical use in my opinion.

There are formats around to allow for 48bit@384kHz or maybe even "better" but I think those are way beyond human perception and mainly used by professionals for studio master recordings and such.

EDIT: I'm not sure that what I write here is a 100% accurate but let's say 90% so you maybe want to look it up on Wikipedia.

#109 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 03 July 2012 - 10:10 PM

Hmm...It seems I finally got the stupid garage door controller working... However, now I've stumbled on another payed project which could mean hundreds and possibly more devices. I couldn't really say no and I'm actually quite excited about it. It's kind of a spin-off from the garage door thing and I'll tell you more about this later on. I will continue to work on this project too, I really want to finish it and I know at least a couple of you guys would want that too. Sorry for the further delay that this may cause and I hope I'm not being too much of a disappointment. Cheers!

#110 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 04 July 2012 - 11:08 PM

Btw, here's a swedish forum post about the garage door controller if anybody is interested (there's a few pictures and a video in English).

#111 TinkeringTurtle

TinkeringTurtle

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 20 August 2012 - 07:57 PM

Olimex can spin up a couple of boards for under 40 Euros.

Good tip.

#112 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 30 August 2012 - 11:23 AM

Again, sorry about the delay this far and regretfully, further delays are to expect. I still mean to complete the project but right now I can't say just when that will be.

#113 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 14 September 2012 - 11:21 AM

While waiting I was wondering what you guys think about a few decision points I face in this.

I plan to have two equally sized boards so that you can stack one on top of the other. For this, the USB audio board itself need only smaller adjustments but I need to think the whole design through so that I don't close the door altogether for any future extensions. If you guys have a minute, please read on.

#1. One of these two boards is the existing USB audio board covered earlier in this thread. This one has a 2 x 5 pin standard IDC connector with all the pins (and a few more) needed to control #2 below.
Attached File  frankencat.JPG   119.34KB   10 downloads

#2. The other board is an amplifier board which I still haven't made but intend to

The USB audio board (#1) is what you call "self powered" meaning that it feeds off the USB 5V of your PC. This board also has a 3.3V regulator which is used to power the logic of the amplifier board (#2). The power stage of the amp (#2) is feeds off an external source (some 26V) and can draw up to 3A.

A. Today #1 has a 2.1mm barrel connector that goes straight to the IDC-connector towards #2 and powers an amp eval board from T via flat cable. I think the barrel connector of #1 can stay but #2 shouldn't use it but have its own barrel connector for the 26V.

B. Today, the 10 pin IDC of #1 contains the following pins/lines:
* The 4-wire I2S bus with USB audio coming from the on-board receiver chip.
* The 2-wrie I2C bus to coming from the Netduino mini used to control the amp (config, volume, etc)
* The two wire power lines coming from the on-board 2.1mm barrel connector
* Two power lines (gnd and 3.3V) for powering amp logics.

I'm thinking of constructing #2 equally sized as #1 and also use it as a general purpose board for various audio applications. Therefore I'm also thinking of designing a kind of generalized bus based on regular dual row headers. The idea is to design this bus so that I can stack these equally sized boards on top of each other so there should be a fair amount of extra pins that aren't used by #1 and #2 today but may be used by future #3, #4, etc. (possibly in combinations with #1 and/or #2).
Attached File  stacked.JPG   114.93KB   11 downloads


Any ideas or thoughts on this?

#114 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 08 February 2013 - 09:00 PM

Hi "everybody" ;-)

 

This is just to say I have not, even for a second, forgot about this project. As it were an excuse and as things turn out, I've been very busy doing all kinds of stuff for money (we all need it right) plus I have a day job. Anyway, I've learned tons of things since I started this project so on the other hand,  circumstances are good for creating a better "Frankencat" than I originally set out to do.

 

Anyway, I really want to return to this project and finish it. Hopefully, some of you guys would still be interested in getting a board.

 

Thanks!



#115 Magpie

Magpie

    Advanced Member

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

Posted 03 March 2013 - 08:00 AM

Hi Hanzibal

I did say I wanted a board but money is a bit tighter these days than last year. But I wont say a definite no as my music is gradually moving to hard disc, and your system could be useful. But I have a few unfinished things I need to do, so a new project is not high on the list.

 

Did you ever get to the bottom of your Crystal problems or did the oscillator just fix everything? I will probably lay out a board with a crystal soon. I normally just get an internal oscillator on the chip.


STEFF Shield High Powered Led Driver shield.

#116 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 03 March 2013 - 11:51 PM

HI Magpie! No worries, naturally you are not in any way obligated to anything simply because you once said you might be interested. Also, given the amount of time you put in helping me, I should be giving you a board. About the crystal, I concluded that the problems where due to pins left floating that should not have been. I didn't see any real reason to go further since the board has worked very well ever since then. I actually use the board quite regularly, got it hooked up to my PC with a pair of monitor speakers and an active sub. Still love the sound :) Nice to hear from you again Magpie!

#117 Magpie

Magpie

    Advanced Member

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

Posted 09 March 2013 - 01:43 PM

Hi Hanzibal

 

On the subject of Oscillators here is a short app note on them. It seemed pretty good. Apart a typo on one of the schematics, where L1 uses a capacitor symbol.

 

http://www.euroquart.../tech-notes.pdf

 

I didn't find to much talk on symmetry though.


STEFF Shield High Powered Led Driver shield.

#118 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 09 March 2013 - 03:18 PM

Thanks, I'll have a look since I'm bound to bump into those problems again sooner or later. From my own bad experiences, oscillators can be quite tricky at times. I think most chips can be driven by a clock on OSC0 with OSC1 tied to ground. Programmable clock modules can be costly but on rare occasions a neighbor chip might have an appropriate clock output (sometimes even programmable). I read somewhere about a new type of oscillator (can't remember where or what it's called) that is more exact and less sensitive than traditional crystal tech but I suppose those aren't exactly for free either. For single boards or prototyping, price doesn't really matter but when it comes to volume, every penny suddenly counts. Surely, ceramic resonators are less exact but they are much cheaper. I used one of those for a USB board recently and it works perfectly in that application plus you don't need external capacitors to ground thus reducing component count, space and cost.






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.