- LocationN48 - E11
- CountdownT-00D 00:00
When you migrate from just learning by copying open-source hardware designs/schematics towards creating your own electronic designs and solutions, you'll sooner or later will be confronted with the task of designing and selecting the right resistors for a certain voltage divider.
In the past, online-tools like this have been a great companion in the process, what can go wrong, it's just two simple resistors, right? Well, after a little more research it seems that it's actually not as trivial as it may did in the beginning, especially when used as an input divider for an ADC.
EZVD was born out of the necessity to have a paperless math proving ground that should be easily hackable and fun to play with various math models and parameters. Python seemed like a logical choice to rebuild the whole division/conversion/calculation chain from input voltage to predicted decimal output for a given ADC resolution.
With EZVD you can simulate and instantly assert your design choices and get warnings for certain constraints you can set:
It's still a very hackish and early implementation but it (or the idea of it) serves well as a basic tool we can build upon. So everyone interested is invited to make it better to help us all to reduce design failure risks by mis-aligning a simple voltage divider where a calculator/simulator can show us the way:
Every reasonably recent GNU system should have this available.
$ git clone https://github.com/apollo-ng/ezvd.git $ cd ezvd
|1||Enter value of R1 in Ohms|
|2||Enter value of R2 in Ohms|
|M||Enter maximum input Voltage (Full-Scale)|
|R||Enter ADC Reference Voltage|
|Tab||Cycle between simulation targets (VIN/R1/R2)|
|+||Increase simulation step size|
|-||Decrease simulation step size|
|▲||Change simulation direction (Up)|
|▼||Change simulation direction (Down)|
People are fighting board-wars over the 1024 vs. 1023 multiplier issue and a lot of code out there one could use as an example bears the risk of also just being copy-pasted from some other bad example. So anyone with the skill to provide knowledge, reflection, verification and feature expansion is invited to join development, so that we all can have an open, reviewed and verified simulation/calculation tool basis to work with. Feedback, PR's and everything else that might increase precision/usability are, as always, very welcome:
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.