Alan numitron clock
SNES Pi Webserver
USB Volume/USB toys
SNES Arcade cabinet
Game boy projects
Home Presence Detector
Rand Nerd Tut
Carnet du maker (fr)
ATmel blog (defunct)
What it will have :
http://picboard.blogspot.ca/2010/10/0-20v-digital-voltmeter-dvm-using.html this site], make a voltage divider. For instance, if you want to measure [0v;20v] range, the max division factor is max voltage / uC voltage = 20/5 = 4. Use that 4 factor to make a divider with that factor :
Don't hesitate to put big resistor, you don't want to use the power, you want to measure it. Thousand or tens of thousands are welcome, mega are ok. Let's say I pick 1ko for the R2, I need 3ko for R1 then.
Ok, so now you get max 5v ... at the condition you put max 20v. What happens when you know, sh### happens and you put more than 20v? Magic smoke. So, put a Zener diode with a 5v breakdown (5.1v is perfectly fine too). Thanks to the zener diode, you can't see more than 5v ! And under that value, you have linear reading, what you need for your voltmeter.
Source : http://picboard.blogspot.ca/2010/10/0-20v-digital-voltmeter-dvm-using.html
This will give you a nice value x in [0;1024] that you will map to [0;20] with the little X = x * 20 / 1024...
Points of interrest:
on my google code account ?
The inside of the beast : a ATTiny861, a 2 digit 7 segment found in the trash bin inside a cd player, a 5 V DC boost converter and 2 AAA battery for a nice 5v
Once closed, reading are not too bad (^_^)v (-> 15 is to be read as 1.5v ... there was no dot on the scavenged 7seg)
All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated)
electrogeek.cc ~ Formerly known as Kalshagar.wikispaces.com (AlanFromJapan [2009 - 2019])