Show Posts
Pages: 1 ... 700 701 [702] 703 704 ... 1169
10516  Using Arduino / General Electronics / Re: using a 5v relay with arduino on: May 26, 2011, 05:28:02 pm

it's shaped like the above thing...right now i have the arduino going into pin one and i don't know what else to do...i don't know where to power the thing or ground it or anything..the data sheet doesn't give me much as you can see...i've never used a relay before so any help would be much apreciated!

I couldn't find the spec on your link that shows 20ma coil current draw, but if it's a fact then you can drive the relay coil directly from an Arduino output pin. Your can wire it with pin 3 (of the relay) to a arduino output pin, then pin 4 would wire to a ground pin. Then a transient protection diode should be wired right at the relay with the cathode of the diode wired to pin 3 and the anode to pin 4. Pins 1 and 2 are the relay contacts that can wire to the circuit you are controlling.

10517  Using Arduino / Microcontrollers / Re: Maximum current of a microcontroller circuit on: May 25, 2011, 10:34:42 pm
If I used one 2n2222 transistor per LED, would that cause any problems?

That should work just fine.


10518  Using Arduino / General Electronics / Re: LM317 Help on: May 25, 2011, 02:58:47 pm

Thanks! smiley-grin

I hope I'm not too annoying with all these questions smiley-razz, maybe something like this?

Could you also tell me what exactly am I look for? N-Channel MOSFETS?

Mouser shows that at $7 a pop:

Sparkfun sells a logic level N-channel power mosfet for a buck:

10519  Using Arduino / Installation & Troubleshooting / Re: Switching between boards on: May 25, 2011, 10:56:35 am
The Uno and the Duemilanove use different USB PC software drivers. Review the installation instructions and be sure you have installed the FTDI drivers that the Duemilanove requires.

10520  Using Arduino / Programming Questions / Re: Watchdog Timer help please! on: May 25, 2011, 03:05:32 am
Anyone know if I can load a bootloader right with the arduino software over USB?

Any 328 based board can run the newest Uno 328 bootloader code. Once loaded you will then have to select the uno board from then on, even if it's a physical 2009 board or some clone board, etc, as long as it has a 16mhz clock source.

 As far as how to burn a bootloader and what you need, that has to be one of the most frequently posted topic these days, a search will show the several methods.


10521  Using Arduino / Programming Questions / Re: Watchdog Timer help please! on: May 25, 2011, 02:36:52 am
Some posts suggest that if you use the watchdog timer on a stock bootloader, it will definitely loop your board. Others say that it MIGHT loop your board... Still others post tutorials on how to do it without any mention at all as to whether its safe to use or not. So which is it?

There is some history to the problem. The arduino bootloader from a few 'boards' ago would not handle watchdog timer resets correctly, where if WDT timed out it would cause a reset which would activate the bootloader code, which didn't handle the WDT correctly (it didn't disable the WDT) so it would just time out once again (after it's programmed timeout period) and restart the bootloader once again, etc. So that must be what 'loop the board' means, although I hadn't heard it called that. More like stuck in a WDT timeout loop.

Anyway, adafruit was the first to release a 3rd party bootloader code that correctly handles WDT interrupts so it doesn't get trapped in the bootloader. And I know that the newest UNO board has an updated bootloader that also handles WDT correctly. I can't say about other arduino boards, as I've made it a practice to use the adafruit bootloader for all my 328 based boards.

10522  Using Arduino / Programming Questions / Re: analogReference(INTERNAL) error on: May 25, 2011, 02:07:37 am
I have tried it with 'INTERNAL1v1' and 'INTERNAL2v56'  and get the same error.

You were on the right track, however as they say, C is case sensitive, so try it with a big V.

INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)
INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)

10523  Community / Bar Sport / Re: Your latest purchase on: May 24, 2011, 09:20:57 pm
Yes I think I got it from them.

And yes, I wanted to have a fallback in case I did something I shouldn't to the fuses. Like disable serial programming.

Nice programmer. Here is my version using a ladyada usbtiny and using a windows avrdude GUI:


10524  Using Arduino / Installation & Troubleshooting / Re: External power supply usage? on: May 24, 2011, 08:46:18 pm
Alright, I'm using an UNO. The reset thing just has to do with the fact that I'm keeping time without an RTC. If there's a power failure setting the time again is no big deal, but I'd rather not have to set the time every single time i hook up my laptop.

There is no problem with having external power and USB power on at the same time. The boards that have an auto-voltage selector circuit will always utilize external power if it's avalible, that is it has priority over usb power. However having your arduino board reset or not is more a function of the PC software you are using and if it activates the DTR signal or not. Most arduino boards these days have the auto-reset on DTR function so if it's important that your running sketch is not reset then you might consider disabling that function and only enabling it when needing to upload a new sketch.

10525  Using Arduino / Project Guidance / Re: Measuring Mains Voltage on: May 24, 2011, 08:26:14 pm
what's wrong with a voltage divider?

One part I don't like about using a voltage divider for directly measurement with an Arduino is that one then must have a common ground connection from the arduino to the AC neutral. Also be aware that if you want to read an analyze the AC waveform directly with an arduino, you are going to need some op-amp conditioning to offset the voltage so that it is all within a 0 to +5vdc range, the arduino cannot handle the negative portion of a AC signal.

As far as if it's intrinsicly safe to deal with direct connections to household AC power or not, it's all about the knowledge and experience level of the person asking the question. The typical snarky response around here is that if you (not aimed at you personally, just posters at random) have to ask, you most likely shouldn't be fooling with it.

You should understand that there are a awful lot of very young user that post such kinds of questions or seek help dealing with AC power. We normally have no idea what their actual age or experience level is, so it's pretty understandable that many of us discourage practices like direct wiring to AC power circuits. It's not a reflection on you, but rather a general feeling of responsibility to encourage safe practices for posters new to the world of electronics.

10526  Using Arduino / Project Guidance / Re: get the arduino to push the button on: May 24, 2011, 08:08:48 pm
thanks for the help! Lefty, do you know a good schematic anywhere for wiring up that relay? I would still use a tip120 or some sort of transistor, no? does this circuit look good?
it's good to know that i can drive the relay with the arduino...having three wall worts for one video would be a little ridiculous...

That circuit (using a transistor to switch the relay) would work fine. However that relay I linked for you only consumes 10ma of current, so an arduino output pin can drive it directly without a transistor if you desired. If you do wish to not use a transistor then just wire one side of the relay coil to an output pin and the other side of the coil to ground. You should still use a diode like shown in the circuit, but wire the diode right across the relay coil terminals with the anode side of the diode wired to the grounded side of the relay. The two relay contact terminals of course just wire directly across the switch contacts you are controlling.

10527  Topics / Science and Measurement / Re: can't get full range from 4mA-20mA sensor on: May 24, 2011, 08:03:09 pm
Well that wiring plan looks OK to me. Do you have a link to the sensors datasheet? Possible things you can try to troubleshoot:

Measure the current in the loop when you apply 100% humity to the sensor. If it doesn't reach 20ma, and the sensor is not at fault, then you need to either increase the loop voltage or lower the resistor value until you can reach a 20ma = 100% condition. Most loop powered sensors are designed to work with a 24vdc loop voltage and below that there are resistrictions on the total amount of loop resistance allowed (wire length + sensing resistor).


10528  Topics / Science and Measurement / Re: can't get full range from 4mA-20mA sensor on: May 24, 2011, 05:18:33 pm
Can you draw out the complete circuit being used including the loop supply power supply and how it's wired to the arduino?


10529  Development / Other Software Development / Re: idea for physics.h library on: May 24, 2011, 05:10:25 pm
Here is a great little free windows GUI conversion utilites that might be useful for checking out many conversion functions you might create:

10530  Using Arduino / Project Guidance / Re: get the arduino to push the button on: May 24, 2011, 05:00:57 pm
I hope this is a simple question...
I am a visual artist and I embed digital photo frames to play videos in my sculptures. The problem is, is that no digital photo frames that I can find play video right away on start always have to press a series of buttons to get the video going.
What I did in the past is just soldered onto the buttons and extended them so that you didn't have to reach into the sculpture to press the button and get the video going. But I'd like to use an Arduino to send a signal to the button to press it. So say I need to press one button, wait a few seconds and press it again, is this is simple as making a digitalOut and setting it to HIGH, delaying, set it to LOW, then setting it to HIGH and LOW again? Would it be even easier(cheaper) to just program a smaller AVR chip to do this, if I really wanted a bare bones setup? There's probably some stuff with voltage that I don't understand so anything you can help me with is much appreciated!
Thanks so much for any feedback!

Yes it is conceptually as simple as that. However because of possible voltage differences and unknown circuit details for the digital frame device, it's often simpler to have the arduino turn small relays on and off with digital commands and wire the relay contacts across the devices' switches. That way there is no need to know the voltage, current value or polarity of the frames button circuits. One relay for each switch you have to control. Here is an example of a small +5vdc relay that an arduino output pin can drive directly.
One should wire a reversed biased diode across each relay coil for transient protection.

Pages: 1 ... 700 701 [702] 703 704 ... 1169