question about RC Time
Keith Hilton
Posts: 150
·I have an interesting question about the Basic Stamp 2 command, RC Time.· Of course RC time is usually determined with a fixed capacitor value, and the resistance can be fixed or one that changes.· Usually, the RC Time is figured with a fixed voltage.· What if you used the RC Time command with the Basic Stamp 2, with a fixed capacitor value, a fixed resistance value, and a voltage that varied?· Of course the voltage could not drop below a certain point, or it would not register as an input on the basic stamp.· Seems to me this is one way you could feed·a variable analog sensor voltageto a Stamp, and have a ready made command for it-RC Time.·
Post Edited By Moderator (Chris Savage (Parallax)) : 8/30/2005 6:32:06 PM GMT
Post Edited By Moderator (Chris Savage (Parallax)) : 8/30/2005 6:32:06 PM GMT
Comments
Way back when (June 13th, 1996), when there was something called the L.O.S.A (List Of Stamp Applications) I used a method similar to what you describe as a crude way to monitor the Battery voltage.
Google:
LOSA Beau Schwabe
Found this...
http://www.hth.com/filelibrary/TXTFILES/losa.txt
...Look at entry #035
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 8/30/2005 6:12:40 PM GMT
Would a simple voltage divider using a few resistors work? Would that affect the rctime?
Heres entry #35
=====================================================================
Title : Simple Battery Check using the BS2-IC [noparse][[/noparse]# 035]
=====================================================================
Date : 960613
Author: Beau Schwabe
E-mail: bschwabe@ionet.net
Stamp model : BS2-IC Module
Code available: YES
Filename : N/A
URL : Se below
Description :
External Components:
.01uF "ZTR" capacitor (Zero Temp Response)
100K Resistor
Directions:
1 - Connect the CAPACITOR and RESISTOR in parallel.
2 - Connect one side of the RC to Vin
3 - Select an available pin on the BS2 for the other
side of the RC.
Program:
Battery var byte
Start:
low {pin#}
rctime {pin#},0,Battery
Debug home,? Battery
goto Start
Typical Results:
85 - Fresh 9 Volt Battery
220 - Low 9 Volt Battery
Note:
Number INCREASES as Battery weakens...
Attached is a schematic.
of current into the stamp to 90uA... In other words, not going to hurt the stamp.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Thank you. So if this is the case, are their general guidelines to follow when working with more than 5 volts input into the stamp?
I never knew that ANY voltage into the stamp over 5 volts was ok, no matter what the current.
should use a voltage divider. So something like this might be appropriate.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
www.emesys.com/BS2rct.htm#B_voltage
As Beau said, the 100 microamps is not going to hurt the Stamp. There are diodes internally at the Stamp pins that clamp the voltage there at Vdd+.6 volt and Vss-.6 volt. Those diodes prevent damage to the gate oxides, but too much current through the protection diodes can burn them out, or lead to a latched up condition in the chip. You can look at the PIC or SX chip Electical Characteristics chart and find there that the maximum clamp current is around 20 milliamps. Another spec is the latchup current, 200 mA. It is good enginerring practice to limit the maximum current from power supplies outside of the 0 to 5 volt range to well less than 20 milliamps, by use of a resistor in series with the pin.
Another issue is, what happens to the current through the resistor when the Stamp goes to sleep? If you want that current to contribute to running the Stamp (via a sneak path), you have to limit it to less than 50 microamps or so, which is the typical current drain of a Stamp in SLEEP.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com