Poll

What could be the problem of dslr not shooting?

Soldered bad
0 (0%)
Hardware part is broken
1 (33.3%)
Cable
0 (0%)
dslr settings
2 (66.7%)

Total Members Voted: 3

Author Topic: help needed - connecting microcontroller and dslr  (Read 4443 times)

0 Members and 1 Guest are viewing this topic.

Offline ssportTopic starter

  • Newbie
  • Posts: 6
  • Country: hr
help needed - connecting microcontroller and dslr
« on: February 25, 2024, 10:49:08 am »
Hi,
I have a problem connecting a microcontroller and dslr.
First of all, the code and the hardware was tested on nikon d5600 and everything worked.
20 days later, tested on nikon d5500 and it doesnt work. (It wasnt tested by me, but I was present there and it worked, so i need to figure it out why is not working for me).

So, I am using esp32 to connect via shutter release cable so I can remotely take a shoot. I am attaching shematics and some photos.

I need your help and here are some of my conclusions.
1. The wires broked so I had to soldered them again, which may be a reason of not working because I am not specialist in it, I am doing a software. As you can see on a photo, there are black, red and white wire. I used multimeter to check, there is no short circuit and every pin works. By that, it seems there is no problem, but not 100%.

2. When I run my code, the screen on the dslr gets black as its trying to focus (when camera wants to focus, it darks the screen usually), but in the end nothing happens, which tells me some of the signal is being sent. I discovered that red wire always send the signal. If I use pin of a red wire in the code either for a shutter or focus it darks the screen but when I use white wire pin for it, it doesnt. I am not expert in a hardware, so is that normal that red wire is used to only that part or the red and the white wire has the same function? Tought there might be a problem.

3. The cable might be a problem. I am using shutter release cable specific for this dslr model.

4. Maybe I need to turn on something on my camera. I tried with manual focus, with shutter release option...

I am sorry if i need to add anything else to make it easier.
 
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2083
  • Country: us
Re: help needed - connecting microcontroller and dslr
« Reply #1 on: February 25, 2024, 03:46:54 pm »
According to this:

https://www.instructables.com/Remote-Shutter-Release-Cable-for-Nikon/

you ground one wire to make it focus, then ground both wires at the same time to fire the shutter.  I assume the black wire is the camera's ground, and it seems the red wire is for focus.  That would leave the white wire as the shutter trigger.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6450
  • Country: ro
Re: help needed - connecting microcontroller and dslr
« Reply #2 on: February 26, 2024, 08:55:14 am »
If it's for remote trigger only, there is an IR remote for Nikon, or you can DIY one.  Once, I've put an ATtiny13 MCU and an IR LED inside a cigarette lighter (the kind of lighter with a LED and batteries near the gas tank).  The advantage is that no wires are connected to the camera, so no risk to fry the camera with external voltages.









The code for the ATtiny13 microcontroller was written in BASIC, but it only pulses an IR LED, should be easy to translate that to C.  The original code can be compiled with the free version of BASCOM-AVR:
Code: [Select]
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Infrared Remote Control Transmitter for Nikon D90
' -------------------------------------------------
'
'  v0.2
'  Written by RoGeorge
'  2010.01.03
'  Compiler BASCOM-AVR v1.11.9.1
'
' Description:
' DIY replacement for Nikon ML-L3 Infra Red (IR) Remote Control
'
' After powering up the microcontroller from the lighter's button,
'  it sends a "TAKE PICTURE" IR command to the camera,
'  then enters in power down mode.  Turn it off from the lighter's button.
'
' It should work with:
'  Nikon N65, N75, Coolpix 8400, 8800, Pronea S, Nuvis S & Lite Touch Zoom,
'  Nikon D40, D40x, D50, D60, D70, D80 & D90 Digital SLR Cameras
'
' It works (tested) with:
'  - Nikon D90
'
' Schematic:
'  - 1 x ATtiny13
'  - 1 x normal open micro switch between batteries (push button)
'  - 3 x 1.5V SR41 (AG3) button cells as power source
'  - 1 x IR LED between OC0B (PIN 6 = LED anode) and GND (PIN 4 = LED cathode)
'  - NO curent limiter resistor is necessary for the IR LED
'
' IR LED waveform out (100% modulated with 38.4 KHz carrier):
'  -  2000 us on
'  - 27830 us off
'  -  390 us on
'  -  1580 us off
'  -  410 us on
'  -  3580 us off
'  -  400 us on
'  - 63200 us off
'  - repet once again the whole sequence
'
' Fuse bits:
' Low: -1101010
'  ||||||++-- CKSEL[1] Clock selection
'  ||||++-- SUT[1] Startup time selection
'  |||+-- CKDIV8 Clock division ratio (1:1/1, 0:1/8)
'  ||+-- WDTON (1:WDT normal, 0:WDT always on)
'  |+-- EESAVE (Retain EEPROM at chip erase 1:No, 0:Yes)
'  +-- SPIEN (1:Disable ISP, 0:Enable ISP) *Available only HVS mode

' High:---11111
'  ||||+-- RSTDISBL (RESET pin 1:Enable, 0:Disable(PB5))
'  ||++-- BODLEVEL[1] (BOD 11:None, 10:1.8V, 01:2.7V, 00:4.3V)
'  |+-- DWEN (On-Chip Debugging via RESET pin 1:Disable, 0:Enable)
'  +-- SPMEN (SPM instruction 1:Disable, 0:Enable)
'
' Cal: 75
'
' Bill of Materials:
'  - 1 x Cigarette Lighter with white LED for case, batteries and power switch
'  - 1 x IR LED
'  - 1 x ATtiny13
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

 $regfile = "attiny13.dat"
 $crystal = 9600000

 $swstack = 8
 $hwstack = 2
 $framesize = 0

 $noramclear

'initializations
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'select clock prescaler to 1/1 (9.6 MHz)
'''''''''''''''''''''''''''''''''''''''''
 Clkpr = bits(7)
 Clkpr = 0

'Ports init
'''''''''''
 Config Portb = Output

'TIMER init
'''''''''''
 Config Timer0 = Counter , _
  Edge = Falling , _
  Compare A = toggle , _
  Compare B = toggle , , _
  Clear Timer = 1

 ocr0a = 13
 ocr0b = 0

'Other peripherals init
'''''''''''''''''''''''
 stop adc
 stop watchdog
 stop ac



'main
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 declare sub pulse1

  waitms 63

  call pulse1
  call pulse1

  portb = 0
  disable interrupts
  powerdown

 end
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''



 sub pulse1
  start timer0
  waitus 2000

  stop timer0
  waitms 28

  start timer0
  waitus 390

  stop timer0
  waitus 1580

  start timer0
  waitus 410

  stop timer0
  waitus 3580

  start timer0
  waitus 400

  stop timer0
  waitms 63
 end sub

'EOF
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
https://hackaday.io/project/1293-turn-a-cigarette-lighter-into-an-ir-nikon-remote

Don't know if the IR remote is still a thing in newer Nikon models.  This one was tested with a Nikon D90.  Should work with any other Nikon camera that supports the original Nikon ML-L3 Infra Red Remote.
« Last Edit: February 26, 2024, 09:07:32 am by RoGeorge »
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6450
  • Country: ro
Re: help needed - connecting microcontroller and dslr
« Reply #3 on: February 26, 2024, 12:09:01 pm »
Yes, ESP32 should work, too.  The original IR remote (ML-L3) sends this sequence of IR pulses:
Code: [Select]
' IR LED waveform out (100% modulated with 38.4 KHz carrier):
'  -  2000 us on
'  -  27830 us off
'  -  390 us on
'  -  1580 us off
'  -  410 us on
'  -  3580 us off
'  -  400 us on
'  -  63200 us off
' repeat once again the whole sequence

In the ATtiny13 I've used a hardware timer to generate a continuous 38.4kHz square wave, 50% duty cycle at an IO pin.  Then, on another IO pin, the on/off signal with the listed above microseconds duration is sent by bit banging.  The LED is connected between the non-stop 38.4kHz pin and the on/off pulses pin.

You should add a series resistor with the IR LED, to limit the max current through the IR LED.  I didn't have a series resistor in my schematic because the button cells batteries used there were limiting the max current anyway.

I bet the software and schematic is already there if you search for "ESP32 ML-L3 Nikon remote".  Random search result:
https://www.az-delivery.de/en/blogs/azdelivery-blog-fur-arduino-und-raspberry-pi/esp32-esp8266-als-fernausloeser-fuer-eine-nikon-kamera-in-micropython-teil-1

Another one, with an Arduino code example.  IIRC the ESP32 boards can be used with the Arduino environment, too, and programmed from the Arduino IDE (often with no code changes needed between the many different types of Arduino hardware/boards).  https://goughlui.com/2013/12/06/teardown-and-project-clone-nikon-ml-l3-ir-remote-and-emulation/
« Last Edit: February 26, 2024, 12:34:53 pm by RoGeorge »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf