Comments (1)
The ADC is 12-bit, but the 12th bit is the sign-bit so positive voltages between 0 and 24v (actually 25.85v because of how the resistor divider is set up) so it's closer to 0.012v granularity.
Except the full-scale range of the ADC when reading a 0-25.85v value is actually set to 4.096v (not 3.3v) giving only ~1649 possible usable values, which brings us to a granularity of 0.015v (25.85 / 1649
) for 24v and 0.002v for the 3.3v inputs.
In this instance we could probably still deal with 3 decimal places on the output voltage and let the end-user oversample the ADC and round as they see fit. So you're still right. A PR would be appreciated.
This is documented pretty exhaustively here - https://forums.pimoroni.com/t/automation-hat-accuracy/7252/3 (I should put a link to this post somewhere in the Automation HAT docs!)
from automation-hat.
Related Issues (20)
- event-based detection HOT 7
- ADC4 not providing sensible readings HOT 5
- Add support for ST7735 0.96" LCD HOT 3
- default output pin state HOT 1
- Automation Hat Mini LCD from other languages HOT 4
- install script doesn't download latest example scripts HOT 2
- examples/hat-mini/output.py does not run HOT 2
- Not an issues just a question Rasberry pi and PIM213 interface HOT 2
- hat-mini analog.py fails on Python3 < 3.6 HOT 1
- Automation HAT Mini missing dependencies HOT 1
- Problems with installation - Module ST7735 not installed and SPI not enabled HOT 5
- relay three will not toggle HOT 2
- Output.py has a relative link which keeps the example from being portable
- Analog input weirdness with new ADS1115 chip. HOT 3
- automation mini hat Remote I/O error HOT 8
- press project HOT 1
- Analog Output Support HOT 2
- Still ADC Issues with spikes or values moved to different channel HOT 1
- Lights not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automation-hat.