Show Posts
Pages: [1] 2 3 ... 88
1  Using Arduino / Project Guidance / Re: Can I use a Arduino uno as a LPT port for laptop? on: August 27, 2014, 10:29:36 am
You have complete control over the I/O pins so of course you can create a parallel port or simulate a computer's LPT port (if you understand the hardware & software protocol).

The tricky part would be on the laptop side, especially if you have an existing  application that uses the LPT port.  In that case, you'd need to write a driver so that your operating system sees the USB/Arduino as a parallel port.

If it was me, I'd just buy an adapter cable.  I assume the operating system & application would recognize this thing a regular parallel port.
2  Using Arduino / General Electronics / Re: 240vac Aussie Plug Wiring. on: August 26, 2014, 05:20:19 pm
That's also the reasion why adapters from the 3 pin connectors to the 2 pin plugs are available but NEVER in the other direction.
Ha!  smiley-grin  In the US, we have these

The cover-mounting screw on a 2-prong outlet is supposed to be grounded and you are supposed screw the ground tab to it.     But, most people don't bother connecting the ground and it's kinda' funny they call it a "ground lift" adapter.  Or, sometimes people just cut the ground contact off of the male plug!

(2-prong power outlets should only be found in older homes.)

3  Using Arduino / General Electronics / Re: Moisture sensors reading very low values on: August 26, 2014, 04:54:00 pm
Maybe the nails or the connections to the nails have rusted/corroded?  Rust is not a good conductor. smiley-wink   

Do you have a multimeter to measure the actual resistance between the nails?  (You'll have to disconnect the Arduino circuitry to accurately measure resistance.)

4  Using Arduino / General Electronics / Re: fading 240v lights in vivarium (Safe method) on: August 26, 2014, 04:20:31 pm
Basically, programming an arduino or IC to control 2 servos. These servos are hooked up to dimmer switches you'd put on your wall by a link bar, so as the servo turns, it rotates the dimmer dial.
I don't like that idea at all! 

Since you don't want to build your own solid-state circuits from scratch, I suggest you look into Home Automation products.   Note that there is a limitation with the X-10 system, in that if you program a light to go-on at 10% brightness, it will come-on at 100% and then dim-down to 10%.   Then, if you send a 20% command, it will go to full-brightness again before fading to 20%.   The INSTEON protocol doesn't seem to have that limitation.
5  Using Arduino / Project Guidance / Re: Controlling voltage out of Arduino (to replace vactrol) on: August 26, 2014, 04:07:21 pm
What are you trying to do?      You can get digitally controlled filters.  That might be better than trying to convert a variable analog filter to digital control.   

PWM isn't a variable DC voltage.  It's a pulsed voltage.  For example, 5V PWM with a 50% duty cycle is on half of the time for an average of 2.5V.  PWM is unlikely to work in your application.

However, you can replace the LDRs with digital potentiometers (if you can find the correct values) and you can control the resistance with the Arduino.
6  Using Arduino / Project Guidance / Re: Dimming 220v LED lights on: August 26, 2014, 03:39:59 pm
There are a few complications...

AC SSRs, are built with TRIACs.    A TRIAC latches-on until the current drops to zero (at the next AC zero-crossing).    So, regular PWM simply won't work.  A normal "phase control" dimmer works by switching-on a TRIAC at some known point in the AC cycle.  Then it remains-on 'till the next zero crossing.    The light is dim if you trigger the TRIAC just-before the zero crossing, and it's bright if you trigger it just-after the zero-crossing.

If you are going to dim a regular incandescent bulb with a microcontroller, you need to detect the AC zero-crossing* (using transformer or opto-isolator to isolate the AC), and then you need another opto-isolator and a TRIAC (or a phase-controllable SSR) to control the AC.   (There are zero-crosing SSRs that won't turn-on in the middle of the cycle, and you don't want to use one of those.)

Some AC LEDs are dimmable (with a regular dimmer) and some are not.   Fluorescent lamps require a different kind of dimmer.

Another way to do it is with the X-10 Protocol.   Then, you can use standard X-10 wall dimmers.   (I've never built an X-10 controller, but I have one that I bought.)

* You don't have to use the actual exact zero-crossing, and that's not so easy to do anyway...  It's not so easy to find the peak either...   You can trigger at some point along the waveform, such as when the voltage hits 10 or 20 volts.   Then, you can figure out from the line frequency when the next zero-crossing is coming.   And, if you find the positive-going 10V point you know where the next two zero-crossings are, so you don't have to find the negative-going 10V point.

When I did this a long time ago with another microprocessor, I used some voltage trigger point from the secondary of the power transformer in the unit's power supply (I don't remember the voltage) and then I just experimented to find the correct timing for minimum & maximum brightness.
7  Using Arduino / Project Guidance / Re: Keeping a box cool on: August 26, 2014, 03:17:33 pm
You can check the "heat rise" by measuring the temperature inside and outside of the box and subtracting to find the difference.    That number should be fairly constant, so if you know the maximum expected ambient temperature you can predict the maximum internal temperature.   

so I am thinking if there are ways to passively reduce the internal temperature as much as possible without a fan.
If you need to move heat out of the box, you can use a heatsink that passes-through the box.   Basically a hunk of metal should work.   It will work best if it's attached to the heat-generating components on the inside, with fins on the outside.   Of course, a heatsink will trasfer temperature both directions...    i.e. If there is more heat outside the box, a heatsink will transfer heat into the box. 

Or as others have suggested, bury the box.     If possible, you might want to make some measurements to see what the underground temperature is.

Of course if the box is sealed, a fan inside the box isn't going to help that much.  It would even-out the temperature inside the box and possibly cool the hottest components slightly, and that might[ help a bit.   But since a fan consumes energy, it generates heat and overall you'll have more heat inside the box with a fan inside.

Do you guys have any more recommendation of how to keep the heat from entering the box?
Given enough time, the inside of the box will always reach the outside temperature, plus any heat generated by the electronics (plus any absorbed heat radiation if the box ins't in the shade).     With enough insulation, you slow-down the heat transfer to average-out the temperature for lower maximums and higher minimums.   Bur realistically, I'd expect the internal temperature to come very close to the outside maximum, even with no electronics inside.

This is less practical than burying the box, but water has a high thermal mass (it changes temperature slowly).    So, "surrounding" the box with water will tend to reduce the temperature extremes.

Evaporation also absorbs heat.   If you have a continuous supply of water, keeping the heatsink wet also would reduce temperature.   
8  Using Arduino / General Electronics / Re: Insulating a three-way joint on: August 26, 2014, 01:09:22 pm
I generally make  something more like a "Y" instead of a "T" and just use one piece of heatshrink.   (If it's components instead of wires, I'll also insulate the individual leads with heatshrink first, or if its' something like a resistor I might put a piece of clear heatshrink over the entire part.)
9  Using Arduino / Project Guidance / Re: connect Arduino MEGA ADK to wall switch on: August 26, 2014, 12:22:00 pm
I turned ON a light from my android app , the light turns ON.
but the wall switch for that button remains OFF while the light is ON.
It's possible to wire a relay in parallel with the wall switch, and that creates an OR condition where either the switch or relay can turn the light on.   

It's also possible to wire a SPDT relay and a SPDT switch as a "3-Way" switch (like where you have one switch at the top of the stairs and another switch at the bottom of the stairs, and sometimes up is on and sometimes up is off).   The problem with that arrangement is that the software doesn't "know" if the light is on or off, so it doesn't know which way to switch the relay.    It' possible to detect if the power is on or off and feed that back to the microcontroller, but probably not practical to do it that way.   

But typically with home automation, the light switch is replaced by a special momentary switch/receiver so you have both manual control and automatic control, and the last command takes precedence.   Here are some switches that can be controlled by X-10 or other home automation protocols.   

I don't know if there are any wall switches that can be directly controlled by bluetooth, but you can probably find a controller that accepts bluetooth commands and translates them to one of the more common home automation protocols.  There are home automation controllers that work with Ethernet or Wi-Fi.    Again, the switches themselves don't use Ethernet/Wi-Fi directly.   The Ethernet/Wi-Fi signal goes to a home automation controller and the controller sends-out a signal to the switch. 

I've got an X-10 timer/controller that's programmed via a serial connection from the computer.  It can be directly controlled from the computer, but it normally runs as a stand-alone unit.   This particular unit doesn't have any software for remote/network control, so I can't control it from a phone.
10  Using Arduino / Audio / Re: Routing Audio Signal on: August 26, 2014, 10:37:38 am
Sometimes I use switch without muting the note. And ordinary switches are making a noticeable interruption on unmuted notes .
If I understand the problem, relays alone are not going to help with that...  A relay is just a switch.   If you switch from A-to-B, any sustain from A is going to get cut-off as soon as switch.   

And, there is a general rule that you shouldn't connect two outputs together, so it's going to be A or B.   If you want to mix two signals together, you need a mixer.  If you want to make a simple mixer yourself, you can build a mixer with a Summing Amplifier, which is just an op-amp and a few resistors.    (Audio mixers are built with a summing amplifier.)   

I thought about using relays but I wondered if I can use my Arduino directly because I remember that I saw some guys made guitar pedals using Arduino like distortion, delay...
I know that's been done, but I don't know the details.   That's not going to help with routing/switching your existing pedals.     I assume these Arduino based effect boxes use an audio shield (an add-on board that has a digital-to-analog converter).   You'd need a separate audio shield for each signal path, and just I don't think that takes you where you want to go.   And, the regular Arduino isn't quite capable of "CD quality" audio (I think the Arduino Due is powerful enough for good audio).    That's probably not an issue with a distortion box. smiley-wink

But I wonder if it allows me do a complicated switch map. For example one switch will be push-n-use but other two switches will be rotative and maybe the other one will open and close another chain separately. I can program Arduino to work this way.
You can get as complex as you want.   The only limitation is the number of inputs/outputs on the Arduino.      You can get single-throw relays which are simply on/off, or double-throw relays which are like an A/B switch.    Probably the most common type of relay is DPDT (double-pole, double-throw), which is two switch-circuits that work together.   These can be used as on/off or A/B, and you can leave the 2nd set of contacts unconnected if you don't need them.     To simulate a rotary switch, you can use multiple relays and switch them on in sequence.   

In contrast to DVDDoug's suggestion, I wouldn't recommend running a relay coil directly off an Arduino pin. An Uno's absolute maximum rating if 40 mA, and you don't want to operate near that if you can avoid it. Use a transistor switch if you're going to use a relay.
That's a good point.    Obviously it makes your circuit simpler if you can directly drive the relays, but there are always engineering trade-offs.    There is also a 200mA total current limitation for the Atmel chip and that may limit the number of relays (and LEDs etc.) you can have on at the same time. 

And, relays that meet the 5V/40mA spec are not that common.   12V relays are much more common, and with a transistor (or someghing like the ULN2803) you can use a 12V relay.

It's probably a good idea to connect an LED (with the normal current-limiting resistor) to each relay coil so you can see which relays are on.

A couple of things you may want to try to help in "development" of your project -

 - You can get some regular SPST (or DPDT) switches and connect them in your signal chain where the relays will eventually go.    You can then switch them manually to make sure you've got all of the signal paths working & switching.

 - Then, you may want to connect the switches to the relay coils to simulate what the Arduino is going to do, before programming the Arduino.

 - When you are developing your program (sketch) you may find it easier to just connect LEDs instead of relays. 
11  Using Arduino / Audio / Re: Routing Audio Signal on: August 25, 2014, 04:30:20 pm
It's not practical to send the signal through the  Arduino.   The guitar's signal is (obviously) analog.    The Arduino is (obviously) digital, and it has an analog-to-digital converter.  But, the ADC is only 10-bits, and the Arduino doesn't have a true digital-to-analog converter built-in, and it just doesn't make since to digitize the signal at that point.

What you CAN do, is use the Arduino to switch relays (or you could use solid state analog switches).    A relay is simply a switch that's controlled electrically.    Look for a relay that has a coil voltage of 5V and a coil current of less than 40mA.   (The Arduino powers the coil, which magnetically changes the state of the contacts.).   The contact ratings are not critical, since the a guitar signal is low voltage & low current and any relay can handle it.
12  Using Arduino / General Electronics / Re: general transistor amplifier questions on: August 25, 2014, 01:42:18 pm
I like with the op-amp idea.   A DC amplifier made from discrete transistors is going to be tricky for a beginner, and you may need multiple transistors.     I haven't built an amplifier from transistors since the 1970's, and personally I'd try to avoid it.

If you can't find an op-amp with high-enough power requirements, you may be able to find a schematic that uses an op-amp plus a pair of transistors.    (Putting the transistors inside the op-amp's feedback loop will simplify the design and give you better precision.)

If you need to get accurate amplification of low voltages (maybe below 1 volt or 1/2 volt) you'll generally need positive and negative power supplies.

That makes sense, but since I want to operate more or less at DC, can I just throw out these caps?
With a DC amplifier you can't have capacitors in the signal chain, but you'll probably have to make some other design changes (or use a different design).   Simply "throwing out" (bypassing) the capacitors will likely throw-off the transistor's biasing to the point where the amp won't work.
13  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.

14  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.
15  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.
Pages: [1] 2 3 ... 88