Show Posts
Pages: [1] 2 3 ... 88
1  Using Arduino / Project Guidance / Re: what is the brighest LED you can use ? on: August 13, 2014, 03:08:03 pm
Look for "high brightness" or "ultra-bright", etc.   Take a look at this page in the Jameco catalog.  The light output is given as mcd.

"High Power" LEDs (1W or more) are different from "high brightness" LEDs.   High power LEDs are normally run from a special constant-current power supply and they cannot be powered directly from the Arduino.

2  Using Arduino / General Electronics / Re: Dumb Novice Questions re Enclosures on: August 12, 2014, 07:05:43 pm
Drilling holes precisely can be tough, even with a drill press.   If you have a drill press and you can clamp-down the workpiece that helps too, but it can be tricky to clamp-down a plastic (or metal) box.

Even if you center-punch the hole, the drill can "walk" while you are drilling.   A Brad Point Bit is another type of drill that can help.    Brad-point bits are designed for wood.    They are OK with plastic as long as the plastic doesn't crack, and they might be OK with thin aluminum, but probably not steel.
3  Using Arduino / Project Guidance / Re: need to drive a zero centered meter on: August 11, 2014, 07:04:48 pm
FYI - With an H-Bridge there is no ground to the meter either.    If the voltage to the + terminal is lower than the voltage to the - terminal, the meter will go in the negative direction.

If you were to ground the meter's - terminal, the only to get a negative reading on the meter would be to apply a negative voltage to the + terminal.     That would require a negative voltage-supply and an additional analog circuit to bias the Arduino's output voltage.
4  Using Arduino / Project Guidance / Re: Potentiometer Temperature Stability on: August 07, 2014, 05:30:34 pm
Quote
I am not going to have a method in the project to measure temperature.
You can add a temperature sensor for about $2 USD.   Take a look at this and this.

The LM35 puts-out a voltage proportional to Centigrade and the  LM34 puts-out a voltage proportional to Fahrenheit.    But, since the Arduino can do math you can use either one. smiley-wink 
5  Using Arduino / Audio / Re: Recommendations for Visualizer on: August 07, 2014, 04:45:05 pm
Quote
I had hope to do the band pass filtering all in software. Doesn't look like anyone has done that yet and not sure if it is possible.
When you want multiple frequency bands, that's normally done with FFT.   There is an FFT library for the Arduino so you don't have to write the code from scratch.    I'm sure there are some limitations since the Arduino isn't a particularly fast processor, but I don't know what those limitations are....    You can find Arduino spectrum analyzers that use FFT..

Quote
I looked at the white papers for a BA3834 . A webpage claimed it is able to do 7 band pass filters in and serial out which sounds usable but I only see a b and c and assume those are inputs?
I'm not familiar with that one, but it might be similar to the MSGEQ7, which you can buy from SparkFun.   I've never used it, but the MSGEQ7 is a slick little chip.   It has one time-multiplexed output, so you can get 7 channels/bands into one Arduino ADC input.   Plus of course, it has the frequency-filtering, and it converts the AC waveform to a DC output that's easily handled by the Arduino.
6  Using Arduino / Audio / Re: audio input controlled Midi interfaced for RGB-LED lights on: August 06, 2014, 07:29:41 pm
You can probably do that. 

Quote
LED lights that are daisy chained with XLR and controlled currently by a mix board with fader control and some other output controls...
I assume the lights are DMX controlled?  It would probably be better to go audio-to-DMX.  But, if your lighting controller doesn't have a DMX input or any other computer/digital input, I guess you're stuck with MIDI (if you want to continue using that lighting controller board).

The first thing to do would be build a MIDI controller to send MIDI messages to your lighting controller.  You should be able to find some example projects.   Get that working before you get involved with the audio sensing.   That's a fairly common project and you should be able to find examples.    You'll just have to modify the code/ commands to work with your lighting controller instead of a MIDI keyboard/instrument.

For the audio, you have a couple of choices.    For frequency-sensing, the simplest solution is the MSGEQ7 chip.  (They call the chip a "graphic equalizer display," but it's really a spectrum analyzer effect chip.)  It filters the audio into 7 bands, and then sends-out a multiplexed DC voltage for each band (so you only need to use one analog input on the Arduino).    You can't get more than 7-bands, and you can't choose the center-frequencies, but it makes for a very simple hardware design,  and you can combine the data or ignore some of the frequency-bands bands in software if you want less than 7 bands..

Another option is FFT, which isolates the frequency bands in software.    Of course, this gives you more flexibility, but the software is much more complicated.  (There is an FFT library so you don't have to write the code from scratch.)   With this option, you need to bias the input at 2.5V, since the Arduino input cannot handle the negative half of the audio waveform.  (That's just 2 resistors and a capacitor.)

A 3rd option would be analog filters built with op-amps (one for each frequency-band).   You probably don't want to do that!



-----------------------------------------------
I always mention a trick I use with the lighting effects I've built - I keep a 20-second moving average of the volume and I use that as a reference  (or some of my effects use the 20-second peak as a reference).   I also automatically switch between the 5V and 1.1V ADC reference depending on the loudness.    That way, the effects automatically adjust to quiet or loud songs, or changes in the volume control and the lighting controller doesn't need any kind of manual sensitivity control.

I've never done anything that's frequency-sensitive...   (Well, a million years ago when I was  kid I built a color organ from a kit, but I got bored with it.)    All of my effects are simply controlled by the volume, and I have several different sequencing-chasing, blinking-pattern effects that are randomly activated (I think there are 8 different "modes").   One of my effects is a "VU Meter".   All of my effects are randomly reversed (so the VU Meter goes down instead of up, or right-to-left depending on how the lights are arranged).  All of the effects are also randomly inverted (so louder turns-off the lights in the VU Meter instead of on, etc.).     

Another simple effect is that I throw-up a random on-off pattern (with some lights on and some off).  Then, the on/off state of each light is changed with the loudness/beat.     Or, the lights that are off will come-on (or flicker-on)  when the volume is louder than average, and turn-off when it's less than average.   The lights that are happen to on in the random pattern work in the opposite direction, flickering-off with loudness.



 
7  Using Arduino / General Electronics / Re: can we measure TTL output using a multimeter? on: August 06, 2014, 06:37:49 pm
You can make a crude pulse tester probe with a couple of LEDs and a couple of resistors.    Wire one LED/resistor between the probe-input and ground so that it comes-on when the probe is connected to 5V.   Wire the other LED/resistor between the probe-input and 5V so it comes-on when the probe is low/grounded.

With "normal data" switching between high and low, both LEDs should glow and/or flicker somewhat dimly.    And, you can read constant-high or constant-low.      The only problem is when you have short pulses or infrequent pulses, you may not see anything happening.

You can also buy (or build) a slightly more advanced logic probe that can detect short pulses.

But, it's hard to beat an oscilloscope! smiley-wink   (I don't own a 'scope, but I have a couple at work.)
8  Using Arduino / Project Guidance / Re: High and Low = 5V and ground? on: August 06, 2014, 06:23:12 pm
Because the Arduino can only put-out 40mA.   You risk damaging the Arduino if you attach a motor directly to an output pin.

The Arduino can power an LED, but it can't power a motor.   You need a MOSFET, transistor, or relay to "boost" the power.

If you were to measure the output-high voltage with the motor attached, you'd find it's low...  Probably less than 1V.   Please DO NOT try that because you will stress the Arduino.
9  Using Arduino / General Electronics / Re: Relay Question on: August 05, 2014, 05:08:49 pm
It is designed to be "triggered" by 5V so it will work with the Arduino.    And it's rated for 3 Amps, which is about 300 Watts.   For something like a 100W light bulb, it would be perfect.
10  Using Arduino / Project Guidance / Re: Third Year Project (first post). on: August 05, 2014, 04:41:43 pm
Quote
  I want to use it for my third year project containing 'animatronics'. I have a vague idea of what i want to do but my dads has been going on about relays and transistors and I'm slightly confused.
3rd year of what?   I take it you are NOT a 3rd-year university electronics student, or you probably wouldn't be confused by relays & transistors. smiley-wink

Have you done any programming or electronics before?

Like any project, take it one step at a time.

Like Shpaget said, try-out some of the examples.     Or If you have some programming experience, start by looking at the language reference.   At some point you should read-through programming language reference, but if you've never programmed before start with the examples or none of it will make any sense.

The two most important concepts in programming are loops - doing stuff over-and-over, and conditional branching - if-statments, etc., which is how comupters "make decisions".   

I'd start your project  with with the button Example...  You push a button (a switch that you need to wire-up) and the pin-13 LED on the Arduino board lights-up. 

 - Then, replace the button with your PIR (and/or "trip wires") and just make sure you can sense the movement and turn-on the LED.

 - Then, figure-out the drill-wiring.    The Arduino puts-out 5 Volts, so you can test the drill and relay/transistor/MOSFET (whatever you decide to use) with a 5V power supply (or the Arduino's 5V power-pin) before you try controlling it actively with the Arduino.

 - Now that your input and output circuitry are working, you can connect everything together and turn-on the drill when someone trips the sensor(s).

 - If you need some more advanced programming, you can do that now that the hardware is fully-functional.

 




11  Using Arduino / Project Guidance / Re: Programming FFT For Uno, Audio to Light System on: August 05, 2014, 03:58:15 pm
Hmmmm...  I thought the MSGEQ7 sample code was on the SparkFun site, but I'm not finding it now.   I didn't find it on the manufacturer's site either.  smiley-sad   You can find sample projects, but maybe somebody can point you to the "real master code".

If you don't want to dim the LEDs, you don't need PWM.

I'd save the smoothing/averaging for a future enhancement.    Of course you can smooth any or all of the inputs.     They are just numbers in an array.    I'm not using any frequency-filtering, so I have one array for the left channel and another for the right.   You might want an array for each frequency band, or maybe you can use one array to average everything.

What I do, is I save a "reading" once per second and store it in the smoothing array array.    So, my 20-second array only has 20 values, and once per second I re-calculate the average and re-find the peak value in the array.  Some of my effects use the peak as a reference.    The peak in the array isn't the true-peak (and the average isn't the true-average) since the Arduino is running in a fast-loop and I'm only grabbing/saving a value once per second.     But, it's close enough for what I'm doing.

The once-per-second timing is based on the Blink Without Delay Example, where I check the to see if one second is up every time through the loop.    (I actually have multiple "timers" running at the same time.)   
12  Using Arduino / Project Guidance / Re: Programming FFT For Uno, Audio to Light System on: August 05, 2014, 01:07:41 pm
DISCLAMER - I've never used the MSGEQ7 chip.

Quote
I'm using a spectrum analyzer shield for the music analysis https://www.sparkfun.com/products/10306.
With the MSGEQ7 chip, you don't need FFT.  That chip has the frequency-filters built-in, which REALLY simplifies things.    You get-out a time-multiplexed DC voltage that corresponds to the signal level of each frequency band.   You will need the MSGEQ7 code to get the clocks & timing right.

Quote
My vision is to have Strip A light up the 3 frequencies in the low range and Strip B to light up the 3 frequencies in the high range while both overlap the mids.
The MSGEQ7 code will give you 7 "numbers".   You can average/combine those to suit your needs.    As a "lighting effect", you may get better results if you throw-away the middle band, or even if you throw-away more than one middle-band and let the LED's respond to the bass & highs....  That's up to you and you can experiment once you get going.   


Quote
I've also found a code to create all digital pins to PWM however, I'm only requesting one digital pin to become a PWM.
So...  The entire LED strip is going to dim as a whole, right?     You'll need one PWM output for each LED strip.

You're also going to need a MOSFET (or something) to power the LED strip.   I'd suggest you develop the project with a pair of regular LEDs and switch to the LED strips after everything else is working to your satisfaction.




----------------------------------
Additional thoughts.....

For my lighting effects, I take a moving average (see the Smoothing Example) over about 20 seconds and use that for a reference.   That way, I can automatically adjust for volume changes for good "lighting action" with quiet or loud songs, or when the volume changes.   I also automatically switch between the 5V & 1.1V ADC references depending on signal level.  (Like I said, I've never used the MSGEQ7, so I can't really help you with adding those features to your sketch.)

Since your spectrum shield has two MSGEQ7s, you might want to get 4 LED strips and make a stereo effect.

PWM (dimming) may be not be necessary...    One of my effects simply turns-on the light when the signal is louder than average and turns it off when the signal is below average.   That gives me a nice "flicker to sound" effect that automatically adjusts to the moving average for a lot of "light action".   (Personally,  I don't want a  dim effect....  I want the lamps/lights to flash brightly.)       

13  Using Arduino / Project Guidance / Re: RMS calculation for acoustic signal on: August 05, 2014, 12:21:53 pm
Quote
I am the beginner to embedded platform and learning the concepts now.
Do you have a microphone/preamp circuit?   Before you worry about calculating RMS, you've got to be able to convert sound into ADC readings.

RMS (Wikipedia).   

For real-world sound, you'll need more than one cycle because every cycle will be different.   It's a question of how much averaging/smoothing you want.

If you use the conditioning circuit to bias the signal, don't forget to subtract-out the bias.   


14  Using Arduino / Audio / Re: JFET Audio Line Mixer For "Organ" Musical Note Polyphony on: August 05, 2014, 11:54:26 am
Quote
From the outputs of the binary counters, transistors and other components can be employed to mix these audio frequency signals.
Normally, mixing is done with a Summing Amplifier.   Audio mixers are built-around summing amplifiers.

If the resistor values are all equal, the output voltage is the inverted sum of the inputs.   The phase/polarity inversion doesn't affect the sound, but sometimes an op-amp inverting stage is added to re-invert the signal.   
15  Using Arduino / General Electronics / Re: Gauging Interest: Printed Circuits on Paper on: August 05, 2014, 11:09:23 am
How to you solder to paper (or otherwise make reliable electrical & mechanical connections)?

How conductive is the ink?

Quote
If this works...
Try a simple circuit a resistor & LED.
Pages: [1] 2 3 ... 88