Shop OBEX P1 Docs P2 Docs Learn Events
Using the QTI sensors with the Prop — Parallax Forums

Using the QTI sensors with the Prop

MightorMightor Posts: 338
edited 2007-07-21 10:42 in Propeller 1
I'm looking around to see what kind of sensors I could add to a Prop based bot and I was wondering if the QTI sensor (http://www.parallax.com/detail.asp?product_id=555-27401) would work. It is rated for 5V but would it work ok on the 3.3V the prop works on? Would I have to power that thing with 5V and use some kind of voltage divider to bring that voltage down to something a little more prop-friendly?

Gr,
Mightor

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-19 20:55
    The sensor itself is capable of being operated at 3.3V, however use of our board as is will likely reduce the effective range. You may want to solder a different value resistor for the 470Ω to regain the sensitivity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • rokickirokicki Posts: 1,000
    edited 2007-07-19 22:09
    Yeah, I took my QTI sensors, clipped out the capacitor (I used a D/A and a current measurement on the phototransistor), and
    replaced the LED resistor. Works fine, good range. I am modulating the IR and tracking the modulation in the
    phototransistor.
  • MightorMightor Posts: 338
    edited 2007-07-20 04:00
    Paul,

    Thanks, I think it shouldn't be too hard to do that. Would a 220Ω do the trick in this case? If I intend to use it for line detection only with perhaps no more than 5-7mm between the sensor and the surface, would it still be necessary to mod it like this?

    Rokicki,

    Thanks for the suggestion. What kind of code would you need to make that work? I suppose that would make the QTI sensor a lot more flexible in its use.

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | What the world needs is more geniuses with humility, there are so few of us left.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-07-20 04:19
    Mightor,

    Converting the QTI sensor for 3.3V operation as opposed to 5V operation, you will need to use a 330 Ohm resistor instead of the 470 Ohm resistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • MightorMightor Posts: 338
    edited 2007-07-20 04:50
    Beau,

    Thanks for the info [noparse]:)[/noparse] How did you come to that value? I'm keen to learn how to figure that kind of stuff out for myself; teach a man to fish and all that stuff.

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | What the world needs is more geniuses with humility, there are so few of us left.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-20 05:02
    The IR LED has some voltage drop for a given intensity, we want that intensity to remain the same so the voltage drop and current through it is the same. So we·set up·a balance equation: 470/5 = x/3.3. Solving for X we get 310, or the nearest value resistor 330. I did some handwaiving on this, I can provide you the full mathmatics if you like (which is basically some unknown values that cancel out).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • MightorMightor Posts: 338
    edited 2007-07-20 05:13
    Paul,

    Oh hehe, it's that easy, eh? I was expecting a little more maths, tbh, but this I can handle [noparse]:)[/noparse]

    Thanks!
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | What the world needs is more geniuses with humility, there are so few of us left.
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-07-20 08:34
    What's the voltage drop on the IR LED? Maybe you really want a 220 ohm resistor.

    For instance, say the LED has a 1.7 volt drop. That gives you (5 - 1.7) / 470 = 7 milliamps current through the circuit. (Current is what you actually want to maintain the same.) If you have 3.3 volts, then you have (3.3 - 1.7), which gives you an effective voltage across the resistor of only 1.6 volts. To get the same 7 milliamps, you need to take 1.6 divided by .007, which comes out to about 228 ohms.

    Paul: I find hand-waving and is fine at 5 volts and up, but when you start getting down into the 3.3 volt range, the voltage drop of a LED can give you significant errors if you don't account for it.

    Mightor: The idea is that you find the voltage drop of the LED, and whatever is left after you take away that is the voltage that is dropped by the resistor. Knowing the resistance and the voltage, you can use ohm's law to find the current. You want the current in your 3.3 volt circuit to be the same as the current was in the old 5 volt circuit, so knowing the new (smaller) voltage drop across the resistor and the desired current, you can reverse ohm's law to give you the resistor that gives you that current.

    With LED's, it really doesn't matter if you drive it with a 470 ohm resistor from 5 volts, or a 220 ohm resistor from 3.3 volts, or even a 100K resistor from 700 volts, the only thing that the LED sees is the same 7 milliamps in each of those three examples, and that controls the brightness of the light.
  • MightorMightor Posts: 338
    edited 2007-07-21 05:18
    Dennis,

    Thanks for all the extra info, it'll come in handy when deciding what R value to use whenever I need calculate it next time for another arbitrary voltage [noparse]:)[/noparse]

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | What the world needs is more geniuses with humility, there are so few of us left.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-07-21 06:43
    Dennis Ferron,

    I stand corrected. Good point!

    Mightor,

    I believe that you were right the first time with a 220 Ohm.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • MightorMightor Posts: 338
    edited 2007-07-21 10:42
    Beau,

    I totally just guestimated that value [noparse]:)[/noparse]
    Me: "Hmmm, 220, yeah, that sounds like a good number." I also like the colour red more than orange anyway, so 220 works out better for me than 330, hehe. Pfff, whoever said there's no such thing as male intuition was lying.

    Thanks for the input people [noparse]:)[/noparse]

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | What the world needs is more geniuses with humility, there are so few of us left.
Sign In or Register to comment.