[CART360] CART 360 _Arduino 'sample rate'

Vincent Leclerc v at uttermatter.com
Sat Oct 17 10:37:04 EDT 2009


Hi Jon,

This is often confusing. There is a big difference in sample rate and
sample resolution. I added a graphic at the bottom of:
http://hybrid.concordia.ca/~cart360_vincent/studio/05/

The 2 graphs show 2 completely different sound samples.

The first graph shows a 1-bit resolution sound sample and the second
shows an 8-bit resolution sound sample. That is sample resolution.

Now for sample rate -- the amount of samples you record (or generate)
per second -- you can see that at [a, b, c] we record samples at the
same time. In the 1-bit resolution sample, you always record 5V, but
for the 8-bit sample we record [2.5V, 1.88V, 1.25V]. This is why
sample resolution is as important as sample rate.

Generally the Arduino outputs with a single digital pin, so it outputs
at a 1-bit resolution, regardless of your sample rate (which can be
quite surprisingly high as you said in class).

If you want 8-bit resolution output, R-2R ladders are the
easiest/cheapest way to go about it.
http://blog.makezine.com/archive/2008/05/makeit_protodac_shield_fo.html?CMP=OTC-0D6B48984890

Hope it makes things clearer.

Vincent


On Fri, Oct 16, 2009 at 10:33 PM, joN <jonnygexter at gmail.com> wrote:
> Hi.
>
> There's something confused in my understanding of sampling (or the opposite,
> reconstructing)..
>
> I was thinking about what you said in class when I mentioned the Arduino was
> shooting out samples at a rate equivalent to a CD player. Did you say that
> the resolution of the Arduino is be one BYTE or one BIT?
>
> Using digital out means the speaker is either HIGH or LOW, which would be
> equivalent of one BIT. But my guess is that the voltage being either high or
> low relates to amplitude.
>
> On the other hand, if you said one BYTE, I would think you meant the integer
> stored as the timeHigh value (time period to switch the speaker HIGH/LOW),
> (though the Arduino reference says that ints are stored as 2 bytes). If this
> is what you were referring to, then my thinking is that this value relates
> to the possible quantized units, as in discrete, non-analog values, I can
> use to set the frequency.



More information about the CART360 mailing list