Show Posts
|
|
Pages: 1 ... 4 5 [6]
|
|
76
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Possibly the cheapest Sound sensor/Sound trigger
|
on: January 23, 2011, 02:05:21 am
|
So I thought I'd share, I might have found one of the easiest/cheapest sound sensors for Arduino. (If anyone knows a cheaper/easier one I'd like to hear about it). Before I found it, I was having all sorts of trouble simply finding a way to hook up a microphone to arduino for a sound trigger with adjustable threshold. Granted I am very new to all this stuff, so its been like a crash course for me, and much confusion along the way. I spent hours searching all over these forums, all over the web. Some people did indeed have an easy method using a guitar amp, or tape recorder, however I wanted to find a way to do it myself without relying on such a device (and not have to carry a guitar amp around). Others pointed me in the way of rather expensive premade amps, envelope followers, etc. I tried making my own amp with a LM386 chip, and making a rectifier to follow it (both of which I was completely unfamiliar with beforehand), but didn't seem to have much luck, it seemed to only detect very loud noises. Hours and research and frustration trying to do what I feel should be the simple task of hooking up a mic to arduino to detect sound levels, I was just about to order the cheapest "arduino sound sensor" I could find, one of these... http://cgi.ebay.com/Sound-Sensor-Module-Arduino-Sensor-Shield-PIC-MCU-/160523026320?pt=LH_DefaultDomain_0&hash=item255feaff90....when I just stumbled upon one of these.... http://cgi.ebay.com/Mini-Hidden-Spy-CCTV-Microphone-Mic-12V-CCTV-System-/160525859430?pt=LH_DefaultDomain_0&hash=item2560163a66....It said in the description "can be direct connected to listening device, no amplifer is needed". Well luckily, I just happened to already own one in my parts bin, that I had bought awhile ago for about $2.50 shipped. Although I haven't pulled the shrink tube all the way off to look, it feels like its almost the identical type circuit board as that cheap arduino sound sensor. I chopped and stripped the cords to find a red, black, and yellow wire. I hooked them up to the arduino put a diode along on the input (not sure if its even necessary, but had seen other people using diodes, so I just did it), and so far it seems to work fine. I put it in the serial monitor and with no sound I get a value of about 460. With sound the value fluctuates up and down (I had a 100ms delay between each print of the serial monitor, so i'm sure its fluxuating a lot more than I am actually seeing). In any case I was able to adjust the threshold to be able to pick up all sorts of levels of noises, even as quiet as me rubbing my fingers together near the mic. Just thought I'd share in case anyone else is struggling doing the same thing. If anyone knows any improvements, or better (but still just as cheap), ways to do it, let me know.
|
|
|
|
|
77
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How fast does arduino process each line of code?
|
on: January 19, 2011, 06:21:44 pm
|
|
One other speed related question too. So I know arduino has a DelayMicroseconds command, and the reference page says it works accurately in the range of 3 milliseconds and up. Thats incredibly fast, 3 millionths of a second.
Can the arduino actually control outputs that fast, or are there bottlenecks somewhere? Like say for example you had an led or other component that could actually operate that fast, could you actually turn it on for 3 microseconds and back off? Or accurately change the duration a millionth of a second at a time (like from 31 microseconds to 32 microseconds).
Also say you have the most simplest photo flash type code of all, no delays, just a simple "when input #1 is high, make output #1 high". What sort of timeframe does it take for it to actually register the input and produce the output? Is it within the range of mere nanoseconds, or microseconds, or what?
Thanks.
|
|
|
|
|
78
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How fast does arduino process each line of code?
|
on: January 19, 2011, 02:51:27 pm
|
|
So sounds like I shouldn't have a speed problem. I'm wondering, would there be any benefit speedwise to set up a "if" type statement, and have a switch to select between the ready and setup mode? Something like this (I know this isn't the correct syntax)
if switch is off {bare minimum set of code here, just the delay variables, and flash firing instructions} else if switch is on {long set of code here, with settings, mode selection, potentiometers to adjust delay, and all the extras I can program}
That way it would just loop through the short section of code most of the time rather looping through all the extra code thats only occasionally used for changing settings or seeing them on the LCD screen. But would there be any real benefit to doing that, or can the ardruino simply loop through the full size code so fast that it doesn't matter? Since it would be giving up some functionality, making you have to switch that switch back and forth, in and out of setup.
|
|
|
|
|
79
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / How fast does arduino process each line of code?
|
on: January 19, 2011, 06:01:43 am
|
|
This might be a silly question, but I couldn't find the answer anywhere. I'm wondering roughly how fast arduino actually goes through and processes each line of code, and if the size of the program can make any sort of difference to how fast its executed?
The main reason I wonder is I'm planning to make a high speed photo flash trigger, where you take input from a sensor (sound, knock, break beam, etc), and instantly activate a flash, or sometimes with a specific timed delay.
Now if speed of executing code is an issue, I could just write the absolute bare minimum amount of lines.
However I'm thinking it would be nice to make it more elaborate, with an lcd screen to display various setting otions and allow you to change them live, such as adjusting the delay in a choice of either milliseconds or microseconds, adjusting the noise thresholds, and other various settings and features.
But would adding all that extra code, and including the lcd library make any sort of delay of a substansial enough value that it could affect the actual response time, or accuracy when its time to fire the flash? I mean, I will be capturing pretty fast things, but its not like I'm going to go trying to capture rifle bullets or anything that fast. If its only a difference of a handful of nanoseconds it wouldn't matter, but if it could be slowing the whole process down by a millisecond that could make a difference.
|
|
|
|
|
80
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Cheapest way to make multiple arduino devices?
|
on: December 01, 2010, 12:52:22 pm
|
|
So those Ardweeny and RBBB kits look cool, and cheap for $10, but what is the point of using those rather than just the chip alone? Is it just so you don't have to solder your own crystal, and regulator, or is there more to it than that?
Also 2 more questions. 1. In my readings, I've gotten mixed answers whether the crystal is actually necessary or not. One thing I read said that it is not required for the 8mhz one, but is for the 16mhz one. Another place said its not required for the 16mhz one but your timings will be a little off. But as long as your not working with stuff that requires time, and rather using circuits like one sensor affects one sensor, does timing actually matter?
2. Also, is the voltage regulator completely necessary, or only when you are using higher than 5v? Would it be possible to power the chip directly with 4 rechargeable AA's, which would add up to about 4.8v of power. Would that be enough to make everything work fine, and be safe for the arduino? And what if you used 4 regular AA batteries, adding up to 6 volts, would that extra 1 volt fry something?
|
|
|
|
|
81
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Cheapest way to make multiple arduino devices?
|
on: December 01, 2010, 12:53:58 am
|
|
I am completely new to arduino. I have been searching for hours to the answer to this question, but haven't been able to get a straight answer.
I'm basically wondering what is the cheapest way to make multiple arduino devices? Like say you make a really simple device, but you want to make like 5 of them. Well, at about $35 a piece for a arduino, or like $20 or whatever it costs for a solder it yourself kit, that can add up.
I heard that there is some way to once you make a device, to take the chip out and use it by itself, and only need to attach some sort of crystal. But other places said you need more than a crystal, and other places said you need a dorkboard or barebones kit. Found so many answers that I don't know what to believe.
Say your project is simple, one sensor, that controls one device. Is it possible to order a bunch of chips at $4 a piece or whatever, do all the programming with the duemilanove, but once you got all your code working right, simply use the duemilanove to put the programming onto all the chips? That way you can take them out and use them by themselves on your projects, simply soldering or connecting the right sensors/device to the right pins on the chip? Making the brains of each project only cost about $5 rather than about $30?
Or is there a lot more to it than that?
|
|
|
|
|
82
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Which remote is easiest to use for a beginner
|
on: November 29, 2010, 01:21:23 am
|
I'm about to buy an arduino nano, and I'm shopping for all the parts I need for my first arduino project. Which is simply using a small (roughly keyfob size) wireless remote with at least 3 buttons to move a single servo to 3 predifined positions. I have spent hours searching and reading about integrating remotes with arduino, but I'm still confused which would be the best and easiest to use. I want to keep the cost of the remote under $10, but my biggest concern is the ease getting it working for a beginner like me who is learning completely from scratch. Here are the most likely choices I've found so far. 1. This $7.50 arduino remote kit from ebay with remote and ir reciever and 2 resistors. Seems like it might be easiest since it comes with both remote and reciever and is advertised specifically for arduino. Too bad it has to come from china. http://cgi.ebay.com/IR-Remote-Control-DIY-Kit-Arduino-MCU-PIC-Infrared-/150515739193?pt=LH_DefaultDomain_0&hash=item230b6fea392. This TSOP4838 38khz ir reciever for $2.50 shipped on ebay. I already have a small JVC car stereo remote I could use (if it would work well with this reciever). This is the cheapest way I've found, and also ships from the US so no 3 week long wait, however I'm concerned it might be much more difficult having to capture the codes from it, or possibly deal with other incompatabilities. http://cgi.ebay.com/IR-Receiver-Module-38-kHz-TSOP4838-/320620984548?pt=LH_DefaultDomain_0&hash=item4aa67ff8e43. This 4 button RF remote/reciever for about $6. Has to ship from china unfortunately, but I believe RF is normally better than IR. I'm just unsure of the difficulty of implementing it with arduino, whether it would be easier to hook up and program or more difficult. 4. Perhaps there is another remote solution that I don't know about that would be better than any of those I've found and still be roughly keyfob size and under $10? Thanks.
|
|
|
|
|
84
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Help choosing first Arduino
|
on: November 28, 2010, 07:25:40 pm
|
|
I am completely new to arduino, getting ready to buy my first one to make a very simple project. I've spent hours of research just trying to figure out which arduino to buy, however the sheer number of different models and clones, etc has made my head spin.
Right now I'm leaning towards the Nano 3.0, but what I have not been able to find out is are you sacrificing any sort of functionality by going that small? Is there things that the duemilanove or uno can do that the nano cannot (besides that you can plug shields into them)?
Then there are all these different clones too that I've heard might be either cheaper or have added functions, are there any clones I'd want to consider?
I'm most concerned about making my first into to arduino as easy as possible.
Thanks.
PS: The project I'm making is going to be a simple remote controlled servo, that I can move to 3 specific positions with the push of the respective button on the remote control. That way I can use it to manually press the shutter button on my camera that does have remote shutter. One button would do the half press of the shutter, the next would press it the rest of the way, and the third button would let go of the button completely.
|
|
|
|
|