I am well on my way to making a fancy logic probe from a LCDuino. Just to fill in, I started with making a probe from a TL082 dual op-amp which works quite well. I assumed that making the same thing out of a microprocessor would be a peice of cake but man, this whole binary/digital thing is sorta getting me. I think I may be trying to make a (what is it?) tri-state thingie...
Basically, I have a simple, one-wire probe. When it is touching something high the micro sees a high and prints a corresponding message on the LCD. If it is low, a message is printed on the LCD for that as well. As it stands now, "floating" is seen as a low. I would like it to be seen as "nothing".
The question is, how does a micro tell if something is simply "not connected"? Not high, not low but floating? I thought about doing this through an ADC but quickly came to the realization that I had no idea how this route would help me. Then I thought about pull-ups and pull-downs and again, stuck. Right now, the only thing I can figure is to connect the guts of my logic probe to the micro and let the op-amp do the "floating" business for me.
I am REALLY open to thoughts on this one. I think I need a real-life circuit-nerd (EE).
Heres a ETO thread that may
Heres a ETO thread that may help you, I have zero time to read so I just google everything.
http://www.electro-tech-online.com/general-electronics-chat/96978-detect-tristate-floating.html
BAM!"Place two large (say
BAM!
"Place two large (say 100K ohm) resistors in series between the +5V and ground. Connect the junction of the resistors to the tri-state output. If the output is in the tri-state mode, then the output will be about +2.5V. Otherwise the output will be high or low depending upon its output logic level. "
You can use an ADC pin!
I am not a circuit nerd and I do not play one on TV
but, from a couple search(point 3) hits(pdf) it would seem that you need to check for a range of voltages rather than yay or nay. The two hits seem to infer that a HiZ pin will have a voltage somewhere inside of the too high to be low and too low to be high range of voltages. The following link while including a microcontroller may offer some idea on how to implement in pure digital logic. If none of what I have posted helps, you could always scan the search I used to get these hits.
More thinkin’
First off, @Birdmun --you have the search ability of Superman, thank you. All fantastic stuff. Man, so much better than what I was bringing up.
Yup, I sat down and actually thought about the problem --or really, what I wanted to achive here. You guys are right --I am NOT looking for some perfect high and/or perfect low. I AM looking for various voltages and how they relate to a given threashold. I sat down and thought, “OK, what would I actually use this tester to test?” --One thing I came up with, and one that would come up a lot would be working with encoders. If I am using IR reflective sensors, we will never be talking “100% of VCC high” nor would we ever see a true 0. Things get funny too with 3.3v systems and 5v systems.
So here’s what I got so far --First is the fact that I won’t be able to use the same pin for pulse width testing AND high/low testing. Second, would be to use the ADC to for my High/low test. Please correct me if I am wrong, but I can’t figure why a simple resistor bridge on an ADC wouldn’t work. Maybe just a gentle (equal) tug both ways, maybe 1M going up and down to keep the ADC sitting right there in the middle. With just the very gently pull of that size resisor, the input should have a pretty easy time yanking the signal way high or way low.
Am I correct or am I underthinking this one? --Where’s my breadboard and voltmeter…
Solved. Well… …made to work.
I went full-on KISS here, but here’s what I did…
I made a resistor bride between Vcc and Vss out of (2) 1M resisitors. The center of that bridge goes to both the probe and a ADC channel. That’s it! The bridge keeps everything centered but just needs a gentle tug either way to bring it to really high or really low. Within the code, there is just a simple threashold to determine how high is high enough to be high and the same with low.
Not perfect, most probably not the correct way to do it, but for Ctc and hobbyist robotics in general, it will work just fine. Considering I have to A) plug in my PC-based O-scope and B) open software to use it, I am sure I will be grabbing for this simple box most of the time.
Here is the post.