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

#61 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 01:16 PM

worth a try?

Absolutely but tying !sspnd to 3.3V seems a odd considering it's supposed to be an output pin from the USB chip. However, if there are errors in the d/s (page 7 and in the reference designs) and it's actually an input, then it would make perfect sense and it would explain everything except why the breadboard proto works perfectly.

I always found it a bit strange that I've hardly ever seen any erratas at TI.

Thanks!

#62 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 01:21 PM

READ TO THE BOTTOM OF THE THREAD FIRST.

Actually I did, but I didn't understand it but now I see what you mean. Yes, this schematics is wrong in pulling !sspnd high:
http://www.ecp.cc/NOS-USB-DAC.html

Luckily, I'm at work so I didn't blow up anything :lol:

#63 Magpie

Magpie

    Advanced Member

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

Posted 24 April 2012 - 01:23 PM

Did you read to the bottom of the thread? It said the datasheet was right and the tying of the output was wrong. I guess the other thing, is did you try different pcs, usb cables, usb hubs, operating systems?
STEFF Shield High Powered Led Driver shield.

#64 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 01:27 PM

I guess the other thing, is did you try different pcs, usb cables, usb hubs, operating systems?

Not extensively no, I always relied on the fact that the proto works perfectly when connected using the same cable to the same PC but now I'm at a point where I'm ready to question anything.

I'ts a bit like Sherlock Holmes once said: When you've tried everything possible, you must start looking at the impossible.

#65 Magpie

Magpie

    Advanced Member

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

Posted 24 April 2012 - 01:31 PM

I think were back to Shrodingers Cat, Got to go now, I think I am also at the bottom of the ideas barrel.
STEFF Shield High Powered Led Driver shield.

#66 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 05:39 PM

Thissen here mochine is a workinPosted Image

Will return shortly with details, let's just say it was a good thing I never really could let go of the crystal thingPosted Image

#67 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 05:48 PM

Darn, I should have learned by now to hold my horses. The thing just died againPosted Image

Atleast now I know why it does that - the "#/&%/"%#/( oscillator stops!

Now "all" I have to do is find out exactly why it does precisely that...anyway here's what happens:

1. The first hour or so everything works just fine. The crystal shows a nice sine with Vpp=3V @ 12Mhz on my scope and !sspnd is 3.18V, i.e. a logic one.

2. All of a sudden the crystal has a "break through", i.e. goes short (or maybe the other way around) and flattens out @ 3.3V. I use a regular HC-49/S 12.000Mhz crystal with 33pF load capacitors.

The crystal should actually have 30pF load but such small deviation shouldn't matter, should it? And the crystal easily should withstand 3V, should it not?

Note that the very same crystal works flawlessly on my breaboard prototype...

#68 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 07:52 PM

Could be that the chip deliberately shuts down the oscillator circuit as a direct effect of entering suspended mode. However, I was under the impression that the crystal is used to generate the system clock on which the whole chip depends. I also thought that you cant stop a crystal from swinging. Earlier when the thing failed after like an hour, I pulled out the USB cable, quickly replaced the crystal and the re-plugged the cable. Then the unit worked well for another 30 minutes before failing the same way again, i.e. flat-lined crystal signal and no !sspnd. When performing another couple of tests just now, the crystal kept swinging even though !sspnd went down and the chip failed. This would indicate that the oscillator is not shut down as part of suspended mode and that it's not really the crystal that fails but instead maybe an internal circuit that derives the clock from the crystal This could be due to all kind of things and so in this case I would pretty much be back where I started. This is all getting very confusing to me. When looking at the block digagram for the USB chip, it shows that the crystal is used for deriving a 96Mhz internal clock via a PLL and this seems to be the only clock used (or maybe system clock is simply not shown). Also the !sspnd is not only associated with the USB protocol but with the "power manager" too so maybe it all has something to do with over/under voltage. This could in turn be the result of some design flaw on my board. Attached File  block.JPG   61.71KB   26 downloads I'm currently testing the board from my EeePC running on battery which should give a smother power supply. Bam! There it went down but crystal is still running. EDIT: Removed schematics.

#69 Magpie

Magpie

    Advanced Member

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

Posted 26 April 2012 - 02:52 PM

Hi Hanzibal
I looked at the schematic and I was wondering why you're running in Bus powered mode.
Or is it bus powered mode unless the jack is plugged in?

Have you tried it in Self Powered mode?

Have you derived your circuit from fig 32?

Typical Circuit Connection 1 (Example of USB Speaker)
Figure 32 illustrates a typical circuit connection for an internal-descriptor, bus-powered, 500-mA application.


STEFF Shield High Powered Led Driver shield.

#70 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 26 April 2012 - 04:14 PM

Hi Hanzibal
I looked at the schematic and I was wondering why you're running in Bus powered mode.
Or is it bus powered mode unless the jack is plugged in?

Have you tried it in Self Powered mode?

Have you derived your circuit from fig 32?

Hi Magpie!

Thanks for taking a look at the schematics.

The jack is for high power supply to a possible amplifier that can be optionally connected to header JP1. These power lines are not connected to the rest of the board.

Therefore, in order for the board to operate on its own, it is powered from USB 5V and so the chip is configured in "bus powered mode". The board is designed for this so I can't really try self powered mode using this board.

Remember I have a logically equivalent breadboard prototype working flawlessly in the exact same configuration.

The circuit has been derived mostly from a combination of figure 33 and 34 but extended with stuff of my own design. In figure 32, a different chip is used.

#71 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 27 April 2012 - 12:01 AM

I soldered on remaining components and connected to an amplifier board in order to create the exact same scenario as with the breadboard prototype. As usual though, the board worked perfectly for about 30 minutes and then !sspnd LED went off. The good thing is that everything but the USB chip works just great - headphone output, headphone detector, LEDs, analogue filters, IR-receiver, HID commands (SPI), descriptor programming (SPI), amplifier control (I2C) and I2S audio. Anyway, here's a photo of the fully populated Frankencat: Attached File  frankencat.JPG   119.34KB   41 downloads Tomorrow I will get some 22pF and 47pF crystal load capacitors and try those. If that doesn't help, I've decided not to go any further with this board. Instead I will design a new and somewhat different PCB and continue with that. I've removed the schematics now since it's likely flawed somehow. Thank you Magpie for all your help, suggestions, advice and support this far!.

#72 Magpie

Magpie

    Advanced Member

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

Posted 27 April 2012 - 01:06 AM

No worries, I guess one other thing you could try is contact Texas support directly. They may be able to spot the problem in 5 minutes. If you can be bothered it would be interesting to see if the chip works better in self powered mode. I was thinking that you would have a local supply anyway because of the power amp.
STEFF Shield High Powered Led Driver shield.

#73 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 27 April 2012 - 07:24 AM

They may be able to spot the problem in 5 minutes.

Yes, I could supply the schematics to them.

I was thinking that you would have a local supply anyway because of the power amp.

Initially that was my plan but then I decided that the board should be able to work when only connected to USB. You still have the headphone amplifier running when on USB only. This way this midway board is not useless on its own. Being able to do both would require extra circuitry adding more points of failure.

If you can be bothered it would be interesting to see if the chip works better in self powered mode.

This is tricky since some pins for configuring this are hardwired and doing it on the breadboard proto would be pointless. I've looked at the 5V supply with the scope and its ok and I've checked by measuring supply triggering on !sspnd going low (i.e. when the chip dies):
Attached File  triggered.JPG   16.41KB   14 downloads
As you can see, nothing happens with the supply when !sspnd goes low.

#74 Magpie

Magpie

    Advanced Member

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

Posted 27 April 2012 - 09:11 AM

Wish I had a storage cro, maybe next year. re: Changing power modes I can see your point, it would be a significant hassle and little chance of reward.
STEFF Shield High Powered Led Driver shield.

#75 Magpie

Magpie

    Advanced Member

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

Posted 27 April 2012 - 12:59 PM

Hey Hanzibal I noticed that there is an evaluation board for this chip. There is a photo and it's seems similar to yours. over at TI. But you can't download the datasheet for the eval board. Which is a problem.
STEFF Shield High Powered Led Driver shield.

#76 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 27 April 2012 - 08:52 PM

Hey Hanzibal
I noticed that there is an evaluation board for this chip.
There is a photo and it's seems similar to yours. over at TI.
But you can't download the datasheet for the eval board. Which is a problem.

Great, I'll have a look. I kind of know one of the guys at TI and maybe he can supply the schematics and/or datasheet.

EDIT: See what you mean about the user guide not being available (HTTP 404). Usually these guides contain schematics. I'll write them and ask what gives. Funny I haven't thought of looking at this sooner. Well, I have a saying about these things: "What's not in you're head, you must have in your legs and what's not in your legs, you must have in your wallet".

EDIT: At least some good news - the board works significantly better with the 47pF crystal load caps. The board has now been working perfectly for almost two hours and counting...

Currently listening to the beautyful Deadmau5 – Strobe on Spotify - check it out.

#77 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 27 April 2012 - 11:44 PM

Just got a a new world record for the board using 47pF caps - more than 2 hours and 30 minutes straight and also the board needs to rest a much shorter time in order for it to function a good while again.

Even though this is very positive indeed, I doubt the solution is to simply keep installing even greater caps, there must be some other flaw present that explains why the board works better with greater crystal load caps. The question still lingering is: What exactly?

Could be that dual ground planes was a really bad idea or something else in terms of generally bad physical layout.

I wrote TI about this whole thing and I think I'll wait and see if/what they think before moving on.

#78 Magpie

Magpie

    Advanced Member

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

Posted 28 April 2012 - 01:56 AM

Good to hear that it can play a whole album now. The good thing is that it's been a good learning experience for you and also for me. My experience with crystals is still basically zero, just put them in and dont worry about them. So I will be interested if you do finally work out what is going on. Bear in mind my scant knowledge of crystals when you read the following. One thing that seems strange is shouldn't the crystals dc offset be about half of the logic voltage? I am just saying this because I thought I read it somewhere and if you look at the block diagram, one pin is connected to a logic gate output, so you would think that it has a square wave on it. You said it was 3V on a logic level of 3.3.
STEFF Shield High Powered Led Driver shield.

#79 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 28 April 2012 - 11:08 AM

One thing that seems strange is shouldn't the crystals dc offset be about half of the logic voltage?
I am just saying this because I thought I read it somewhere and if you look at the block diagram, one pin is connected to a logic gate output, so you would think that it has a square wave on it.

This is what it looks like when measured on the one crystal leg connected to XTO of the chip:

Attached File  oscillator.JPG   117.27KB   21 downloads

It's a nice 12MHz sine wave with ~3V peak to peak and ~1.5V DC offset. The image says 11.90MHz but that is likely due to inaccuracy in the frequency calculation algorithm of the scope and not actual frequency deviation. The HC-49/S crystal is specified to some +/-50ppm frequency deviation satisfying the max +/-500ppm required by the chip.

My earlier experiences of crystals are like yours, i.e. just put it there and don't have think about it again. My guess is that the board introduces some stray capacitance in it self due to its form factor.

#80 Magpie

Magpie

    Advanced Member

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

Posted 28 April 2012 - 11:40 AM

It seems that spotify can't licence in Australia at the moment. The music powers that be dont want any competition.
STEFF Shield High Powered Led Driver shield.




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.