DSLR IR remote hack....help?!
steve_b
Posts: 1,563
Hi folks,
just trying to get back in to the hobby.
I have a Nikon D90 DSLR with the IR trigger remote. Works great.
What I'd like to do is, simulate the IR code with a uProc and make an intervalometer (set the camera to take 10second exposures every xminutes) for playing with sky pictures or city scenes.
Anyhow, I grabbed an IR rcvr and have the pulse sequence....unfortunately, I don't believe it coincides with any Sony remote code....so I tried to brute force the hack.
The pulse sequence is: off.....on for 2.24mS.....off for 27.6mS......on for 760uS......off for 1.24mS.....on for 760uS....off for 3.24mS.....on for 720uS.....off for 63mS...then repeat!
Simple enough....but the stamps freqout function only has 1mS resolution.
The pulsout function would work but the pause function has the 1mS resolution as well.
I pulled out my SX but my key is broken (old problem I never fixed) and I'm waiting to hear from Parallax support about getting that sorted (nudge nudge!!) [noparse];)[/noparse]
So, I grabbed my propellor....I bought it when it first came out...thinking I'd ride the new wave... Gotta have time to surf!! So I never learned it....but did come up with a code that I thought would work.
So....with the stamp not quite being up to snuff and the SX parked....my question rests with the prop.
So, I'm using the SquareWave object and a bench scope to see what's actually happening.
<snip>
_clkmode = xtal1 + pll16x ' System clock → 80 MHz
_xinfreq = 5_000_000
<double snip>
SqrWave.Freq(0, 1, 38000)
waitcnt (179200 + cnt) 'wait 2.24mS -- confirmed on scope to be close!
dira~
waitcnt(2122000 + cnt)
</snip>
So, I guess I'm sending out the 38kHz signal on pin 1 for the waitcnt period....then changing pin1 to an input, which zero's that port; then waiting before I send the signal out again.
The o-scope seems to jive with what I'm after....the timing numbers I calculated didn't work...so I just started changing waitcnt values until I got the relative timing.
I'm using a PropRPM board and have the IR transmitter on p0 (is this pin1 or pin0?). The IR transmitter is a LTE-5228A)
Other than the fact the stamp didn't have the pause resolution, I would've thought this to be easier........
So, what I see on the scope (connected to the IR tx led) is a floating line that sits a few hundred mV's high (this actually changes with the ambient light....not sure I understand why it's being a photocell. In fact, I can press the button on my camera remote and see the pulses through this led....interesting!
Anyhow, I've got a 120ohm resistor between the led and p1 and my pulses aren't all that high on the scope but they are there! Unfortunately, because the whole line is floating, I'm assuming that the led is basically on all the time and then just has a bit of modulation that happens during my codes run....
So, I'm assuming there's a way to have the pin an output but be low unless outputting.
Any thoughts? (I know there'll be a couple! [noparse];)[/noparse]
Cheers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<FONT>Steve
What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
Lee Travino after the second time being hit by lightning!
just trying to get back in to the hobby.
I have a Nikon D90 DSLR with the IR trigger remote. Works great.
What I'd like to do is, simulate the IR code with a uProc and make an intervalometer (set the camera to take 10second exposures every xminutes) for playing with sky pictures or city scenes.
Anyhow, I grabbed an IR rcvr and have the pulse sequence....unfortunately, I don't believe it coincides with any Sony remote code....so I tried to brute force the hack.
The pulse sequence is: off.....on for 2.24mS.....off for 27.6mS......on for 760uS......off for 1.24mS.....on for 760uS....off for 3.24mS.....on for 720uS.....off for 63mS...then repeat!
Simple enough....but the stamps freqout function only has 1mS resolution.
The pulsout function would work but the pause function has the 1mS resolution as well.
I pulled out my SX but my key is broken (old problem I never fixed) and I'm waiting to hear from Parallax support about getting that sorted (nudge nudge!!) [noparse];)[/noparse]
So, I grabbed my propellor....I bought it when it first came out...thinking I'd ride the new wave... Gotta have time to surf!! So I never learned it....but did come up with a code that I thought would work.
So....with the stamp not quite being up to snuff and the SX parked....my question rests with the prop.
So, I'm using the SquareWave object and a bench scope to see what's actually happening.
<snip>
_clkmode = xtal1 + pll16x ' System clock → 80 MHz
_xinfreq = 5_000_000
<double snip>
SqrWave.Freq(0, 1, 38000)
waitcnt (179200 + cnt) 'wait 2.24mS -- confirmed on scope to be close!
dira~
waitcnt(2122000 + cnt)
</snip>
So, I guess I'm sending out the 38kHz signal on pin 1 for the waitcnt period....then changing pin1 to an input, which zero's that port; then waiting before I send the signal out again.
The o-scope seems to jive with what I'm after....the timing numbers I calculated didn't work...so I just started changing waitcnt values until I got the relative timing.
I'm using a PropRPM board and have the IR transmitter on p0 (is this pin1 or pin0?). The IR transmitter is a LTE-5228A)
Other than the fact the stamp didn't have the pause resolution, I would've thought this to be easier........
So, what I see on the scope (connected to the IR tx led) is a floating line that sits a few hundred mV's high (this actually changes with the ambient light....not sure I understand why it's being a photocell. In fact, I can press the button on my camera remote and see the pulses through this led....interesting!
Anyhow, I've got a 120ohm resistor between the led and p1 and my pulses aren't all that high on the scope but they are there! Unfortunately, because the whole line is floating, I'm assuming that the led is basically on all the time and then just has a bit of modulation that happens during my codes run....
So, I'm assuming there's a way to have the pin an output but be low unless outputting.
Any thoughts? (I know there'll be a couple! [noparse];)[/noparse]
Cheers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<FONT>Steve
What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
Lee Travino after the second time being hit by lightning!
Comments
I had a transmitter and receiver on the same board and was mucking around with wires and just realized I crossed them.
So, I look like I am transmitting better...the line isn't floating anymore.
I don't seem to be able to trigger the camera still....so I assume my values are still off, or my led isn't intense enough.
I only seem to have 1.2V across the led...
I calculated the resistor based on a 3.3v pin and sink/sourcing 40mA 3.3/40m=82.5ohms....so figured 120 would be alright. But I guess that might not be enough for a led that is rated upwards of 60mA (less than half power?).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<FONT>Steve
What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
Lee Travino after the second time being hit by lightning!
Well, thanks for the thoughts...managed to get it to work.
I'll package this and post it. It's been done on other micro's, but I've been itching to get back in to parallax products and this may get me better motivated!
I had to play with a bunch of the timing values. However long it takes different functions to run was throwing me off.
Cheers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<FONT>Steve
What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
Lee Travino after the second time being hit by lightning!
'Glad you got it working! But, dude, seriously: there was less than an hour between your first and last posts. What do you expect from us?!!
-Phil
I usually have to walk away from the project....which tends to explain the large amount of unfinished projects on my shelf (and around the house!).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<FONT>Steve
What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
Lee Travino after the second time being hit by lightning!
haha....I get a little manic when I'm close but just shy of the mark!!
I usually have to walk away from the project....which tends to explain the large amount of unfinished projects on my shelf (and around the house!).
I have the same problem so I know what you mean.......>>>>>>>
Right now·I have 5 or more project are just wait for a fix of some sort or another to get them going again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
BTW I want this T-shirt!!!
www.zazzle.com/the_king_of_unfinished_projects_t_shirt-235730365753523211
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy
users.tkk.fi/jwagner/electr/d70remote/
It works very well.
The code is very badly written, I'd have done it differently.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 9/27/2009 4:32:39 PM GMT