佳能EF鏡頭SPI控制|天天快訊
(相關(guān)資料圖)
使用廉價的MCU,搭配SPI協(xié)議驅(qū)動你的佳能攝像頭。逆向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.標(biāo)簽:
相關(guān)文章
佳能EF鏡頭SPI控制|天天快訊
?使用廉價的MCU,搭配SPI協(xié)議驅(qū)動你的佳能攝像頭。逆向CanonEF卡口鏡頭,這個是昨天的文章。ASCOMEFLensCont
潛山市天柱山中心小學(xué)合唱團(tuán)在安慶市第四屆中小學(xué)合唱節(jié)展演中喜獲二等獎
?5月25日,2023年“同心奮進(jìn)新征程,我為祖國獻(xiàn)歌聲”安慶市中小學(xué)生合唱專項展演暨安慶市第四屆中小學(xué)合唱
《南沙方案》三先啟區(qū)集中開、竣工項目總投資近300億|全球快訊
?中新網(wǎng)廣州5月30日電 (王堅 王子杰)在《廣州南沙深化面向世界的粵港澳全面合作總體方案》(以下簡稱《
俄交通部:波蘭對俄白兩國貨車的禁令不會影響運(yùn)輸時效 每日熱訊
?據(jù)央視新聞,當(dāng)?shù)貢r間5月30日,俄羅斯交通部新聞處發(fā)布消息稱,波蘭禁止俄羅斯和白俄羅斯兩國貨運(yùn)汽車通行
4299起 華為Mate 40 Pro官翻開售 送質(zhì)保
?本周,華為正式上架了華為Mate40官方翻新版,目前官翻版的手機(jī)提供8GB+128GB、8GB+256GB兩種規(guī)格,由于是4G
2023年人民日報高考臨考各科提分攻略 怎樣抓住得分重點-百事通
?高考,拼的不只是努力和天賦,還有身體和心理。所以說,緩解壓力很重要,不要孤軍奮戰(zhàn),和志同道合的朋友一
成都因高溫作業(yè)中暑算工傷嗎?|焦點熱門
?中暑經(jīng)診斷為職業(yè)病的可享受工傷待遇勞動者因高溫作業(yè)或者高溫天氣作業(yè)引起中暑,經(jīng)診斷為職業(yè)病的,享受工
全球今日報丨航天科工203所晶體元器件助力神舟十六號太空接棒
?航天科工203所晶體元器件助力神舟十六號太空接棒---航天科工二院203所供圖。中新網(wǎng)北京5月30日電神舟十六號
四川攀枝花大學(xué)怎么樣有什好院好不好
?1、四川攀枝花大學(xué)怎么樣攀枝花學(xué)院是屬本省市級高校,他在本市也算有名了,他為整個攀枝花地區(qū)的人力資源
藍(lán)盾、搜于特退市,轉(zhuǎn)債如何交易?兩公司董秘辦坦言A股無先例,正在等監(jiān)管意見
?由于正股藍(lán)盾股份、搜于特觸發(fā)面值退市,且發(fā)行人債務(wù)壓力較大,藍(lán)盾轉(zhuǎn)債、搜特轉(zhuǎn)債的違約風(fēng)險前所未有。后
華遠(yuǎn)地產(chǎn):減持區(qū)間屆滿 京泰投資已集中競價減持5.84萬股
?觀點網(wǎng)訊。5月30日,華遠(yuǎn)地產(chǎn)股份有限公司披露持股5%以上股東減持股份計劃減持時間區(qū)間屆滿暨減持股份結(jié)果
相約美麗雁江:吃小龍蝦,觀龍舟賽!
?相約美麗雁江,共赴雁江區(qū)“中和小龍蝦”美食盛宴。2023年雁江區(qū)“中和小龍蝦”美食周活動將于6月16日至6月
印度航空CEO:公司每月招聘600名機(jī)組人員
?據(jù)Simpleflying消息,印度航空每個月招聘多達(dá)600名新機(jī)組人員,其中包括飛行員和機(jī)組人員。坎貝爾·威爾遜
要聞速遞:中國好人的定義和理解_中國好人的定義
?1、好人的定義應(yīng)該是有無私奉獻(xiàn)精神。2、還有仁慈博愛、公正公平、自己覺悟了再幫助他人覺悟。3、以及能促
當(dāng)歸燉雞蛋的正確做法? 今日看點
?1 材料:雞蛋100克,當(dāng)歸10g,黃芪30g,紅棗10克,姜5克,紅糖20克2 做法:坐鍋燒100克水,姜切絲放入,黃
超大型未來社區(qū)規(guī)劃亮相,之江樓市將被攪動?
?今天(5月30日),杭州市規(guī)劃和自然資源局對杭政儲出[2022]68號地塊商品住宅及商業(yè)(設(shè)配套幼兒園)項目建
【天天新視野】2023中關(guān)村新型儲能及氫能產(chǎn)業(yè)發(fā)展論壇舉辦
?26日,2023中關(guān)村新型儲能及氫能產(chǎn)業(yè)發(fā)展論壇暨投資房山——海外招商推介大會在京舉辦。
抖音怎么做成影視號?如何操作?
??現(xiàn)在抖音是具有巨大潛力和廣泛群眾基礎(chǔ)的影視號平臺。作為一名創(chuàng)作者,如何將抖音打造成為一個影視號,吸
文家市鎮(zhèn):“十年禁漁”亮劍行動進(jìn)行中-環(huán)球觀熱點
?為牢固樹立“綠水青山就是金山銀山”的生態(tài)文明理念,堅持打好十年禁漁持久戰(zhàn),依法嚴(yán)厲打擊非法捕撈行為,
梅西拒絕巴黎續(xù)約(梅西缺陣巴黎大名單)-全球快資訊
?每日小編都會為大家?guī)硪恍┲R類的文章,那么為大家?guī)淼氖敲肺魅标嚢屠璐竺麊畏矫娴南⒅R,那么如果
【鏡頭里的青?!棵Q拢焊瓯谏钐幒蝤B的家園
?5月的青海省海西蒙古族藏族自治州茫崖市,不斷地?zé)òl(fā)出勃勃的生機(jī),新一季的鳥類遷徙已近尾聲,“老朋友”
報道:瑯琊榜夏江是誰演的_瑯琊榜夏江是誰簡介介紹
?對于瑯琊榜夏江是誰這個問題感興趣的朋友應(yīng)該很多,這個也是目前大家比較關(guān)注的問題,那么下面小好小編就收
“晚年凄涼,必有征兆” :人過五十,身上出現(xiàn)這些“怪事”,警惕!
?企業(yè)BOSS成功論壇:不一樣的觀點,不一樣的故事!每天為您提供,國際時事,熱點資訊,經(jīng)商策略,文化哲學(xué)等
【環(huán)球新要聞】安丘市大盛鎮(zhèn)汶河社區(qū)服務(wù)隊
?1、安丘市大盛鎮(zhèn)汶河社區(qū)服務(wù)隊是由安丘市慈善總會領(lǐng)導(dǎo)下的志愿團(tuán)體。2、成立于2017年5月15日。文章到此就
肇民科技:5月29日融資買入85.54萬元,融資融券余額4508.12萬元-環(huán)球熱頭條
?5月29日,肇民科技(301000)融資買入85 54萬元,融資償還106 2萬元,融資凈賣出20 66萬元,融資余額4508 12萬元。
馬斯克發(fā)推評價中國航天工程計劃:比大多數(shù)人意識到的更加超前
?【環(huán)球網(wǎng)報道】在5月29日神舟十六號載人飛行任務(wù)新聞發(fā)布會上,中國載人航天工程新聞發(fā)言人、載人航天工程