測量電壓

回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

測量電壓

文章 yehlu »

http://www.geek-workshop.com/forum.php? ... d&tid=1041

http://captain-slow.dk/2010/10/18/volta ... d-arduino/

圖檔

圖檔

代碼: 選擇全部

under resistive divider
Vout = Vin*Z1/(Z1+Z2)

so for example if you wanted 0 - 12 volts scaled from 0 - 4.9 volts:
Z1 = 10,000 ohms
Z2 = 6901ohms

12v/1024 = .0117v increments
http://en.wikipedia.org/wiki/Voltage_divider
回覆文章

回到「Arduino」