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 / 19029
19028  |  19030
Subject: 
Re: Voltage Sensor
Newsgroups: 
lugnet.robotics
Date: 
Mon, 16 Sep 2002 20:09:31 GMT
Viewed: 
606 times
  
Hello,

If so you can use the RCX it'self to monitor the battery.

This idea, while in itself interesting, will not work when the 12V battery
gets regulated down to 9V. This is because these 9V will barely vary across
the regulator's permitted input range. If of course the regulator is
specifically designed to not be ideal with respect to line regulation [1],
then the idea would work and is indeed very elegant, because it saves one
sensor input. What I mean is this: When a 10V input voltage causes the
regulator to drop its output level to whatever the RCX assumes to be
BatteryLevel() 0%, and a 14,4V input voltage translates to whatever the RCX
recognizes as BatteryLevel() 100%, then the regulator itself can elegantly
be used as the measurement circuitry for the 12V battery's charging level.

On the other hand, Tom seems to be ready to give up one sensor input for
that, so a voltage sensor seems a straightforward way to do this. Here is
one idea for that: It has been stated [2] that temperature sensor inputs
convert a voltage of 0..5V to a raw reading of 0..1023 quite linearly. Now,
for the purpose of reading a 12v battery's voltage, there is three
possibilities (ordered by increasing accuracy):
A) Make up a resistive network from the internal 10k pullup resistor and
   2 external resistors (one pulldown to ground, one to the battery to be
   measured), and calculate output voltage as a function of input voltage
B) Extend the range from 0..5V to  0..15V by a resistive divider followed
   by an Operational Amplifier
C) Offset the range from 0..5V to 10..15V by an Operational Amplifier

A) is the simplest of these, but in addition to not using the full 0..5V
swing of the sensor input (which limit accuracy) it will draw some current
out of the battery through the resistive network.
B) and C) both need an operational amplifier in order to force some voltage
in the range 0..5V into the RCX sensor input against the 10k pullup
resistor.

I can certainly elaborate more on one or the other solution, but not right
now, and not on all of them ;-), so if you have more specific questions ...

Greetings

Horst

[1] line regulation characterizes a voltage regulator's ability to
    retain its output voltage even when the input voltage changes.

[2] <http://www.plazaearth.com/usr/gasperi/lego.htm>



Message has 2 Replies:
  Re: Voltage Sensor
 
(...) It's amazing when you get a different perspective on a problem! While not really applicable for this application the idea is indeed very elegant and saves on a precious input port. I have a spare regulator which I will modify to test this out. (...) (22 years ago, 17-Sep-02, to lugnet.robotics)
  Re: Voltage Sensor
 
Caution: the your external supply has one side connected to RCX ground, which is itself connected to sensor input connector right side. Whichever circuit you choose, you will have to make sure that sensor connector will not be reversed (the (...) (22 years ago, 17-Sep-02, to lugnet.robotics)

Message is in Reply To:
  Re: Voltage Sensor
 
Are you powering the RCX from this battery? If so you can use the RCX it'self to monitor the battery. task main() { while (true) { SetUserDisplay(BatteryLevel(), 3); } } I use this to detect if my 1.0 RCX is plugged in or on batterys. Hope that (...) (22 years ago, 16-Sep-02, to lugnet.robotics)

11 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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