To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 8665
8664  |  8666
Subject: 
Re: Do it yourself light sensors. How does RCX drive them?
Newsgroups: 
lugnet.robotics
Date: 
Tue, 30 Nov 1999 21:05:33 GMT
Viewed: 
1009 times
  
In lugnet.robotics, "Pam Durham" <pdurham1@ix.netcom.com> writes:
<snipped>
If so, none of the circuits I've seen on the various web sites should work.
It would seem that to make this work one would need a switching transistor
that shunted current to the light only when the voltage went above 5 volts.
This current shunt would then be used to charge a capacitor.  During the 5v
phase the switching transistor would turn off and isolate the light and the
light would be driven by the charge in the capacitor (this is needed since
an led will instantly turn off, unlike an incandescent light.  During the 5v
phase the RCX would only see the photo transistor.

The circuits I've seen hook the led and the photo transistor in to what
amounts to be parallel.  Thus during the 5v measurement phase the RCX is
measuring the voltage drop across both the led and the phototransistor.
I've found that this makes the effective measurement range about 680 - 700
raw units, too small to be useful.

Am I correct in my assumptions and does anyone have a good circuit design to
build a IR sensor with an IR source?   It would save me having to dig out my
college text books.
<snipped>
You are correct, in that the diode in the 'loop' when driving using the normal
op-amp output into a resistor technique, imposes a problem, but this is not
that significant over the centre of the output range, so most designs tend to
ignore this. It causes the 'kink' at the end of the plotted response curve
using this technique. There is seperately a problem, which I consider 'worse',
in that when driving using (say) a 2.2k resistor (the largest value that
allows 100% to be reached), and pulling to 0v, this resistor is effectively
straight across the supply (plus two diode drops, and the small resistance
inside the RCX itself), and drawing a significant current during the power
phase of the cycle. In the example given this draws just over 3mA,
representing a large 'slice' of the 'useable' power from the RCX output, and
making this a less than ideal drive design. Personally, driving from a couple
of more sophisticated sensors, where I wanted good linearity, and low waste
current, I instead use a transistor and op-amp to provide a constant current
source. The technique is simple, just involving an NPN transistor, with it's
base to the op-amp output, and then the emitter of the transistor having a
resistor to the 0v rail. The connection between the emitter and resistor, is
the point fed back into the -ve feedback connection of the op-amp. The
collector of the transistor is simply fed directly to the normal pair of
diodes to provide the signal back to the RCX. You apply your signal voltage to
the +ve input of the op-amp, and the same voltage is maintained across the
resistor during both the drive, and sample phases of the system. The
sensitivity of the circuit depends on the value selected for the emitter
resistor, with 1k, giving about 0.4v full scale. You have to be careful not to
'overdrive' the input. This circuit gives +ve 'percentage' output, for +ve
voltage in (a nice feature), and at full drive (0.4v), draws a maximum of only
about 1mA (including the power to the op-ap, using a low power 'rail to rail'
design - I use half an LM358). I have found this a much more succesful drive
circuit, and have fed this from a PIC 16C71, using either a Xicor X9CMME
'digital pot', or a PWM output from the processor. The latter requires the
processor to remain 'awake', and though it involves one less part, draws more
current, since the processor has to run at a fairly 'high' frequency, and be
running all the time. I am currently driving this circuit from a PIC running
at only about 100k, using an external RC oscillator, and by letting the
processor sleep when reading it's own A-D's, can get good accuracy, and do
some processing inside the sensor, while the whole thing is low power. At the
moment my biggest problem is minaturising the whole thing. :-)

Now that having all been said!, it doesn't really explain your inability to
get the simple circuit referred to at the beginning to work. Though this won't
give much sensitivity (probably not enough for your remote sensor/LED
requirement), it should work fine. The photodiode acts as a current source,
and will correctly provide a small return when it 'sees' light. It should be
working. For the longer range you require though, a series of 'solutions'
apply. The suitability of each depends on what you actually want to do?. You
can get more sensitivity from the receiver, by either using amplification (an
op-amp as allready mentioned), or if you can accept visible light, a photo-
transistor gives much higher sensitivity at the cost of frequency. If you
would prefer to reject visible light, then the solution is to 'pulse' an IR
source, and filter the return (this is the approach used in IR remote
controls), giving massive range for small current consumption. If you would
care to give an idea of the sort of range you require, and your requirements
about ambient light, I will try to sketch a circuit and mail it to you.
However it will be more complex than the design you have been looking at, the
Lego design also has some electronics in it...

Best Wishes



Message is in Reply To:
  Do it yourself light sensors. How does RCX drive them?
 
Greetings, I've been attempting to build my own IR sensor just like the one that ships with Mindstorms. I've been to the various sites that describe such things, and have even built the circuits described there (see (URL) Unfortunately I haven't (...) (26 years ago, 13-Jan-99, to lugnet.robotics)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
6 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR