voltage confusion
Taisho
Posts: 34
I'm confused....if you have seen my previous posts you will not be surprised....
I know about the 25mA limit per pin and 50mA per each set of 8 pins. Now I just need to clear up the voltage issues. I have read as many books/documents as I can and can't find the answer. I searched here but did not find the answer. If there are search terms that would have found the answer please correct me....whew...back to the question....
I am inputting 6 volts using 5 rechargeable AAs. Now as for the current/voltage draw across pins what is the voltage limit? The LEDs I am planning to use will be 3.7Vf and 20mA. I was going to be using a 470 ohm resistor. Will I be safe with that or will the voltage be too much?
Thanks for your patience and help.....
I know about the 25mA limit per pin and 50mA per each set of 8 pins. Now I just need to clear up the voltage issues. I have read as many books/documents as I can and can't find the answer. I searched here but did not find the answer. If there are search terms that would have found the answer please correct me....whew...back to the question....
I am inputting 6 volts using 5 rechargeable AAs. Now as for the current/voltage draw across pins what is the voltage limit? The LEDs I am planning to use will be 3.7Vf and 20mA. I was going to be using a 470 ohm resistor. Will I be safe with that or will the voltage be too much?
Thanks for your patience and help.....
Comments
The Stamps have their own voltage regulators. As long as you connect the 6V supply to the Vin pin (and Vss pin), you will be fine. That's the input to the voltage regulator. The Vdd input is for regulated 5V only (it's the output from the regulator and the power supply for the actual logic of the Stamp).
For the I/O pins, the maximum input voltage is 5V. Anything above that can damage the I/O pin. Also, do not connect a negative voltage to an I/O pin. That can also damage the I/O pin. If it's possible to have an input to the Stamp above +5V or below 0V, use a 1K or higher series resistor to limit the "fault" current and that will protect the pin. The PBasic manual discusses the use of a 22K resistor in series with an I/O pin for use with an RS232 port where the voltages can range from +12V to -12V. See the chapter on the SERIN and SEROUT statements.
For the I/O pins as outputs, they get connected internally to Vdd (for a logic HIGH) or to Vss (for a logic LOW). There's a little voltage drop in the internal transistors used, so the voltage isn't exactly Vdd or Vss. Logic HIGH is typically 4.3V and logic LOW is typically 0.6V.
For your LEDs, you will have 4.3V - 3.7V = 0.6V to drop across the 470 Ohm resistor. Ohm's Law gives the current as I = E / R = 0.6V / 470 = 1.2mA. This is probably not what you wanted. If the LED really has a Vf of 3.7V, try a 100 Ohm resistor which will give an LED current of about 6mA.
Make sure you understand Ohm's Law (Voltage = Current x Resistance) and the power formula (Power (Watts) = Voltage (Volts) x Current (Amps)). Learn how to read a datasheet. For example, Voh is Voltage Output High and Vol is Voltage Output Low and specify the maximum output voltage and minimum output voltage for a logic output pin for a specified output current and power supply voltage.
Post Edited (Mike Green) : 5/31/2008 3:46:36 PM GMT