Subject:
|
Re: Sensor Sampling; Progress?
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Sun, 19 Jan 2003 01:15:45 GMT
|
Viewed:
|
3498 times
|
| |
| |
The Lego firmware cuts power for about 200uS, with a period of 3mS.
So most sensors have to have enough capacitor based power storage for the
full 200uS and be able to run on about 93% duty cycle. (The rotation sensor
is one of the devices on the ragged edge, it can barely make it through the
full 200uS.)
Please be very careful to ensure you test your planned timing with long
wires to the sensors. The standard firmware allows >50uS for settling. The
problem is the time-constant associated with the 10k pull up resistor and
the capacitance of the wire. The RCX A/D converter is a 10 bit device which
thus reads to 0.1% accuracy, crudely put. Thus, with long wires going to the
sensors which may be the case for a light sensor being used in a train
layout for example, make sure that the settling time is within 0.1% within
your defined settling time. Else you will find your readings will have
dependency on the difference between the supply voltage and the reference
voltage. Although the reference voltage is fixed at 5.00 volts by the
regulator in the RCX, the raw supply tends to be battery dependent and so
your readings will change with the changing battery voltage which is
probably an undesirable effect ;)
I would suggest you set up a reference sensor like the light sensor in a
highly constrained environment to provide a constant reading. Then add** an
extension wire and check the reading doesn't change. If it does, its a
timing issue related to the capacitance of the wire and nothing to do with
the wire's resistance which has a negligible effect at the low current
levels involved.
JB
** I do mean "add". You don't have to insert it in the connection to the
sensor. Just add a long piece of wire on top of the sensor connector. The
extra capacitance will add to the capacitance already in the circuit just as
if the wire were inline.
> I agree. With the current firmware, power gets cut off to all
> 3 sensors for ~85us (sometimes longer). With the scheme
> I mentioned, power would be cut to only one sensor for
> ~25us. The sample rate could be adjusted anywhere from
> 8 Hz to 6 KHz. BrickOS already works like this but the
> sample rate is pegged at 6.7 KHz so the power duty cycle
> isn't all that good.
|
|
Message is in Reply To:
| | Re: Sensor Sampling; Progress?
|
| (...) Yes. (...) individually (...) That's right. (...) I agree. With the current firmware, power gets cut off to all 3 sensors for ~85us (sometimes longer). With the scheme I mentioned, power would be cut to only one sensor for ~25us. The sample (...) (22 years ago, 19-Jan-03, to lugnet.robotics.rcx.legos)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|