ZappBots wishes a warm welcome to everyone.

Especially our visitors from
Savage///Circuits and Parallax!!!


Please take a look our new forums, we hope you register and become an active user.

The ZappBots forums are being run on phpBB 3.1.4 software which is different then the vBulletin used on the Savage///Circuits and Parallax forums.
Therefore, things look and work a little different, especially creating posts and uploading images / attachments.


The important thing is we have a place toTalk, Learn and Showcase our projects.

QTI (infra-red line follower) sensitivity

This is the place to talk about Bio-Medical Electronics
User avatar
Electrons-R-Fun
Member
Member
Posts: 140
Joined: Tue May 12, 2015 7:03 pm
Contact:

QTI (infra-red line follower) sensitivity

Postby Electrons-R-Fun » Tue Jan 02, 2018 2:53 pm

Hello All,

I wanted to ask, would anyone hazard to guess if a QTI sensor would be able to detect (affect the decay rate of built in RC circuit) the difference between the Sclera (the white part of the human eye) and the Iris (colored part of the eye) or Pupil (the black part)?

I just wanted to ask before I purchased a set.

I do have some infra-red LED's and Infrared detectors here and I could make a similar circuit to a QTI sensor kit then hook it up to the Oscilloscope, but I'm worried the results would be different (loose bread board problems or extra capacitance) or I would make some errors leading me to believe the idea won't work.

Jason

User avatar
Electrons-R-Fun
Member
Member
Posts: 140
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: QTI (infra-red line follower) sensitivity

Postby Electrons-R-Fun » Wed Jan 03, 2018 8:49 pm

The answer is yes, I was able to get the idea to work, now Lisa can speak using the infra red eye switch

I did not use a line follower module, but did still use infra-red.

Maybe someone would be kind enough to explain to me the positioning of the capacitor in the Parallax line follower module. To me, the capacitor would pass a pulse when the infra red transistor turns on and would be near zero volts on the lead connected to the infra red transistor and always maintain a 5 volt reading on the end connected to 5 volt source. I don't understand how you can apply 5 volts to each lead of a capacitor(one lead connected to 5 volts source and the other end connected to a 5 volt source through a RC circuit) and only have the one lead, that should be connected to a near 0 volts drain down, maybe I work with polarized capacitors too much. I realize ceramic capacitors are not polarized but I still don't know why the capacitor wasn't placed between ground and the infra red transistor. I tried a circuit, both ways in a software simulation, and the function of the circuit didn't seem to change.

Any thoughts anyone?

Thanks Jason

User avatar
zappman
Administrator
Administrator
Posts: 111
Joined: Wed May 06, 2015 12:31 am
Contact:

Re: QTI (infra-red line follower) sensitivity

Postby zappman » Sun Feb 04, 2018 9:53 pm

Electrons-R-Fun wrote:The answer is yes, I was able to get the idea to work, now Lisa can speak using the infra red eye switch

I did not use a line follower module, but did still use infra-red.

Maybe someone would be kind enough to explain to me the positioning of the capacitor in the Parallax line follower module. To me, the capacitor would pass a pulse when the infra red transistor turns on and would be near zero volts on the lead connected to the infra red transistor and always maintain a 5 volt reading on the end connected to 5 volt source. I don't understand how you can apply 5 volts to each lead of a capacitor(one lead connected to 5 volts source and the other end connected to a 5 volt source through a RC circuit) and only have the one lead, that should be connected to a near 0 volts drain down, maybe I work with polarized capacitors too much. I realize ceramic capacitors are not polarized but I still don't know why the capacitor wasn't placed between ground and the infra red transistor. I tried a circuit, both ways in a software simulation, and the function of the circuit didn't seem to change.

Any thoughts anyone?

Thanks Jason


Hi Jason,

I believe your question is about the "QTI Line Follower AppKit for the Small Robot" https://www.parallax.com/product/28108 .

If this is correct?, go to the "QTI Line Follower AppKit Product Guide" page at https://www.parallax.com/downloads/qti-line-follower-appkit-product-guide

You will notice there are 3 Versions of the Product Guide, open the "28108-QTI-Line-Follower-Guide-v2.1.pdf" https://www.parallax.com/sites/default/files/downloads/28108-QTI-Line-Follower-Guide-v2.1.pdf

Go to page 2 of the 28108-QTI-Line-Follower-Guide-v2.1, this section of the document is labeled "A Closer Look at the QTI" it explains that there are two ways to use the sensor (with a Basic Stamp).

As an "analog sensor" as described in the second paragraph, or as a "digital sensor" as described in the third and fourth paragraphs.

The capacitor is used when the QTI Sensor it used as an "analog sensor".

When used as an analog sensor, the QTI can detect shades of gray on paper and distances over a short range if the light in the room remains constant.


If all you want to know is whether a line is black or white, the QTI can also be converted to a digital sensor


There is also some Basic Stamp code shown on page 2 of the 28108-QTI-Line-Follower-Guide-v2.1 (as shown below).

Code: Select all

' AnalogQti.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}
time VAR word
DO
HIGH 3
RCTIME 3, 1, time
DEBUG CLS, ? time
PAUSE 100
LOOP


To understand this code you need to look at the "27218-Web-BASIC Stamp Manual-v2.2.pdf" at https://www.parallax.com/downloads/basic-stamp-manual

Page 363 of the "BASIC Stamp Manual" explains the "RCTIME 3, 1, time" line of the above code.

RCTIME Pin, State, Variable

Function: Measure time while Pin remains in State; usually to measure the charge/discharge time of resistor/capacitor (RC) circuit.

    Pin is a variable/constant/expression (0 – 15) that specifies the I/O pin to use. This pin will be placed into input mode.

    State is a variable/constant/expression (0 - 1) that specifies the desired state to measure. Once Pin is not in State, the command ends and stores the result in Variable

    Variable is a variable (usually a word) in which the time measurement will be stored.

Explanation
RCTIME can be used to measure the charge or discharge time of a resistor/capacitor circuit. This allows you to measure resistance or capacitance; use R or C sensors such as thermistors or capacitive humidity sensors or respond to user input through a potentiometer. In a broader sense, RCTIME can also serve as a fast, precise stopwatch for events of very short duration.

HOW "RCTIME"'S TIMER WORKS - When RCTIME executes, it makes Pin an input, then starts a counter (who's unit of time is shown in Table 5.87). It stops this counter as soon as the specified pin is no longer in State (0 or 1). If pin is not in State when the instruction executes, RCTIME will return 1 in Variable, since the instruction requires one timing cycle to discover this fact. If pin remains in State longer than 65535 timing cycles RCTIME returns 0.


So, when the QTI sensor is used as an analog sensor, both sides of the the capacitor pins "W" and "R" are initially at positive voltage.

    5 volts is applied on Pin "W".
    Pin 3 of Basic Stamp is set as an output, and is set to a logic high level.

When RCTIME executes, Pin 3 of Basic Stamp is set as an input and no voltage is applied to the capacitor from the Basic Stamp; and the "infrared transistor" inside the QTI acts as a variable resistor discharging the capacitor. The time it takes pin "R" to go from a "logic high to a logic" is proportional to the "shade of gray" detected by the QTI sensor.

The capacitor serves no function when the QTI Sensor it used as a "digital sensor"

I hope this helps you understand, how the QTI sensor works.
Image
butlh ghajbogh nuv'e' yIHo'.
Admire the person with dirt under his fingernails.

User avatar
Electrons-R-Fun
Member
Member
Posts: 140
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: QTI (infra-red line follower) sensitivity

Postby Electrons-R-Fun » Tue Feb 06, 2018 2:24 pm

Hi Zappman,

Thanks for all the info on the QTI sensor. I do understand how the Decay time works as a analog sensor and I understand How the micro-controller pins can be used as a comparator threshold, (I thought thresholds levels were half the operating voltage for the IC, so the Propeller works on 3.3 so it's threshold is 1.65 but the basic stamps seems a little different at 1.4 volts even though it works on 5 volts). No big deal though, I get the concept there.

My question was more about why the capacitor is connected as it is. I would have put the capacitor connections at R and B instead of W and R. I feel My arrangement would still allow the capacitor to charge as an analog sensor or still be used as a digital threshold detector. I think I'm also having problems getting pass the idea of a capacitor exploding by hooking it up wrong.

In my current project there is very little change in the voltage value and I have a lot of problems with the analog signal "riding" near the the comparator threshold value and I need to add something called hysteresis so I can turn the threshold value more into a window comparator threshold. I know I probably said all that wrong in contrast to how the professionals would describe it, but I hope my meaning comes across ok.


Return to “Bio-Medical Electronics”

Who is online

Users browsing this forum: No registered users and 1 guest