×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

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.)
4 months 1 day 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.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: Ken
4 months 20 hours 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.
4 months 20 hours ago #83357

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

  • Posts: 130
  • Thank you received: 14
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
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB w/Stellarmate out on the scope, Raspberry Pi 4B 4GB test server
Linux client
4 months 8 hours 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: 3 months 3 weeks ago by Ken. Reason: Fixed and improved code
4 months 7 hours ago #83367

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

Time to create page: 2.948 seconds