(相關(guān)資料圖)
使用廉價(jià)的MCU,搭配SPI協(xié)議驅(qū)動(dòng)你的佳能攝像頭。逆向Canon EF卡口鏡頭,這個(gè)是昨天的文章。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.代碼使用我就不寫了,后面我會(huì)上代碼: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.下載這個(gè)控制軟件,有一種年老失修的美
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.關(guān)鍵詞:
凡注有"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶"或電頭為"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶"的稿件,均為環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶獨(dú)家版權(quán)所有,未經(jīng)許可不得轉(zhuǎn)載或鏡像;授權(quán)轉(zhuǎn)載必須注明來(lái)源為"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶",并保留"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶"的電頭。
- 世界播報(bào):佳能EF鏡頭SPI控制2023-05-31
- 股票跌停能賣出嗎?跌停的股票怎么能賣出去2023-05-31
- 3月至今,山東法院辦理退出失信案件20245件2023-05-31
- 匯成股份:聘任黃振芳擔(dān)任公司副總經(jīng)理_世2023-05-31
- 基金贖回是按哪天的凈值?基金贖回是按照當(dāng)2023-05-31
- 天天熱消息:12306網(wǎng)上訂火車票官網(wǎng)余票查2023-05-31
- 每日信息:控虛發(fā)實(shí)2023-05-31
- 【天天速看料】福建招標(biāo)網(wǎng)平臺(tái)_福建招標(biāo)網(wǎng)2023-05-31
- 三大股指午后全線翻紅 人腦工程板塊表現(xiàn)搶2023-05-31
- 炸了,馬斯克突然宣布!-環(huán)球報(bào)資訊2023-05-31
- 高木同學(xué)同人番外-北條與濱口-01:天婦羅2023-05-31
- “六一”將至 市關(guān)工委赴淳安慰問(wèn)留守兒童2023-05-30
- 2019年埃博拉疫情怎么治_2019年埃博拉疫情2023-05-30
- 《原神》中為什么那么多人討厭楓原萬(wàn)葉?楓2023-05-30
- 二十余年厚積薄發(fā) 遼寧躋身半導(dǎo)體裝備2023-05-30
- 《英雄聯(lián)盟》外服宣布將在13.7版本后 停止2023-05-30
- 意大利威尼斯主河道部分水域水體顏色變成熒2023-05-30
- 轉(zhuǎn)貸降息需要什么條件?降息會(huì)造成哪些影響?2023-05-30
- 房貸不是自己名字可以退稅嗎?房貸可以提前2023-05-30
- reits交易規(guī)則怎么樣?reits交易成本高嗎?2023-05-30
- 轉(zhuǎn)融券標(biāo)的股是什么?融資融券是利好還是利2023-05-30
- 中介辦理停息掛賬可靠嗎貼吧?中介辦理停息2023-05-30
- 每日觀點(diǎn):市州觀察丨多種活動(dòng)“廉”番上演2023-05-30
- 微動(dòng)態(tài)丨湖南財(cái)經(jīng)2020錄取分?jǐn)?shù)線2023-05-30
- 股票壓力線怎么設(shè)置?壓力線怎么形成?2023-05-30
- 北京:到2025年人工智能核心產(chǎn)業(yè)規(guī)模達(dá)到302023-05-30
- 宏景科技:全資子公司取得涉密信息系統(tǒng)集成2023-05-30
- 王者新賽季s31正確上線時(shí)間是什么時(shí)候?《2023-05-30
- 主力出貨是什么意思?主力出貨股票就會(huì)跌嗎?2023-05-30
- 去馬爾代夫現(xiàn)在需要簽證嗎?馬爾代夫在哪里?2023-05-30
- 退契稅需要什么條件2023?退契稅的流程?
- 中華人民共和國(guó)人口與計(jì)劃生育法第三十七條是什么內(nèi)容?計(jì)劃生育的優(yōu)勢(shì)是什么?
- 網(wǎng)易云游戲光遇實(shí)名認(rèn)證怎么解除? 光遇如何修改實(shí)名認(rèn)證?
- 股票跌停怎么辦?一字跌停是什么意思?
- 假釋官的含義是什么? 假釋出獄是什么意思?
- 新硬盤如何分區(qū)?電腦新裝硬盤怎樣激活使用?
- 湖南都市頻道都市調(diào)解室是什么?民生欄目的發(fā)展歷程是?
- 被公司辭退要開什么證明?員工能力不足被開除有賠償嗎?
- 筆的發(fā)明介紹 毛筆是誰(shuí)發(fā)明的?
- 信用卡逾期后怎么協(xié)商只還本金?銀行卡掛賬停息是什么意思?
資訊
- 3月至今,山東法院辦理退出失信案件20245件 將16415家企業(yè)移出失信名單
- 北京:到2025年人工智能核心產(chǎn)業(yè)規(guī)模達(dá)到3000億元,持續(xù)保持10%以上增長(zhǎng) 全球獨(dú)家
- 每日熱議!2K+240Hz+R1000!夢(mèng)幻的環(huán)繞視覺(jué)享受—螞蟻電競(jìng) ANT32VQCK
- 和評(píng)理丨對(duì)華關(guān)稅重估 美政府應(yīng)秉持客觀理性態(tài)度-環(huán)球播資訊
- 每日熱聞!長(zhǎng)寧區(qū)“15分鐘社區(qū)美好生活圈”行動(dòng)專題研討班今天開班
- 勁仔食品今日大宗交易折價(jià)成交414.22萬(wàn)股 成交額4945.78萬(wàn)元-世界熱推薦
- 市場(chǎng)指導(dǎo)價(jià)52.18萬(wàn)元 奧迪S4 Avant正式上市|焦點(diǎn)快報(bào)
- E選車丨奔馳EQE SUV:頂配比GLE入門還便宜 想買選低配就夠了
- 中國(guó)工程物理研究院職工工學(xué)院怎么樣 中國(guó)工程物理研究院職工工學(xué)院全國(guó)排名
- 最資訊丨蔚來(lái)車主慘遭背刺,李斌的“不降價(jià)”還能扛多久?
焦點(diǎn)
- 工行網(wǎng)銀轉(zhuǎn)賬手續(xù)費(fèi)標(biāo)準(zhǔn)是什么?工商銀行異地取款收費(fèi)嗎?
- 股票分紅需要持股多久?股票分紅多久一次?
- ?信陽(yáng)市平橋區(qū)召開統(tǒng)一戰(zhàn)線年中重點(diǎn)工作推進(jìn)會(huì)
- 2411是哪里的區(qū)號(hào)?區(qū)號(hào)是怎么劃分的?
- 中國(guó)銀行大額存單有風(fēng)險(xiǎn)嗎 大額存單有什么坑?
- 怎么寫簡(jiǎn)歷才能讓HR一眼看中?HR看簡(jiǎn)歷究竟看了些什么?
- 鶴壁市市長(zhǎng)趙宏宇到河南能源化工集團(tuán)鶴煤公司調(diào)研_熱資訊
- 藥物分析是什么學(xué)科?藥品檢驗(yàn)工作的基本程序是什么?
- 山西2023年第四批50家售電公司重大信息變更
- 兩陰夾一陽(yáng)是什么??jī)申帄A一陽(yáng)的相關(guān)解析