Los Angeles, CA, United States
Offline
Full Member
Karma: 2
Posts: 206
|
 |
« on: July 21, 2011, 11:35:57 pm » |
I have a camera flash that is triggered by putting two wires together. Is there any way to trigger that by plugging the wires into my arduino duemilanove and typing something into the serial monitor? It will need to be triggered my a left mouse click.
|
|
|
|
|
Logged
|
C program run. C program crash. C programmer quit.
|
|
|
|
|
|
Los Angeles, CA, United States
Offline
Full Member
Karma: 2
Posts: 206
|
 |
« Reply #2 on: July 21, 2011, 11:59:42 pm » |
Is there anyway I can do this all without external hardware?
|
|
|
|
|
Logged
|
C program run. C program crash. C programmer quit.
|
|
|
|
Los Angeles, CA, United States
Offline
Full Member
Karma: 2
Posts: 206
|
 |
« Reply #3 on: July 22, 2011, 12:02:50 am » |
All I need to do really is touch two wires together momentarly. The problem is it is needs to be triggered by a left click as the program I am using converts sound into a left click
|
|
|
|
|
Logged
|
C program run. C program crash. C programmer quit.
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 241
Posts: 16465
Available for Design & Build services
|
 |
« Reply #4 on: July 22, 2011, 12:35:42 am » |
The arduino does not have isolated pins that allow you to connect external signals together. Without knowing what the two wires have on them for voltage and how much current flows when connected, the best you can do is an external part to keep from blowing out the arduino. Do you have a multimeter? Can you make some measurements on the pins? Is there a ground that the arduino ground can connect to?
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 71
Posts: 6811
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #5 on: July 22, 2011, 12:50:56 am » |
All I need to do really is touch two wires together momentarly. The problem is you don't know exactly what's on those two wires. It is possible that just applying a logic level to one of them and GND or 5V to the other will work, but you don't know that without proper documentation. Therefore the only safe way is with a relay of some kind. Get some proper data and there may be other options. ______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 241
Posts: 16465
Available for Design & Build services
|
 |
« Reply #7 on: July 23, 2011, 07:11:54 pm » |
See the relay connections on the right side. That relay seems to take a bit too much current to drive from an arduino pin directly. 
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 71
Posts: 6811
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #8 on: July 23, 2011, 07:38:03 pm » |
Yes that relay pulls 80mA, way over what an Arduino can supply. Use the circuit shown in Crossroad's schematic. NOTE: If you are careful and use direct port manipulation you could drive the relay from 4 Arduino pins and not need the transistor. But this approach is quite prone to blowing up your Arduino if you get it wrong ______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Los Angeles, CA, United States
Offline
Full Member
Karma: 2
Posts: 206
|
 |
« Reply #9 on: July 23, 2011, 07:43:13 pm » |
Will this work using my relay that I bought? If not can you please explain the schematic
|
|
|
|
|
Logged
|
C program run. C program crash. C programmer quit.
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 241
Posts: 16465
Available for Design & Build services
|
 |
« Reply #10 on: July 23, 2011, 09:19:37 pm » |
You didn't purchase the relay in #9, you purchased one that has lower coil resistance, which requires more current flow. Thus you need an NPN transister which can control that larger current flow without overheating and burning up. When a smaller amount of current is supplied to the base of the transister, a much larger amount of current is allowed to flow from the collecter to the emitter.
|
|
|
|
|
Logged
|
|
|
|
|
Los Angeles, CA, United States
Offline
Full Member
Karma: 2
Posts: 206
|
 |
« Reply #11 on: July 23, 2011, 09:51:26 pm » |
|
|
|
|
|
Logged
|
C program run. C program crash. C programmer quit.
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 241
Posts: 16465
Available for Design & Build services
|
 |
« Reply #12 on: July 23, 2011, 10:10:29 pm » |
The one that I linked to back in Reply #2 because it only needs 31ma to turn it on, which the Arduino can handle. I don't think any of these will work without a transistor as they all need too much current. http://www.allelectronics.com/make-a-store/category/500200/Relays/DIP/1.html
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 241
Posts: 16465
Available for Design & Build services
|
 |
« Reply #13 on: July 23, 2011, 10:13:10 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Greenwood, Indiana
Offline
God Member
Karma: 0
Posts: 508
Arduino rocks
|
 |
« Reply #14 on: July 24, 2011, 12:28:36 pm » |
Even with the lower current relay you still need the diode or the reverse EMF can fry the arduino
|
|
|
|
|
Logged
|
If it was designed by man it can be repaired by man.
|
|
|
|
|