您當前的位置 :環球傳媒網 - 環球資訊網 - 環球生活門戶>生活 > 正文
世界播報:佳能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入門還便宜 想買選低配就夠了
- 中國工程物理研究院職工工學院怎么樣 中國工程物理研究院職工工學院全國排名
- 最資訊丨蔚來車主慘遭背刺,李斌的“不降價”還能扛多久?