Multi Camera IR Control

Library Discription:

At the search, how to emulate my Nikon IR remote control, I found following site. bigMike. A first sketch was written fast and with best results. A friend of mine would like use the same easy system to control his Canon. I found the Canon timing and a lot of others at a thread here. Not just Canon, also Minolta, Sony, Olympus and Pentax. I decide to write a Arduino library where all timings are included. Nikon, Canon, Pentax, Olympus and Sony cameras are working very well. The other cameras have to be checked. It would be nice if you could do that and give me a feedback. Some cameras do have the possibility to control a lot of more then just the shutter. For example zoom and other things. I would like to implement these features later if it is clear that the timings are working well.Please don’t forget to chose a mode of your camera where it will receive IR commands!You will find the Arduino multiCameraIrControl library download at the end of the page.Have fun!

HELP: hello :
Hello , I ‚m STI2D terminal and draft court . The project involves making an infrared remote control ( coded rc6 ) to send information to a camera (canon eos 500d ) for it to take a photo remotely. However after testing PLUSIEUR I’m at the same point ( nothing happens ) . This is why I call it a forum.

In this project I have at disposal : – an Arduino uno card ( microcontroller )
– A shield infrared ( IR sensor ( infrared LED on the receiver and 3 on port 11 of microcontroller ) )
-appareille picture canon eos 500d

Bit of a learning curve but spent the day looking into how to get the Canon 5DMkII and 7D MkII to work.
With an infrared detector and an Arduino sketch I found that the RC-6 remote from Canon outputs a 500uS burst, a delay of 6940us and then another 500uS burst. I then used a IR Led at 940nm – modified a sketch to send these bursts and lo and behold – it works.
The RC-6 is used for a number of Canon Dslr’s so should cover a few more models for your library.

Hi,
Please excuse my ignorance – but I am new to Arduino / programming.
I’d like to see what functions / commands exist within your library so that I can write a sketch to use with my Canon 5DMkIII and 7D MkII. As far as I can see from your example the only functions are ShutterNow() and ShutterDelayed() – or am I misunderstanding. Do I need to identify the exact camera model as a variable?

I have built the simple circuit using a 940nm IR led and run your example sketch – but no shutter release although all works fine with the Cano RC-6 remote. I have an IR camera and can see that the IR Led has illuminated.

I have built the simple circuit using a 940nm IR led and run your example sketch – but no shutter release although all works fine with the Cano RC-6 remote. I have an IR camera and can see that the IR Led has illuminated.

I can’t check it. I don’t own a 5D or 7D. Maybe the IR pattern changed for the newer Canon cameras…
If you find a new pattern, let me know, I will implement it.

The library works fine, except when I use Serial.println(„something“).
I could get around this by removing all calls to Serial.println, but I would like to use it to debug, and output variables in my serial monitor.
Do you have any idea why your code doesn’t work together with Serial.println?

I am trying to make the circuit as suggested, however the IR LED is not flashing anything. I can determine it with my phone camera. The code compiles ok. Are there any specifications for the IR LED to be used? I am using 100 mA 940 nm IR LED with 100 ohms resistor connected to ground.

Thanks Sebastian for the tip. Attiny working frequency is probably causing problems. I run it at 1 MHz, while Uno runs at 16 MHz. Will have to modify the library. Maybe you could share a good IR protocol web site?

I’ve captured another IR contol.
there are 1250us „high“ and „low“ , and 450us both high and low pulses. – All „high“ are 38Khz modulated. – and after 29.7ms it’s resent.

My question is, how do I decode that – do we for example know it to be the 4bit NEC protcol ?
I’d like to take something simple like :
void Olympus::shutterNow()
{
bool _seq[] = {
0,1,1,0,0,0,0,1,1,1,0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1 };
high(8972,_freq,_pin); <<what is 8972 ?
wait(4384); <<what is this number
high(624,_freq,_pin); <<what is this number
for (int i=0;i<sizeof(_seq);i++){
if (_seq[i]==0){
wait(488); <<what is this number
high(600,_freq,_pin); <<what is this number
}
else{
wait(1600); <<what is this number
high(600,_freq,_pin); <<what is this number
}
};
}

Basically , I have trouble translating what I have, to a part of this library – because I am not sure how it works.

As far as I can see from the cpp library „high“ sends frequency _freq to pin _pin for 8972 microseconds (in the corresponding line). Correspondingly „wait“ is the instruction to wait for the set number of microseconds. I believe you have to check these frequencies and timings against NEC protocol.

Thank you.
This is what I get regardless of what example I try to compile.
Nikon.cpp.o: In function `loop‘:
/home/andre/Arduino/arduino-1.0.6/Nikon.pde:29: undefined reference to `Nikon::Nikon(int)‘
/home/andre/Arduino/arduino-1.0.6/Nikon.pde:28: undefined reference to `Nikon::shutterNow()‘

Does anyone have a clue about what can cause this ? (I have many other libraries that work fine, and much more complex sketches that work.)

Hello guys i have modified the the marlin frimware of RepRap M240 command. By default it emulates canon RC1 remote I modified it to emulate multiple devices Canon, Nikon, Olympus, Pentax, Sony or Minolta IR remotes. But the problem is when i send the code manually it works everytime but when its send to the Print it works sometime, sometimes not. Amy idea what the problem is??
Program code

I checked the IR led with my Iphone Camera and i can see it „blinking“ when using your library so the signal is sent but the 70D is not triggered.
Tested also on both arduino 1.5.6-r2 and 1.0.5-R2 with Uno and Mega.

Could it be the led signal not strong enough ? or the 70D not compatible with your library ? or anything else ?
I’m getting short on ideas and hope someone could help.

I not sure to understand what you mean by „activate the IR mode“. If it is on the camera (timer mode), i think i’m good since the original remote is ok.
On the arduino side, i have plugged the IR Shield on the arduino, checked the pin for emiter (3) and used the following code (tried both with and without shutterDelayed) :

„activate“ the IR mode in the camera. But if you used the RC-6 successful you did it already.
The code looks OK.
Did you try to use the IR board to control a TV or something? Just to be sure the board works.

Hi,
Has anyone succeeded to get the code to work with a Fujifilm S2000HD, I’ve been looking around but can’t find anything for the brand apart from NEC codes which I don’t know how to use.
Thanks in advance

great thanks, just tested with Canon EOS M, worked! but something weird happen, first shoot takes instantly and secondly shoot is delayed, this happen repeatedly is this suppose to happen? how can i make it shoot instantly every time?

Sebastian, i have tested today this Remote control with my Canon EOS 7D.
It works fine at a distance of 2 meters ( I have not tested for increased distance).
I used IR led ( dont know the IR wavelenght) with resistor R2 to 27 Ohms for more power (distance).
R1 is 10 K ohms and I used BC 548 transistor (common use).http://www.fairchildsemi.com/ds/BC/BC548.pdf

To be able to use the remote control in Canon 7D, you must set the Timer function before.
Thank you very much!

I have not too much experience with arduino. I have been trying to use the nikon example after downloading the file „multiCameraIrControl_1-9.zip“. I have move to Nikon folder the files
„multiCameraIrControl.cpp“, „multiCameraIrControl.h“ and „keywords.txt“.

I’m using arduino 1.0.5 hand when i verify the code i get this error:
Nikon:22: error: ‚Nikon‘ does not name a type
Nikon.pde: In function ‚void loop()‘:
Nikon:28: error: ‚D5000‘ was not declared in this scope

Hi Sebastian
Small question.
Is it possible to assign only one port to all possible cameras in the framework?
For example:
Canon D5(9);
Nikon D5000(9);
Sony A900(9);
…. so on.

I’m working on project and this is the device which rotate object on it for 360° and take photos. I need selection of type of camera because in that case I can support as many cameras as available in the framework and no wire connection. So very useful would be to have only one IR port output.
I haven’t tried the code because I’m waiting for IR LED that’s why I’m curious about that.

I just replaced my IR code with this library and it works quite well.
One problem that I have, which also occurred with my code was that my EOS 350D sometimes missed a trigger, even when directly facing the led.
Could this be a problem with the diode?

I have replace the Ir led I used and tested with 2 wide angle iR leds at 880nm and 950nm. In both cases it still sometimes fails to trigger the camera. Even with all other components disconnected and the led as close to the controller as possible.
For now I build in a wired trigger module because I need the thing to work perfectly next week, But I’ll try to figure this out on another arduino board.

Thank for the tip, but that wasn’t it. I tried the same setup standalone with my prototyping arduino board and it work much better. It must be the carrier frequency which is slightly off on the arduino mini in the project.
But thanks anyway!

We havent com across IR commands for cameras before, but we will add them to our list for inclusion in our project….tnx

For anyone interested in IR protocols – we have just launched a project for AnalysIR – IR Decoder & Analyzer GUI (Arduino & Raspberry Pi). Currently we support 17 IR protocols and are looking for more to add as part of the campaign. Suggestions Welcome!

If the project is successful, we hope to add support for Raspberry Pi !

Hi to all
Coding For Pentax Shoud be named ToggleZoom not Focus. I can confirm same coding works for Pentax Optio S1 and X-5 as well. In my blog you can also find undocumented IR timing codes for FUJI ’s Finepix (S2000HD). All IR scketches for cameras can be ported on ATtiny85 provided you „burn“ it to run on 16MHZ internal PLL with BOD disabled.
Regards
Manolis

I would like to use this library in my project It works prefect on my uno but I would like to use an attiny45 20pu I have the fuse set at 8mhz but it will not trigger the shutter with the attiny. I am thinking that the frequency and or timer delay is altered by using 8mhz instead of the 16mhz that the uno runs. Do you know what modifications I would need to do to the cpp file in order to get it to work with the 8mhz chip?

there library don’t use any special timer or so. I don’t know if the way I produce the carrier frequency is that smart, maybe that can be a problem…
But, you can check the website where I got all the timings from. He uses a ATtiny25, maybe you can learn something there.

Thanks for making this available for everyone. I’m writing a program that will use this, but won’t have access to a camera with IR capability for a few weeks. Looking at your code, it looks like you don’t need to use a PWM digital pin for the IR remote, but can use a plain digital output pin. Am I correct? Thanks

Excuse me, I am new with this stuff. I saw that it was possible with to control a Canon, a Nikon, an Olympus, a Pentax, a Sony, a Minolta with the Arduino. But, do you think it would possible to control the 6 cameras simultaneously with and arduino uno and a EduShield? Or what should I add to make this work? Thank you in advance.

Hello. total respect for what you are doing. ill be back in a few weeks while working on my lightning trigger for nikon d3000. For now i’d like to make a suggestion to assist you or any of your posters on how to obtain the „timings“ from in IR remote. The logitech harmony remotes (even the lowest model the 300) have the ability to record these timings and saves them to memory on the remote. you access the data from a txt file on the remote. you access the remote with USB & can browse the folders as if storage device. I dont know what the data means but I am sure its what you are looking for. chat in a few weeks time 😀

Thank you for the library. I got it working within the hour, and that for my first Arduino project :).
As a beginner I needed the most time figuring out how to load a library. Here is how: http://arduino.cc/en/Guide/Libraries . Maybe ‚How to load a library‘ could be part of your documentation? It might help others.

I am using a Canon Eos 550D and I tried with 2 differnent LED but I can not get it running.
I have this LED : http://www.dx.com/SKU.135040 and another from an old remote. I used 2 different types of transistors (BUZ72A) and 2n7002 but when I check the LED with my cell phone camera in Canon mode I can only the a glimmming light – no proper flash as I can see in a professional remote controll. When I manually set the PIN high (digitalWrite(9, HIGH)) I can see a shiny light.
Any ideas what might be wrong? Is the LED to slow to follow the impuls?
Thanks for your input

Thanks it worked. Now I have another question: how can I manage the B exposure with my Pentax K100D Super? According to manual as far as the IR is „on“ the shutter should remain open, but this is not the case with the library. I’m afraid the IR signal is given just „one shot“. Is this possible? Did anyone succeed in using the B on Pentax with MulticameraIR?
Thank you so much!
P.S. Some Pentax cameras may be configured such that the B works as „one shot opens – next shot closes“, unfortunately not mine 🙁

Sebastian, thank you so much. It works great with my ‚Pentax K100D Super‘. I tested with an Arduino Pro Mini, an Arduino Nano and an Arduino Uno. Can’t wait to set it up for some great time-lapse shooting!

Tom, I went through the manual again and I cannot seem to find any place where the Bulb mode is mentioned in relation to the IR remote. Maybe, you should try and read again to make sure.
What is more, I do not think it would be possible to „hold down“ the IR remote button. What it does when you press the button once is light the IR led a few times with different timings, a sort of light morse code. Pressing and holding the button would not be the same as pressing and holding a button switch on a wired trigger.

As I wrote in the text above I found all timings in a forum. But somewhere in the past I found a very good website where somebody had a arduino project which could do what you would like to do. But I cant find it right now…

I just ordered an arduino, and was looking various hardware projects, and noticed the question about the Olympus SP-565UZ. Unfortunately, the SP-565UZ does not support an infrared remote shutter release (Olympus product numbers RM-1, RM-2). However, it does support a wired shutter release (RM-UC1). You need to get a cable that is compatible with the RM-UC1, either by hacking up an existing clone RM-UC1 shutter release, or getting the Pixel CL-UC1 cable, which has the Olympus 12 pin multi-connector on one side, and a 2.5mm phono plug on the other side. I would imagine there are other projects that deal with wired shutter releases. A commerical product that will start shipping shortly is the triggertrap (triggertrap.com), and they make a shield that plugs into the Arduino, and the code is available for the shield.

The WProgram.h file, which provides declarations for the Arduino API, has been renamed to Arduino.h. To create a library that will work in both Arduino 0022 and Arduino 1.0, you can use an #ifdef that checks for the ARDUINO constant, which was 22 and is now 100.

Hi Sebastian,
Thank you for the library. I tried to rewrite the code to make it smaller, faster and prevent interrupts from causing a problem. Each demo sketch compiles to about 100 bytes smaller and should be faster. I cannot really test most of the routines but it is possible that all timings are slightly off because the code is faster. I don’t know if this is consistant with the plans to ‚tighten‘ the code but this is my attempt.
Thanks for all of your work.
don

Minolta::Minolta(int pin)
{
pinMode(pin, OUTPUT);
_pin = pin;
_pause = 9; //(1000/38/2)-4;//frequency of 38khz use 40 for 40khz
//_len = 33; //sequence is 33 bits long but we will send out a
//standalone leading zero then 32 bits of the rest
//of the code, this avoids unsigned long longs
//this avoids about 600 bytes of code

I’m very impressed of your work! A big thank you to you!
I hope I will understand your changes. In a few weeks I hopefully will have more time to implement all the work from you and the others. Your code will lead to ver.2 of the library.

Sebastion,
The code does seem destroyed. I don’t know how to upload/attach the files or create a code box.
I am happy to share if I can figure out how. I wouldn’t mind mailing the code to someone
for posting.

For my Canon EOS ti1 (d500 in Europe) I noticed that you need to send only one signal for it to work. If you do a simple if condition with a pushbutton for exemple it will not work because the controller will send many signals to your camera. A simple delay fix the issue.
This will NOT work:

Greetings! I’ve just written and tested class CanonWLDC100 for you library, which adds possibility to use IR transmitter for Canon WL-DC100 remote for Canon next cameras: S60/S70/S1IS/G1/G2/G3/G5/G6/Pro90/Pro1

Hi! Great library! I have canon 5Dm2 and it work well. But my another old non DSLR camera does not work. It has anower remote WL-DC100 and another protocol to work. Here is description for LIRC project http://lirc.sourceforge.net/remotes/canon/WL-DC100.
Can you add support for this remote. It suitebal for canon S60/S70/S1IS/G1/G2/G3/G5/G6/Pro90/Pro1 cameras.
Big thanks!

I’ve just managed to get my Canon XSi (EOS 450d) shooting remotely with this code, but I would like to point out one little thing with IR led’s, for those who are having problems with getting their rig to work. At least in the case of the IR LED I used, you basically have to aim the head of the LED directly at the IR sensor on your camera. If it is orthogonal to it, it will probably not trigger the shutter. Apparently my Arduino was sending out signals correctly all this time while I was tinkering with the timings thinking something was off. I can’t speak for other cameras but on the XSi the remote sensor sits directly below the shutter button. Also, I used a 850nm IR LED over a 100 Ohm resistor.

Anyways, I’m really glad I found this little library, it has made my evening. Danke schoen!!

i’m a student in informatic engineering in Italy,
i’d like to implement something (just a little intervalometer) in hardware, with VHDL language.
it’s a project for university, NON COMMERCIAL.
i’d like to talk a bit with you…
where did you found documentation or datasheet to know how „talk“ to camera and timing?
could you help me? please…
thanks giacomo

This is SO awesome. I was planning to do this a long time ago. Now I just soldered of the IR LED fra an old SONY remote, downloaded your code, and 5 mins later it works! Love it. Arduino+Sebastian <3 😀

Many thanks for your good work (and all those that have assisted).
I am a newcomer and I find that when I try and use the Canon example Arduino comes up with the error message …………….’Canon‘ does not name a type.
I have simply opened up the Canon example from the Arduino Sketchbook. I am obviously doing something WRONG !!
Thanks again John W

You need to put it in commander mode; (press left on circle; last item). I have no idea where the damn IR receiver is though; and my IR led is scraped so there allot reasons why I haven’t got it working; But if you have, please let us know.

I spent more time today experimenting with the Olympus pulse train, and found the allowable limits for each pulse and null by trial and error. I also added two functions, zoomin() and zoomout(), to control the camera’s zoom function. The functions are passed an unsigned integer value which represents the percentage of zoom movement requested. This value determines the number of times the trailing pulse train is repeated.
The code for zoomout is identical except for the bool sequence and the percentage coversion factor, which is 70 rather than 52.

Where „+“ indicates a pulse, and „-“ indicates null. The +89xx,-21xx,+6xx,-95xxx at the end is repeated as long as the remote’s shutter button is pressed.

The major differences between this pulse train and the program’s pulse train are:

1. The start pulse is almost 9 ms, rather than 3.8 ms long. This is probably the crucial difference.
2. The „zero“ nulls are slightly less than 500 us.
3. The „ones“ nulls are 1600 us long, rather than 1500 us.
4. The pulses between the nulls are 600 us, rather than 500.

I modified the multiCameraIrControl.cpp program as follows, with the literal values from the test results, and was successful in triggering the camera:

I know your post is quite old, but did you use the Pentax example code that Sebastian gave in the library to test your K-x? I’ve been trying to hook up my K-x, but can’t get it to work. I just started using Arduino and I’m new to coding. Any help would be greatly appriciated!

Hi,
I was trying to get my dSLR (Canon EOS400) work with this library, as a start point for the bigger project, but.. it didn’t work (I’ve tested) minimal version now. What is your suggestion for R1 resistor? I’ve tried with 100Ohm. I don’t know why it’s not working, but I will try to make it work. I’ve to study your library to check. I’ve tested IR led, it’s working fine (video + slower blinking, second on, second off, pin 13). Is there any setup in Camera which should be done..? Thank you in advance.

you have to switch into the RC mode by using the timer button(the top right of the screen). Than you should see a RC symbol on the screen.
The value of R1 depends on your LED. But if your LED has a voltage drop of 1.5V and a current of less than 50mA, 100 Ohm is a good choice.