Voltage measurement
danielreis
Posts: 16
Hi guys,
I'm developing a project that I need to read a battery charge.
I'm a basic stamp user, and with it I can use the RCTIME command to make this measurement, but with propeller, how can I do that?
Best regards,
Daniel Reis
I'm developing a project that I need to read a battery charge.
I'm a basic stamp user, and with it I can use the RCTIME command to make this measurement, but with propeller, how can I do that?
Best regards,
Daniel Reis
Comments
You can also use the Propeller's normal ADC functionality using a Sigma-Delta ADC as described in the application note (AN001) available on the Propeller Downloads webpage. This uses two I/O pins and you have to mount the passive components very close to the Propeller chip. The RCTIME technique may be easier.
RC techniques will give you a logarithmic return. So the voltage is detected accurately at only two points, the further you get away from those two points the less accurate it is. You could add float math algorithms to get a more accurate reading across a wider range of inputs. But in a simple RC setup, no matter what, as the voltage gets low (closer to Vdd / 2) the accuracy goes out the window.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
I will try to use the RCTIME function of BS2_functions library, it appears to be simpler.
Bye,
Daniel Reis