Show Posts
Pages: 1 ... 39 40 [41] 42 43 ... 78
601  Using Arduino / Project Guidance / Re: Sensing Vibration from Plucked String/Metal Wire on: January 14, 2013, 04:52:37 pm
An electric guitar pick-up is made by winding wire around a magnet.  A typical guitar pick-up puts-out about 1 Volt into a high impedance.    (The high impedance implies many-many turns of wire.)  Of course, it only works with steel strings which affect the magnetic field.

If you have metal strings, guitar pick-ups for each string would probably be the simplest and best solution, but it could get quite expensive if you harp has as many strings as a real harp.   So, you might want to experiment with winding your own.

If you put a microhone diaphragm (or a speaker cone) in contact with the string, that would pick-up vibrations too.

The wire itself will be about 3 metres long, preferably in a material that can light up.
You might be able to splice a metal string (or a small steel rod) to a plastic string (or plastic rod).   Or, maybe attach a plastic rod to a spring and and pick-up the spring movement.

You may get enough signal from your pick-up to drive an Arduino input, or you may need a preamp.   You are doing something unique, so you'll have to experiment.   Don't forget to protect the Arduino from negative voltage swings (or voltages above 5V, if necessary).
602  Using Arduino / Project Guidance / Re: Powering LEDs using transistors controlled by arduino mega on: January 14, 2013, 03:49:34 pm
Does anyone have any knowledge regarding values?
Assuming an hfe of 100, you need at least 1/100th of the LED current into the transistor base.   A reasonable rule-of-thumb is 1/50th to 1/20th (2%-5%) to make sure the transistor turns all the way on ;(saturates).    You can use Ohm's Law to make some calculations.  But just as a rough guess, The Arduino is supplying slightly voltage than is "seen" by the LED current-limiting resistor.   So, let's say 20 times the LED resistor, or somewhere around 7-8k Ohms.   If the LEDs are well-matched, and if you never have to replace on with one from a different batch, you may be able to get away with it.

know it's not good practice to use only one resistor to limit the current going to parallel LEDs, but it works and the resistance is enough to prevent a single LED blowing.
Do you know why it's bad practice?   ...The current (around 25mA in your case) gets divided among the parallel LEDs, but it does not necessarily get divided evenly, depending on variations in LED characteristics.  That means some LEDs may be brighter than others. 

It would be better to put the LEDs in series (or maybe pair them in series).   There is a trade-off here, because wiring LEDs in series increases the voltage across the LEDs and reduces the voltage across the resistor. The lower the voltage across the current limiting resistor, the more sensitive it is to supply variations, and the brightness variation with power supply variations (such as an aging battery) will be worse.
603  Using Arduino / Project Guidance / Re: Where I can see who make electronics housing? on: January 14, 2013, 01:42:37 pm
I'd suggest looking for a "precision sheet metal shop".   (Assuming you want "bent metal", with punched holes & optional welding, etc.).   Generally, you'd provide them with a drawing showing all of the details & dimensions (AKA a "blueprint").   One of the sheet metal fabricators my employer in Silicon Valley uses is Perfection Metal Products.

A "regular" sheet metal shop might specialize in heating & ventilation and they might not be able to give you the accuracy you need. If there is silkscreening and/or painting the sheet metal shop can usually sub-contract that stuff.  You'd have to provide the master artwork for any silkscreening.

Usually, this kind thing is too expensive for a hobbyist or for prototype quantities.  You are going to pay for a few hours of skilled labor.   In the pro/commercial world, it can pay-off as you buy a few-hundred boxes at a time and the per-unit cost comes down.  I'd guess it would cost $500 - $1000 USD for an average-size box where I live, and for that price I could probably get 1 box or 10 boxes... or maybe 25.   It would a few-hundred more for painting and silkscreening.   (That would include any one-time set-up or machine-programming costs.)

For hobbyists & prototyping, usually we but a per-made box (example, example) and drill it as needed.   Rub-on lettering is a good substitute for silkscreening.

Or, you can compromise and buy a pre-made box and then find a sheet metal or machine shop to modify it for you.  Often, this is done in low-quantity manufacturing.
604  Using Arduino / Project Guidance / Re: LED strip light fade on: January 09, 2013, 06:53:07 pm
smiley-grin Yeah... the PWM is perfectly linear...  It's our perception that's approximately logarithmic.  So, a PWM change from 10-20 (a 100% increase) will appear to be a bigger change in brightness than a change from 100 to 110 (a 10% increase).

If the change is slow enough, say sunrise effect over a 10 minute period, you can't really see the change happening anyway, so you won't notice any "nonlinearity" in the rate-of-change.
605  Using Arduino / General Electronics / Re: Trying to assemble custom cables and housings? on: January 08, 2013, 06:59:21 pm
I'd love to have one of the nice specialty crimpers to produce a nice bind like that picture, but the price of the official tools is downright ridiculous.  If I ponied up $200 or more for a crimper and then had to abandon my stock when Molex decides to stop producing that part, I'd rage-quit electronics.  If in doubt, just add a touch of solder.
I don't have the correct crimper either, and I usually end-up soldering. 
606  Using Arduino / Project Guidance / Re: How, specifically, does an electric meter measure wattage? on: January 08, 2013, 05:17:37 pm
Secondly, if a 1:1 transformer is used between the meter and the load, would the meter still read correctly?
If you put the transformer between your electric meter and your referigerator, of course the meter is still going to measure the power consumption...

AC just looks like a sine wave on an oscilloscope so what characteristics of that sine wave are measured to determine wattage used?
If you have a resistive load, like a light bulb, the current and voltage are in-phase.   So, you can simply measure the RMS current and the RMS voltage, and multiply.   

With inductive or capacitive loads, the current and voltage can be out-of-phase by some amount (up to 90 degrees).  In that case you have to measure the voltage and current at the same instant and calculate the power for that instant, or take many measurements or measure continuously to get an RMS power measurement.  (I'm sure you use some calculus in your physics class, and you might remember how to multiply two sine waves with a known phase-angle difference...)

If you call an electrician and ask him to measure the power your refigerator is consuming, he might not have a power meter handy*, so he''d probably break the circuit and insert his multi-meter in series to measure RMS current.   Then, he'd multiply by the known line-voltage to calculate the power.  That wouldn't be 100% accurate, since the compressor motor is somewhat inductive, but it would be a reasonable approximation.

If you wanted to do someting similar with the Arduino, it would be easier to measure the peak current.   Since you know it's a sine wave, you can multiply by 0.707 to get the RMS current.  And, since you also know the (approximate) line voltage, you can calculate the power.

If it's for a physics class or for the power company, it's very important to measure the true-accurate RMS power consumption.   For casual/hobby use you may be able to take some shortcuts. smiley-wink

*Power meters are somewhat rare, but I assume most electricians now have a Kill-A-Watt in their truck.
607  Using Arduino / Project Guidance / Re: Switching between 2 motors on: January 08, 2013, 04:26:51 pm
I can't write your skech for you, but maybe I can help you to get started...

Do you understand what the current sketch is doing?   The part that might be tricky is that your main loop "calls" the "drive" functions to operate the motors. 

i.e.  When you see "motor_stop();" in your main loop, it calls (runs) the code following "void motor_stop(){", which is 5 lines of code ending with the closing curly-bracket.  Then, it jumps back to your main loop and performs the next step.

Once you understand what it's doing, you should be able to re-arrange the code to make it do what you want.   You should be able to do what you want by changing your main loop.   You should not need to mess with the drive functions.

 It would be a good idea to review (and try-out) some of the example programs, and you might want to pick-up a C or C++ programmig book, or look for some online tutorials.    Programming is NOT easy!   

The most important things to learn about programming are:

How a program is structured (how functions are called, etc.)
How basic statements work (a statement is basically a line of code that does something)
How basic mathamatical expressions* work (a single expression can be a statement)
How loops work (and how to exit a loop)
How if-statemenst and switch-statements work.

The two most important programming concepts... the two things that make programming really useful...  are loops (doing things over-and-over) and conditional branching (if-statements and switch-statements).   If-statements are how computers "make decisions".  For example, if the time is up, and if the button is pushed, turn-on on the LED...

* An expression is a lot like regular math, except you can have things like X=X+3, which doesn't make sense in regular math, and you always have to put the result/answer on the left, so X=3 is OK, but 3+X is an error.
608  Using Arduino / General Electronics / Re: transistor current gain vs voltage gain. on: January 08, 2013, 01:20:58 pm
Transistors are inherently current gain devices, but that's not usually how we use 'em..    Most signals & sources we use are voltage-based*, so ttansistors are typically used in circuits that amplify or shift voltage.  Or, they are used as a switch to boost the current capability, rather than amplifying (multiplying) the current by some constant gain-factor.

The current gain (hfe) specs are usually very loose, and it varies with temperature, so it's usually a bad idea to use a transistor alone to control/regulate current.    If you want to use a transistor as a current source, there is usually some kind of feedback to measure and adjust the current, keeping it constant.

* For example, as long as we have normal operating conditions, the voltage-output from a microphone or audio amplifier doesn't change with the load resistance.    If we have an amplifier with a voltage gain of 100, the voltage gain is independent of the load resistance.   But, the current (and therefore the current gain) depends on the load resistance.   (But, we never think about the current gain.)  

Or if we have a 12V 1 Amp power supply, it's supposed to put-out 12V no matter what load we attach, as long as we don't exceed the 1A limit.   (How well it holds the 12V constant depends on how well the power supply is regulated.
609  Using Arduino / General Electronics / Re: Transistor on: January 08, 2013, 12:58:11 pm
Does this help?

How much electronics do you know?    Before you try to understand transistors, you need to at least know Ohm's Law and Kirchhoff's Laws.

If you were studying electronics in school, you'd have a semester of DC curcuits, and a semester AC circuits before you start learning about transistors, MOSFETs or other active devices.
610  Using Arduino / Project Guidance / Re: Sensus Omni Pulse Output on: January 07, 2013, 07:32:24 pm
Yeah...  First, you can fry the Arduino with more than 5V into an analog or digital input....  Figure 2-4 in your user manual shows you how to knock-down the voltage with a voltage divider (2 resistors).    With the voltage divider, you won't need an additional pull-up resistor.

It's hard to measure pulses with a meter...  You might measure something, depending on how "dense" the data is.    Is the voltage stuck-low, or stuck high?

Do you have some sort of software (sketch)?    How would you know if the Arduino is seeing pulses?    Do you know how to "read" the serial digital data stream?  (I don't know anything about the protocol, so I wouldn't know what to do with the pulses...)
611  Using Arduino / Project Guidance / Re: AC adaptor on: January 07, 2013, 05:32:20 pm
before removing the ferrite bead and was able to read 20.1V, but after removing it I get 0v? Any idea why that might be?
It probably "sparked" (shorted) one to many times, and it could be dead. smiley-sad   (An internal fues may have blown, but those those things often have to be cut-apart and epoxied or Bondoed back together... Not really recommended...)

Once i get the AC adapter back up and running I was planning on using a 7812 to provide 12v to some devices and then splitting that off with a 7805 for all the 5v devices. Will that work? Does that sound like a realistic plan? Thanks!
If you can get voltage out of it, Yes... Maybe...   The 78xx series are linear regulators rated for about 1 Amp maximum.   And since they are linear regulators, the more voltage you drop across them, the hotter they get (at the same current).    That means you have to watch the power dissipation (Voltage x current = power) as well as the current (you can overheat it at less than it's maximum current rating), and you may need a heatsink.
612  Using Arduino / General Electronics / Re: ProMini 3.3V DigitalPin Output for OSRAM LRTB (RGB-LED) on: January 04, 2013, 06:52:34 pm
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).   
613  Using Arduino / General Electronics / Re: Thoughts on an Audio Control of RGB LEDs on: January 03, 2013, 08:07:59 pm
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.
614  Using Arduino / General Electronics / Re: Basic resistance question on: January 03, 2013, 07:46:11 pm
...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. 
615  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.
Pages: 1 ... 39 40 [41] 42 43 ... 78