Tag Archives: bluetooth

Update: Bluetooth Camera Remote

7 Jun

I have updated both the hardware setup of my camera remote as well as the software that is used to control the Arduino.

With regard to the hardware, I have soldered the optoisolator and capacitors to a small board. I also bought a remote cable for the Nikon D200 and connected it to my optoisolator, so that the setup can now be connected more easily to the camera.

The revised hardware part (the pins can be connected to the Arduino ports 13 and GND). Note that the setup can also be used for different brands of cameras by using a different adapter.

Here is a description of the circuit:

The simple circuit (note that the type of optoisolator given there is different to the one I used; could not change that in the software somehow).

With regard to the software, I updated my app with further modes for interval shooting and bulb (apart of the existing self timer mode). The new version of the app depends on Android 4.0 (ICS) in order to work properly, as I used the advanced number pickers that are not available in the older versions of Android.

The start screen of the App.

The interval shooting mode. You can pick the pause between the shots, as well as how many pictures you want to have taken (as the Arduino keeps track of time etc., the App can be closed after triggering the interval shooting).

I also pushed all the code to a Bitbucket repository with a small description of how to get this setup to work: https://bitbucket.org/boden/btcamremote/

A description of the initial setup can be found here: https://postapocalypticresearchinstitute.wordpress.com/2012/01/15/bluetooth-camera-remote/

Advertisements

Bluetooth Camera Remote

15 Jan

Recently I have been experimenting with interfacing my Ardunio Uno with my Nikon D200 DSLR. The D200 has a connector for a remote control cable that consists of 10 pins. After some research on the web I was able to find some information on how the pin layout works: http://www.doc-diy.net/photo/remote_pinout/#nikon. Basically, you have to connect the two pins  for activating the autofocus and the shutter to the ground pin in order to take a picture.

The pin layout of the remote connector

As I do not own a remote for this camera or a cable that fits into the remote connector, I used breadboard cables which fit perfectly into the pins of the connector. With these cables and an optoisolator, it was easy to connect the camera to my Arduino board.

The remote connector of the D200

Some experiments showed that activating the optoisolator for 1000 milliseconds was a good value to activate the camera for one shot (this can also be done by simply bypassing the three cables. This opens up many possibilities for triggering the camera for example with a lightbarrier (for example using an IR diode and a photodiode), or by sound sensors or other means of activation (such as a photo resistor for detecting ambient light and automatically shooting sunsets if you are too lazy to get up early).

The Arduino board (with Bluetooth Shield), connected to the optoisolator

However, as I was recently experimenting with the Amariono toolkit (http://amarino-toolkit.net/) that enables the interfacing of Arduino boards with Android devices over Bluetooth, I decided to build a remote control App that would be able to trigger my camera wirelessly: a Bluetooth Camera Remote.

The Bluetooth Camera Remote Prototype

The BTCamRemote consists of several components:

  • An Arduino Uno board with an optoisolator connected to the right remote trigger pins at the DSLR.
  • A Bluetooth Shield (I use the one from iteadstudio.com).
  • An Arduino program that depends on the Amarino Library and listens to commands that are recieved over the Amarino framework (basically consisting of a certain flag and an Integer value that sets the duration for activating the optoisolator and thus the camera).
  • An Android cellphone (I use an HTC Legend with Android 2.2) running the Amarino App (where the connection to the Arduino has to be set-up, coupling the Bluetooth devices).
  • An Android App that uses the Amarino Framework to send commands to the Ardunio board when a button is pushed (the user can also set a delay before the command is sent, so you can hide the cellphone when you want to take self portraits).

This setup is not really simple (because of the many software components), but it works and can be easily extended with further functions (for example activating other pins with further optoisolators etc.). It is also possible to use the Arduino for long term exposures, for instance when taking night shots (as far as I know, the camera can do exposures up to 30 seconds without using the manual “bulb” mode; the Arduino could control exposure times that are much longer, and it could be easily made accessible with a nice user interface on the Android phone.

The Android App “BTCamRemote”

The next steps will be to solder the circuit to a (smaller) circuit board and exchange the breadboard cables with the right camera cable. I will also try to attach the Arduino board to the hot shoe of the camera, and power the Ardunio with a battery in order to make the setup more mobile and easier to carry around. It would also be nice to learn more about how the other pins on the connector work, in order to access more camera functions with my remote.

You can download the source code as well as a signed APK of the application here (note that it depends on the Amarino App that has to be installed separately): https://bitbucket.org/boden/btcamremote/

Arduino-powered three-color lamp

31 Dec

This is a small example of interfacing Arduino with Android via bluetooth. I am using a very nice and convenient framework for this: Amarino, and basically followed one of the tutorials that are featured there to build a christmas decoration that I can control with my Android phone.

Arduino-powered three-color lamp

The setup consists of several components:

  • An Arduino Uno board with a bluetooth shield (I use the bluetooth shield from iteadstudio (v2.2))
  • A 3-color LED that is connected to the Arduino (via three PWM digital output pins)
  • An Android phone that is connected to the Arduino via bluetooth (using the Amarino framework). I used an HTC Legend running Froyo (2.2).
  • An Android App that uses the Amarino API to control the output value of the three PWM pins on the Arduino, thus enabling the user to set the color of the LED

Here is a picture of basically the same setup, but using three different LEDs instead of one 3-colored one. As you can see, the circuit is pretty simple: the LEDs are connected to three of the PWM digital output pins (9,10,11). Don’t forget to add capacitors, or you will probably burn your LEDs at some point.

Arduino-powered three-color lamp

The code that runs on the Arduino board depends on the Amarino library, that can be downloaded at http://www.amarino-toolkit.net/, and is pretty much the same that is documented in the abovementioned tutorial (with some slight changes to work with my setup). Basically, I just changed had to change the baud rate to 115200 as this is recommended for my bluetooth shield.

The App that is running on my Android phone is also the same like the one featured in the tutorial. In the current version it cannot be shared as an APK, but has to be compiled as the MAC Address of the Ardunio board that has to be controlled needs is hardcoded. So you will need the Android SDK in order to get the App installed, but then it works just fine. You also need the Amarino App to be installed on your phone, and connect it to your bluetooth shield in order to get the setup to work.