logo
Canon Remote
Canon Remote using the NodeMCU Mini

This little project with the NodeMCU Mini remotely focus and trigger's a shot on the Canon DSLR using the remote input socket
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 send a signal back to the remote, indicating the action was executed with short vibration and beep with the shot,
The remote will also vibrate continuously when its out of range or not connected to the receiver,
this unit will only work for taking Photos, dose not support Video
I have done a quick test and the unit was still working at 170 meters apart, line of sight.

PARTS

NodeMCU Lua ESP8266 ESP-12 WeMos D1 Mini WIFI
2 x SRD-5VDC-SL-C PCB Mini 5V DC Coil Power Relay 5 Pin
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
2 x 1N4001 Diode
2 x LEDs
1/4" Mini Smart Ball Head Bracket/Holder
/Mount Camera Tripod hot shoe
1 x 5V Electromagnetic Piezo Buzzer
2 x Push ON button switches
2 x 9V Volt Battery Snap Clip Connector

3 x SPDT ON-Off Mini Miniature Toggle Slide Switch
2 x 9V Volt Battery
1 x DC3V 70mA Phone Coin Flat Vibrating Vibration Motor
1 x 2.5mm Stereo Male Plug Jack




receiver-sender-top        receiver-sender-open1

receiver-sender-side1        receiver-sender-side2

receiver        sender

receiver-sender-open        lid

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

Canon-pinout

nodemcu_relay_gpo_wiring_s
click picture to enlarge

nodemcu_relay_gpo_wiring_s
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
/*------------------------------------------------------------------------------
 24/09/2018
 Author: Melissa Merritt
 Platforms: Nodemcu mini
 Language: C++/Arduino
 Program: Camera-Remote-Recever-Canon
 ------------------------------------------------------------------------------
 License:
 MerrittSoft
 ------------------------------------------------------------------------------*/

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
uint8_t relay1 = D2; // Relay1 Trigger the Shutter
uint8_t relay2 = D1; // Relay2 Focus
IPAddress apIP(192, 168, 1, 1);
DNSServer dnsServer;
ESP8266WebServer webServer(80);
void setup() {
 pinMode(relay1, OUTPUT);
 digitalWrite(relay1, LOW);
 pinMode(relay2, OUTPUT);
 digitalWrite(relay2, LOW);
 WiFi.mode(WIFI_AP);
 WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
 WiFi.softAP("CAMERA", "12345678");
 Serial.begin(115200);
 // simple HTTP server to see that DNS server is working
 webServer.onNotFound([]() {
   String message = "Hello World!\n\n";
   message += "URI: ";
   message += webServer.uri();
   webServer.send(200, "text/plain", message);
 });
 webServer.on("/RELAY1=ON", relay1ON);
 webServer.on("/RELAY2=ON", relay2ON);
 webServer.begin();
}
void loop() {
 dnsServer.processNextRequest();
 webServer.handleClient();
}
void relay1ON()
{
 digitalWrite(relay1, HIGH);
 webServer.send(204, "");
 delay(5000);
digitalWrite(relay1, LOW);
 shottakenrootreturn();
 delay(100);
 beeprootreturn();
return
;
}
void relay2ON()
{
 webServer.send(204, "");
 shottakenrootreturn();
 delay(500);
 shottakenrootreturn();
 digitalWrite(relay2, HIGH);
 delay(1200);
 digitalWrite(relay2, LOW);
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;
}


/*------------------------------------------------------------------------------
 24/09/2018
 Author: Melissa Merritt
 Platforms: Nodemcu mini
 Language: C++/Arduino
 Program: Camera-Remote-Sender-Canon
 ------------------------------------------------------------------------------
 License:
 MerrittSoft
 ------------------------------------------------------------------------------

#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 = "CAMERA";
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);
 //IPAddress ip(192, 168, 1, 10);
 WiFi.begin(ssid, password);
 WiFi.mode(WIFI_STA); // added works with some boards to stop the wifi broadcast.
 //WiFi.mode(WIFI_AP_STA); // added works with some boards to start the wifi broadcast.
 Serial.begin(115200);
 while (WiFi.status() != WL_CONNECTED)
 {
   Serial.print(".t");
   delay(500);
 }
 digitalWrite(vibrater, LOW);
 Serial.println("");
 Serial.print("IP Address: ");
 Serial.println(WiFi.localIP());
 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(500);
 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;
}