USB Audio Device - FINALLY WORKS!!
#41
Posted 19 April 2012 - 08:19 AM
#42
Posted 19 April 2012 - 08:35 AM
#43
Posted 20 April 2012 - 08:18 AM
Maybe but with one major difference - chanses are still good that your board worksLook on the bright side, your still doing better than me.
It's like Schroedinger's cat where my box is opened while your is still not
#44
Posted 20 April 2012 - 11:42 AM
#45
Posted 20 April 2012 - 04:33 PM
#46
Posted 21 April 2012 - 01:11 PM
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
With the exception for a swapped pair of USB data lines mod, the board is actually flawless. Oh, sweet joy
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
Posted 21 April 2012 - 02:02 PM
#48
Posted 21 April 2012 - 11:13 PM
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:
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 go
#49
Posted 22 April 2012 - 12:25 AM
#50
Posted 22 April 2012 - 12:56 AM
Yes and the crystal is producing a steady 12Mhz sine.Have you got an oscilloscope?
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.With what you said about the oscillator, checking the clock would be a good place to start.
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
Posted 22 April 2012 - 08:24 AM
#52
Posted 22 April 2012 - 02:25 PM
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.I hope that's it, but it's still a bit strange how it would work for an hour though.
Here's an excerpt from the board layout depicting the asymmetry of the oscillator with the longer trace is highlighted:
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
Posted 23 April 2012 - 03:57 AM
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.
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>
#54
Posted 23 April 2012 - 05:25 AM
#55
Posted 23 April 2012 - 12:24 PM
#56
Posted 24 April 2012 - 11:31 AM
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.
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...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'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 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 done all of this several times, but I will give it another go just the same.I guess the standard approach is to debugging digital circuits is.
after this it will be circuit specific.
- 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.
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.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 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.By the way how does it stop working, does the usb driver stop talking?
Hope you're doing better than me!
#57
Posted 24 April 2012 - 12:24 PM
#58
Posted 24 April 2012 - 12:58 PM
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?
#59
Posted 24 April 2012 - 01:01 PM
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?if you can keep a full record of your projects failure times etc you might see something new.
Will try this!After a switch off is there some pin that holds its charge some how and you can measure it going down very slowly?
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.The other thing I would be interested to know is do you have two of the new boards with the same symptoms?
#60
Posted 24 April 2012 - 01:05 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users