Loading...
  Show Posts
Pages: 1 ... 32 33 [34] 35 36 ... 55
496  Using Arduino / Project Guidance / Re: Audio input on: June 12, 2012, 07:26:33 pm
Quote
I'm wondering exactly how to go about doing this; would it be better to use a high sample rate and external amplifier, or use a lower sample rate and external integrator? 
It depends on your requirements...  I'm not sure you need an integrator or amplifier at all.  You may need an external analog-to-digital converter if you need a higher sample-rate and/or more bit depth.

The built-in ADC is 10 bits (0-1023), and I read somewhere (not confirmed) that the maximum sample rate is ~10kHz.   With a 10kHz sample rate, your signal can only go up to 5kHz (Nyquist theory).   As you may know, CDs have a sample rate of 44.1KHz to cover the "full audio range" beyond 20kHz, with 16-bits of resolution.

Real digital oscillosopes have a sample rate of about 10 times their rated frequency/bandwidth.

As far as processing the data (FFT, etc.) I don't have a good feel for the Arduino's speed.   Hopefully, someone will jump-in with some input...  Something tells me that would be another bottleneck.

A 'scope doesn't have to do that much processing, and your eyes/brain can only process rather slowly, so I don't think a 'scope would be a problem once you get past the input/sampling limitations.    And, you don't need much resolution for a 'scope, as long as you can change the range/scale.   The Tektronix 'scope on my bench only has 8-bits of vertical resolution, which is about half the resolution of a DVD, and plenty for a 5-inch screen. 

P.S.
If you want to make a 7-band spectrum analyzer, there is nifty analog chip that makes it easy with 7 filtered-outputs for you to run into 7 Arduino analog inputs, and you only have to "process" the amplitude for each channel at a fairly-slow "visual" rate.   
497  Using Arduino / General Electronics / Re: General question concerning power LEDs and resistors. on: June 12, 2012, 03:58:35 pm
Quote
It does.  However, 5V * .35A =1.75 watts per LED = 5.25 watts per package.  So, the questions.

1.  They say .35A each above which I run it at, yet this would seem to be 5.25 watts which exceeds the spec of 3 watts.
The 5V is divided between the resistor and LED...   Some of that wattage is being used (wasted) to heat-up the resistors. smiley-wink

P.S.
So basically, you can't assume the current is 350mA...   And since the voltage drop across each LED color is different, the current through each color is also different (when the resistors are the same).   Because of the way LEDs work, you can assume that the rated voltage is dropped across the LED, and the difference between that LED-voltage and your power supply is dropped across the resistor.    From the calculated voltage across the resistor, you can use Ohm's Law to calculate the current through the resistor (which is the same current flowing through the LED in series).

And FYI - High power LEDs are normally powered from a constant-current switching supply, which is more efficient than using a resistor as a current limiter.
498  Using Arduino / Project Guidance / Re: Very long-term countdown timer (no display needed) on: June 12, 2012, 03:28:04 pm
Quote
It needs to be accurate only to within a few days of the target...
That's no problem, (assuming no software bugs, hardware failures, or loss of power with dead batteries).

A typical crystal has an accuracy of 100ppm (parts per million).   So after 1 million days, you could be off by 100 days.  Orone day after 10,000 days.  (I think that works-out to around one hour per year.)
499  Using Arduino / General Electronics / Re: cheap led driver faulty? on: June 11, 2012, 07:20:32 pm
It could be heat related.  That shouldn't be too hard to test... Is it worse on hotter days (or during the day) or after it's been running awhile and has warmed-up?  Maybe you can set on an (insulated) ice pack to see if it works better when cool.    The problem is...  Knowing that it's heat related doesn't solve the problem.

Is this a driver chip,or a power supply module?  If it's a chip, it might need heatsinking (or more heatsinking) to meet the full 350mA rating.    If it's a module, it should work as specified.

If banging or mechanically shocking the unit causes it to flicker, it's a bad solder joint or bad connection.  Most electronic failures are caused by bad/failed connectors/connections (assuming the design is good, and the device/product was used as intended, etc.).

You said one set flickers... Is it easy to swap the LED sets & drivers around to see if its the driver or "something else"?

Quote
Or is this just ebay crap failing?
Could be...  You have to wonder why it's being sold on eBay, rather than through the normal electronic-parts distribution channels.   
500  Using Arduino / General Electronics / Re: LED matrix and button matrix on same pins? on: June 11, 2012, 06:54:11 pm
I' gonna say NO.   It might be possible, but probably not practical...  Maybe it could be done with some kind of additional hardware that switches between the buttons & the LEDs, so that at any moment either the buttons or the LEDs are connected/working. 

An I/O pin has to be configured as an output OR an input.   Your sketch can change the function at any time while it's running, but it cannot be an input and an output at the same time.   

As a general rule, you don't want to connect outputs together...  And a switch is an "output" (it goes to an input).  For example, very-bad things can happen if your switch tries to force a signal high, while an Arduino output is trying to force the same signal/pin low at the same time.   And, it needs to have the right kind of physical/functional connection.  (i.e. A switch goes to an input, and an LED connects to an output...  Or, you receive on an input and transmit from an output, etc.) 

You can "OR" outputs together with a pull-up (or pull-down) resistor, so you could "or" an output pin together with a switch.  But, somehow I don't think this will work with a matrix connection.  And, it would probably turn-out that logically or-ing the signals together does the wrong thing logically/functionally.
501  Using Arduino / General Electronics / Re: Ultrasonic Atomizers on: June 11, 2012, 04:36:52 pm
Quote
Can an arduino do PWM at 3 MHZ?
No...  The default PWM frequency is ~500Hz.  And, you probably don't want PWM anyway.

I assume the thing runs off a square wave, and there are easier ways to generate a square wave.  I'm not sure if an LM555 can go to 2MHz, but I'm sure there are oscillator/multivibrator chips that can.   You'd also need to boost the power with a MOSFET or something.   

You can also buy a complete fogger/mister with the oscillator built-in.  One nice thing about these (besides being built and ready to go) is that the oscillator & electronics are already enclosed in metal so you aren't "broadcasting" high-power RF signals.   I've got one of these things...  I forget the power rating... probably medium power... I paid less than $100 USD for it....   I tried it out in the bath tub and it generated enough fog that you couldn't see the water, but not enough to fog-up the bathroom...   Dissapointing...   I think the droplet size is large compared to a regular fog machine and I'm guessing it falls to the ground before it can be spread-around.
502  Using Arduino / Audio / Re: Musical LED lights on: June 11, 2012, 02:19:32 pm
Quote
Is there any way to obtain real-time amplitude of the audio signal using a software and send the signal as input to Arduino via USB?
No...  You'd have to program the Arduino to "look like" a soundcard.    Then with the computer sending to (digital) sound to the Arduino "sound card", you wouldn't get any sound from your real soundcard.
503  Using Arduino / General Electronics / Re: get better frequency response from an electret mic? on: June 11, 2012, 02:08:50 pm
Quote
I may be able to compensate in software at the cost of noise
If you compensate with an analog circuit, you will have exactly the same noise issues.   Hopefully, it's a capacitor issue...

Quote
I may be able to compensate in software at the cost of noise, but it will have multiple sources and I don't want to screw up those inputs when used since they don't have a problem since they are an actual audio source...

... I also am planning on having it automatically scale the microphone gain as to not max the msgeq7 out when the music is played loud
If you scale the 7 channels independently, that might solve most of your problems.
504  Using Arduino / Project Guidance / Re: Multiplying then repeating a digital signal. on: June 07, 2012, 07:00:51 pm
Quote
I could change the parameters in the computer, however I don't want to loose the resolution I had with the old sensor.
If you can do that, do it!    How many readings do you need per-revolution?   I would think that one wind-speed reading per minute would be more than enough...  Like Mike said, you aren't getting more resolution by adding (or interpolating) made-up data....    It's like blowing-up a picure or watching a VHS tape on an HDTV...   More pixels don't automatically Improve the resolution.

Quote
Could I use an Arduino to read the input from the new sensor, multiply that value by four, then output that value to the computer? I would assume that there would have to be some type of sample rate/timed interval before multiplying the input value?
I think so...   You need a buffer or delay...   Measure the time between two "input-ticks", and then pump-out 4 equally-spaced "output-ticks" (4 times as fast) while measuring the time to the next "input-tick".     But I think you might need a bigger buffer (more delay) because if the wind is accelerating, the next input-tick will come-along before all 4 output-ticks have been sent-out to the computer. 

505  Using Arduino / Audio / Re: Questions about this piezo buzzer on: June 07, 2012, 06:36:17 pm
Quote
Could this piezo buzzer respond fast enough to generate ultrasonic, or near ultrasonic tones (>= 17kHz)? I can still hear around 17kHz, according to a YouTube test.
Probably, but you'd have to check the specs (if they are available).   Transducers don't suddenly stop working at some frequency.   The output "drops-off" at higher (or lower) frequencies, eventually to the point where there is no useful output.

Quote
Also, do mosquitos actually keep some distance from you when you play a 17kHz+ noise?
No, but you can use it to repel teenagers. smiley-grin

Apparently the best thing (other than a mosquito net) is a device that uses propane.  I guess it actually attracts and traps or kiss them.    Or, a big fan can work too...  Mosquitoes like still-air and can't fly against the wind very well, and the fan may also throw them off your scent.
506  Using Arduino / Motors, Mechanics, and Power / Re: DC motor Stall Current higher then Motor Driver Specifications - Problem? on: June 07, 2012, 04:06:46 pm
I recommend that your electronics should be able to handle the "worst case".   I believe the motor will draw the stall current (or nearly the stall current) when you start or reverse it.
507  Using Arduino / LEDs and Multiplexing / Re: Brighter LEDs on: June 07, 2012, 02:53:47 pm
Do you have the specs for your LEDs?

Regular LEDs are rated for millicandelas (mcd) at their recommended maximum current (typically ~20mA).

Just looking at my Jameco catalog, I see standard-output LEDs rated ~600 mcd and high-output LEDs rated at 5000 mcd or more.

High-power LEDs (1W or more) are brighter, and I think they are rated differently.
508  Using Arduino / Programming Questions / Re: Moving variables between routiens. on: June 06, 2012, 05:07:48 pm
Quote
I understand the idea that a "function" does something and maybe returns a value saying it has suceeded or failed.

It can also return other values.
Yes...   A function can return ONE value (or it can return nothing).  You can pass multiple values into the function, but you are (normally) passing-in only the value, not the variable itself.   So, if you pass-in X, you are passing in the value of X.  If your function changes X, it only changes the numerical value copied into the function, it does not change the value of the original X.  ( If you return X, you can change the original value.)

If you want a function to change more than one value (a classic example is if you want to swap the values of X & Y, or if you want to change a string) you have to pass-in pointers or references, and that allows your function to change the original variables.  (You can also use global variables, but that's normally considered bad practice.)
509  Using Arduino / Audio / Re: Driving a Speaker from a 595... on: June 06, 2012, 03:37:34 pm
Quote
but I've gathered that hooking it directly to the 595 with the LCD will procude a very "buzzy" sound..

...I'd like to be able to control the pitch, tone and length (it will be producing morse code) of the sound from it.
Digital circuits produce square waves & rectangle waves which have lots of harmonics.  You can control the pitch (frequency), and to some extent you can adjust the "tone" (and volume) by adjusting the duty cycle.   A "pure" tone is a sine wave.   The length/duration is no problem.

You might want to download Audacity (a FREE audio editor).  It has a Generate feature that can generate square or sine waves at any frequency you wish.    That would make it easy to experiment with different tones to see what you like, so you know what you are shooting for.
 
Quote
Please could someone recommend how to run a speaker from a 595?
You probably need an amplifier, or at least a MOSFET.  (An amp would give you a volume control)... How much current can you get from a 595?   5V into an 8-Ohm speaker is 625 mA (5/8 = 0.625).

510  Using Arduino / LEDs and Multiplexing / Re: Arduino to control 120 3 watt LEDs on an aquarium light on: June 06, 2012, 01:01:17 pm
3x120 = 360 Watts of LED lighting...  Is that a typo, or are you trying to blind your fish? smiley-grin

High-power LEDs (1W or more) require a special constant-current power supply, which you can buy or build.   Yes, you can get (or build) dimmable power supplies.
Pages: 1 ... 32 33 [34] 35 36 ... 55