Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
What exactly are you measuring?Is it the 'out' to 'gnd' in the first diagram in the link?
The problem is I don't quite understand readings from my multimeter when measuring resistance of the detector: when multimeter is set to 200k it shows 44.3, when it's set to 20k it shows 10.17;(Everything is fine when I measure a resistor)
so measure the resistance before soldering it. that way it'll give correct readings,
The most precise result, you'll get from building the circuit as shown and then measure voltages, as it is then loaded and biased as it will be in its application (since it is).
I have my circuit already built on the breadboard to test it out, and still readings do not match:2M --> 0.357200k --> 46.520k --> 10.372k --> 0.637As they don't match, how can I decide upon which size resistor to use in order to read voltage?
Edited 2nd time: When I connect IR Detector to the circuit, Collector pin goes to V+ and Emitter pin to GND? ...this way I get better voltage readings... I've always thought that longer pin (Emitter) is always positive...
Are you talking about a two pin photo transistor (in an "LED house")?
IF it's an NPN photo transistor, the emitter (where the arrow is) should go to ground.
OK, I've got it working diagram is below.
When IR is reflected from black surface it gives ~0.8V, when IR is reflected from white surface it gives ~1.8V.
There is, however, a few things that could be improved [...]
[...] wouldn't it be easier to set threshold voltage using software in uC rather than using resistors?
The software, starting from a stable base, can then almost make the circuit reach the stars
Then you would need to use A/D-C for the input (slower) [...]
[...] there's no reason to use an op-amp in the first place, since a carefully selected resistor will do.
I thought that I need to use ADC in order to get readings from analog sensor, hence count clicks when motor shaft is spinning. However, I suspect now that it's better to have 2 state sensor giving on/off only and attach it to a pin of uC without using ADC.
That's the problem, as I do not yet have many different components I try to build stuff using things that I have at hand.
Aha, remade my circuit the way Soeren has offered (apart from feedback resistor, because I don't have any resistors of that size ). What does feedback resistor do?
Anyway, now circuit works giving ~2V while IR is reflected from black and giving 0V when IR is reflected from white.