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

#41 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 19 April 2012 - 08:19 AM

I cross-checked traces of the physical board against both the schematics and the working prototype. I discovered that I had swapped two of the USB lines so I soldered up a new board with mods for this. The new board works better, the regulator and USB chip no longer get hot but still no joy :( but I got a few other ideas to test. To be continued...

#42 Magpie

Magpie

    Advanced Member

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

Posted 19 April 2012 - 08:35 AM

Oh well Look on the bright side, your still doing better than me. Olimex apparently posted me my boards a month ago, and I still haven't got them. and I've blown up all my chips in the meantime.
STEFF Shield High Powered Led Driver shield.

#43 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 20 April 2012 - 08:18 AM

Look on the bright side, your still doing better than me.

Maybe but with one major difference - chanses are still good that your board works :)

It's like Schroedinger's cat where my box is opened while your is still not :D

#44 Magpie

Magpie

    Advanced Member

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

Posted 20 April 2012 - 11:42 AM

At least you believe your board exists, mine must be in some sort of quantum state.
STEFF Shield High Powered Led Driver shield.

#45 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 20 April 2012 - 04:33 PM

So in summary, we got two cats, one evidently dead and one whos existance is questionable :-) For what it's worth, I'm going two attempt revival of mine tonight. There's thunder coming so hopefully we shall behold the Frankencat before the break of dawn. Muhahaha!

#46 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 21 April 2012 - 01:11 PM

After more than 15 hours of continuous frustrating and desperate resurrection attempts, operation Frankencat finally succeded just now and I'm very please to announce that my cat is aliiiiiiiiiiiiiiiiiiiiiive!

Turned out that I had managed to shorten two USB pins while soldering the SMD USB mini connector. Should have examined the soldering more carefully with the magnifying glass. Lesson learned - won't do that again, ever, promise, honestly Posted Image

With the exception for a swapped pair of USB data lines mod, the board is actually flawless. Oh, sweet joyPosted Image

In honor of this gruesome night (and the late doctor himself), let it hereby be known to all that this board shall henceforth be known as:

Frankencat



#47 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 21 April 2012 - 02:02 PM

Apparently, happiness never lasts...the board worked for like an hour but now it's dead againPosted Image This could be worse than before since it suddenly just died without me changing anything. Oh well.

#48 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 21 April 2012 - 11:13 PM

Thinking that I might have molested the latest board while tinkering with it, I soldered up another one only to observe the exact same phenomena - it worked for a while and then died. Funny thing is, if I unplug it and leave it be for an hour or so it works for a (shorter) while and then dies again.

Feels like something is building up, but it doesn't get hot or anything. I remember having similar initial problems with the breadboard prototype and back then it turned out to be a bad crystal. Therefore, on the last board, I installed a socket so that I could easily replace the crystal but to no avail.

Oh well, this day has not been totally unfruitful, I ended up with this beautiful three-level "techno art" paperweight:
Attached File  paperweight.JPG   114.93KB   48 downloads
A cat's got nine lives they say. I've spent twenty seven now and got nine more to goPosted Image

#49 Magpie

Magpie

    Advanced Member

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

Posted 22 April 2012 - 12:25 AM

Maybe just power it up when there is a lightning storm. On the good side, it sounds like you haven't damaged any hardware. It's not a software issue is it? Reboot fixes it? probably not but worth asking. Have you got an oscilloscope? With what you said about the oscillator, checking the clock would be a good place to start. You could also check all the pins to look for invalid inputs. Do you have a schematic? And a pcb file I could look at?
STEFF Shield High Powered Led Driver shield.

#50 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 22 April 2012 - 12:56 AM

Have you got an oscilloscope?

Yes and the crystal is producing a steady 12Mhz sine.

With what you said about the oscillator, checking the clock would be a good place to start.

It suddenly hit me, that my oscillator circuitry is asymmetric (!!) thanks to my stupidity in combination with the "auto routing" feature of Eagle. The last couple of hours, I've been experimenting using different lengths of each crystal leg as means of compensation. It's better but still far from stable.

This was just a quick check before going to bed to see if I was finally onto something. In the morning I will solder on a new symmetric oscillator circuit connected directly onto the chip pads and see how that works. I'm pretty sure this is the problem especially when thinking back on the similar problems I had with the breadboard prototype.

Thanks for your support Magpie, I really appreciate it!

EDIT: By asymmetric, I mean that the traces from the chip to each side of the crystal differ in length and that can't be good but could it really be the source of the problem?

#51 Magpie

Magpie

    Advanced Member

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

Posted 22 April 2012 - 08:24 AM

I hope that's it, but it's still a bit strange how it would work for an hour though.
STEFF Shield High Powered Led Driver shield.

#52 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 22 April 2012 - 02:25 PM

I hope that's it, but it's still a bit strange how it would work for an hour though.

This morning I tried it again and now it worked for about half a minute. After letting it rest for 20 minutes, it works for another short(er) while. The longer it rests, the longer it works but never more than maybe 30 seconds max. Actually, I'm pretty sure I was mistaken yesterday when I said that it worked for like an hour.

Here's an excerpt from the board layout depicting the asymmetry of the oscillator with the longer trace is highlighted:
Attached File  board2.JPG   107.61KB   26 downloads
As you can see caps are soldered directly onto to bottom ground plane but the closest ground pin of the chip (forth pad from bottom on the right side) resides on an island which is connected to the bottom plane by a via. The distance from that to the caps could be nearly an inch.

What do you think, could this be the problem?

#53 Magpie

Magpie

    Advanced Member

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

Posted 23 April 2012 - 03:57 AM

Hi Hanzibal
There is a lot of stuff here that I am not very experienced in but ignore that and I will try to give you some extra ideas.

It seems the crystal is ok. If you cant actually get to the clock pulse because it's internal to the chip and the crystal looks good, what else can you do but assume it is good.

I am not sure your decoupling circuitry is correct, but it is hard to see from the photos.
both C5 and C7 according to the reference design should have a 1uF ceramic in parrallel to a 10uF electro. the ceramic should be as close as possible to the pins.
all other ceramics should probably be the very close to their pins as well.
Are they ceramic? some have that baby shit brown colour that they use on tantalum caps.


I guess the standard approach is to debugging digital circuits is.
  • Check all grounds. (Voltages)
  • Check all power.
  • check clock (it seems to be entirely internal, so check crystal which you have done.)
  • check all inputs for irregularity, such as indeterminate logic states, unexpected noise or waveforms, and if you can check the expected logic state is there.
after this it will be circuit specific.

Lastly what I often find is a good way to solve problems that are complicated, is to
start with something that is working and keep adding to it until you add the thing that breaks the system,
this works better than starting with something that isn't working and trying to work backwards.
In your case, did you have a breadboard that does work? does it still work? What is different?

Think to yourself this is where I earn my money. (while you look for needles in a haystack.)

The other obvious place for the problem is in software.

By the way how does it stop working, does the usb driver stop talking?<br><br>
STEFF Shield High Powered Led Driver shield.

#54 Magpie

Magpie

    Advanced Member

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

Posted 23 April 2012 - 05:25 AM

ps. My boards arrived today, now I have to reorder my chips. Then I can see If I have a dead cat.
STEFF Shield High Powered Led Driver shield.

#55 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 23 April 2012 - 12:24 PM

Congrats, really hope isyours alive and kicking! Done quite a few tests regarding the oscillator suspicion which turned I now think to be a dead end. My new high score is about an hour of correct operation. Currently sitting with a USB sniffer program trying to figure out whats wrong. It's bound to be something else, if only I could figure out just what. Good luck with your card!

#56 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 11:31 AM

Sorry Magpie, I didn't see this post until just now.

I've now got a couple of boards that are semi-working in the sense that they work correctly for a while and the suddenly stops. If I put them aside for a while and then try again, they'll be working for a shorter period of time and then stop again. The longer wait between runs, the longer they work. A full night of rest will yield approx 30 minutes of flawless operation.

What acutally happens at failure is that the USB chip suddenly de-asserts its !sspnd output pin signalling that it went down to suspended mode. This would normally only happen when the bus goes idle, i.e. when no audio data has been sent for a while. In reality this happen on very rare occasions (when the PC hybernates or such I think) and should particularily never happen during my tests since I always play music while peforming them. On the breadboard proto, this never happens - it's been running continously for a whole night.

It seems the crystal is ok. If you cant actually get to the clock pulse because it's internal to the chip and the crystal looks good, what else can you do but assume it is good.

Yes, I've pretty much abandoned the crystal track. What I still haven't done is to look at the crystal output at the point in time where the board stops working. A thing that troubles me is that the breadboard proto initally also behaved the way described above but after replacing the crystal I've never seen it happen again ever since. This is why I'm having a hard time entirely letting go of the this crystal thing...

I am not sure your decoupling circuitry is correct, but it is hard to see from the photos.
both C5 and C7 according to the reference design should have a 1uF ceramic in parrallel to a 10uF electro. the ceramic should be as close as possible to the pins.
all other ceramics should probably be the very close to their pins as well.
Are they ceramic?

I've got all the decoupling caps as specified in the reference design. Not all of them are as close to the chip/circuit that one could wish though. They are all ceramic except for the 10uF electrolytic that you mentioned.

I guess the standard approach is to debugging digital circuits is.

  • Check all grounds. (Voltages)
  • Check all power.
  • check clock (it seems to be entirely internal, so check crystal which you have done.)
  • check all inputs for irregularity, such as indeterminate logic states, unexpected noise or waveforms, and if you can check the expected logic state is there.
after this it will be circuit specific.

I've done all of this several times, but I will give it another go just the same.

Lastly what I often find is a good way to solve problems that are complicated, is to
start with something that is working and keep adding to it until you add the thing that breaks the system,
this works better than starting with something that isn't working and trying to work backwards.
In your case, did you have a breadboard that does work? does it still work? What is different?

I've been focusing on differences between the fully functional working breadboard prototype and the actual board. Also, I've been trying to come down to a minimum stripped down working version of the board to build from until it breaks. Regretfully there seem to be no such version. My current version practically only has the USB chip in place and I've removed the Netduino mini, IR-receiver, analogue parts, headphone jack and LEDs. Yes, the board actually runs without the mini, I simply hardwire some pins of the DIP24 socket. However, the problem remains - it works for a while then stops as an effect of the !sspnd being de-asserted.

By the way how does it stop working, does the usb driver stop talking?

I've done some USB sniffing but the logs do not indicate any actual errors, the device seem to disconnect as if I suddenly pulled out the mini USB cable.

Hope you're doing better than me!

#57 Magpie

Magpie

    Advanced Member

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

Posted 24 April 2012 - 12:24 PM

I guess one thing you can verify, is the relationship between uptime and resttime, as you said this is very odd. If you can say that "without doubt" uptime has some repeatable relation with the previous resttime then this should give us a real clue. if you can keep a full record of your projects failure times etc you might see something new. After a switch off is there some pin that holds its charge some how and you can measure it going down very slowly? The other thing I would be interested to know is do you have two of the new boards with the same symptoms?
STEFF Shield High Powered Led Driver shield.

#58 Magpie

Magpie

    Advanced Member

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

Posted 24 April 2012 - 12:58 PM

Hi Hanzibal

I'm hoping this is relevant, I checked the forums on your chip and people are talking about tying the output suspend pin high.

part way down page.

In the datasheet reference design it isn't tied high, and I think some people said it might be an error in the datasheet.

worth a try?
STEFF Shield High Powered Led Driver shield.

#59 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 April 2012 - 01:01 PM

if you can keep a full record of your projects failure times etc you might see something new.

Been thinking the exact samt thing but haven't actually done so yet. I know as much as there's a hysteresis in the sence that I have to wait for a longer timer than I can play. Are you thinking in terms of correlating the behaviour to some known characteristica?

After a switch off is there some pin that holds its charge some how and you can measure it going down very slowly?

Will try this!

The other thing I would be interested to know is do you have two of the new boards with the same symptoms?

Yes, I got two boards and they work (doesn't work) much the same way but one of them seem to work a little longer than the other but I haven't actually measured the difference. They are not entirely identical with respect to what parts are populated though but I can make sure they are and then measure the timings on then.

#60 Magpie

Magpie

    Advanced Member

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

Posted 24 April 2012 - 01:05 PM

Actually just hold off on the tying the pin suggestion. READ TO THE BOTTOM OF THE THREAD FIRST. like I should have.
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.