您当前的位置 :环球传媒网 - 环球资讯网 - 环球生活门户>生活 > 正文
世界播报:佳能EF镜头SPI控制
2023-05-31 01:25:19 来源:面包芯语
(相关资料图)
使用廉价的MCU,搭配SPI协议驱动你的佳能摄像头。逆向Canon EF卡口镜头,这个是昨天的文章。ASCOM EF Lens Controller – control unit for Canon EF/EF-S lenses. It allows you to control lens using the ASCOM platform tools.Features (supported by driver):focus control;aperture value control;temperature measure (additional sensor required, e.g. popularDS18B20).This device uses SPI interface. Description of lens commands were taken from published articles about reverse engineered internal Canon protocol.Connection to lens is easy. It is only necessary to know pinout of itscontacts. This information is available on the Web. Just «google» canon efpinout. I recommend to use a scheme, shown below.This picture describes electric pins on lens or special macro-adapter which issuitable for soldering wires. You can buy adapters in any photo shop or onweb stores such as EBay. It looks something like this.Next component – microcontroller, which support SPI interface. It may beATmega, STM32, PIC or board, based on its controllers. Factory PCB has allrequired components and will be easy for beginners while simplemicrocontroller allows you to make own custom device.I used Arduino Nano based on ATmega328P controller. Its performance isenough for our purpose. Small size and low cost - its advantage.Pinout diagram above shows the designations of Arduino Nano contacts. Sowe need:Note: only huge lenses may require external power supply. I tested mylenses (EF-S 18-55, EF 50/1.8, EF200/2.8L) and measured their currentconsumption. It was less than 200 mA. It means that these lenses can bepowered directly from 5V Arduino pin. Entire system will be powered fromUSB, and there is no need for additional wires.You can experiment on the breadboard but for the final design it is better touse a more respectable solution.I want to point out one feature associated with Arduino. Now, these boardsuse the Automatic (Software) Reset, which is convenient for firmware uploadbut do not really need us. The fact is that:One of the hardware flow control lines (DTR) of the FT232RL is connected to thereset line of the ATmega168 or ATmega328 via a 100 nanofarad capacitor. Whenthis line is asserted (taken low), the reset line drops long enough to reset the chip.This means that each connection («Connect» button in MaximDL orFocusMax) to the device will cause it to reboot. Result is 3-5 sec delay. Ifyou are not satisfied, simplest solution is to unsolder DTR pin to preventtransfer of reboot signal. I used «ChinaDuino», it has CH340G as UART chip.Original Arduino uses FT232RL.These schemes allow you to easily find the DTR pin. After making thesechanges, device connects immediately.SoftwareSoftware consists of two main parts:Arduino sketch (firmware) is responsible for interaction with lens;ASCOM device driver.Unit relations shown in the figure below:The red highlighted functionality implemented in addition to the mainfunctions realized in driver pattern. Focuser driver has no iris controlfunctions by default. But aperture value control is important feature.代码使用我就不写了,后面我会上代码:Use P# to get current focus position (5000 by default)Use Mxxxx# to move focus, e.g. M5270#Use Axx# to change aperture value, where xx – count of steps (1/3EV). 0 – wide open on your lens.下载这个控制软件,有一种年老失修的美
ASCOM
Click «Properties», you can see driver setup dialog. Set requiredparameters:
COM Port Number – controller connection port;
Lens Model – choose your lens from drop-down list. In fact youcan use any lens. Just add it to lens.txt which is in driverinstallation folder and insert all aperture values of lens;
Aperture Value – select required aperture value. Changes will besaved in EEPROM of Arduino chip.
After all changes are saved, you can connect to the controller.Temperature will be displayed only if you connect a sensor. I usedanalog KTS-1 sensor. GET TEMPERATURE section in my sketch work with this sensor. You can use any other. Do not forget to correct your sketch. If you do not need to measure temperature just comment this strings.关键词:
相关阅读
版权和免责申明
凡注有"环球传媒网 - 环球资讯网 - 环球生活门户"或电头为"环球传媒网 - 环球资讯网 - 环球生活门户"的稿件,均为环球传媒网 - 环球资讯网 - 环球生活门户独家版权所有,未经许可不得转载或镜像;授权转载必须注明来源为"环球传媒网 - 环球资讯网 - 环球生活门户",并保留"环球传媒网 - 环球资讯网 - 环球生活门户"的电头。
- 世界播报:佳能EF镜头SPI控制2023-05-31
- 股票跌停能卖出吗?跌停的股票怎么能卖出去2023-05-31
- 3月至今,山东法院办理退出失信案件20245件2023-05-31
- 汇成股份:聘任黄振芳担任公司副总经理_世2023-05-31
- 基金赎回是按哪天的净值?基金赎回是按照当2023-05-31
- 天天热消息:12306网上订火车票官网余票查2023-05-31
- 每日信息:控虚发实2023-05-31
- 【天天速看料】福建招标网平台_福建招标网2023-05-31
- 三大股指午后全线翻红 人脑工程板块表现抢2023-05-31
- 炸了,马斯克突然宣布!-环球报资讯2023-05-31
- 高木同学同人番外-北条与滨口-01:天妇罗2023-05-31
- “六一”将至 市关工委赴淳安慰问留守儿童2023-05-30
- 2019年埃博拉疫情怎么治_2019年埃博拉疫情2023-05-30
- 《原神》中为什么那么多人讨厌枫原万叶?枫2023-05-30
- 二十余年厚积薄发 辽宁跻身半导体装备2023-05-30
- 《英雄联盟》外服宣布将在13.7版本后 停止2023-05-30
- 意大利威尼斯主河道部分水域水体颜色变成荧2023-05-30
- 转贷降息需要什么条件?降息会造成哪些影响?2023-05-30
- 房贷不是自己名字可以退税吗?房贷可以提前2023-05-30
- reits交易规则怎么样?reits交易成本高吗?2023-05-30
- 转融券标的股是什么?融资融券是利好还是利2023-05-30
- 中介办理停息挂账可靠吗贴吧?中介办理停息2023-05-30
- 每日观点:市州观察丨多种活动“廉”番上演2023-05-30
- 微动态丨湖南财经2020录取分数线2023-05-30
- 股票压力线怎么设置?压力线怎么形成?2023-05-30
- 北京:到2025年人工智能核心产业规模达到302023-05-30
- 宏景科技:全资子公司取得涉密信息系统集成2023-05-30
- 王者新赛季s31正确上线时间是什么时候?《2023-05-30
- 主力出货是什么意思?主力出货股票就会跌吗?2023-05-30
- 去马尔代夫现在需要签证吗?马尔代夫在哪里?2023-05-30
资讯
- 3月至今,山东法院办理退出失信案件20245件 将16415家企业移出失信名单
- 北京:到2025年人工智能核心产业规模达到3000亿元,持续保持10%以上增长 全球独家
- 每日热议!2K+240Hz+R1000!梦幻的环绕视觉享受—蚂蚁电竞 ANT32VQCK
- 和评理丨对华关税重估 美政府应秉持客观理性态度-环球播资讯
- 每日热闻!长宁区“15分钟社区美好生活圈”行动专题研讨班今天开班
- 劲仔食品今日大宗交易折价成交414.22万股 成交额4945.78万元-世界热推荐
- 市场指导价52.18万元 奥迪S4 Avant正式上市|焦点快报
- E选车丨奔驰EQE SUV:顶配比GLE入门还便宜 想买选低配就够了
- 中国工程物理研究院职工工学院怎么样 中国工程物理研究院职工工学院全国排名
- 最资讯丨蔚来车主惨遭背刺,李斌的“不降价”还能扛多久?