Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
02-02-2011, 10:33 AM - 12 Likes   #1
Senior Member
piesforyou's Avatar

Join Date: Dec 2009
Photos: Albums
Posts: 129
Absurdly simple DIY K-x remote timer using MP3 player

Edit: There is now a dedicated Android App for controlling your Pentax camera using this method. Get it here:

LINK (New version 1.1 with vastly improved range)
[Link updated - should work now!]

It is not on the Market Place because it was developed using Android AppInventor which does not (currently) allow you to upload apps to the marketplace.

This BETA! Please report bugs :-)


Thismorning I stumbled upon this Instructable detailing how to make an IR transmitter using an audio jack lead, which would then transmit any IR code using a custom .wav file. This is one of those situations where in a cartoon a lightbulb would have appeared above my head - idea!

So this is a very quick guide as to how to utilize the IR lead in the above instructable (and kudos to alberto_canvas for a very informative guide as to how to make the lead) in order to use any MP3 player/phone or laptop (although I would highly recommend PK_Tether in that instance), basically ANYTHING that can play an audio file, as an intervalometer or remote timer.

Here are some shots from my build.

I started with a headphone extension lead, from Poundland (luckily I thought the one Maplin sold for £7.99 was a ripoff) and the two IR LEDs are from Maplin, code YH70M, just over a quid each.




Testing. Believe me, when the shutter went off this was a real EUREKA! moment for me. You have to wire them up so that the positive leg from one LED is attached to the negative leg of the other LED. This is NOT a parallel circuit - they are two opposing diodes. This becomes clear later. Also, my lead has a red, white and yellow wire. The yellow is ground, and is not connected to anything.


I decided to file down one edge of each LED so that they fitted next to each other nicely (you have to make sure to file the correct side on each one else the leads don't go well together)


See I started filing the wrong side on one of them.




I used thin shrink tubing on one lead and then larger shrink tubing to cover both the leads, then wrapped the whole lot in insulation tape.


Finished. Very simple. I guess it took about 2 hours to make but that included the time it took me to figure out how to make the .wav file work.


So that's the lead. The next step is the .wav file. I found the correct code from this thread. It looks like this.



So here's the important bit. To be honest i'm not sure that what I'm about to say is technically correct but, well it works so there you go. The IR code signal is 38kHz but the .wav file we will create cannot go that high. So what we do is use pulses of 19kHz, and because we have two LEDs wired opposing each other, one LED will 'light' up during the positive part of the wave and the other will light up during the negative part of the wave, so that for each wavelength we actually have two pulses - so a 19kHz wave gives us 38kHz pulses. Follow me? To make sure this works, only one channel (I've made it the left channel) can transmit the signal because if both channels do then they cancel each other out. Or you could invert the signal on the right channel (possibly leading to a stronger IR pulse - need to experiment with that).

The signals are created simply using the "Generate, Tone" function in Audacity. I specified a square signal and 19000 Hz, for 13 milliseconds for the first long pulse and then 1 millisecond for the subsequent pulses.

Here's a screenshot of the .wav file I created, I used Audacity which is free.

LINK

Once it is saved as a .wav, use windows media player or something to check it works. In case you hadn't guessed, the lead you made just plugs into the headphone jack of your computer/MP3 player/whatever. It's funny though - this didn't work with VLC. But windows media player did work. Meh. It also worked when I converted the file into an MP3, but possibly less reliably? Not sure. I would stick with wavs unless your device can't play them.

To make this into a useful timer, you need to create a track with the signal at the beginning, followed by X amount of silence, and then simply play the track on repeat. However I have found it hard to gauge how much time to leave - for example when you set the shutter speed to 30 seconds the time between shots is actually a bit longer than this. For this reason I prefer to use bulb mode, so the .wav is laid out like this:

SIGNAL - 30s silence - SIGNAL - 2 seconds silence

with this on repeat, the camera will continuously take 30s shots until the memory card is full/batteries run out. Whatever, experiment, see what you like. Watch out for DFS though, but then you could even account for that by putting in the appropriate amount of silence for DFS.

Anyway the point is this is a really really simple way to make your k-x into a time-lapse or astrophotography beast! You could even set up a playlist to give you, say, 100 exposures at 30 seconds, 10 exposures at 5 seconds, or whatever. I'll be making some sort of mount to attach the lead to the camera close to the IR port, possibly even just an elastic band or something.

Finally here's a zip of the audacity project and the raw .wav file (Now with improved range by putting the inverted signal on the opposite channel)





Hope you enjoy.

EDIT:

This is why the mp3 does not work quite so well:



I didn't imagine the mp3 would be quite so screwed up! I would definitely recommend some sort of lossless compression, for example ogg vorbis which looks a LOT better:



Also, as lavascript points out, this is useful for any pentax camera not just the k-x. However it is particularly useful for the k-x as it has no timelapse functionality.


Last edited by piesforyou; 07-21-2011 at 03:20 AM.
02-02-2011, 10:44 AM   #2
Inactive Account




Join Date: Apr 2010
Location: New Orleans
Photos: Gallery
Posts: 3,053
Nice work.

I wonder if an old bluetooth headset to do a radio controlled IR shutter release and just attach it to the lens with some gaffer tape.

I will have to bookmark this post for the next time I have time to do a project.
02-02-2011, 10:59 AM   #3
Veteran Member
lavascript's Avatar

Join Date: Jul 2009
Location: Baton Rouge
Posts: 392
Wow.

Seriously, omg.

This is pretty much the coolest thing EVER. And all Pentax cameras take the same remote code, right? So this should work for them all.

Yowza.
02-02-2011, 11:06 AM   #4
Senior Member
piesforyou's Avatar

Join Date: Dec 2009
Photos: Albums
Posts: 129
Original Poster
QuoteOriginally posted by mikemike Quote
Nice work.

I wonder if an old bluetooth headset to do a radio controlled IR shutter release and just attach it to the lens with some gaffer tape.
The possibilities are endless

QuoteOriginally posted by lavascript Quote
Wow.

Seriously, omg.

This is pretty much the coolest thing EVER. And all Pentax cameras take the same remote code, right? So this should work for them all.

Yowza.
Glad you like it. As far as I know the code is the same across the board.

02-02-2011, 11:39 AM   #5
Veteran Member
aurele's Avatar

Join Date: Jan 2011
Location: Paris, France
Photos: Albums
Posts: 3,217
As Lavascript said this is the coolest thing EVER !

I have a day off tomorrow, i know how i'm going to use it wisely
02-02-2011, 12:41 PM   #6
Veteran Member




Join Date: Dec 2009
Location: Ontario
Posts: 550
This is pretty awesome. However, not all cameras operate the same. For the Kx, they added the ability to keep the shutter open on the first click and close the shutter on the second click for bulb mode. Not so with the Km or previous generations. However, if you can keep the signal pulsing then you could get a very long exposure.

What I'd worry about it someone putting it on repeat and accidentally leaving it. If there a time limit to how long you can keep the shutter open and the sensor collecting light?
02-02-2011, 01:08 PM   #7
Senior Member
piesforyou's Avatar

Join Date: Dec 2009
Photos: Albums
Posts: 129
Original Poster
QuoteOriginally posted by epqwerty Quote
not all cameras operate the same. For the Kx, they added the ability to keep the shutter open on the first click and close the shutter on the second click for bulb mode. Not so with the Km or previous generations. However, if you can keep the signal pulsing then you could get a very long exposure.
I did not know that, thanks for pointing it out. Do you just keep the button pressed for bulb mode on the k-m then? In which case yes you would just repeat the signal over and over again for X seconds.

It would still be pretty easy to use the shutter speed rather than bulb mode, it's just a case of figuring out how long the camera takes for a, say, 30 second exposure. In fact i'll time it right now.

31.8 seconds. Is that weird? Anyway it would be very simple to make an audio file which is, say, 33 seconds long to be safe, with the signal at the beginning.

02-02-2011, 01:43 PM   #8
Junior Member




Join Date: Jun 2010
Location: Montreal QC
Posts: 28
wow - after I ordered a bunch of stuff from China to build an interval meter.

This is a great idea if powered by a smart phone, the possibilities are endless.

Dave
02-02-2011, 01:57 PM   #9
Senior Member
piesforyou's Avatar

Join Date: Dec 2009
Photos: Albums
Posts: 129
Original Poster
QuoteOriginally posted by cdndave Quote
wow - after I ordered a bunch of stuff from China to build an interval meter.

This is a great idea if powered by a smart phone, the possibilities are endless.

Dave
It would be very simple (for someone who can code - not me!) to create an app for Android or iOS, or even symbian to control this. After all it's just playing a wav file at the right time.

Edit: so simple I managed it myself. Android app is working. I don't have an iPhone though.

Last edited by piesforyou; 02-02-2011 at 06:25 PM.
02-02-2011, 01:58 PM   #10
Forum Member
freddykrueger's Avatar

Join Date: Jan 2011
Location: Czech Republic
Photos: Gallery
Posts: 80
Wow, this is just amazing. I'm definitelly gonna build it for time-lapse photography. This topic deserves to be marked as "sticky".
02-02-2011, 02:34 PM   #11
Senior Member
piesforyou's Avatar

Join Date: Dec 2009
Photos: Albums
Posts: 129
Original Poster
Er guys, you know what, in 15 minutes I've just learnt how to make a kitty purr on my android, using Android AppInventor. It's so simple. Hell, that's a remote trigger right there.

I'm gunna develop an Android app for this thing. My damn Magic doesn't have a built in audio jack though - need to buy a USB to audio adaptor
02-02-2011, 02:40 PM   #12
Site Supporter
Site Supporter
mattb123's Avatar

Join Date: Apr 2010
Location: Colorado High Country
Photos: Gallery
Posts: 10,864
This is fantastic! Thanks for sharing.
02-02-2011, 03:17 PM   #13
Veteran Member




Join Date: Oct 2010
Location: madrid
Photos: Albums
Posts: 833
Yep great!!!
Gonna get me some free time to try it.
THX
02-02-2011, 04:05 PM   #14
Veteran Member
aurele's Avatar

Join Date: Jan 2011
Location: Paris, France
Photos: Albums
Posts: 3,217
QuoteOriginally posted by epqwerty Quote
This is pretty awesome. However, not all cameras operate the same. For the Kx, they added the ability to keep the shutter open on the first click and close the shutter on the second click for bulb mode. Not so with the Km or previous generations. However, if you can keep the signal pulsing then you could get a very long exposure.

What I'd worry about it someone putting it on repeat and accidentally leaving it. If there a time limit to how long you can keep the shutter open and the sensor collecting light?
About 5 minutes max with the K-x, with a external temp about 20°c. After that, the sensor heat too much and its cut by security. And you have to wait the sensor to be cooler to take some other picture, or use movie mode.

what is the tolerance of the IR receptor about the peak wavelengt ? Your led are about 940nm. If i take 930nm or 945 nm, will it be okay ?

Last edited by aurele; 02-02-2011 at 04:28 PM.
02-02-2011, 06:07 PM   #15
Senior Member
piesforyou's Avatar

Join Date: Dec 2009
Photos: Albums
Posts: 129
Original Poster
Good news chaps. Android application is, well, functional!

This means for the first time(?) you can actually control your Pentax camera using your Android smartphone. It currently has single shutter release and a simple timer function, with infinite shots or you can set a limit.

Now I'm going to bed!
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
camera, channel, code, dslr, file, ir, k-x, lead, mp3, photography, silence
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless remote timer recommendation? stuskier Pentax Camera and Field Accessories 3 01-20-2011 08:03 PM
wireless remote timer stuskier Ask B&H Photo! 1 01-20-2011 07:58 AM
Digital Remote Timer eccs19 Troubleshooting and Beginner Help 3 12-06-2010 04:17 PM
Help with self portrait without remote, using timer einstrigger Troubleshooting and Beginner Help 8 02-12-2010 10:51 AM
Timer remote control (intervalometer) for K7 Torva Pentax Camera and Field Accessories 4 01-09-2010 06:31 PM



All times are GMT -7. The time now is 01:57 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top