×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

DIY PROJECT: Digistump Attiny85 Remote shutter release

  • Posts: 5
  • Thank you received: 0
Hello all!
I am new to the forum and don't have much programming knowledge in writing drivers for INDI. I want to use my Fuji XT-1 as my main camera, however, EKOS doesn't seem to be able to control the shutter speed.
During my preliminary testing, I noticed that when the driver is set to Camera Priority, an exposure taken with the cameras built in shutter is downloaded. This gave me the idea of using a small and inexpensive (Dirt cheap) microcontroller (in this case a Digispark Digistump attiny85) as a shutter release controller device.This way, many other cameras may be used with INDI/EKOS, not to mention other systems utilizing switches or relays.

Now comes my problem and question: How does an INDI CCD driver communicate with a separate shutter release on a given port? What command is sent and what protocol is utilized? If a driver needs to be written for such a project, where should I look for information? (The developer documentation was not helpful for me.)
1 year 10 months ago #83348

Please Log in or Create an account to join the conversation.

You can see it on this line: github.com/indilib/indi-3rdparty/blob/98...oto_driver.cpp#L1063

It opens the shutter port and uses ioctl to trigger it.
The following user(s) said Thank You: Ken
1 year 10 months ago #83355

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
Found it, Thanks!
It seems to send FF 01 01 to release the shutter and FF 01 00 to close it. I think I can implement this into the attiny. Ill post my results next week.
1 year 10 months ago #83357

Please Log in or Create an account to join the conversation.

  • Posts: 194
  • Thank you received: 20
Ken,

Its togling the RTS line. I built one a few years back using a USB to serial converter. It was for the shutter release on a Nikon camera. Only the RTS and ground were used. If you have one lying around, you could test it to see if that works. Wouldn't be as much fun as playing with an ATtiny85.

Dave
1 year 10 months ago #83364

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
I don't have a serial converter lying around, but an attiny. I'm also thinking about writing a driver for arduino, to toggle extra equipment, or set up custom commands within ekos. But that is a future project.

EDIT: Here is a quick and extremely dirty code for a shutter release. Written and tested ONLY for and on a Digispark attiny85 stump, tested with Micronucleus Version 2.6. The beginning if statements may be used as a template to trigger other equipment on shutter release. Just make sure to assign the correct pin.

#include <DigiCDC.h>
int incomingByte[] = {0x00,0x00,0x00};
int msg[] = {255,1};                        // FF=255 Header, 01 channel
 
void setup() {
  SerialUSB.begin();                        // Opens usb-serial port
  pinMode(1,OUTPUT);                        // Pin2 is used for onboard LED feedback
  digitalWrite(1,LOW);                      // Pin off as standard
 
}
 
void loop() {
  int msgflag = 1;
  if (SerialUSB.available() > 0) {
    // read the incoming byte:
    incomingByte[0] = SerialUSB.read();      // Read Bytes
    incomingByte[1] = SerialUSB.read();
    incomingByte[2] = SerialUSB.read();
 
    for (int i = 0;  i < 2; i++) {
      if ((incomingByte[i] == msg[i]) && msgflag == 1) {
        msgflag = 1;                         // Validate Header and channel
      }
      else {
        msgflag = 0;
      }
    }
    if (incomingByte[2] == 1) {            
          SerialUSB.print(0x06, HEX);     // ACKnowledge 
          digitalWrite(1,HIGH);           // Pin2 and onboard LED ON
 
      }
      else if (incomingByte[2] == 0) {
         SerialUSB.print(0x06, HEX);     // ACKnowledge 
          digitalWrite(1,LOW);            // Pin2 and onboardLED OFF
      }
    }
    }
 
Last edit: 1 year 10 months ago by Ken. Reason: Fixed and improved code
1 year 10 months ago #83367

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
Hi,
I was digging in the forum about the possibility of using a Fuji X-T1 with Ekos.
I was able to do some exposure with the electronic shutter but the exposure time is limited to 1" by the camera.

Using a separate shutter release is the only way to shoot long exposures in bulb mode with the mechanical shutter? And I can set any value for the exposure time?
Apparently, with gphoto2 from the command line I can control the camera in bulb mode with the mechanical shutter and download the image, why it doesn't work in Ekos?
Am I missing something?

Thank you,
Eugenio
7 months 2 weeks ago #95295

Please Log in or Create an account to join the conversation.

  • Posts: 83
  • Thank you received: 26
Fuji on KStars/Ekos/Indi is possible (I've used a X-T2 quite extensively) but has some limitations - please see indilib.org/forum/ccds-dslrs/11763-fujifilm-cameras/83163.html for more details.
7 months 2 weeks ago #95316

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
thank you for the reply.
I will try with your settings, even though in T mode you are limited to 30" and maybe I would like to take longer exposures.
7 months 2 weeks ago #95318

Please Log in or Create an account to join the conversation.

Time to create page: 1.209 seconds