Show Posts
Pages: [1] 2 3 ... 86
1  Using Arduino / General Electronics / Re: Temperature coefficient diodes. on: July 21, 2014, 02:04:00 pm
Any concerns?
A proper constant current or regulated current supply is going to require an active device...  A transistor, MOSFET, or a chip with transistors/MOSFETs inside.     And since linear designs tend to be very inefficient (and components tend to get hot), a switching design (with an inductor) is commonly used.   

For regular low-power LEDs, we usually don't care about efficiency (and heat is not an issue) we can simply use a voltage-regulated supply and a current-limiting resistor.   (The more voltage we drop across the resistor, the closer we come to a constant current supply, and the less efficient the circuit becomes.)

...If the voltage & current numbers on your schematic are correct, you've got less than 1/2 watt going to the LED (current x voltage) with more than 2W consumed by the other components.
2  Using Arduino / General Electronics / Re: Arduino Due: Minimum reading of "20" on analog inputs on some PCBs on: July 21, 2014, 12:44:13 pm
For the ADC inputs above with minimum values greater than ~4, connecting the ADC input pin directly to ground still will not yield a 0 ADC result. The only way to get a 0 value is to input a slightly negative voltage.
I assume you've confirmed a good ground connection?    The input-ground connects to the chip-ground?

This is just a guess, but try adding a delay before each read.   

Try a long delay (something like 100mS) and if it helps you can dig-into the data sheet or experiment to see how fast the ADC "settles".   
3  Using Arduino / General Electronics / Re: Muting an audio signal with a transistor on: July 17, 2014, 05:29:14 pm
Have you tried connecting the resistor directly to 5V?     If you still get noise that way, there may be noise in your power supply, so try a battery (directly to the resistor without the Arduino).

You might also try a capacitor across the base-emitter junction.    Maybe 0.1uF, or a 1uF electrolytic, or something larger if that's what you have.

If all else fails, you may need to use a relay.   The relay contacts will be completely isolated from the Arduino, and the grounds can be isolated too.

There's no harm in shorting-out the guitar pick-up coil, but you shouldn't short the output of an effects pedal or an active pick-up.  (It's OK to grounding/shorting  the input of a pedal.)
4  Using Arduino / Project Guidance / Re: Controlling TRIAC using DIGITAL pot for a 220v 500w dimmer on: July 17, 2014, 05:02:23 pm
The phase control method using zero cross detection and pwm, is not the way i want to execute the job.
There's a good reason most digital dimmers use phase detection.   (BTW - You can't use "regular" PWM with a TRIAC.)

Instead i thought of using a digital pot to control the firing angle. This way i can control the dimming (linearly or any way i want)  much easily.
  smiley-evil  How about a regular pot controlled by a servo motor?    smiley-evil    You can actually buy a Motor Driven Variac,
  but they are expensive, bulky, and not very practical.   

When I built a digitally controlled dimmer a million years ago with a different microcontroller, I used the power supply's transformer for isolation and I detected the (near) zero-crossing from the transformer's secondary.     The TRIAC was isolated with an opto-isolator especially made for use with a TRIAC (as usual). 
5  Using Arduino / General Electronics / Re: Coupling Capacitors on: July 17, 2014, 02:31:54 pm
If I do not use a capacitor bewteen the nano voltage divider and the amplifier...I do not get an output signal.
Since the amplifier runs from a single-ended supply (no negative power supply voltage) the input will be biased at half the supply voltage (2.5V).     This bias allow for the negative-half of an AC waveform.  Without the DC blocking capacitor, you are probably fouling-up that bias, and doing who-knows-what to the chip. 

The output is normally bridged ("push-pull" with no ground connection to the speakers), otherwise another capacitor would be required on the output, which is also biased at 2.5V.   Headphones usually have a common ground shared by the left & right channels, and I don't know exactly how the "MCL" circuit works, or how you are supposed to connect headphones...   I don't think you are supposed to connect them to ground!

I thought the cap "removed" DC signals (which the square wave is from the nano is is it not?) so only sine wave signal would go though....

Still not getting my head around what an AC vs DC signal is exactly...
Your 20mV square wave goes from ground (zero volts)  to +20mV.  Since it's zero volts half the time, it has an average of +10mV.   If you run it through a capacitor the "DC component" is removed and it goes from -10mV to +10mV (with an average of zero).

At lower frequencies, or with a smaller-value capacitor, the flat parts at the top & bottom of square wave will "droop" back towards zero.     If you think about it, the +10mV and -10mV parts of the square wave are like DC for a very-short time, and the capacitor will start to "block it".

The square wave output from your Arduino has a DC component and an AC component.  Mathematically, it's a 20mV peak-to-peak square wave with 10mV DC added to it.     If you subtract 10mV, you get a regular square wave.   The capacitor doesn't mathematically subtract the DC component, but it does block it.

A normal square wave (without the DC component) can be mathematically constructed from a series sine waves.  As fungus said, these are higher-frequency harmonics.     With a low-pass filter, you can filter-out the harmonics and get a sine wave.     The series capacitor is a high-pass filter...   DC is zero hertz, so it's filtered-out by a high-pass filter.      (It takes a fairly advanced low-pass filter to filter-out all of the harmonics.   And of course, if you change the frequency you have to change the low-pass filter.)
6  Using Arduino / General Electronics / Re: Switch with physical and electronic control on: July 16, 2014, 05:43:59 pm
Typically, you are not going to physically move  a switch electronically or remotely...  The "real switch" is going to be a relay that's controlled by pushing/moving a switch or under software/automatic control.  Once you've got a relay connected to a microcontroller, any number of things can control it!

So, now we need to think about the logic...   Usually, you don't want to use a regular toggle switch because the toggle switch may be in the on position after the microcontroller has turned it off (or vice-versa).

One option is to have an "on" button and an "off" button (momentary switches).   Or, you can find momentary center-off toggle switches that spring-back to the center.

Or, you can have a single momentary button that the software senses and toggles (changes state) every time you press it.

Or, you can create an "or condition" arrangement, where either the switch or microcontroller can turn the relay on, and unless both  are off, the relay stays on.

Or, you can use a toggle switch that works like a "3-Way" switch in a house...  Sometimes up is on, and sometimes up is off, depending of the state of the other switch (r the state of the microcontroller).    That can be done in software so you don't need a double-pole switch like you'd use for a 3-way light switch.)
7  Using Arduino / Project Guidance / Re: Powering mulitple Adruinos (8 to 10) - Best Source for power on: July 16, 2014, 05:06:54 pm
As for not needed 10 boards - I thought about that - and running the individual trigger
wires to each relay - then I'd need like a 10-12 conductor wire, and as the farther you
go on the string, you would need less wires.
Telephone systems and computer networks usually have a separate cable running from each "terminal" to a central "hub".   To me, that seems like the most practical solution (unless you want to use X-10). 

I've seen multiconductor cable used in telephone/telecom systems, but it can be a mess where you "tap in".

But, it's your project and you get to make all of the decisions and compromises! smiley-wink
8  Using Arduino / General Electronics / Re: Reading PWM signal from RC Receiver on: July 16, 2014, 04:30:14 pm
I assume you'll have to average.    And, you might want to correct the offset too (add ~63 or multiply by ~1.044 to make your average nearer to 1500).

Averaging shouldn't take too long when you compare processor speed to mechanical stick speed.   You'll probably want to take a reading every-few milliseconds and calculate a moving average.   You'll just have to experiment with the number of readings to average, and the time delay between readings (if any) to see what it takes.     (See the Smoothing Example.)   And, don't use delay().   If you want to allow some time between readings, follow the Bink Without Delay example so your program can do other things between taking readings.

I think the delay is more related to the signal variation and how much averaging/filtering is needed , rather than how fast the processor works.     

9  Using Arduino / General Electronics / Re: cheap led xmas lights on: July 16, 2014, 02:01:01 pm
I agree with trashing the U.S. lights...  If it's a switchmode power supply, it might work, or the power supply or LEDs might die immediately, or the LEDs might be over-bright and burn-out over a short period of time, or...  the power supply might over-heat and start a fire later when you are not watching it.

I don't want to over-worry you, but a couple of other unrelated (non-dangerous) things that might happen...

 - Solid state relays don't always shut-off completely with a light load.   So, the LEDs might stay on or glow dimly when they are supposed to be off.

 - A switchmode power supply might have a few milliseconds (or several milliseconds) delay when powered-on.

 - The output capacitor in the power supply may cause the LEDs to "dim-off" rather than "snap off".
10  Using Arduino / Project Guidance / Re: Convert pulsetrain into square wave. on: July 16, 2014, 12:39:33 pm
Maybe....  It depends on the characteristics of the pulse train and what "information" you need from it.

If you have a rectangle wave or pulse of a constant frequency, you can convert it to a perfect square wave of one-half the frequency by toggling your output-state on every rising-edge (or falling edge) of the rectangle wave.  That's traditionally done with a flip-flop.  You don't need a microcontroller on any programming.

If you have a serial data steam, you could detect the data-stream and generate a square wave, but of course the square wave wouldn't contain the serial data.
11  Using Arduino / General Electronics / Re: Are residential customers billed for Real or Apparent Power ? on: July 15, 2014, 02:41:07 pm
I believe a watt-hour meter measures true power

...but real power is well under 100mW.
I haven't analyzed the circuit, but I'm not sure I believe that.  What's the zener voltage?  What's C1?   220uF?  220pF? It's kinda funny you've got 1W resistors if you only expect to dissipate 100mW total.
12  Using Arduino / Project Guidance / Re: Using a switch & LED to drive input pin on: July 15, 2014, 01:29:05 pm
Is there a way to connect 5 volts in a circuit with the led and the magnetic switch then to the pin to turn on the relay.
Sure!  Wire the LED in series with a resistor (as usual).  Connect one end of the LED/resistor to +5V and the other end to the switch.  Ground the other switch contact.   Now when close the switch is closed (turned on), the LED will come on.

Also connect the non-grounded end of the switch to an Arduino input.    Enable the Arduino's internal pull-up resistor so make sure the input reads high when the switch is open.  When the switch is on (closed) , the Arduino input will be pulled low.  Your sketch can read the input state and take appropriate action.
13  Using Arduino / Project Guidance / Re: Ultrasonic audio amplifier. on: July 15, 2014, 01:10:31 pm
I doesn't get much simpler than an LM386.  Is the 386 really obsolete?   Are you having trouble finding it?

The biggest problem I see with that circuit is that it needs another 386 (or something similar) on the output to drive "normal everyday" dynamic headphones.
14  Using Arduino / Project Guidance / Re: Powering mulitple Adruinos (8 to 10) - Best Source for power on: July 15, 2014, 12:56:24 pm
One more thought....

If you are concerned with power efficiency, run the Arduino from a 5V switching supply.  The on-board regulator is linear and at 9V almost as much power is wasted in the regulator as the Arduino is using.    (At 10V, the regulator is consuming exactly the same amount of power as everything running from it!  i.e.  50% efficiency.) 

If you need 9V for something else you can use two power supplies or a dual power supply. 
15  Using Arduino / Project Guidance / Re: Powering mulitple Adruinos (8 to 10) - Best Source for power on: July 15, 2014, 12:35:07 pm
One power supply isn't necessarily more efficient than 10 power supplies.     And, if you use switching supplies (or one switching power supply) they are nearly 100% efficient.

You'll need to measure (or estimate) the current required for each Arduino in your particular application.   I don't know what the current requirement for the Arduino alone is, but I'm sure someone can tell you.   Thenyou'll ned to know the current requirements for the RF module and relays.   And, leave yourself some safety margin.    A power supply with extra current capability won't be any less efficient and it will be more reliable.

So, I am considering running a low voltage run along with the AC lines and tap each unit off this line.
If you can run wires in parallel with the AC line, you probably don't need 10 Arduino's. smiley-wink

BTW - And I'm not sure what you are doing,  but you can buy "home automation" systems such as  X-10  or Insteon.   I've got an X-10 controller/timer and 8 or 10 X-10 controlled lights & outlets.   The controller get's programmed by the computer and it turns-on my porch lights at sunset, etc.     And, I've got a couple of manual controllers, so I can press a button an turn on/of everything that's X-10 controlled.

 I've also got a "sunrise simulation" gizmo I built with a microcontroller that slowly fades-on the light with a "gentle beeper" that wakes me up in the morning.   That gizmo doesn't have it's own time-of-day clock, so it's plugged into the X-10.   (With the Insteon dimmers, you don't need the gizmo because you can actually dim-up in steps to simulate fading-on the light over several minutes.)

You can interface the Arduino with the X-10 protocol, but I've never tried it.
Pages: [1] 2 3 ... 86