Close
0%
0%

Talking Time Lapse Camera Control for Astronomy

Talking interface controlling a DSLR camera for astronomy photos

Similar projects worth following
The best astrophotographs are stacks of several images taken of the same scene. Stacking can reduce noise and bring out faint details. Night vision takes a minimum of 20 minutes to return after viewing bright lights such as LEDs or monitors. This device uses a Raspberry Pi as talking interface to create a sequence of images for stacking, and preserves night vision by not using a display. It can also be used to create time lapse films of the sky, or any other subject. It will control a Canon DSLR camera ( others will be added later ), features talking feedback and will use increment, decrement and enter controls. One button will be for starting and stopping the exposures. The Pi will speak the choices as you proceed through the menus. The Raspberry Pi will speak an announcement before the end of each exposure, just to let the world know how the stars are doing.

SO....

A Raspberry Pi offers a lot for astronomy hackers, too much for one project. Start simple, succeed, add incrementally. I winnowed a lot of ideas to get here, aiming a telescope with Stellarium (an app with that feature already built in), perhaps VNC control from a phone, wireless serial connection, or just an autoguider port to keep a telescope on track for real long exposures -all gone . Hey, why not view the live image on a small screen, and save the files to a flash drive, phoooey! But what I can see happening, is later adding some of these ports to the board, to eventually create a flexible Raspberry Pi astronomy HAT.

So to start, this has

  1. Raspberry pi GPIO attached via Perma Proto Hat / 40 pin connector
  2. To trigger the camera, 2.5mm stereo cable attached to the GPIOs via an optocoupler, to keep owners of expensive cameras less jittery
  3. speaker connection
  4. up, down, yes, no, one go/stop buttons

Initially this is aimed to work with my Canon DSLR EOS Xsi Rebel ( wow, alphabet soup! ) It has a 2.5mm stereo jack to trigger the exposures, that takes ground on it's tip. To take a shot, prefocus must be set by a closed circuit on the ring of the jack, and the sleeve is closed for the the duration of the shot. Some other models of Canon cameras don't need the ring high for an exposure, so the sleeve and ring will each get a GPIO, and the software will handle the needs of each future model. The 4N36 dual opto isolator will handle both signals to one camera. Note for future flexibility, several cameras could be controlled through a serial shift register at once ; )

Possibly, with only a very little chance because of feature creep, I'll add a photosensor for daylight detection to stop all this foolishness at Sunrise.

I'm planning on having the Pi ask for three types of exposure sequence.

  1. Repeat one exposure time in a loop.
  2. Repeat a sequence of manually entered exposures
  3. Loop a calculated sequence based on first and last exposure times.

If 1. is selected The program ask for an exposure time. up, down increments in 30 second intervals, then in minutes.

If 2. is selected the program asks for a series of exposure times, press yes/enter to enter the next exposure.

If 3. is selected the program asks for the number of photos, start and finish exposure times, and calculates a mathematical progression between each.

All questions are finished by pressing start once, the Pi speaks some details. Press Start again to begin, Press No to re-enter the menu.

After getting this working, I'ld like to add options for planetary length (short) exposures, number of repeats or duration of looping, daylight detection to end shots or control image brightness. Also, more cameras could be controlled, and settings could be read from a text file. And many many more feature creepy kinda features.

SpeechAndAudioScripts.zip

speechtest 1 and 2 scripts. Need to install flite, festival and espeak to use these. Audio output control scripts. select HDMI, 3.5mm audio jack or auto selection (normal configuration).

Zip Archive - 1.07 kB - 02/25/2016 at 17:44

Download

speachtest2.mp3

Standard computer speech test for fans of obscure '70s sci fi

MPEG Video - 297.74 kB - 02/25/2016 at 16:25

Download

speechtest1.mp3

Standard computer speech test 1

MPEG Video - 281.41 kB - 02/25/2016 at 16:24

Download

CanonBulbControl_B_0_4_0.ino.zip

Last Version of the Arduino / Pro Trinket Camera Control code as an example. Code contains lots of notes on future additions. Some this will make its way into the Pi project. Circuit diagram en route now.

Zip Archive - 4.58 kB - 02/24/2016 at 22:02

Download

  • 1 × Raspberry Pi The smaller - low power the better.
  • 1 × Raspberry Pi perma proto HAT ( for prototype )
  • 1 × 4400 mAh USB power supply Enough power for a headless pi for most of a night.
  • 1 × 5 momentary contact pushbuttons Up, down, yes, no and whammy!!! - let's take some photos of galaxies!!!!
  • 1 × 4n36 opto coupler Keeps Raspberry PI power, and the camera's electronics separate. Just so my buddies won't freak with their expensive cameras.

View all 9 components

  • Research adds features !!!!

    Davidian02/26/2016 at 19:38 0 comments

    With some more research I found a library Canon released for developing USB camera control software. - Wow, more feature creep already. That lead me to a linux application called gphoto2, available as an apt-get download. The project will stay with the 2.5mm jack control for now, but eventually I'm going to add in access through USB. Especially since USB access has the promise of putting a live image on the pi's monitor. Now, at the moment the project is headless, but a nice dim monitor with a live image from the camera is very useful for aiming , focusing and composing shots.

    The screen on the back of a camera is useful, but, the menus are horribly bright for night time work, and the camera can get into some unusual positions. It's pointing up at the sky, to check the monitor you need to get under that screen, and not bash into the tripod. With a darker desktop, a small computer screen would be great for monitoring the camera, doing in field code mods, and using other Linux astronomy apps. I've added photos to the project that show how well the desktop of the Pi can be darkened. I think I'll have to get into some text files to go further, and edit the icons.

    These mods are just some low hanging fruit, but they will come in very handy after the main program and board are debugged. But seeing ready made USB camera software opens up a lot of possibilities

  • Picking a Speech Synthesizer pt.1

    Davidian02/25/2016 at 17:09 0 comments

    Speech Synth section!

    There's excellent Adafruit article on Raspberry Pi speech synthesis by Mike Barela, here https://learn.adafruit.com/speech-synthesis-on-the-raspberry-pi . Worth checking out for many reasons. It outlines using 2 speech synth apps, Flite and Festival. A little further research and it turns out there is another speech synth available for the pi, espeak. All can be accessed from the command line, or can receive instructions through a pipeline.

    I did a few experiments, spooking my son by making his pi talk to him remotely via ssh, getting the programs receive pipeline commands and read text files. I found that flite and festival both worked without problems, where espeak would throw errors as it looked for various outputs and jack, an audio flow application. I think espeak could be made to work with some configuration changes, but I would keep the system simple by avoiding jack. I've found it can be a little high maintenance. Sorry to throw that at you jack enthusiasts, I just haven't spent enough time playing with it and I'ld like to keep this project as clean as possible.

    So based on some errors reported, and a bit of flaky Pi activity after using espeak, it's out of the running. I can see why it didn't make it into Mike Barela's article. In some ways it's my favourite. It seems to speak brisker, but mostly because it sounds like an old sci fi robot, and it has a funky english accent. Hmmmmm, maybe something in the future....

    Flite and Festival. Take a listen to my files, standard computer speech test 1 and 2. You'll hear all three synths. Just based on personal preferences, and an odd 1970's English sense of humour, I still like espeak, festival seems to have the clearest voice, and, well, Flite was there. But in the second test, Festival makes a big pause between the phrase, and the announcement of it's name. There's a line break there in the text file, could be causing the pause. I find that sort of pause in the middle of phrases distracting, or, rather, I totally loose attention while I'm waiting and start playing with other buttons. Perhaps that's just my problem. Nonetheless, for reliability and smoothness, so far Flite is the winner.

    Just to check out Festival further, I'll write a text file with line breaks and see if it can read through them cleanly. I'm planning on using phrases with variables for adjectives and numbers, so there will be some chances for the pause to crop up in my program's interface. And next time I'll give a sample of how the menus will sound.

    Stay tuned

    associated files; - look for these in the files section of this project -

    speechtest1.mp3

    speechtest2.mp3

    SpeechAndAudioScripts.zip - contains the scripts for the mp3s and scripts to change the audio output from HDMI to analog

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates