Pages: 1 [2]   Go Down
Author Topic: Do not follow Simple Audio Player example - DAC0 now non-functional on DUE  (Read 12676 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm still confused as to how exactly we have blown these up. Technically there is only one DAC, it is multiplexed to two sample/hold buffers. So somehow we must have blown the last output transistor. Yet the pin still works fine for digitalWrite/Read. Personally I'm waiting for the Due to be more widely available, then I was going to try overloading DAC1 in a controlled way until it breaks too, to try and find where the limits are.

Incidentally by my calculation it should be possible to get 11 bits at 41kHz from the PWM hardware, and that has 8 channels smiley-grin
Logged


Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34562
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Rather than blow one up which tells you little why not look in the data sheet.
The problem with a distruction test is that it tells you nothing of the situation where it still works but damage is being done so that it has a reduced life time.
Logged

White River Junction, Vermont USA
Offline Offline
Full Member
***
Karma: 5
Posts: 106
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Rather than blow one up which tells you little why not look in the data sheet.

The SAM3X/A datasheet:
Page 1369:
45.5.3 Conversion Performances
  • For performance and electrical characteristics of the DACC, see the product DC Characteristics
    section.

Page 1391:
46.2 DC Characteristics
I(OH) (ISource) for pins in Group 2 (which include the DAC), is -3mA.
I(OL) (ISink) for pins in Group 2 (which include the DAC), is 6mA.

Pins in Group 2:
PA[1-6], PA8, PA[10-13], PA[16-17], PA[20-24], PB[4-7], PB9, PB[12-13], PB[15-21],PB[25-31],PE[10-14], PE16, PE22,
PE24, PE26, PF[3-5]

Group 1 (most other) pins have limits of -15/9mA.

The minimum allowed load (by spec, conservative) is 3.3V/.003A =1100 ohms.  Personally, I would never intentionally come close to this low of a load for this chip.

The information in this thread: http://arduino.cc/forum/index.php/topic,132130.0.html applies to everyone, even us audio guys.

-Chris
(not an audio guy)
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 230
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

DAC0 is the one you learn on, DAC1 is the one you then take care of.

Duane B

destructive testing  smiley-confuse
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I(OH) (ISource) for pins in Group 2 (which include the DAC), is -3mA.
I(OL) (ISink) for pins in Group 2 (which include the DAC), is 6mA.


That is the spec for the digital output stage of the PIO pins, not the analog stage of the DAC. (They are the maximum loads for the digital output to reach a specified voltage level at a specified speed - not the absolute maximum current)

What I'm looking for is some specification of output impedance or output resistance (ie the minimum resistance on the output so that the output voltage is still accurate to 12 bits without distortion) - usually called RL or RLOAD or Z

I've looked and looked through the SAM3X datasheet for the specifications for the DAC and they are missing. But I think I may have found something useful. The SAM3S datasheet has a section on the electrical characteristics of its DAC which is mostly the same as the SAM3X, except that it also includes a table on analog output specifications (on p1033), which gives RLOAD as minimum 5k ohms. Given the similarities I shall assume this is true for the SAM3X too.

http://www.atmel.com/Images/Atmel_6500_32-bit-Cortex-M3-Microcontroller_SAM3S_Datasheet.pdf
Logged


Offline Offline
Jr. Member
**
Karma: 1
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, before I destroy my DAC, there is something I don't understand, how can a board source a negative intensity? Is it because we are supposed to use our speaker tied to the DAC and 3.3V?
Logged

L.C.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The example is still the same. One more fried DAC0. I emailed support. Please change this example.
Logged

Tacoma, WA
Offline Offline
Full Member
***
Karma: 4
Posts: 192
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The example is still the same. One more fried DAC0. I emailed support. Please change this example.
http://arduino.cc/en/Tutorial/SimpleAudioPlayer   It ONLY shows how to use an LM386 amplifier, and clearly says "Warning: do not connect the speaker directly to the pins of the Arduino Due."
Logged

Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the source I found, not your link

http://arduino.cc/en/Reference/AudioBegin

ALL instances of this must be changed. I don;t know where your link came from. This is where I found the code. Also, assuming that someone is using the IDE from a computer that is not connected to the internet, the link you posted is not available to them. Only thing available is a comment in the example code that reads: "connect speaker to DAC0.


Offer to replace one board, offer to replace any board damaged by this example.   Some "community" you represent.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I, too, followed the above linked example and connected the speaker to DAC0, where it did not produce a sound. I then, without modifying the sound, connected it to DAC1 where it did (albeit faintly and for some time), despite the code referencing DAC0. In this case, could it simply be that DAC0 is not being driven at all?

Either that or I have also fried my DAC0.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34562
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

But that example code says
Quote
*Audio amplifier circuit with speaker attached to DAC0
Where does it say connect the speaker directly?
Unless you took that to mean the speaker was connected to the DAC0 in which case what did you think the amplifier was doing?
« Last Edit: July 23, 2013, 03:03:48 pm by Grumpy_Mike » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 502
Posts: 19080
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Clearly I'm missing something here. Where does it say to connect a speaker to the output pin? The code says:

Quote
*Audio amplifier circuit with speaker attached to DAC0

(my emphasis)

It would appear someone may have interpreted that as:

Quote
*Audio amplifier circuit with speaker attached to DAC0

But if so, where does the amplifier come into it? Put aside on the bench?

Is there another link that I am unaware of? One that says "connect your speaker to the output pin"?
Logged


Global Moderator
Offline Offline
Brattain Member
*****
Karma: 502
Posts: 19080
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Only thing available is a comment in the example code that reads: "connect speaker to DAC0.

No, it doesn't. Not on the page I can see.

It says:

Quote
Code:
  *Audio amplifier circuit with speaker attached to DAC0

If you are viewing a different page please provide a link to it.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have I stumbled on another issue?  Please assist:

http://forum.arduino.cc//index.php?topic=193753.msg1431198#msg1431198

Cheers,
Courtney
Logged

Pages: 1 [2]   Go Up
Jump to: