transistor base input

On Sun, 4 May 2008 13:00:03 -0700 (PDT), lerameur <lerameur@yahoo.com>
wrote:

On May 2, 12:08 pm, gearhead <nos...@billburg.com> wrote:
On May 1, 2:42 pm, John Popelish <jpopel...@rica.net> wrote:



gearhead wrote:
On Apr 30, 2:55 pm, Randy Day <randy....@shaw.cax> wrote:
Just use your micro as a digital input; no analog required.

6-9vdc in --10K-----+------ micro
|
/\ 5v zener diode
|
Gnd




The output is DC, depends on the batteries voltage. But it is usually
6.4v.
Well I tried the circuit with the zener diode. I get 5v at the output.
But as soon as I place the microcontroller input pin, that voltage
just sink to 1.4v and the controller do not read it. If I put the
input pin directly on the output of the 7805 regulator (5v) then it
reads it as 5v. I used a 150ohm resistor afterwards, that did not
work. why is that
---
It sounds to me like you've got your ľC "input" pin configured as an
output.

JF
 
On Sun, 4 May 2008 13:00:03 -0700 (PDT), lerameur <lerameur@yahoo.com>
wrote:


The output is DC, depends on the batteries voltage. But it is usually
6.4v.
Well I tried the circuit with the zener diode. I get 5v at the output.
But as soon as I place the microcontroller input pin, that voltage
just sink to 1.4v and the controller do not read it. If I put the
input pin directly on the output of the 7805 regulator (5v) then it
reads it as 5v. I used a 150ohm resistor afterwards, that did not
work. why is that ?
It seems that your microcontroller input is a fairly low resistance to
ground - seems strange to me, since the 8052s I use have weak
pull-ups, and a plain CMOS input would be high impedance in either
direction - however, I suppose anything is possible.

To solve the problem, you will need a lower series resistance than the
10K that Randy suggested to provide enough current to pull the
microcontroller input high.

Also, are you sure that the microcontroller pin is programmed as an
input? Depending on the processor, it may be possible to use a pin as
an input even if it is set to be an output, and is outputting a low.


--
Peter Bennett, VE7CEI
peterbb4 (at) interchange.ubc.ca
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver.powersquadron.ca
 
lerameur wrote:
On May 2, 12:08 pm, gearhead <nos...@billburg.com> wrote:
On May 1, 2:42 pm, John Popelish <jpopel...@rica.net> wrote:



gearhead wrote:
On Apr 30, 2:55 pm, Randy Day <randy....@shaw.cax> wrote:
Just use your micro as a digital input; no analog required.

6-9vdc in --10K-----+------ micro
|
/\ 5v zener diode
|
Gnd


The output is DC, depends on the batteries voltage. But it is usually
6.4v.
Well I tried the circuit with the zener diode. I get 5v at the output.
But as soon as I place the microcontroller input pin, that voltage
just sink to 1.4v and the controller do not read it. If I put the
input pin directly on the output of the 7805 regulator (5v) then it
reads it as 5v. I used a 150ohm resistor afterwards, that did not
work. why is that ?
As an experiment:
put the 10k resistor back in, and connect the
input end to the +5 supply for the micro.

Measure the voltage with and without the zener
in the circuit.

If the voltage stays at 1.4v, you've probably
got:

a) your input pin is actually programmed as an output pin
b) your input pin is actually programmed as something other
than a digital input (analog, clock in, etc).
c) a fried input to your micro.

A working digital input is said to be 'tied high'
with a 10k resistor; the voltage should be near +5.
If your voltage is 1.4 without the zener, the problem
is in the micro.

Can you hook a 10k to another input pin on the
device to compare?
 
On May 2, 12:08 pm, gearhead <nos...@billburg.com> wrote:
On May 1, 2:42 pm, John Popelish <jpopel...@rica.net> wrote:



gearhead wrote:
On Apr 30, 2:55 pm, Randy Day <randy....@shaw.cax> wrote:
Just use your micro as a digital input; no analog required.

6-9vdc in --10K-----+------ micro
|
/\ 5v zener diode
|
Gnd


The output is DC, depends on the batteries voltage. But it is usually
6.4v.
Well I tried the circuit with the zener diode. I get 5v at the output.
But as soon as I place the microcontroller input pin, that voltage
just sink to 1.4v and the controller do not read it. If I put the
input pin directly on the output of the 7805 regulator (5v) then it
reads it as 5v. I used a 150ohm resistor afterwards, that did not
work. why is that ?
 
On May 4, 4:55 pm, Randy Day <randy....@shaw.cax> wrote:
lerameur wrote:

On May 2, 12:08 pm, gearhead <nos...@billburg.com> wrote:
On May 1, 2:42 pm, John Popelish <jpopel...@rica.net> wrote:

gearhead wrote:
On Apr 30, 2:55 pm, Randy Day <randy....@shaw.cax> wrote:
Just use your micro as a digital input; no analog required.

6-9vdc in --10K-----+------ micro
|
/\ 5v zener diode
|
Gnd

The output is DC, depends on the batteries voltage. But it is usually
6.4v.
Well I tried the circuit with the zener diode. I get 5v at the output.
But as soon as I place the microcontroller input pin, that voltage
just sink to 1.4v and the controller do not read it. If I put the
input pin directly on the output of the 7805 regulator (5v) then it
reads it as 5v. I used a 150ohm resistor afterwards, that did not
work. why is that ?

As an experiment:
put the 10k resistor back in, and connect the
input end to the +5 supply for the micro.

Measure the voltage with and without the zener
in the circuit.

If the voltage stays at 1.4v, you've probably
got:

a) your input pin is actually programmed as an output pin
b) your input pin is actually programmed as something other
than a digital input (analog, clock in, etc).
c) a fried input to your micro.

A working digital input is said to be 'tied high'
with a 10k resistor; the voltage should be near +5.
If your voltage is 1.4 without the zener, the problem
is in the micro.

Can you hook a 10k to another input pin on the
device to compare?
crap, my pin was set to output...
thanks
 

Welcome to EDABoard.com

Sponsor

Back
Top