Author Topic: Very simple LANC controller  (Read 11560 times)

0 Members and 1 Guest are viewing this topic.

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Very simple LANC controller
« on: September 15, 2014, 04:32:56 pm »
Hi, I'm seeking a bit of advice.
I would like to design and build a simple LANC controller, it's just a simple pushbutton and an indication LED (maybe two color - ready/recording).
The priority is low cost and small footprint.
My problem is the choice of the Microcontroller, I have some experience with Atmel chips, so I was thinking about an AtTiny ... could anyone help me?

Thanks a lot :)

I looked over http://www.boehmel.de/lanc.htm so I kind of know what I'm dealing with.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Very simple LANC controller
« Reply #1 on: September 15, 2014, 04:52:48 pm »
You can do LANC with pretty much any micro.  I used to make a LANC product (it did more than just LANC) and that had an PIC18Fxxxx micro in it - you can do LANC with a PIC10F if you want.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #2 on: September 15, 2014, 05:00:49 pm »
Thanks for answer :)

I'm just curious, I've read some articles on the internet about controlling LANC and I have 2 questions:
1) Is the micro fast enough to not just send the command, but also read back the data from the cam?
2) I read about timing issues with different cameras (Sony/Canon), do you have any experience with that?
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Very simple LANC controller
« Reply #3 on: September 15, 2014, 07:07:21 pm »
1. Yes, even if you bit bang the interface. From memory it's only 9600 (I did the project perhaps 10years ago).
2. Yes, there is a small difference HOWEVER if your implementing basic functions (I was also reading TC) it should be fine.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline babysitter

  • Frequent Contributor
  • **
  • Posts: 893
  • Country: de
  • pushing silicon at work
Re: Very simple LANC controller
« Reply #4 on: September 16, 2014, 07:55:59 pm »
Old but might be a reservoir of information what Mijo K did years ago...

http://lea.hamradio.si/~s51kq/DV-IN.HTM

I'm not a feature, I'm a bug! ARC DG3HDA
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Very simple LANC controller
« Reply #5 on: September 16, 2014, 07:59:25 pm »
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #6 on: March 21, 2015, 05:33:17 pm »
Hi guys, I need to revive this topic.

I have a semi-working remote, but I ran into a problem. The thing is, when the camera is powered down and has the display closed and I power it up via the remote (by pulling the data line low) the camera only powers up for a few seconds and then shuts down.
I have a hypeye controller here, which keeps the camera on when its plugged in, I actually probed the it and found the data line, which is sending some data in byte 2 and 3, but I am unable to find out the scheme, because it isnt sending it all the time and the commands are changing.
Does anybody know how to keep the camera on by LANC commands?
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Very simple LANC controller
« Reply #7 on: March 21, 2015, 11:22:07 pm »
What camera?  Keeping the identity secret probably won't be very helpful.
It seems quite possible that the camera simply assumes that nobody would want to use it with the display closed, and there is no code to countermand that assumption.  it may be just the way the camera was designed and has nothing to do with LANC.

Some cameras also have a small viewfinder (eyepiece) and pulling it out serves the same purpose as opening the display.
 

Offline albert22

  • Regular Contributor
  • *
  • Posts: 177
Re: Very simple LANC controller
« Reply #8 on: March 22, 2015, 12:10:00 am »
Wow. I am surprised that somebody is is still using lanc, I implemented it about 15 years ago on a 16c84 and then ported to a 16f84,  for a sony camera TVR66 with nighvision that was new at that time. Following the same page that you linked. At that time there was another page with more info about the protocol.
As far as I remember the power on was done by pulsing the data line low by 16mS (an entire frame) and then on again.  And the power off by sending a specific command (5e). I think that the camera stayed on for several minutes without sending any commands.
« Last Edit: March 22, 2015, 12:14:28 am by albert22 »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Very simple LANC controller
« Reply #9 on: March 22, 2015, 12:17:00 am »
Wow. I am surprised that somebody is is still using lanc,
Sony cameras, from consumer to semi-pro continue to use LANC extensively.
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #10 on: March 24, 2015, 12:38:10 pm »
What camera?  Keeping the identity secret probably won't be very helpful.
It seems quite possible that the camera simply assumes that nobody would want to use it with the display closed, and there is no code to countermand that assumption.  it may be just the way the camera was designed and has nothing to do with LANC.

Some cameras also have a small viewfinder (eyepiece) and pulling it out serves the same purpose as opening the display.

Maybe I wasn't clear on this.
So I will try to explain again :D

I have a working controller - a Hypeye D Pro, which is able to keep the camera (Sony HDR-CX105) powered on, even in "closed" state. I was able to probe the command lines and found out that the controller is sending some data to camera in byte 2 and 3 (normal commands are sent in byte 0 and 1).

So, I am trying to reverse-engineer this to my controller, but I have no idea what commands to send and when (It seems random at first glance, but it has to have some sort of scheme).
I also found this page http://www-e2.ijs.si/damir.vrancic/personal/TRV900/Cameras/default.htm
Where the guy writes about sending 0x43 and 0x53 to the camera.

Thanks for any ideas :)

 
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #11 on: March 29, 2015, 02:27:40 pm »
So, I cracked the "keepalive" packets, but I would like to ask if anyone can help me with my circuit design.

I would like to be able to turn on the camera via the REC/PAUSE button, but I simply don't know how to design that circuit.
so:

while the camera is turned off, the data line is +1V
to turn the camera on, I need to put a low resistance/short between the data line and ground (pull the data line low)
after that the camera sends +5V on the power line

so, is it possible to pull the data line low with the rec/pause switch, without interference to it's current functionality?
thanks

I attached my current circuit
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Very simple LANC controller
« Reply #12 on: March 29, 2015, 03:19:07 pm »
You could put in a tiny relay that would connect the pushbutton switch directly across the data line when there is no power.
Then when the power arrives, it can pull in the relay and connect the pushbutton to the Arduino input pin.
Athough I am rather surprised that you can draw enough current out of the LANC port to power an Arduino.
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #13 on: March 29, 2015, 03:45:38 pm »
Yeah, it works with Arduino just fine :D

I was thinking about a relay, but I will need to "shrink" my design to be as small as possible (port it to ATTiny) and I'm afraid a relay would be too big. Isn't there a "smarter" solution?
« Last Edit: March 30, 2015, 08:55:18 am by salamander »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Very simple LANC controller
« Reply #14 on: March 29, 2015, 05:34:31 pm »
There are relays the size of a DIP IC.  An alternative might be a depletion-mode ("normally on") FET.
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #15 on: March 30, 2015, 08:59:15 am »
OK, i will look into it. Still hope I'll find a simpler solution.
And I will share my "keepalive" packet solution as soon as possible, stay tuned :D
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #16 on: April 27, 2015, 07:19:08 pm »
I attached the circuit design I'm using.

Can anyone help me choose the device I need? JFET or tiny relay ?  I was searching for something I could use, by came up with nothing.

It needs to connect the button to data line to pull the line low, then, when the camera is activated, disconnect the button from the data line.

Thanks guys

EDIT: anything I could use from this shop? http://www.gmelectronic.com
« Last Edit: April 27, 2015, 07:23:52 pm by salamander »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
« Last Edit: April 27, 2015, 07:55:17 pm by Richard Crowley »
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #18 on: April 27, 2015, 08:17:47 pm »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Very simple LANC controller
« Reply #19 on: April 27, 2015, 08:28:32 pm »
You are welcome.  I assume you can figure out how to connect it.  With the coil directly across the camera GND and +5V, then the relay will activate when the camera powers up.  Then you can use the "normally closed" (NC) switch contacts to connect the high side of the button directly to the data line.  As soon as the camera powers up and applies power to the relay coil, the NC switch will DISconnect the button from the data line.

You can return the favor by sharing your Arduno code.
As soon as these gadgets arrive, I will be working on a project to send LANC over that control circuit of this fiber extender...
http://www.camplex.com/product.asp?item=CMX-HDMIF
So I need to simulate the camera back at the control end to accept the LANC and translate into a simple serial data stream,
and then convert it back to LANC at the camera end.  I figure I can do that with a little Arduino at each end.
 

Offline salamanderTopic starter

  • Contributor
  • Posts: 22
  • Country: cz
Re: Very simple LANC controller
« Reply #20 on: April 27, 2015, 09:41:29 pm »
Well, I have the code on GitHub, but it's lacking comments (some are still in czech) and it's actually quite crude ... but it works, somehow :D
So excuse the state of the code for now.

https://github.com/Salamander0/LANC-Control/blob/master/LancControl.ino

I will add comments later on, but I think it is pretty obvious what I'm doing.

PS: I suppose ELM624 won't help you in this case
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf