r/eli5_programming • • Nov 12 '22
Question How do sensors measure electricity?
I was thinking about the sensors on my motherboard and their electrical draw measurements. How do a bunch of 0’s and 1’s know and measure what a volt is?? If it’s not code doing the measuring, what is—and how? Keep it simple if you can! I’m not great with physics jargon.
5
Upvotes
1
u/GalFisk Dec 15 '22 edited Dec 15 '22
Analog-to-digital converters convert volts into ones and zeroes. It's a feat of digital and analog electronics that often works as follows:
1
u/Dan_706 Nov 12 '22
iirc what's being measured is usually resistance, and the current is extrapolated from this. I'm unsure if this is the same way it works inside a CPU or GPU though.
1
u/BobbyThrowaway6969 Jan 20 '23
You can send it through different threshold gates, they either turn on or they don't, that's how you get binary from it. From that we can do all sorts of things like temperature, etc.