Input impedence of ports (pins) of BS2
po2le
Posts: 76
I have a Basic Stamp Homework Board with a BS2.· Can anyone tell me what the imput impedence of the pins are?· (The input/output pins 0-15)
Comments
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
DJ
>> ...errrrrr, how can you get 25mA through 10Mohm with 5V?
The input impedance is in parallel with the input, not in series. The output impedance of the PIC is around 60 ohms for low currents.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
DJ
As to input impedance, I don't think it is 10 MΩ. That came from an earlier question. The input resistance is practically infinite, and the leakage current is also very low, unless the input moves out of the 0 to 5 volt input range or the temperature is very high. The leakage current is usually modeled as a current source/sink, not a a resistance, because is obeys I=constant more closely than I=V/R. As for the reactive part of the input impedance, suppose the input capacitance is 10pF. Its Xc would become 10 MΩ at an input frequency of around 1600 Hz. That would only be an issue if you happened to be driving the input at that frequency from a device with a very high output impedance. For example, pH probes have a very high output impedance which can exceed 10 or even 100 MΩ, but things like that are not done at 1600 Hz. Any current into the input pin has to charge and discharge that 10pF capacitor.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I can deliver a neg. pulse to the input port of about 1.4v neg. (I'm working on getting it pos.), but when I apply the pulses to the port, the pulse volts drop to less than half a volt. Since I'm trying to use the BS2 to count pulses, those low voltage pulses are not detected and counted. Vas ist los?
If I can draw the circuitry, then show it on here, I'll give it a try.
po2l
However, there is probably something about your circuit that is not right. Please do draw out your circuit and explain the goal and the source of the pulses. When you say, "1.4 volt negative pulse" that could mean a couple of different things, like, going from 5 volts down to 3.6 volts, or, from zero volts down to -1.4 volts, or.....? When you say the pulses drop to less than half a volt, that immediately brings to mind the characteristic drop across a diode. Vas ist? The voltage seen by the Stamp has to cross its 1.4 volt threshold.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
An LED circuit makes the best example here. If you connect the 'other' end of the LED (with current limiting resistor) to 'ground', then you need to Output a High to turn on the LED, and current flows from the I/O pin to the LED/resistor, to ground.
If you connect the 'other' end of the LED/resistor to Vdd, you need to Output a Low to turn on the LED. In this case, current flows from Vdd through the LED/resistor INTO the Output pin. This doesn't make the pin an "Input", this means it's sinking that current.
When you do set up the I/O pin as an INPUT, then the output drivers are disabled, and what you have is an Input with very high impedance (10 Megohms) which can be used to 'sense' what voltage some other device is putting on that pin.
thanks
Jeff T.
po2l
The only time that I come off of a twelve volt system is when I actually connect to the motorcycle ignition, but from that I use the voltage divider, which is comprised of somewhat large resistances (series 220k and 110k to gnd), and reading across the 110k. I was advised to use this type of divider by a motorcycle mechanic/advisor who is also an electronic hobbyist. I'm concerned that using less resistance in the divider will possibly put too much load on the electronic ignition. However, I might be wrong about that also. I had a 5.1v zener diode across the output of the divider, but the high resistance of the divider wouldn't allow enough current into the zener to make it operable. And I think the high resistances also cause problems further down the line with other ckts that I tried using to clean up the ignition output pulses.
A problem with the ignition pulses is "ringing" (if that term is still used) at the top of the positive portion of the output pulses. The 'pulses' go from 12v to 0v (gnd) for about 5 msecs, then back up to 12v for about 12 to 18 msecs, depending on RPM. When the pulse rises back to 12v, it shoots past 12v with a short peak of about 2msecs, then back to 12. Its a
'bouncing' short peak. This causes problems with the COUNT routine of the stamp; too many inconsistant counts.
I kept trying to use the negative going portion of the pulses, since they are flat bottomed and square, but have been mostly unsuccessful. Schmitt trigger worked so-so, a monostable MV sometimes worked; mostly not. I think that I will have to go with the pos. portion; I'm going to try a clipper ckt. I found a ckt, in house, to use that somewhat simulates the ignition pulses. If I can get that system to work, maybe I'll have half a chance of getting the mc ignition pulses to work. I'm an old retired guy with time to spend on a hobby that I find quite interesting.
Thanks for the help and information
Pat
Why can't you use a level shifter to change the 12 volt into a 5 volt max signal. You only have to measure the time it is high or low. Attached is a quick method to achieve this change.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave W.
Pat
The transistor circuit that Dave-W suggested is good. A 0.001uF capacitor in parallel with the Stamp input pin where it joins the output of the transistor could help with noise rejection. The Stamp pin has to have a very clean waveform to COUNT accurately.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
"When you do set up the I/O pin as an INPUT, then the output drivers are disabled..." - gotcha, understood.
DJ
Pat