Using the QTI sensors with the Prop
Mightor
Posts: 338
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.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
replaced the LED resistor. Works fine, good range. I am modulating the IR and tracking the modulation in the
phototransistor.
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.
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.
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 Baker
Propeller Applications Engineer
Parallax, Inc.
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.
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.
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.
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.
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.