Pages: [1]   Go Down
Author Topic: Triggering a camera  (Read 478 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I recently picked up a USB pen camera with SD card storage to fiddle about with as a project focus to get me learning electronics; to start myself off I thought I'd try my hand at triggering the camera with my mobile using Bluetooth. I've managed to knock out a Bluetooth trigger on my phone over the last couple of days & it's working fine with sending data to my Arduino Mega using a BlueSMiRF however I'm having trouble overriding the switch to trigger the camera, I've had a probe & there's 3.5v going through the switch when bridged. Manual bridging with a bit of wire works fine & I've approximated the voltage being kicked out of pin 8 on the Mega using the code below:

Code:
analogWrite( 8, 182 );

I've checked the voltage with an ammeter & it's around 3.51v so I believe should simulate the bridging of the switch, however it doesn't appear to be working.

I'm a bit lost as to where to go from here, can I even use PWM in this manner or am I barking up the wrong tree? Any ideas would be much appreciated!


Many thanks in advance!
Logged

Offline Offline
God Member
*****
Karma: 2
Posts: 711
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


the name of the function analogWrite() is poorly chosen... I think there are ways of using capacitors to smooth out the signal to do what you want it to ... others who know more about electronics might be able to help you with that. As is, you are not producing 3.5V, but rapidly switching between 5V and 0V which wont have the desired effect.

Have you considered simply using a transistor instead of the switch?
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Damn, I thought that might be the case. I did have a look into capacitor smoothing, hadn't thought of using a transistor though; would a transistor not be subject to the same issue with the modulating voltage supplied by PWM?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31483
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is how PWM works:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html

Quote
would a transistor not be subject to the same issue with the modulating voltage supplied by PWM?
It would but you don't feed PWM into the transistor, just a steady high or low through a resistor. When you feed the base high the transistor turns on and acts like your shorted wire. When you feed the base with a low signal the transistor turns off just like removing your wire.
Just as the wire has two ends so must your circuit. That means connecting the arduino ground to the ground of your camera.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Gotcha, I was stuck thinking about PWM in particular & forgot about my other options  smiley-sweat I'll have a fiddle about with a breadboard & see what I can get working!

Many thanks!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Right, I have the transistor option working so thank you all. I'm a little worried about the voltages I'm applying now, from what I've been reading transistors can be used as amplifiers & pushing the 3.5 operating voltage of the camera through the collector pin of the transistor & then applying the 4.91 volts "digitalWrite( 8, HIGH );" is outputting on the Mega is a little worrying from my newbie perspective. Should I use a couple of resistors to bring the cumulative voltage down to the expected 3.5v or will this not be an issue?
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I really need to do this myself, I have never been able to drive an RC Car and get a decent photo at the same time but with a little fiddling it should be possible to knock together some sort fo electronic trip wire with and adjustable delay to capture my cars as they lean into a corner of take off the lip of a jump.

I did see a really nice project where a guy had built a single box that could be switched to trigger a camera based on sound or light, it was in a tough looking box so great for using 'in the field'

Duane B

rcarduino.blogspot.com
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31483
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Should I use a couple of resistors to bring the cumulative voltage down to the expected 3.5v or will this not be an issue?
It is not an issue. Providing you have a resistor between the base of the transistor and the arduino output to limit the current this is fine.

Quote
from what I've been reading transistors can be used as amplifiers
In this context no. Transistors do not amplify a voltage as such, they only allow a higher voltage to be controlled from a smaller one, they do not make a small voltage bigger.
You have a switch with a voltage on it. By supplying current to the base you allow the collector / emitter to conduct current, which is all that your wire did.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 50
Posts: 1767
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I did see a really nice project where a guy had built a single box that could be switched to trigger a camera based on sound or light, it was in a tough looking box so great for using 'in the field'
There are at least two commercial projects that use Arduinos to trigger a camera based on sound, light, or other triggers (triggertrap.com, cameraaxe.com).  Both have fully build versions, as well as Arduino shields (note, the Triggertrap shield is not yet shipping).

There are also some companies that use cell phones instead of Arduinos, using the sensors in the cell phone.  And another company that produced its own unit before Arduinos and Cell phone triggers (Mumford Time Machine).

There are several other projects that I've bookmarked that were not commercial (at least initially, you can find the original post from the guy who founded cameraaxe).

However, most of these devices only work with cameras that have electronic or infrared shutter releases.  For the electronic shutter release, there are 3 wires (ground, focus, shoot) and you need to connect ground+focus to get the camera to focus, and either ground+shoot or ground+focus+shoot to fire.  In these, you plug the Arduino's signal into an optocoupler, and connect the ground and focus/shoot wires to the output of the optocoupler.  For infrared, you use an IR led, and send out the appropriate sequence.

If your camera doesn't support either a wired or infrared shutter release, your options are to hack open the camera and add an optocoupler connection to where the shutter is to take the picture, or use a servo to press down a button.  I would imagine the USB camera doesn't have a button like a normal camera does however.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent, thanks Grumpy_Mike. No, I hadn't stuck a resistor in there yet smiley-roll-sweat. I've wired the rest up & am now trying to work out the resistor I'll need.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I must admit, I'm having a little difficulty working out what resistor I should use for this. I've been reading about & have found the following:

For this reason it is a good idea to connect OUTPUT pins to other devices with 470Ω or 1k resistors, unless maximum current draw from the pins is required for a particular application.

Would others agree on using a 470Ω or 1k resistor, or would something like the 220Ω resistors suggested for other simple projects be advisable?


Many thanks
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31483
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Anything from 1K to 10K will do, it is not very critical.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Project complete, thank you Grumpy_Mike.
Logged

Pages: [1]   Go Up
Jump to: