I'm working on a project for which I'm going to need first 10, an then 100 11x11" sheets of 1/8" acrylic cut.
I'm not sure if laser or CNC cutting would be less expensive, but I'm on a budget, so if one is going to be half the cost of the other, but the quality of the cuts isn't as good, then I'd prefer the cheaper service. This will be a base plate so it's not going to be seen much.
Each sheet would have six holes for screws, two SD card size slots, and square holes for a DC jack and rocker switch. In the center, there will also need to be a 'grill' with holes for screws at the corners, behind which will be mounted a small speaker.
The speaker portion will probably add the most cost. Right now it's a fancy design with oval shapes, but that might actually make it cheaper to cut than something with a lot of much smaller holes.
I'm not looking for random suggestions; I know how to use google. What I'm looking for are reviews from those who've actually used particular services and been happy with the results or might have an idea of the cost difference between CNC and laser cutting for panels like this.
I'm also not sure what format they'll want the data in, but I would like to be able to just create the design in Eagle since that's what I know and I'll have the board right there for reference. I think most places will want DXF, though maybe some can accept gerbers? I'm not sure if I can export DXF form Eagle, that's something I still need to look into.
Oh and as Grumpy mentioned, the speaker housing is important. The waves from the back side of the speaker are 180 degrees out of phase with the ones from the front and they cancel eachother out like noise canceling headphones. The speaker cabinet prevents that from happening. They sell tiny speakers on Digikey with plastic housings. I haven't tried them myself as they are fairly new, but I would imagine they'll give you the most bang for your buck with minimal effort.
I've done a lot of stuff with speakers in my projects, trying to get the most out of small and large speakers.
There's several things you'll want to pay attention to.
First there's the audio file itself. Have you maximized the peaks? Run it through a compressor? You can double the volume this way.
Next, there's the impedance. If you've got a little 3W amplifier running on 5V, then a 4 ohm speaker (or two 8 ohm speakers in parallel) is going to allow twice the current to flow, and you will get twice the power out of it.
Then there's the sensitivity. All other things being equal, the sensitivity, measured in decibels, is how efficient the speaker is at converting power into volume. A 6db increase is a doubling in volume.
But the sensitivity does you no good if the speaker isn't good at reproducing the tones you want. Look at the datasheet for the speaker if you can find one for a graph. Or at the very least, there should be a range for frequencies the speaker can reproduce. You can hear between 20Hz-20kHz, so you want as wide a range as possible. For a tiny speaker, if it can go down to 300Hz then that's great. But make sure it isn't limited to something like 8Hz on the high end if you want the best audio quality.
Finally, there's the size of the speaker. You'd think the other factors above would tell the whole story but in my tests, that doesn't seem to be the case. A 3" speaker is going to sound a hell of a lot louder than a 1x2" speaker, even if the latter is listed as having a higher sensitivity, and has half the impedance. Perhaps this is partly due to the larger speaker's ability to play lower frequency sounds, but it seems like it's across the board that a larger speaker will be louder with the same power input.
Unfortunately if you're buying your speakers on Ebay instead of a site like Digikey or Mouser, then you're not really going to have much of this data to base your decision on, and you can't really trust what's there anyway.
So, I'd suggest getting a speaker from Digikey and paying close attention to the specs, or else it's just going to be pot luck what you get. That said... the 5pc auction looks like that would be the louder speaker. But neither looks like a very good speaker. Not a fan of the mylar.
I made him using a Teensy 3.0 + audio shield, an ultrasonic sensor, a 3W amplifier, a TLC59711 breakout, and a regulated 5V wall adapter.
This is more a proof of concept than a final product, as the kits I mention will actually use a new board I'm designing which will be based on the Arduino Pro and Wave Shield. That board is being designed as part of a commission, but I figured since it was perfect for talking paintings like this, (it will be long and thin and have the controls and SD card slot and power jack all along the bottom and have an amplifier and LED driver and DC motor controller built in) that I might as well sell a few spares. I needed something to demonstrate the concept to potential buyers though, and I had the Teensy already, so I based the prototype on that. I'll probably set up a Kickstarter in a couple weeks to take preorders once the design of the new board has been nailed down. It's not going to be marketed as a Vigo circuit, but as a generic Halloween prop controller. And , since it's based on the Arduino Pro it will be programmable by the end user in the IDE using an FTDI or ISP programmer.
The code for Vigo is actually somewhat sophisticated.
I didn't want him to repeat the same audio file every time he started up, so I seed the random number generator with the time and distance at which he first detects something blocking the sensor.
I also will have limited ram to work with when I switch to a 328, so I needed a way to select a file to play back that didn't require me to store all the filenames or indexes in ram, since there are over a hundred phrases. So I count the number of files on startup, and then choose a random index and just read the directory again until I've read that many files.
To prevent him from repeating the same phrase several times which the random number generator alone was wont to do, I keep a running history of the last 10 indices played in a ring buffer and compare new selections to that before playing them.
Vigo also does not trigger the instant you step in front of the sensor, but waits for the opportune moment to startle the unsuspecting victim... between 3..5 seconds. If the user walks away before that time elapses he won't trigger. And after he has spoken, he will wait a longer period before he begins pinging for victims again.
As for his glowing eyes, those work by detecting the maximum amplitude of the waveform since the last check, and he performs this check 30 times a second. The brightness is squared to make the fade linear, and I multiply the peak value by 4 because the volume of the audio files is at half to begin with and I wanted even softly spoken lines to light the eyes at almost full brightness.
You could add the modified wiring.c to the sketch folder. I just ran a quick test to confirm it gets compiled and linked OK. I haven't tested making any change to the file to prove that the definitions in this copy take precedence over the ones in the standard wiring.c, but I think they probably do.
I'm afraid I misunderstood your question. I thought you wanted to read multiple audio files off an SD card at the same time and mix them.
The Mozzi library appears to synthesize effects. And I noticed you wrote in the subject line "not PCM".
You refer to wavetable synthesis though, which is the mixing of "samples", ie, an instrument recorded for a short period and looped, played back at different speeds to create the various notes.
As for whether you can get four channels of PWM audio going at the same time, I'm afraid I haven't done anything with PWM audio on the Arduino. My work with audio has been with DACs. I'm not sure how much work the PWM requires of the processor. Or how much work it has to do to generate those samples, or if it's even generating them in realtime.
I suspect my advice about it being too much for the processor though is still accurate. You may have more PWM channels available on the Mega, but I suspect that PWM audio is fairly cpu heavy and you don't get more CPU power on the Mega.
And modify the line in the wiring.c function in the Arduino program files hardware\arduino\cores\arduino\wiring.c : #define MICROSECONDS_PER_TIMER0_OVERFLOW (clockCyclesToMicroseconds(1 * 510))
My question is, can I just throw that #define in my main program after my includes, possibly #undef -ing it first, and have the compiler use that new definition everywhere, or am I going to have to alter wiring.c, which I'd prefer not to do because the modification will affect other projects and will inevitably be lost and forgotten when I back up my project folder?
I'm aware there are other timers I could use, but Timer 1 is in use by the audio library, and both Timer 1 and Timer 2 share pins with the SPI interface, and I want to drive a motor controller with PWM and that means I need two PWM pins for forward and reverse control, and if I used pins from two different timers then both have to be set to the higher PWM speed, and I'm sure I'd regret that decision later if I need Timer 2 for something else.
It's more than fast enough but where did you get the 20khz PWM spec ? That's not an arduino PWM frequency so where is it from ?
20khz is a typical PWM speed when controlling motors. It's fast enough that the PWM won't cause the motor to buzz at an audible frequency. While it's true that the default PWM speed on the Arduino is 490hz you can change a few registers to get much higher PWM speeds.
As far as I know the Teensy audio and neopixel code is pretty stable. I did encounter some bugs when I used it several months back, but the developer is really fast about fixing stuff and he fixed the issues I reported within a week or so and added some features I requested to allow for looping audio seamlessly.
As for the Mega, just because the board costs a lot more and has a lot of pins and a lot of ram, doesn't mean it's much more powerful than an Uno. It's still 16mhz, still an 8 bit mega processor. The Teensy runs at up to 96mhz, is 32 bit, and has a DMA controller which greatly speeds up the transfer of data from the SD card and to the audio circuity.
And 44khz 16bit is 88K bytes per second... x4 = 352K bytes per second.
So could you do it? I don't know. There are seek times to deal with when changing files, though I think it's possible to store the index to jump straight to the file.
I didn't say it was impossible, but it's not going to be easy.
I know a fair bit about wavetable synthesis - I grew up creating MOD files on my 386, which also ran at 16mhz. It could just barely handle 4 channels of 8 bit audio at a low sample rate, and that was with highly optimized code, and a full 640K of ram to work with.
Not sure what I should be looking for on the timing specs, but the worst number I see there is 800ns which I think means the switching speed can be faster than 1mhz.
Seems like a nice chip. Might have to be careful in motor selection even if it will work though. I notice one motor I just checked has a stall current of 2A. It would be bad if the part were to blow if the motor was prevented from turning.
Oh wait, are you asking for 4 channel audio? As in four speakers, each with one channel? The Teensy audio library doesn't handle that I don't think. You could of course, use two boards. And you should be able to feed the audio from each sound file to only one of the stereo outputs.