karplus / PteroDAQ

Other
3 stars 2 forks source link

Allow choice of voltage reference #31

Open karplus opened 9 years ago

karplus commented 9 years ago

Original report by kevin_karplus (Bitbucket: kevin_karplus, ).


Currently, PteroDAQ always uses the power supply as the reference voltage.

It would be good to allow other voltage references (the AREF pin or the bandgap voltage).

If the AREF pin is used, the user will have to provide a scale factor for AREF (typically either 1.0 for ratiometric readings or the voltage of AREF measured externally).

karplus commented 9 years ago

Original comment by Abraham Karplus (Bitbucket: abe_k, ).


The boards.py file already provides a listing of possible analog references, and the core and firmware are set up to handle it, so this would (hopefully) be a purely GUI change. Note, though, that the KL25Z does not support using the bandgap as a reference, only the power rail and the external AREF pin. We might also want to warn users that on the ATMega, whichever reference voltage is selected is connected to the AREF pin, so connecting an external reference and using an internal one can be disastrous. Also possibly worth noting is the KL25Z spec of minimum 1.13 V for external references.