StatCounter

Thursday, August 25, 2011

YaNis Android Wireless EOS Controller



UPDATE 17/09/12:  
Canon copied and implemented this project's functionality in its latest 6D camera! Awesome.

UPDATE 18/09/11: 
Project Instructable published! http://www.instructables.com/id/Building-the-YaNis-EOS-Controller/

---





This article is about a wireless Canon EOS controller that I was planning to build a few weeks ago when I saw Oleg Mazurov's PTP libraries for Arduino.

Basically, the controller accepts commands over Bluetooth from an Android device to offer full manual control over most of the camera's settings.


Manual control over:
  • Aperture
  • Shutter Speed
  • ISO
  • White Balance
  • Focus Position
  • Live View STATUS
  • Capture
  • Intervalometer/Timer
Upcoming Features
  • Video mode
  • Rack Focusing
  • HDR Bracketing
  • Bracketed intervalometer
  • Arduino Side Battery life optimizations (about 80% improvement expected)
  • Multiple camera control
  • 'Script' mode
The set of command the device accepts in order to issue relevant PTP commands will be reffered to as the "Manis Command Set", MCS.

The app is available for free on the android market as:

This is an Open Source project - I plan to release the app's source code as soon as it exits beta status.
While I will write something more in-depth in the coming days, here is a quick build instructions of the hardware:


Things you will need:


-An Arduino Board. (I used the Pro Mini 3.3v from Sparkfun)
-A USB Host Shield from here.
-An SPP compatible bluetooth module. (eg Sparkfun RN42, BlueSMIRF)
-(optional) A portable power source.











A LiPo battery can be useful. 1000mAh or more is recommended.



The Arduino sketch and required libraries is available at: http://code.google.com/p/yanis-android-wireless-camera-controller/



The Arduino software part is heavily based on Oleg Maruzov's excellent PTP/USB Libraries.

Current hardware revision has been tested to work successfully with a Canon 1000D. Should work equally well with 450D, 400D, 500D, etc. The whole Canon EOS range is expected to be supported at some point.


Version 2.0 (Version 2.1 uses an ebay BT module rather than the RN42)

Version 2.1
The pictures should have given you a pretty good idea how the listed components fit together.
If not, check out the instructable

Remember:


2. Set the Bluetooth module to operate at 9600Baud. (else it won't work unless you alter the code). 9600 Baud is perfectly appropriate for this circuit. I don't recommend to move to higher baud rates.

3. Youtube Demo is being upload as I am typing this.

Feel free to report issues on the google code project page.

Peace,

manis404.



Screenshots:




61 comments:

johannes said...

Wow.! This IS great!!
Do you think it would work with a EOS 7D, too?

I will go and order the pieces now!

mAnis said...

Yes it can definitely work! I can optimize it specifically for the 7D tho. Will upload the optimized code to the google code page ASAP.

mtb06 said...

Thanks for sharing this!

Would you tell me what have you improved by replacing the RN42 by the BT?

Is your code will still work with the former RN42?

Marc.

mAnis said...

BT is actually a Cambridge Silicon Radio chip. I realised that I was more familiar with the CSR BT chip (pinout-wise) than the RN42.

So..

I guess they should perform quite similarly though.

mAnis said...

The code SHOULD work with the RN42. I will write about this in a separate post.

If in the unlikely case the code is not compatible, I will post another version of the Arduino sketch.

Edo said...

This is a great project! Actually I was thinking about making my own controller but my lack of Android programming skills left me behind.
I've seen you are looking for testers... I can do it, I'll surely build the controller within the week and try it with my Canon 40D.

aTaylor said...

You beat me to it! My bits and pieces to do exactly this arrived just yesterday.

I've very limited software experience but am willing to work with you if there's anything specific you would like, i'll be working with a 7D. Hoping to make a much more rugged finished product that I can just toss in my bag which is where my experience lies (mechanical design).

mAnis said...

To all builders: PLEASE submit your build report! We are very interested to investigate any issues, should you encounter any. We need this data to ensure compatibility across the line-up.


@aTaylor: The 7D is an ideal device to test this on. An enclosure would be nice to have. It's certainly not rugged enough in this current prototype form (which is held by putty btw).

Branden Gunn said...

Very cool. Wish you had a Nikon version.

As far as a project box, I have gotten the FB-30 from polycase for similarly sized projects. http://www.polycase.com/fb-30-series

The KT series is the next size up.

MRBFX said...

I've been thinking about how good it would be to control my Nikon D40 via my Android phone for ages. I'm really interested in getting involved, to test or whatever with the aim of hopefully making a version that works with my camera.

Mark Hester - W6 Youthworks Project Director said...

Anyone know if this will work with a 350D? Thsi camera does not have "live preview" on the LCD screen.

mAnis said...

Thank you for all the interest in testing. As I have said before, the first step will be to build the controller, then report me anything that does/does not work.

@ Branden Gun, MRBFX: Nikon support will be implemented, but now very soon.

@ Mark Hester: I do not think that the 350D will work, unfortunately.

Oleg said...

Here is my build, made mainly to play with the idea and possibly develop further - kind of large. Enjoy -> http://www.circuitsathome.com/camera-control/building-yanis-android-wireless-eos-controller

Oleg,
Circuits@Home

cosmo said...

Hi,
(1) Yes, this is a fantastic project. I was just thinking how nice it would be to control my CANON P&S cameras wirelessly when taking bracketed HDR photos.
(2) I have a Canon G12, Canon A610 and Canon A620 camera.
(3) I have been mainly using a Pentax Kx for my HDR photos but it is limited to 3 AEB shots, and 30 sec max exposures.
(4) I really need to be able to take 5, 7, and 9 AEB shots automatically (at, say, 1EV steps), and a lot more than 30 secs max exposure.
(5) The Canon G12 is limited to 3 AEB shots and 1 second max exposures, which is next to useless for high dynamic range scenes (eg: sunset or indoor).
(6) Look forward to the projects success. I can now justify the purchase of an Android phone.
Cheers :)

Next said...

very nice project

dritterman said...

Awesome project! Great work :D

Would it be possible to control via a bluetooth enabled laptop?

If so, how would one go about coding a windows program to control it? Are you going to release the source code or any documentation for the Android side of things?

mAnis said...

Yes I will release the Android code soon.

In fact, I have already written a windows version of the app using visual c++. Works equally well as the Android app and very easy to code.

I will release the 'command set' too. I just need some patience to TYPE that in because it's written on paper lol.

cosmo said...

A scan of the paper copy would probably be adequate. Neatness is nice but not mandatory. You will then have more spare time to do other things. All the best :)

dritterman said...

Awesome! You legend :D

Anonymous said...

i look forward to seeing this project progress.

looking for an alternative for a PC/MAC.

Regards
Martieuk@hotmail.com

caladeira said...

Great project.
I've successfully assembled it with the dealextreme bluetoth module.
I'm testing it with a Canon 500D and only seen two issues:
- when i try to set the duration to BULB, I get an error and the application closes: "Selected list item: List index too large".
- when you select ISO, since I'm using extended ISO, if I chose Auto on android, I'll get 3200 on camera.

And now a suggestion, when the application first start, the settings should be read from camera. Is it possible?

I'm looking forward to see future improvements in this application.

Carlos Ladeira

caladeira said...
This comment has been removed by the author.
mAnis said...

Congrats for the build dude and thanks for catching those bugs! I'll start fixing them ASAP.

And yes it is possible to read settings from the camera but this 'feature' is presently at the bottom of the 'upcoming features' list. But it will be definitely implemented at some point in the future.

Also, feel free to suggest any improvements in the UI.

M.

caladeira said...

Great news.

About feature request, well, I can think of one that might bee interesting but also give you some extra work.

What if you move part of the control to the arduino instead of being running on the android phone?

For example, you can setup a timelapse using your phone and then leave the place for a few hours without the need of leaving the phone on site.

Just an idea!

Regards,
Carlos Ladeira

mAnis said...

Nice point. That's already in the works. It will be implemented when I complete the HDR timelapse feature in the next Android App iteration.

Anonymous said...

There are dozens of BT modules on eBay. Could you provide an auction number, seller name, whatever?

Anonymous said...

Does the app work on Android tablets or only on phones?

mAnis said...

http://rover.ebay.com/rover/0/e11030.m43.l1123/7?euid=3370bcee08c347fb88ce9cb4ac9179dd&loc=http%3A%2F%2Fcgi.ebay.co.uk%2Fws%2FeBayISAPI.dll%3FViewItem%26item%3D290614272070%26ssPageName%3DADME%3AB%3AEF%3AGB%3A1123

Anything that includes 'Bluetooth serial' in the description should work.

And yep, works with tablets too.

Georgia said...

Hi,

This is amazing! Is there any chance that instead of just checking the "live view" status, it could actually trigger the camera to turn on the Live View? And how about the record "on/off" function for recording video?

Many thanks for sharing so generously.

mAnis said...

@Georgia

Glad you like it. The next update addresses those issues. Planned to be released next Saturday.

By the way, if you connect an external monitor, the liveview feed will display on the monitor when you activate liveview via the Android App.

Georgia said...

Great, I look forward to the new release.

dschiedsch said...

Hi
Assembled it yesterday
and tried it with my Canon EOS 5D MK2
it worked perfect in the beginning but then the camera went into Error 70 mode and wouldn't come out of it again even after disconnecting both batteries :-(
Any ideas ?

mAnis said...

Ouch! I got that same behavior with my 550D. I just had to remove the battery and wait for a while then replacing the battery. It should work. Let me know what happens.

dschiedsch said...

Removed both batteries over the night
sadly it doesn't change the problem
However I found out that the camera is still working in custom mode 1-3 but not in the manual and semi manual modes as well as in automatic
It seems that I did change a setting that shouldn't be changeable and now I can't undo it because i can't connect to the camera in these modes. Interestingly in the other modes the camera as well as the remote still work fine. Bad thing though the reset to factory sub menu is only available in the manual mode (which sucks) :-|

Paul said...

I have a friend that does photography for a side job, and as a hobby. I was wondering if you have tried this with any of the nikon cameras seeing as that's what she prefers to use.

blackhawk1793 said...

Great project!!

I gave it a try with Arduino Nano V3, and realised that you need the usb host sheild. Can you not make this without and usb host shield?

What i think would be better is to send data to arduino, for him to execute.

Let's say i select some interval shotting with some exposure compensation. Set configuration on phone, then send it to arduino, and he executes the shots.

I think at the moment, the phone actually takes all shots, so the phone actually sends a capture for every shot.

Why? If you send the settings for interval shot to the arduino, no need for the phone to be on.

If during the shots, i want to see the status, i launch application and it will connect to arduino... and send me the status of interval shots to my phone. (Pictures taken, remaining...)

It will also save bluetooth comsumtion and phone consumtion.

Cristo said...

hey Yanis do you know if I could succesfully comunicate to this bluetooth module through a J2e app made with mobile processing? else do you know a good starting point to create your own android apps, but let me know on the J2e apps first. thnanks

Manis B said...

@Christo

In fact I tried with J2me initially, but since implementation of j2me varies by manufacturer, I switched to the more universal Android platform.

There is no reason J2me(or any other platform) shouldnt work. Just make sure your application is sending the right characters through bluetooth for the arduino module to decode.

The name's Manis btw :).

Manis B said...

@everyone

Thank you for your suggestions, I really appreciate it. Since this is an open source project, feel free to implement them and send me your improved versions so that anyone can benefit from your additions.

Cristo said...

Oops sorry Manis,

I will try with J2me and post my work for others to learn from. One more question, i checked the RN-42 module, but the RN-41 has 100 meters range in comparison to the other one.

Would your example still work with this one? Or is there a mayor difference? thanks again for your comments.

kind regards
christo

Zagnut said...

This is so cool. Great job! I was hoping to find something to control my 1000D wirelessly with my phone.

And the fact that it is an intervalometer and offers full control too? You sir, are awesome!

Anonymous said...

I would like to know if their are any software differences between the EOS Rebel XS and the EOS 1000D that would make the application not work with a Rebel XS?

Genesis said...

could this be made to work over wifi?
to increase range and speed

thx

Terence said...

I bricked my 5D Mk II doing this. Error 70, boots up just fine in C1, C2 and C3. I did try to boot it up in CA with the lens off, and it still won't work. :-(.

It's a great project, but we've got to be REALLY careful about not bricking cameras. :-(

I built mine out of the Sparkfun USB Host shield and a RN-42 on the Sparkfun breakout board.

Anyone have experience recovering from the dreaded ERR70?

-=- Terence

ttstam (at) gmail ...

Anonymous said...

I had to remove the battery AND the backup coin battery to recover my 7D, The USB library from circuits@home is far from perfect but it an gigantic work and I couldn't do without it. I hope you where able to finally reboot your EOS with removing both batteries.

Android app development said...

I like your blog features.This is one of the good post.Nice information.
Android app developers

Android developers said...

I am glad to apprehend the accomplished agreeable of this blog and am actual aflame and blessed to say that the webmaster has done a actual acceptable job actuality to put all the advice agreeable and advice at one place.

Andreas said...


The set of command the device accepts in order to issue relevant PTP commands will be reffered to as the "Manis Command Set", MCS

Hi,

is there a chance to get a copy of that command set ?
I tried to look into the inventor files, but i cannot find any examples in there.
I would love to give it a try with the android-sdk and eclipse...

Anonymous said...

Got it built using BT and Arduino from ebay and shield from Oleg. I can connect to it from my phone but nothing seems to happen on the camera. Plugging in the USB causes the camera to go busy for a few seconds, but no remote commands appear to do anything. The Camera is an XS (should be same as 1000D). I did have to make a few updates to the lib for arduino 1.0. Maybe I'll try the 0023 version.

Anonymous said...

From what i've heard, the libs that I used are not quite compatible with the arduino 1.0 ide. The v.0022 should work fine.

Also, make sure you connected the BT module properly. Tx/Rx are inverted/crossed.

be.em said...

Success, the issue was the baud rate. The instructable said make sure the baud rate is 9600, but the downloaded sketch set it to 115200. I changed the sketch to 9600 and both the 1.0 and 0023 IDE builds work now. Which baud rate should be used ?

Note: I got the 1.0 IDE to compile with your libs by doing the WProgram.h to Arduino.h replacement and changing the return type for Max_LCD:write as per the 1.0 release notes.

Nice project and thanks for doing it.

Andy Shrimpton said...

Hi Yanis

This project is great. I am new to the these type of projects but this is going to be my first i will build. I hope to be able to control my 20D or 30D but i would really like it to work on my 7D. I am not sure that the code will work on the 7D, I will ahve to read you blog again. I wish i had the skill to create a project like this. Kepp up the good work

Nino said...

Just wondering if I would need to make two wireless controllers for my canon 1000d. one for my smart phone and another for my laptop, or will one controller work for both? Thanks

"Manis B" said...

One will work for both. It's pretty much platform independent as long as the RFCOMM protocol is used.

murat hedeght said...

hi, this project seems superb. I'm excited. But, I need some help.

You mentioned, we can use any arduino bluetooth device supporting SPP instead of RN42. Could you please give me a sample link from ebay. I'm not familiar with arduino board and I do not want to buy a wrong board. Thank you

"Manis B" said...

There you go:

http://www.ebay.co.uk/itm/Wireless-Serial-4-Pin-Bluetooth-RF-Transceiver-Module-RS232-With-backplane-new-/200723840473?pt=UK_Computing_Networking_SM&hash=item2ebc12bdd9

Bernard richard said...

wow... your blog is cool

mini wireless spy cam
spy camera wireless

Jamez said...

Hi, I stupidly ordered the 5v version of the arduino pro mini. Would this still be alright to use or would i fry everything?

contratodo said...

Looks great, thanks for sharing! I already ordered the pieces.
One question: Do you know if this will work on a EOS M model (that compact Canon DSLR)?

Aeriform said...

Hi mAnis great project
i have some compliing issues with the latest pde
i get compling errors even though i have added the right libaries for the pde
added ptp2 lib
added usbhost lib
is there any other libs i need to add

Aeriform said...

Hi mAnis great project
i have some compliing issues with the latest pde
i get compling errors even though i have added the right libaries for the pde
added ptp2 lib
added usbhost lib
is there any other libs i need to add