Author Topic: EEVblog #297 - Canon LANC Bus Reverse Engineering  (Read 11579 times)

0 Members and 1 Guest are viewing this topic.

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37738
  • Country: au
    • EEVblog
EEVblog #297 - Canon LANC Bus Reverse Engineering
« on: June 22, 2012, 01:12:45 pm »


Dave.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #1 on: June 22, 2012, 01:56:19 pm »
I got lots of documentation on LANC. It is actually a sony protocol. The commands are fairly standard between camera's.
It was used for early edition stations like the casablanca to control the decks and be able to start/ stop playback. There is even timecode transmitted.
Wired or single wire bus. In playback the camera or deck transmits timecode info at regular intervals.

If i remeber correctly commands need to be sent three times in a row.
There is lots of info on the internet. Somebody even made an rs232 to lanc box.
Both sony , canon and panasonic use this connection. It was codeveloped by sony and canon.
Even on camera's where you don't think it is, it is present. I have a sony HD harddisk based camera. The lanc port sits on the analog video out connector.
I use the camera to shoot video underwater in a housing. The grips transmit ir code to a lanc controller board in the camera housing. This allows watertight transmission. The grips beam the ir code into the housing. No need for wires and feedtroughs. Nothing can leak.
The controller picks up the commands and translates into lanc sequences that are sent into the camera through the video out cable. The video out is tapped to display on the rear view monitor.

Any sony or canon camera can go in the housing. Its universal.
There command lists are public domain. No secrets there.
« Last Edit: June 22, 2012, 02:04:42 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline notsob

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: au
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #2 on: June 22, 2012, 02:00:31 pm »
Dave, there is a tiny bit of info on a lanc chip "ELM624DS.pdf"
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #3 on: June 22, 2012, 02:07:32 pm »
That Elm chip is a simple pic with some firmware...

here is some mor einfo :
the bitrate of this lanc ( or control-l as it is sometimes called  )
looks odd , but it isn't. everything is synchronized to the line-rate of the video signal !
the decks in a studio are all time and phase synced so there are no glitches when switching from one to another. same if fadeovers need be done : both video signals needed ot be in sync ( this was before digital processing )
so the decks used the lanc frame rate to stay in sync video wise.
a packet was always transmitted at a set point in time after the beginning of a video line. ( or was it a frame .. can't remember, have to look it up )
packets are variable in lenght. i belive the 'master' sends 4 bytes while 'slaves' can send 8 bytes ( needed for the timecode that is correct down to the frame ( 50 or 60 frames a second )
« Last Edit: June 22, 2012, 02:28:29 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline notsob

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: au
 

Offline firehacker

  • Contributor
  • Posts: 26
  • Country: kz
    • VBStreets Forum
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #5 on: June 22, 2012, 04:36:02 pm »
I have posted my suggestion, it have got 15 thumbs-ups and then disappeared  :o. Is it YouTube bug or it was deleted by Dave?

However, this post is still accessible by this message-related link:
Code: [Select]
https://www.youtube.com/watch?v=s_--r-Mb6Dg&lc=dKRe5f1DeGlcS_CCvh7Df2_-a4uAiQF5v_HbvfmEFac&feature=inbox
But when I am looking through all comments under video on page-by-page basis there are no my message. It is absent.

And yeah, another my post (I have splitted a big post due to post-length limit) is marked as spam.

What's wrong with it?
« Last Edit: June 22, 2012, 04:38:36 pm by firehacker »
 

Offline krivx

  • Frequent Contributor
  • **
  • Posts: 765
  • Country: ie
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #6 on: June 22, 2012, 04:48:31 pm »
 

Offline richcj10

  • Supporter
  • ****
  • Posts: 201
  • Country: us
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #7 on: June 22, 2012, 07:07:26 pm »
I thin I really like this system. I wouldn't see this for high bandwidth applications but for use with low band with devices, its really a neat idea!
I found example code online for really and uC to do LANC!
http://blog.furiousgreencloud.com/2008/08/arduino-speaks-to-lanc-devices-camera.html
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37738
  • Country: au
    • EEVblog
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #8 on: June 22, 2012, 10:45:02 pm »
I have posted my suggestion, it have got 15 thumbs-ups and then disappeared  :o. Is it YouTube bug or it was deleted by Dave?

I didn't delete anything.
There are couple of blank "Comment removed, Author withheld" messages.

Dave.
 

Offline bruce273

  • Contributor
  • Posts: 39
  • Country: gb
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #9 on: June 22, 2012, 11:07:51 pm »
Worst case if the camera doesn't output the record status you could just put a photo diode over the led on the screen and relay that to your lamp. Save cutting the camera apart  :)
 

Offline JoannaK

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: fi
    • Diytao making blog
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #10 on: June 22, 2012, 11:31:53 pm »
It may well be that camera sends the stop/Recotd reply just once ... If so, it's easily missed amongs other data running. Afterall it sends full 8-bytes datapacket per each vsync (50times sec) so capturing it would be quite hit/miss.
 

Offline dda

  • Contributor
  • Posts: 46
  • Country: au
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #11 on: June 23, 2012, 03:03:04 am »
Can't you send a record/stop record signal to the camera rater than try to capture it. you could rig a big red record button to turn light on and send the start signal to the camera.
 

Offline icon

  • Regular Contributor
  • *
  • Posts: 246
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #12 on: June 23, 2012, 09:00:07 pm »
Hi

It must be possible to do this; I have one. It's a device that I used to use to start and stop a (Sony) camcorder for videoing skydives. It connected to the LANC socket and provided a start/stop button and ... ta-daa! ... a two colour status LED (standby/recording) that you arranged to be visible out of the corner of your eye. The whole thing just fitted into the helmet (where the camera was also mounted). It's called a Cameye, made by Skytools.

It's hanging on a peg in the garage at the moment - hang on - yup, still got it. Want me to send it to you, Dave? You could hack it apaaart.

Regards
John
 

Offline mianchen

  • Regular Contributor
  • *
  • Posts: 225
  • Country: gb
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #13 on: June 24, 2012, 12:32:39 am »
How about a simple light detection circuit to detect the red LED on your camera and then turn on the ON AIR sign? You can probably blu tack it to the camera. I know it's less elegant but you can probably make it in 5 minutes.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9015
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #14 on: June 24, 2012, 01:04:49 am »
With the battery fully charged, measure the power used by the camera. If it uses a lot more in recording, you can use a current sensor to trigger the sign.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37738
  • Country: au
    • EEVblog
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #15 on: June 24, 2012, 06:04:02 am »
Hi

It must be possible to do this; I have one. It's a device that I used to use to start and stop a (Sony) camcorder for videoing skydives. It connected to the LANC socket and provided a start/stop button and ... ta-daa! ... a two colour status LED (standby/recording) that you arranged to be visible out of the corner of your eye. The whole thing just fitted into the helmet (where the camera was also mounted). It's called a Cameye, made by Skytools.

It's hanging on a peg in the garage at the moment - hang on - yup, still got it. Want me to send it to you, Dave? You could hack it apaaart.

If you don't need it any more, sure that would be cool, thanks.
The Sony might output a Start/Stop signal, but the Canon may very well not. By all accounts the Canons don't implement much of the stuff that Sony do.

Dave.
 

Offline icon

  • Regular Contributor
  • *
  • Posts: 246
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #16 on: June 24, 2012, 02:23:36 pm »
The Sony might output a Start/Stop signal, but the Canon may very well not. By all accounts the Canons don't implement much of the stuff that Sony do.

I've just dug an old Canon 5iMC out of the cupboard and connected it to the Cameye - the light works correctly (and record starts and stops), so that's encouraging. I'll bung it in the post tomorrow.

Cheers
John
 

Offline caroper

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #17 on: June 24, 2012, 10:25:41 pm »
I envisage Dave with a helmet on for the Next video because he got it to work but had no time to re house it :)


Offline dcel

  • Regular Contributor
  • *
  • Posts: 179
  • Country: us
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #18 on: June 25, 2012, 05:09:53 am »
I wish I could find a pic of my brothers skydiving helmet camera rig. I'd photoshop Dave into it and post it up here. That thing was huge, top mtg Sony vid cam and forehead mtg Canon 10d. I wired everything up to it and helped him sight it in. I forgot about it because my brother is no longer in the sport, base jumping accident grounded him, but remembered it when Icon suggested it. I was always curious how that thing worked and look forward to seeing the teardown and hack.

Chris

 

Offline notsob

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: au
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #19 on: June 26, 2012, 04:51:36 am »
You will need to hook it up to you "on air" sign as well
 

Offline notsob

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: au
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #20 on: July 04, 2012, 05:40:04 am »
Dave, as you have an arduino, this LANC sniffer info may be of use to you

http://controlyourcamera.blogspot.com.au/2011/02/finding-out-lanc-remote-commands.html
 

Offline dda

  • Contributor
  • Posts: 46
  • Country: au
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #21 on: July 04, 2012, 10:27:42 am »
Dave, as you have an arduino, this LANC sniffer info may be of use to you

http://controlyourcamera.blogspot.com.au/2011/02/finding-out-lanc-remote-commands.html

Which suggests Dave can output 00011000 00110011 to his camera to start/stop it. So rather than read the recording status and light the sign, he can change the recording status and light the sign.
 

Offline baljemmett

  • Supporter
  • ****
  • Posts: 665
  • Country: gb
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #22 on: July 04, 2012, 12:18:27 pm »
Which suggests Dave can output 00011000 00110011 to his camera to start/stop it. So rather than read the recording status and light the sign, he can change the recording status and light the sign.

The problem there is how you ensure the camera has reacted to the command -- if it refused, for whatever reason (out of space / out of juice / too busy scratching its proverbials), the on-air lamp would be out of sync with reality.  If Dave was planning on actually using it as a tally lamp then that could frustrate him immensely!
 

Offline notsob

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: au
Re: EEVblog #297 - Canon LANC Bus Reverse Engineering
« Reply #23 on: July 04, 2012, 12:42:54 pm »
with the sniffer, dave should be able to see if/what response there is from the camera when he sends a start recording signal to the camera
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf