Show Posts
Pages: 1 ... 74 75 [76] 77 78 ... 86
1126  Forum 2005-2010 (read only) / Interfacing / Re: Tell me about DACs! on: May 14, 2010, 06:43:39 pm
Quote
There are chips that record and playback a few seconds of sound, all self-contained.
But you mentioned changing pitch, etc. which is not supported by those solutions.

Can you name some of those?  They might not help with this project but something like that would surely come in handy for others.
1127  Forum 2005-2010 (read only) / Interfacing / Re: Tell me about DACs! on: May 13, 2010, 05:44:28 pm
Quote
I have just purchased 4-5 of SparkFun's "MP3 Trigger" boards. They are MADE for integrating into installations (like museum pieces, etc.) Great stuff.  They use a micro SD flash memory card to accomodate GB of audio data.

Those MP3 trigger boards look cool, but they're way too expensive to integrate into my props.  They're also kinda big.  I don't think one would fit in this particular prop.  (I don't use the regular Arduinos, I use the Pro Minis.)
1128  Forum 2005-2010 (read only) / Interfacing / Re: Tell me about DACs! on: May 13, 2010, 05:35:49 pm
Quote
The sampling RATE is also an important factor. Nyquist, et.al. says that you need 2x the highest frequency you want to reproduce. Standard good-quality audio is defined as 20Hz to 20KHz. That is why CDs use a sample rate or 44KHz (2x the 20KHz maximum plus a bit more to accomodate the low-pass filter skirts.)  But, again, you say you don't need pristine quality, so maybe you could get away with a sample rate of 11KHz or even 8KHz?

Yeah, I'm aware of that 2x sampling rate issue.  And I did some tests last night on the sound effect I want to use in Sound Forge, to see exactly how small I could get it.  Turned out it sounded fine at 8bit, but I couldn't lower the sampling rate any lower than 22khz without it turning to muddy sounding crap because it's mostly frequencies around 5-10khz.

Even at 8bit and 22khz mono, and sampling only a single cycle of the effect which I would then have to adjust in pitch, I still couldn't get it down below about 20K, which is too big for the Arduino to store.

So... not sure what I'm gonna do about that.  

I wonder if I could compress the sound in some way.  A lower sample depth would give a sine wave that isn't very smooth, but what if instead of storing the samples, I stored the difference between each, and instead of simply storing the difference, I set it up so that stored diferences of  1 2 3 or 4 would be translated to 1 2 4 or 8, so greater changes would be stored with less accuracy, while finer adjustments would have greater accuracy?

Well just an idea.  Even if that gave me 2x compression it still wouldn't really be enough to fit the sample in memory with my program.

Hm... I wonder if one could do something like that with a resistor ladder to get a better sounding output.  That's not what they did with the phones, is it?  It sounds like you were saying they did a kind of compression like that, but with the sample value, rather than the difference, so louder samples would be lower quality.

Not even sure how that compression idea of mine would even sound actually.  Or if you could do that with a resisotr ladder dac.
1129  Forum 2005-2010 (read only) / Interfacing / Re: Tell me about DACs! on: May 13, 2010, 04:17:01 pm
Grumpy:

Great resource, but... *head explodes*

I don't know where to start with that!

I don't know what questions to ask either though, so I'll give that a good once or twice over before I start. smiley
1130  Forum 2005-2010 (read only) / Interfacing / Tell me about DACs! on: May 12, 2010, 11:43:15 pm
I'm looking into how to go about playing back audio samples, both prerecorded and generated in realtime, and while I know all about do-it-yourself R2R DACs, I don't know anything about the on-cip solutions.

I was looking for some at Mouser, and the ones I found were really expensive.  Like $15.  And some forum posts I found on google seemed to indicate that was the case for DACs.

But on Digikey, I found some which were cheap.  Like $2-$3:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Selection

But I realized, I don't know what the heck I should be looking for here.  I know I need a DIP package, and I think 8-bit should be sufficient for my needs, and some of those cheap ones are 12 bit, which is great, but why are they so cheap?  Are they fast enough for generating audio?

And lastly, is there any specific DAC folks would recommend I look at?  I'm just generating sound effects in a prop.  It doesn't need to produce really great sound.  

(Oh, and in regards to the R2R ladder... I could fall back on that, but I'd rather not dedicate six pins just to sound generation.  I am also considering PCM, but that might use too much cpu.)
1131  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 03, 2010, 06:10:21 am
Manual?   What's that?  All my electronics equipment is a hand me down from my dad and was made in the 1980's.  :-)
1132  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 03, 2010, 03:41:24 am
Retro:
Makes sense now.  Thanks. :-)
1133  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 02, 2010, 12:16:32 pm
Hm...

http://en.wikipedia.org/wiki/Multimeter

It would appear that in reality 2K might actually mean 1.999~ which would make more sense.  I guess maybe it's an accuracy thing or something?  Getting the most out of the display?  Still not really sure why it's not 10K though.  9.9999 would still make more use of the display than 1.9999.
1134  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 02, 2010, 12:09:10 pm
That seems kinda silly.  So does that mean in any mode the highest number it will display is 2.0?  Why 2.0?  Why not 2000?  And why 2K?  Why not 1K?
1135  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 02, 2010, 11:28:48 am
I'm not getting anything out of my multimeter, whether it's set to 200 ohms, 2K, 20K 200K or 2000K.  At least not on my finger.  It reads .820 when I've got it across an 820 ohm resistor on the 2K setting.  Not sure why the setting is called 2K when it's obviously reading 1K as 1.0, but nothing in electronics ever seems to make sense to me.  

Anyway, I know it's working.  But I suspect my finger's resistance is indeed somewhere in the 10M ohm range, so the meter can't read it.
1136  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 02, 2010, 11:12:21 am
I have a multimeter, but I'm not really sure how to use it.  I'll try to figre out how to get it to measure resistance though. :-)

As for whether the gizmo uses a resitive switch, I'm pretty sure it does:
http://www.cylandprops.com/PKEmeterp1.html

Note the four wires at the top of the handle:


Also on the front of the meter:


Unfortunately, not much can be told from the internals. :-)
1137  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 02, 2010, 10:29:37 am
But 4.7K seems way too low.  Even if it were paired with a resistor.  Most of the examples I've been able to find for these sorts of switches reccomend resistances as high as 10M ohms...
1138  Forum 2005-2010 (read only) / Interfacing / Re: How do I make a resistive touch switch? on: May 02, 2010, 10:01:49 am
4.7K pot on the other side of what?
1139  Forum 2005-2010 (read only) / Interfacing / How do I make a resistive touch switch? on: May 02, 2010, 01:45:37 am
I've been searching for schematics on the web for how to make a touch switch, but 90% of what I find either shows how to make a capacitive touch switch, or has all these extra components like transistors and nand gates which confuse me as to how to make it function with the Arduino.

I need a resistive touch switch for two reasons:

1)  I'm building a replica prop, and the original uses a resistive touch switch, so for authneticity's sake I want to mimic this.

2) I'm fairly certain that a resisitve touch switch is not unlike a potentiometer and as such requires only one pin to function.  Capacitance switches appear to require two.

I found this post dealing with them:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1264609996

But the ascii schematics aren't clear.

I'm pretty sure that what PaulS is trying to show is the following:



And I suspect that the reason mburkit was having issues is because he connected the circuit up this way:



...and because he used a 10K resistor which according to this page is much less than the resistance of skin:
http://www.produceconsumerobot.com/truth/


Other pages I've read seem to indicate that the finger should have a lower resistance than the resistor you use in the circuit.  Which if I understand how potetiometers work, makes perfect sense.

And that page seems to indicate that a human finger has a resistance somehwere between 50K and 10M ohms.  Though I'm sure this probably differs based on how far apart you have the contacts.  (Mine will have 0.2" (5mm) or less seperation.)

But it also says a 10M resistor makes the signal noisy, so I dunno.  And PaulS didn't specify the size of resistor needed.


Also, assuming PaulS's cicuit works, I am concerned about something in the design.  When you place your finger across the terminals, they have a lot of resistance, and things are hunky-dory.  But what happens if a piece of metal accidentally comes in contact with them?  Then there's no resistor between the +5v and the pin of the Arduino.  Is that a problem?  I'm not sure, but I think that would let hundreds of milliamps of current flow and would fry the Arduino.

So to prevent the Arduino from being fried, I think I should use one of the following setups.  I suppose it doesn't matter which, since R2 would only be 1K or so.  Though perhaps it should be larger than that?  






Another thing that concerns me is how much current will be flowing across your finger.  I saw something that said 10mA is painful, and 40mA is dangerous.  But is that a concern with a battery?  I don't know.  But I could select the size of R2 to get the mA down into a safe range if that's an issue.  I suspect it isn't though.

Speaking of which, I found this page on wikipedia:
http://en.wikipedia.org/wiki/Electric_shock

Which says the resistance of skin is 1K to 100K, which is quite a bit  different from what that other page said.  

So much conflicting info. smiley-sad


Anyway, one last thing...

When no connection is being made, do you suppose the Arduino will return 0 for the value on the analog port, or might I want to treat say, any value less than 512 as an off state?  I suppose I may need to do debouncing as well because this switch will need to toggle an action.  There's a debounce library right?  I'm sure I saw one.
1140  Forum 2005-2010 (read only) / Interfacing / Re: Could someone take a quick peek at these PCB's? on: April 28, 2010, 08:05:54 pm
Well, I put the order in for these today.  Hopefully if there are any glitches they can be fixed with the extra pads I put on the board.  I could spend several months on this and still not be sure I've got everything right.

Assuming all goes well, I'll post some videos in the exhibition forum around May 18th when I'll have gotten the boards back and had time to put them together.

Thanks for all the help!
Pages: 1 ... 74 75 [76] 77 78 ... 86