logo
Canon Remote 2
Canon Remote using the NodeMCU Mini (Wemos D1 Mini)

This little project with the NodeMCU Mini (Wemos D1 Mini) remotely trigger's a shot and Start / Stops the video on the Canon DSLR using the infrared sensor
I used two NodeMCU Minis one as a receiver and the other as the remote sender.
This is a different type of remote, it uses the NodeMCU Mini wifi to connect and when the remote buttons are
pressed the remote sends a signal to the receiver and then the receiver send a signal back to the remote, indicating the action was executed with short vibration and beeps,
the beeps are at the receiver and remote sender 3 beeps that can be used in post editing to line up the audio if a separate audio recording  device is being used
The remote will also vibrate continuously when its out of range or not connected to the receiver,
this unit will work for taking Photos and Video with a Canon DSLR with infrared sensor
I have done a quick test and the unit was still working at 170 meters apart, line of sight.

PARTS

2 x NodeMCU Lua ESP8266 ESP-12 WeMos D1 Mini WIFI
2 x 85x58x33mm Waterproof Clear Cover Plastic Project Box
 4 x 2N2222 Bipolar Transistor NPN 40V 0.6A TO-92
2 x L7805 5V REGULATOR LM7805
2 x Electrolytic Capacitors 100uF

2 x Electrolytic Capacitors 10uF
2 x 100nF Ceramic Capacitors
4 x 1k Resister Ohm
2 x 470 Resister Ohm
2 x 10k Resister Ohm
1 x Resister For The Try Of IR-Led You Have
2 x LEDs
1/4" Mini Smart Ball Head Bracket/Holder
/Mount Camera Tripod hot shoe
2 x 5V Electromagnetic Piezo Buzzer
2 x Push ON button switches
2 x 9V Volt Battery Snap Clip Connector

4 x SPDT ON-Off Mini Miniature Toggle Slide Switch
2 x 9V Volt Battery
1 x DC3V 70mA Phone Coin Flat Vibrating Vibration Motor
Lenght Of 4mm Building Wire To Hold The IR-Led
1 x IR Transmiter Led

receiver-sender-top1        receiver-sender-top2

receiver-top        sender-top

receiver-sender        lid

To get the 9v battery to fit, I needed to grinde a little out of the lid, shown in the picture above.

text3730

Above is how the beeps look in post editing

camera-left        camera-right





mel-Camera-remote-server_bb
click picture to enlarge

mel-Camera-remote-sender_bb
click picture to enlarge





Below are the Sketchs that works, They may not be the best put you can change them to suit your own designs
/*------------------------------------------------------------------------------
 15/10/2018
 Author: Melissa Merritt
 Platforms: Nodemcu mini
 Language: C++/Arduino
 Program: Mel-Camera-Remote-Recever-Canon
 ------------------------------------------------------------------------------
 License:
 MerrittSoft
 ------------------------------------------------------------------------------*/

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <Wire.h>
/*
                   The next line "unsigned int pulseDuration = 12;" the number may needed to be changed,
                   12 worked for me but with a Arduino micro i used 10
                   i think its from 10 to 15 depending what unit you are using
*/
unsigned int pulseDuration = 12; //microseconds.
unsigned int photo = 7330; //A 7330 microseconds delay between bursts shoots a photo.
unsigned int video = 5360; //A 5360 microseconds delay between bursts starts/stops video recording.
uint8_t irLED = D2; //  irled
uint8_t buzzer = D1; // buzzer Trigger the Shutter
IPAddress apIP(192, 168, 1, 1);
DNSServer dnsServer;
ESP8266WebServer webServer(80);
void setup() {
 pinMode(irLED, OUTPUT);
 digitalWrite(irLED, LOW);
 pinMode(buzzer, OUTPUT);
 digitalWrite(buzzer, LOW);
 WiFi.mode(WIFI_AP);
 WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
 WiFi.softAP("IRCAMERA", "12345678");
 Serial.begin(115200);
 // simple HTTP server to see that DNS server is working
 webServer.onNotFound([]() {
   String message = "Camera Remate by MerrittSoft & Meltronica";
   webServer.send(200, "text/plain", message);
 });
 webServer.on("/RELAY1=ON", vidioON);
 webServer.on("/RELAY2=ON", photoON);
 webServer.begin();
}
void loop() {
 dnsServer.processNextRequest();
 webServer.handleClient();
}
void vidioON()
{
 webServer.send(204, "");
 //send first 16 bursts
 for (int i = 0; i < 16; i++) {
   digitalWrite(irLED, HIGH);
   delayMicroseconds(pulseDuration);
   digitalWrite(irLED, LOW);
   delayMicroseconds(pulseDuration);
 }
 delayMicroseconds(video);
 //send second 16 bursts
 for (int i = 0; i < 16; i++) {
   digitalWrite(irLED, HIGH);
   delayMicroseconds(pulseDuration);
   digitalWrite(irLED, LOW);
   delayMicroseconds(pulseDuration);
 }
 shottakenrootreturn();
 delay(100);
 beeprootreturn();
 digitalWrite(buzzer, HIGH);
 delay(100);
 digitalWrite(buzzer, LOW);
 delay(500);
 digitalWrite(buzzer, HIGH);
 delay(100);
 digitalWrite(buzzer, LOW);
 delay(500);
 digitalWrite(buzzer, HIGH);
 delay(100);
 digitalWrite(buzzer, LOW);
 return;
}
void photoON()
{
 webServer.send(204, "");
 shottakenrootreturn();
 delay(500);
 //send first 16 bursts
 for (int i = 0; i < 16; i++) {
   digitalWrite(irLED, HIGH);
   delayMicroseconds(pulseDuration);
   digitalWrite(irLED, LOW);
   delayMicroseconds(pulseDuration);
 }
 delayMicroseconds(photo);
 //send second 16 bursts
 for (int i = 0; i < 16; i++) {
   digitalWrite(irLED, HIGH);
   delayMicroseconds(pulseDuration);
   digitalWrite(irLED, LOW);
   delayMicroseconds(pulseDuration);
 }
 delay(500);
 shottakenrootreturn();
 return;
}
void shottakenrootreturn() {
 HTTPClient http;
 http.begin("http://192.168.1.100/SHOTTAKEN");
 int httpCode = http.GET();
 http.end();
 return;
}
void beeprootreturn() {
 HTTPClient http;
 http.begin("http://192.168.1.100/BEEP");
 int httpCode = http.GET();
 http.end();
 return;
}
/*------------------------------------------------------------------------------
 15/10/2018
 Author: Melissa Merritt
 Platforms: Nodemcu mini
 Language: C++/Arduino
 Program: Mel-Camera-Remote-Sender-Canon
 ------------------------------------------------------------------------------
 License:
 MerrittSoft
 ------------------------------------------------------------------------------
 Button shot = Button focis and Button focus = Button shot*/

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WebServer.h>
ESP8266WebServer webServer;
uint8_t beeper = D1;
uint8_t vibrater = D2;
int buttonfocuss = D7;
int buttonshot = D8;
int buttonState1 = 0;
int buttonState2 = 0;
char* ssid = "IRCAMERA";
char* password = "12345678";
void setup() {
 WiFi.hostname("CameraRemot");
 pinMode(beeper, OUTPUT);
 digitalWrite(beeper, LOW);
 pinMode(vibrater, OUTPUT);
 digitalWrite(vibrater, HIGH);
 pinMode(buttonfocuss, INPUT);
 pinMode(buttonshot, INPUT);
 WiFi.begin(ssid, password);
 WiFi.mode(WIFI_STA); // added works with some boards to stop the wifi broadcast.
 while (WiFi.status() != WL_CONNECTED)
 {
   delay(500);
 }
 digitalWrite(vibrater, LOW);
 
 webServer.on("/", []() {
   webServer.send(200, "text/plain", "Meltronica");
 });
 // ADD COMMANDS HERE
 webServer.on("/SHOTTAKEN", shottaken);
 webServer.on("/BEEP", beep);
 webServer.begin();
 digitalWrite(vibrater, LOW);
}
void loop() {
 if (WiFi.status() != WL_CONNECTED)
 {
   ESP.reset();
 }
 webServer.handleClient();
 buttonState1 = digitalRead(buttonfocuss);
 if (buttonState1 == 1)
 {
   buttonfocussub();
   delay(200);
 }
 buttonState2 = digitalRead(buttonshot);
 if (buttonState2 == 1)
 {
   buttonshotsub();
   delay(3000);
 }
}
void shottaken()//vibrater
{
 digitalWrite(vibrater, HIGH);
 webServer.send(204, "");
 delay(300);
 digitalWrite(vibrater, LOW);
return;
}
void beep()
{
 webServer.send(204, "");
 digitalWrite(beeper, HIGH);
 delay(100);
 digitalWrite(beeper, LOW);
 delay(500);
 digitalWrite(beeper, HIGH);
 delay(100);
 digitalWrite(beeper, LOW);
 delay(500);
 digitalWrite(beeper, HIGH);
 delay(100);
 digitalWrite(beeper, LOW);
return;
}
void buttonfocussub() {
 HTTPClient http;
 http.begin("http://192.168.1.1/RELAY2=ON");
 int httpCode = http.GET();
 http.end();
 return;
}
void buttonshotsub() {
 HTTPClient http;
 http.begin("http://192.168.1.1/RELAY1=ON");
 int httpCode = http.GET();
 http.end();
 return;
}
www.000webhost.com