Show Posts
Pages: 1 ... 40 41 [42] 43 44 ... 78
616  Using Arduino / General Electronics / Re: ProMini 3.3V DigitalPin Output for OSRAM LRTB (RGB-LED) on: January 04, 2013, 06:52:34 pm
Quote
What voltage is coming out of the digital pins reliable?
You don't run LEDs  from a constant-voltage source...  You run them from a constant-current source.   (Or, from an approximately-constant current source, such as a known-voltage across a resistor.) 

If you try to run from a voltage-source, a very small change in voltage will make a large change in current (and a large change in brightness).   A small increase in voltage could even result in a big-enough current jump to fry the part.    The actual voltage drop (at a given current) will vary from part-to-part, and with temperature.

And, the different colors in an RGB LED will have different voltage drops (at the same current).

I think you are going to need more than 3.3V (and a transistor or MOSFET), especially for the blue... You need enough "extra" voltage, so that you can have a (relatively) constant voltage drop across the resistor (which is the "remaining" voltage after you subtract the LED voltage-drop).   
617  Using Arduino / General Electronics / Re: Thoughts on an Audio Control of RGB LEDs on: January 03, 2013, 08:07:59 pm
Quote
Here is my initial schematic. Basically this takes the left and right audio signals and filters them to exract the Bass, Mid, and Treble then run through OP Amp to get the signal up to something that is a little easier for the Analog Inputs to see
A line-level signal (like the audio outputs from your CD or DVD player) is around 1V, and that should be fine as long as there's no volume control in the signal path.

Remember, there is an optional 1.1V reference for the Arduino's A/D converter.    A headphone output (at full volume) is in the same ballpark.    Sometimes the peak line-level will go above 1V (it depends on the equipment and the loudness of the signal).   But, you'll loose a little signal with your passive audio filters.  With the 1.1V reference, a signal as low as 0.1V (an A/D reading around 100) should be enough for your lighting effects.

With my audio-activated lighting projects, I "auto range" by reading the input level, and if it hits 1023 with the 1.1V reference, I switch to the 5V reference.   And if the peak doesn't go above around 200 for about 20 seconds, I switch to back to the more-sensitive 1.1V reference.

In additon to the 1.1V/5V hardware reference, I generate a software reference from a 20 second running average.    And, I keep track of the highest peak over the last 20 seconds.  That way, the lighting effect can automatically adjust to volume changes.  In your case, you might want a software reference for each frequency band.  The actual trigger threshold depends on the particular lighting effect.  Sometimes I take the half-way point between the 20-second average and the 20-second peak.

In your case, if you simply turn-on the LED with the signal is above average and turn it off with it's below average, each LED will be on half the time and you'll get lots of "blinking-action" (if that's what you want smiley-wink ). 

With the hardware auto-ranging and the software auto-calibration, I have a some lighting effects in my van that run from the volume-controlled input to the power amp and it seems to work fine at any volume.
618  Using Arduino / General Electronics / Re: Basic resistance question on: January 03, 2013, 07:46:11 pm
Quote
...lets say the resistor has a resistance of 50 Ohms (I have no idea what the typical LED resistance is)
The resistance of an LED is non-constant and nonlinear.   At low voltages, the resistance is relatively high, and at high voltages, it's very low.   (A diode or LED basically "turns off" when the voltage across it is low, and it "turns on" when the voltage across it is high-enough.)

Ohm's Law is a physical law.  It's ALWAYS TRUE* and you CAN calculate the resistance under the particular conditions if you know the EXACT voltage/current characteristics.   If the LED is rated 20mA at 2V, that's 2V/0.020 = 100 Ohms. 

But, those voltage/current characteristics vary from part-to-part and with temperature.    So if you apply 2V, you might get a lot more than 20mA (the resistance might be lower than 100 Ohms) and the LED might burn-up, or you might get a lot less than 20mA, and the LED will be too dim.   That's why we use something else (typically a resistor) to control the current, rather than applying a controlled voltage.


* In AC circuits wiht inductors and/or capacitors, there can be phase differences between the current and the voltage.   So, if you measure the voltage and current it can seem like Ohm's Law isn't true.   But, if you measure voltage and current at any instant in-time, you'll ll find that the law holds true. 
619  Using Arduino / General Electronics / Re: How many mA? on: January 03, 2013, 02:47:02 pm
That depends... How much current do you need?   

It's a linear regulator, so the power (and heat) depends on the volatage dropped across the regulator and the current through it.   If you are powering the board from 7V (with 2V dropped across the regulator) you can get more current than if you are powering the board from 12V (with 7V dropped across the regulator).

Itr also depends on what your Arduino is powering...   If you've got a bunch of LEDs connected to the Arduino's outputs, that means less "extra" current avaliable for your other circuitry.
620  Using Arduino / General Electronics / Re: Arduino Capacitor Selection on: January 03, 2013, 02:34:33 pm
I assume these are "bypass" capacitors (between the power supply and ground)?   You can use ceramic or monolithic .    Really, anything will work*.     And, a higher (uF) value won't hurt anything.

The voltage rating on a capacitor simply it's maximum rating** (if you put more than the rated voltage across it, you might fry it).    You're probably not going to find any ceramic or monolithic capacitors rated for less than 25V, so that shouldn't be an issue either.  It's "good practice" to allow some safety margin...  If you have 25 Volts, you should use a capacitor rated for a bit more than 25V.

The only downsides to using a higher value or higher voltage capacitor is physical size and cost.  In some applications the capacitor value is more critical, but in most applications a higher value won't hurt.   And a higher voltage rating never hurts.   



*Electrolytic and Tantalum capacitors shouldn't be used as bypass capacitors unless you put a ceramic/monolithic in parallel, because these capacitors don't always "act like capacitors" at very-high frequencies.   Other types of capacitors (such as film capacitors) would work fine as bypass capacitors, but they are more expensive so they are generally used where the value and tolerance are more critical.

**The voltage rating on a capacitor (or transistor, etc.) is like the maximum weight rating on a ladder.   As long as the ladder is rated for your weight or more, it's safe for you to climb the ladder!
621  Using Arduino / Project Guidance / Re: Clean and energy efficient LED dimming on: December 20, 2012, 08:21:00 pm
Quote
In the moment everything is open - but when the wallpaper is done it's to late to change
something. So i need to make sure everything is planed correct and thats the reason
i read allot.
I'd say try do make it easy to access the wires or run new wiring.  If you have an attic or crawl space, that's not hard to do.  Otherwise, maybe you can run some conduit.  It's very-likely that something will need to change in the future.

And, it sounds like its a little late to be designing some new-untested lighting concept.  For something permanent in your house, I'd consult an electrician and install something tried-and-true.  You can buy dimmable and non-dimmable LED home lighting that runs off 12V or 120/240V, and as far as I know it's all highly efficient so you shouldn't need to design something yourself unless you really want to.
622  Using Arduino / Project Guidance / Re: Clean and energy efficient LED dimming on: December 20, 2012, 08:10:06 pm
Some high-power LED power supplies will accept PWM or variable DC as a dimmer-control signal.   You can filter PWM to variable-DC, but sometimes it's a 0-10V control so you'd have to amplify the Arduino's 5V output.  Most of these supplies are highly efficient.

PWM is 100% efficient (in an ideal world), but in addition to (or along with) dimming, you need current limiting.   With low-power LEDs, you normally use a resistor for the current limiting, and that's not efficient, but no big deal if you are only wasting a few milliwatts.    In fact, switched current-limiting (very efficient) is usually based on PWM with feedback-control and a "smoothing" inductor.

Quote
Is there a way to modify the "Highly Efficient 0-100% LED Dimmer" and use it with
the Arduinos PWM?
Probably...   But, by the time I figure-out how that circuit works and how to modify it, I dunno...   

Quote
To much detail?
Hm, but nobody wants flickering lights in the living room?
As long as they flicker at a fast rate, nobody can see it.  Older flourscent lights flicker at 2 x the 50/60 Hz line frequency.   TVs flicker at the same rate.  Film flickers at twice the framerate (2x24Hz).   Most people aren't bothered by that.  Newer flourscents with electronic ballasts flicker at kHz frequencies and nobody is bothered by that.   The Arduino's default PWM rate is ~500Hz, and nobody can see that either.
623  Using Arduino / Programming Questions / Re: arduino sound visualizer on: December 20, 2012, 04:37:55 pm
Taqke a look at the MSGEQ7.  If pre-set the frequency bands work for you, that will be the easiest solution.

Quote
I don't want it to display frequency just when it hits a certain high point.
The digital filtering/FFT is the hard part (which the MSGEQ7 will do in hardware).   Then, it's just a matter of using an if-statement to turn-on an LED when the signal(s) exceed your preset threshold.

Don't forget that you can't put AC signals into the Arduino, since you can't put-in negative voltages.  So, you'll need some hardware to bias the input (typically at 2.5V).   Again, the MSGEQ7 can take care of that issue.

If you've never done anything like this this before, I'd start by flashing-on an LED when the overall audio signal reaches your target "loudness" level.   Then add the frequency-filtering.
624  Using Arduino / Project Guidance / Re: multi rgb hookup help needed.. on: December 20, 2012, 04:23:51 pm
Quote
2 of these then is enough for 1 grid of mine.. since it can drive 128 leds together no?

MAX7219 8Digit LED Disp Driver
With single-color LEDs, yes.  But, I don't believe those will work with RGB LEDs.   You need 2 connections (anode & cathode) per LED).   So you'd need 6 connections for the 3 LEDs inside each RGB LED, and they are not made that way.   There are only 4 connections.

Quote
...but i'm still at a loss and confused as to how to hook it all up
The trick is to start small (with a few LEDs) and experiment.   Don't start by soldering-up 100 LEDs! smiley-wink   And, buy a few extra parts so you can try different things, and in case you "fry" something.
625  Using Arduino / Project Guidance / Re: multi rgb hookup help needed.. on: December 20, 2012, 01:33:02 pm
I believe you'll need 300 drivers or 300 "ports" to drive the 300 colors.     As far as I know, you can't wire it as a matrix (with 20 drivers for each color) because each LED has a common anode or common cathode shared by each internal LED.  Of course, you can arrange the LEDs in a matrix and and program it to work/act like a matrix. 

Quote
how many resistors and such...
That really depends on what kind of driver circuit you choose.   

Quote
how do you define the colors in the coding? is it something like this:
That will depend on your hardware design. 

300 individual colors is a LOT of wiring (unless you can make a PC board).   I'm working on a project now that has 48 individually addressable LED, and the soldering/wiring for that was tedious.   I used 6 MAX6968 driver chips, which have 8 ports each.  (There are other driver chips with more outputs.)  The chip I used takes serial data, so it only uses 3 Arduino I/O ports to drive/address all 48 LEDs.  And, it has a built-in constant-current driver, so each LED doesn't need a resistor.
626  Using Arduino / LEDs and Multiplexing / Re: xmas light driver, not sure what i did wrong on: December 18, 2012, 02:25:33 pm
Have you tested the TRIAC driver alone?   i.e. Connect 5V to an input to see if the light comes on?

What kind of christmas lights are you using?  (Regular 'ol incandescent or LED?)    LEDs might have some sort of power supply that doesn't "like" being switched on & off rapidly.   

Are the lights stuck-on or stuck-off?   
627  Using Arduino / Project Guidance / Re: Building a tester for a special cable. on: December 17, 2012, 05:52:13 pm
If this is a simple pin-to-pin cable, you can do a "walking ones test".    One end of the cable is connected to 8-outputs, and the other end connects to 8-inputs.    As long as you read-back what you write, the cable is OK.     

You write a pattern that looks like this in binary:
0000 0001
0000 0010
0000 0100
0000 1000
0001 0000...

With 8 reads & writes, you can check all 8 connections for opens or shorts.  (You'll want to add some resistors to the ouputs to prevent shorts from damaging the Arduino.)

To catch intermittant failures, you can run a loop and latch or count the errors.

Then, all you really need is one LED to indicate "good".   If you want to diagnose exactly what's wrong, you can add a header or some kind of break-out pins to hook-up a multimeter.  Or, you can upt an additional LED on each digital input.   If you run it slowly enough, you can watch the LEDs and if one doesn't come-on, or if two come on at a time, you'll know exactly wht the problem is...   Or, you slow-down the loop only when you detect an error.

Or if you're not worried about shorts, just hook-up 8 LEDs with no "brain chip".  If one LED doesn't light-up, or if it flickers when the cable is flexed, you've got a failure.
628  Using Arduino / Project Guidance / Re: Quick question about using a simple toggle switch on: December 14, 2012, 02:05:30 pm
That's no problem at all!

With the switch on and the input pulled to ground, there is a small current through the internal pull-up resistor.

Of course if the switch is on 90% of the time, you can reverse your logic  and make "off" the "normal" condition.    But as far as reliability, it doesn't matter.
629  Using Arduino / General Electronics / Re: Innacuracy in converting thermistor resistance to temperature. on: December 11, 2012, 04:00:14 pm
Quote
At the time of measurement RT = 27 C with digital thermometer and arduino temperature display showing 31.58 C.
To me, that seems pretty good for something that's not calibrated.... smiley-wink

You can do the calibration in software.   Typically when calibrating a "straight line", there is an offset adjustment at zero (or at the bottom of your range).   The offset is a constant correction-value added/subtracted from each reading.  In other words, the offset adjustmet shifts the curve (or line) up or down without affecting the slope.

Then the top of the range there is usually calibrated with a gain adjustment.   i.e. A constant correction-value multiplied by each reading.   In other words, the gain adjustment  adjusts the slope of the curve/line.

If you want the most accuracy at room temperature (or somewhere in the middle of the range), you may want to make that one of your calibration-points, instead of using the high-low end-points.

Sometimes, there are different corrections (calibrations) for different segments of the curve/line.  But, you have to be careful not to introduce a discontinuity, where your correction value suddenly jumps and the reading could jump down, when the temperature goes up, etc.
630  Using Arduino / Microcontrollers / Re: what chips dont need a bootloader? on: December 11, 2012, 03:36:04 pm
If you are a hobbyist, and you don't want to buy a programmer and you want to save the trouble of configuring and learning to use the programmer...  The bootloader is a beautiful thing!!!!.

I've used some other microcontrollers & microprocessors in the past, and I was amazed that I could install the IDE and get the "Blink LED" example running in 5 minutes!   With a lot of other platforms, that process could have taken a whole day.   

With the Aruino being it's own self-programmer and is it's own development board, and you've saved a ton of time and money compared to starting from scratch.
Pages: 1 ... 40 41 [42] 43 44 ... 78