Reading Pot. values. any suggestions
I'm familiar with reading an input for a pin, but what I want to do is read the resistance value from a Pot. the value doesn't need to the actual resistance but just some linear value range.
I want to be able to adjust the speed of my bot, and the distance threshold for the PING sensor, i.e. how close it will get to an object before it turns. I want to be able to do this with out having to reprogram the propeller. so if distance < Pot. value + threshold turn. this will allow me to compensate for different locations and conditions.
could someone recommend a method or circuit for doing this. I'm just learning about A/D converts, but I have no idea how to choose which one to use or if it's even the best solution.
Thanks in advance.
p.s. this of course will be done on a propeller chip.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
I want to be able to adjust the speed of my bot, and the distance threshold for the PING sensor, i.e. how close it will get to an object before it turns. I want to be able to do this with out having to reprogram the propeller. so if distance < Pot. value + threshold turn. this will allow me to compensate for different locations and conditions.
could someone recommend a method or circuit for doing this. I'm just learning about A/D converts, but I have no idea how to choose which one to use or if it's even the best solution.
Thanks in advance.
p.s. this of course will be done on a propeller chip.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I'm toying with the idea of implementing this...
If your trying to read a POT value then this article may be of use:
http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV134.pdf
Code for the article can be found here:
http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/code/NV134.zip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
You could think out of the box and use a quadrature encoder (such as the Bourne EC1J series)... this looks and feels like a pot and there are plenty of samples of the code required to use it in this forum - only two·pins and 2 pullups required [noparse]:)[/noparse].
A.
But for some years now inexpensive devices are available (around 2 Euro). I like their robustness and long term stability. That they have no stop position can be considered a good thing or a bad thing. In fact they are as "incremental" as the mouse ist.
But reading a pot with one Propeller line is the basic experiment you have to do anyhow, well described in many Parallax documentations (see my links or Mike Cook's links). Charging a cap and reading its voltage threashold ist also a good pre-requisite to understand delta-sigma modulation...