 |
Search Sci.Electronics.Basics |
|
 |
 |
|
|
|
 |
|
|
Sci.Electronics.Basics -> transistor base input
There are 21 messages in this thread.
You are currently looking at messages 1 to 20.
|
Author: lerameurDate: 14:21 30-04-08
|
|
Hi all
I have an old analog alarm system. I am hooking up the bell output to
a microcontroller.
Although the output voltage for the bell fluctuates around 6 to 9
volts. I need either a steady 0 or 5v for the input of the
controller.
I made a circuit with 2 2n222 transistor, acting as an inverting
gate. The problem is that the spec sheet of these and most transistor
have a Veb of 5 volt. my Ve is at ground therefor my Veb exceeds
this. any ideas on how to get pass this issue.
Thought about a voltage divider at the output of th bell , but I am
scared that if voltage drops a bit below 6v, the inverter will not
pick it up as positive voltage.
thanks
k
|
|
|
|
Author: John PopelishDate: 15:22 30-04-08
|
|
lerameur wrote:
> Hi all
>
> I have an old analog alarm system. I am hooking up the bell output to
> a microcontroller.
> Although the output voltage for the bell fluctuates around 6 to 9
> volts. I need either a steady 0 or 5v for the input of the
> controller.
> I made a circuit with 2 2n222 transistor, acting as an inverting
> gate. The problem is that the spec sheet of these and most transistor
> have a Veb of 5 volt. my Ve is at ground therefor my Veb exceeds
> this. any ideas on how to get pass this issue.
> Thought about a voltage divider at the output of th bell , but I am
> scared that if voltage drops a bit below 6v, the inverter will not
> pick it up as positive voltage.
> thanks
The Veb spec is a limit on how much reverse voltage that
junction can stand, not any normal operating voltage. If
the emitter is at zero volts, the transistor will switch on
when the base voltage is about 0.7 volts more positive than
ground, and the base-emitter junction becomes forward biased
enough for the base current to rise to about 1/20th of the
collector load current.
However, using a transistor as a switch will do nothing to
regulate the voltage of the collector load.
It would help us help you if we could see a schematic of
your circuit. Either you could post a link to your circuit,
draw one with text characters (and a fixed width font, (like
Courier) and post it here (this is made easy with a little
chunk of software:
http://www.tech-chat.de/ascii-circuits.html )
or post a normal graphic file representation on the
alt.binaries.schematics.electronic group, where attachments
are allowed.
--
Regards,
John Popelish
|
|
|
|
Author: lerameurDate: 16:00 30-04-08
|
|
> The Veb spec is a limit on how much reverse voltage that
> junction can stand, not any normal operating voltage. If
> the emitter is at zero volts, the transistor will switch on
> when the base voltage is about 0.7 volts more positive than
> ground, and the base-emitter junction becomes forward biased
> enough for the base current to rise to about 1/20th of the
> collector load current.
>
> However, using a transistor as a switch will do nothing to
> regulate the voltage of the collector load.
>
> It would help us help you if we could see a schematic of
> your circuit. Either you could post a link to your circuit,
> draw one with text characters (and a fixed width font, (like
> Courier) and post it here (this is made easy with a little
> chunk of software:http://www.tech-chat.de/ascii-circuits.html)
> or post a normal graphic file representation on the
> alt.binaries.schematics.electronic group, where attachments
> are allowed.
>
> --
> Regards,
>
> John Popelish
ok good thanks for the link. below is my circuit . I have a 7805 that
regulates the 5v. The ground is common to all. The source is anywhere
between 6 to 9 volts. The source as mentionned in the circuit is the
output of the analog alarm system going to the siren. I will hooking
up the 5v regulator most probably on the batteries (12v) actin g as
backup and being recharge by the analog circuit.
Hope that helps you help me.
VCC 5V
+
VCC 5v |
+ |
| .-.
| | |
.-. | |
| | '-'
| | | ___
'-' -------|___|-- to
microcontroller
| |
| ___ |/
|----|___|--|
| |>
___ |/ |
Source--|___|- --------| |
|> |
|
| GND
|
GND
|
|
|
|
Author: John PopelishDate: 16:09 30-04-08
|
|
lerameur wrote:
> ok good thanks for the link. below is my circuit . I have a 7805 that
> regulates the 5v. The ground is common to all. The source is anywhere
> between 6 to 9 volts. The source as mentionned in the circuit is the
> output of the analog alarm system going to the siren. I will hooking
> up the 5v regulator most probably on the batteries (12v) actin g as
> backup and being recharge by the analog circuit.
> Hope that helps you help me.
Is the voltage swing labeled as "source, below also limited
to swing between +5 volts and ground? I guess I don't
understand why you need this circuit, at all. What prevents
you from connecting the "source" directly to the microprocessor?
>
> VCC 5V
> +
> VCC 5v |
> + |
> | .-.
> | | |
> .-. | |
> | | '-'
> | | | ___
> '-' -------|___|-- to
> microcontroller
> | |
> | ___ |/
> |----|___|--|
> | |>
> ___ |/ |
> Source--|___|- --------| |
> |> |
> |
> | GND
> |
> GND
>
Once I understand exactly what the purpose of this circuit
is, I might have more suggestions.
--
Regards,
John Popelish
|
|
|
|
Author: lerameurDate: 16:28 30-04-08
|
|
On Apr 30, 4:09 pm, John Popelish <jpopel...@rica.net> wrote:
> lerameur wrote:
> > ok good thanks for the link. below is my circuit . I have a 7805 that
> > regulates the 5v. The ground is common to all. The source is anywhere
> > between 6 to 9 volts. The source as mentionned in the circuit is the
> > output of the analog alarm system going to the siren. I will hooking
> > up the 5v regulator most probably on the batteries (12v) actin g as
> > backup and being recharge by the analog circuit.
> > Hope that helps you help me.
>
> Is the voltage swing labeled as "source, below also limited
> to swing between +5 volts and ground? I guess I don't
> understand why you need this circuit, at all. What prevents
> you from connecting the "source" directly to the microprocessor?
>
>
>
>
>
> > VCC 5V
> > +
> > VCC 5v |
> > + |
> > | .-.
> > | | |
> > .-. | |
> > | | '-'
> > | | | ___
> > '-' -------|___|-- to
> > microcontroller
> > | |
> > | ___ |/
> > |----|___|--|
> > | |>
> > ___ |/ |
> > Source--|___|- --------| |
> > |> |
> > |
> > | GND
> > |
> > GND
>
> Once I understand exactly what the purpose of this circuit
> is, I might have more suggestions.
>
> --
> Regards,
>
> John Popelish
Well section 13.9 of the pic16F88 datasheet is copied below:
From what I can read, if I supply 5v to the chip, my input to the
microcontroller has to be between 4.4v and 5.6v.
So the circuit is there to have a steady output of 5v into the
microcontroller for any voltage between 6 to 9 v off alarm system
(source)
A simplified circuit for an analog input is shown in
Figure 13-4. Since the analog pins are connected to a
digital output, they have reverse biased diodes to VDD
and VSS. The analog input, therefore, must be between
VSS and VDD. If the input voltage deviates from this
range by more than 0.6V in either direction, one of the
diodes is forward biased and a latch-up condition may
occur. A maximum source impedance of 10 k? is rec-
ommended for the analog sources. Any external com-
ponent connected to an analog input pin, such as a
capacitor or a Zener diode, should have very little
leakage current.
|
|
|
|
Author: John PopelishDate: 16:51 30-04-08
|
|
lerameur wrote:
> On Apr 30, 4:09 pm, John Popelish <jpopel...@rica.net> wrote:
>> Is the voltage swing labeled as "source, below also limited
>> to swing between +5 volts and ground? I guess I don't
>> understand why you need this circuit, at all. What prevents
>> you from connecting the "source" directly to the microprocessor?
(snip)
> Well section 13.9 of the pic16F88 datasheet is copied below:
> From what I can read, if I supply 5v to the chip, my input to the
> microcontroller has to be between 4.4v and 5.6v.
> So the circuit is there to have a steady output of 5v into the
> microcontroller for any voltage between 6 to 9 v off alarm system
> (source)
I assume this is a PIC input configured as a digital input,
based on your two transistor interface circuit.
> A simplified circuit for an analog input is shown in
> Figure 13-4. Since the analog pins are connected to a
> digital output, they have reverse biased diodes to VDD
> and VSS.
Why would you use the input configured as an analog input,
instead of digital? Your circuit will output only two
states-- high and low.
> The analog input, therefore, must be between
> VSS and VDD.
Yes.
> If the input voltage deviates from this
> range by more than 0.6V in either direction, one of the
> diodes is forward biased and a latch-up condition may
> occur.
Yes.
> A maximum source impedance of 10 k? is rec-
> ommended for the analog sources.
Only if you need the full analog to digital converter
resolution over the full temperature range. What, exactly
do you want the microprocessor to know about the input signal?
> Any external com-
> ponent connected to an analog input pin, such as a
> capacitor or a Zener diode, should have very little
> leakage current.
Of else, what?
--
Regards,
John Popelish
|
|
|
|
Author: John PopelishDate: 16:54 30-04-08
|
|
|
|
|
|
Author: lerameurDate: 17:05 30-04-08
|
|
> I assume this is a PIC input configured as a digital input,
> based on your two transistor interface circuit.
>
> > A simplified circuit for an analog input is shown in
> > Figure 13-4. Since the analog pins are connected to a
> > digital output, they have reverse biased diodes to VDD
> > and VSS.
>
> Why would you use the input configured as an analog input,
> instead of digital? Your circuit will output only two
> states-- high and low.
Because the input is from the analog alarm system, which varies
between 6 to 9 volts. I cannot use that as an input.
> > A maximum source impedance of 10 k? is rec-
> > ommended for the analog sources.
>
> Only if you need the full analog to digital converter
> resolution over the full temperature range. What, exactly
> do you want the microprocessor to know about the input signal?
Just high or low, alarm on or off...
k
|
|
|
|
Author: John PopelishDate: 17:29 30-04-08
|
|
lerameur wrote:
>> I assume this is a PIC input configured as a digital input,
>> based on your two transistor interface circuit.
>>
>>> A simplified circuit for an analog input is shown in
>>> Figure 13-4. Since the analog pins are connected to a
>>> digital output, they have reverse biased diodes to VDD
>>> and VSS.
>> Why would you use the input configured as an analog input,
>> instead of digital? Your circuit will output only two
>> states-- high and low.
> Because the input is from the analog alarm system, which varies
> between 6 to 9 volts. I cannot use that as an input.
>
>
>>> A maximum source impedance of 10 k? is rec-
>>> ommended for the analog sources.
>> Only if you need the full analog to digital converter
>> resolution over the full temperature range. What, exactly
>> do you want the microprocessor to know about the input signal?
> Just high or low, alarm on or off...
So you need to distinguish between an output of 9 volts and
an output of 6 volts, with some decision voltage between those?
I suggest you use a two resistor divider to lower the input
range to about 1/3rd (3 to 2 volts) and do a one bit analog
to digital conversion of this range with one of the inputs
configured as a comparator. The comparators include an
internal reference voltage derived from the PIC supply
voltage, or can use a second input as the reference voltage
input (the decision voltage) so you could use an external
pot to set the detection point.
See section 13.0 for comparator setup and Tables 18.1 and
18.2 for the comparator DC specs. Note that the comparator
input voltage range is 0 to Vcc-1.5 volts. Note, also that
only the decision voltage must be within this range, since
the measured input will still give the correct result if it
goes more positive than this limit. So you may get by with
a 1/2 input voltage division (4.5 to 3 volts), or some
ration between 1/3rd and 1/2, as long as the decision
voltage is below 3.5 volts.
If the microprocessor might not be powered when the input is
active, you might want to add a Schottky diode from the
comparator input to Vcc to limit the input voltage to about
Vcc+0.3 volts.
--
Regards,
John Popelish
|
|
|
|
Author: lerameurDate: 17:33 30-04-08
|
|
On Apr 30, 5:29 pm, John Popelish <jpopel...@rica.net> wrote:
> lerameur wrote:
> >> I assume this is a PIC input configured as a digital input,
> >> based on your two transistor interface circuit.
>
> >>> A simplified circuit for an analog input is shown in
> >>> Figure 13-4. Since the analog pins are connected to a
> >>> digital output, they have reverse biased diodes to VDD
> >>> and VSS.
> >> Why would you use the input configured as an analog input,
> >> instead of digital? Your circuit will output only two
> >> states-- high and low.
> > Because the input is from the analog alarm system, which varies
> > between 6 to 9 volts. I cannot use that as an input.
>
> >>> A maximum source impedance of 10 k? is rec-
> >>> ommended for the analog sources.
> >> Only if you need the full analog to digital converter
> >> resolution over the full temperature range. What, exactly
> >> do you want the microprocessor to know about the input signal?
> > Just high or low, alarm on or off...
>
> So you need to distinguish between an output of 9 volts and
> an output of 6 volts, with some decision voltage between those?
no
just as 5 volt.
When the voltage from my source is between 6v and 9 volts, my chip
reads high (or 5v)
otherwise the chip reads low or zero.
like I said, the source is the voltage going to the siren, so it is
almost always ZERO.
When siren goes off, the voltage jumps anywhere between 6 to 9 volts.
Then the chip should read high
ken
|
|
|
|
Author: Randy DayDate: 17:55 30-04-08
|
|
lerameur wrote:
[snip]
> just as 5 volt.
>
> When the voltage from my source is between 6v and 9 volts, my chip
> reads high (or 5v)
> otherwise the chip reads low or zero.
> like I said, the source is the voltage going to the siren, so it is
> almost always ZERO.
> When siren goes off, the voltage jumps anywhere between 6 to 9 volts.
> Then the chip should read high
Just use your micro as a digital input; no analog required.
6-9vdc in --10K-----+------ micro
|
/\ 5v zener diode
|
Gnd
HTH
|
|
|
|
Author: John PopelishDate: 18:23 30-04-08
|
|
lerameur wrote:
> On Apr 30, 5:29 pm, John Popelish <jpopel...@rica.net> wrote:
>> lerameur wrote:
>>>> I assume this is a PIC input configured as a digital input,
>>>> based on your two transistor interface circuit.
>>>>> A simplified circuit for an analog input is shown in
>>>>> Figure 13-4. Since the analog pins are connected to a
>>>>> digital output, they have reverse biased diodes to VDD
>>>>> and VSS.
>>>> Why would you use the input configured as an analog input,
>>>> instead of digital? Your circuit will output only two
>>>> states-- high and low.
>>> Because the input is from the analog alarm system, which varies
>>> between 6 to 9 volts. I cannot use that as an input.
>>>>> A maximum source impedance of 10 k? is rec-
>>>>> ommended for the analog sources.
>>>> Only if you need the full analog to digital converter
>>>> resolution over the full temperature range. What, exactly
>>>> do you want the microprocessor to know about the input signal?
>>> Just high or low, alarm on or off...
>> So you need to distinguish between an output of 9 volts and
>> an output of 6 volts, with some decision voltage between those?
> no
>
> just as 5 volt.
>
> When the voltage from my source is between 6v and 9 volts, my chip
> reads high (or 5v)
> otherwise the chip reads low or zero.
> like I said, the source is the voltage going to the siren, so it is
> almost always ZERO.
> When siren goes off, the voltage jumps anywhere between 6 to 9 volts.
> Then the chip should read high
Man, it took you enough posts to make that simple
explanation of what you want. All you need is a series
resistor to limit the current from the source and a means to
clamp the input voltage to no more than Vcc +0.3 volts. You
could do that with a 10k to 100k series resistor and a 5.1
volt zener or a Schottky diode to Vcc. Set the PIC pin as a
digital input. If you want the low state to be more noise
immune, use a 2:1 voltage divider for the input, since the
decision voltage is between 0.8 volts and 2.0 volts (see
18.4, DC characteristics.)
--
Regards,
John Popelish
|
|
|
|
Author: lerameurDate: 18:46 30-04-08
|
|
On Apr 30, 6:23 pm, John Popelish <jpopel...@rica.net> wrote:
> lerameur wrote:
> > On Apr 30, 5:29 pm, John Popelish <jpopel...@rica.net> wrote:
> >> lerameur wrote:
> >>>> I assume this is a PIC input configured as a digital input,
> >>>> based on your two transistor interface circuit.
> >>>>> A simplified circuit for an analog input is shown in
> >>>>> Figure 13-4. Since the analog pins are connected to a
> >>>>> digital output, they have reverse biased diodes to VDD
> >>>>> and VSS.
> >>>> Why would you use the input configured as an analog input,
> >>>> instead of digital? Your circuit will output only two
> >>>> states-- high and low.
> >>> Because the input is from the analog alarm system, which varies
> >>> between 6 to 9 volts. I cannot use that as an input.
> >>>>> A maximum source impedance of 10 k? is rec-
> >>>>> ommended for the analog sources.
> >>>> Only if you need the full analog to digital converter
> >>>> resolution over the full temperature range. What, exactly
> >>>> do you want the microprocessor to know about the input signal?
> >>> Just high or low, alarm on or off...
> >> So you need to distinguish between an output of 9 volts and
> >> an output of 6 volts, with some decision voltage between those?
> > no
>
> > just as 5 volt.
>
> > When the voltage from my source is between 6v and 9 volts, my chip
> > reads high (or 5v)
> > otherwise the chip reads low or zero.
> > like I said, the source is the voltage going to the siren, so it is
> > almost always ZERO.
> > When siren goes off, the voltage jumps anywhere between 6 to 9 volts.
> > Then the chip should read high
>
> Man, it took you enough posts to make that simple
> explanation of what you want. All you need is a series
> resistor to limit the current from the source and a means to
> clamp the input voltage to no more than Vcc +0.3 volts. You
> could do that with a 10k to 100k series resistor and a 5.1
> volt zener or a Schottky diode to Vcc. Set the PIC pin as a
> digital input. If you want the low state to be more noise
> immune, use a 2:1 voltage divider for the input, since the
> decision voltage is between 0.8 volts and 2.0 volts (see
> 18.4, DC characteristics.)
>
I think we have it now, thats sounds pretty good. Sorry for the bad
explanation, I thought I had it good enough.
k
|
|
|
|
Author: John PopelishDate: 19:27 30-04-08
|
|
lerameur wrote:
> I think we have it now, thats sounds pretty good. Sorry for the bad
> explanation, I thought I had it good enough.
If it makes sense to you, then that's fine. If not, we'll
hit it some more.
As to "good enough", I probably have a lot more
possibilities floating around in my imagination than you
have, so you don't understand what I have to eliminate to
get to your case.
--
Regards,
John Popelish
|
|
|
|
Author: lerameurDate: 19:28 30-04-08
|
|
On Apr 30, 6:23 pm, John Popelish <jpopel...@rica.net> wrote:
> lerameur wrote:
> > On Apr 30, 5:29 pm, John Popelish <jpopel...@rica.net> wrote:
> >> lerameur wrote:
> >>>> I assume this is a PIC input configured as a digital input,
> >>>> based on your two transistor interface circuit.
> >>>>> A simplified circuit for an analog input is shown in
> >>>>> Figure 13-4. Since the analog pins are connected to a
> >>>>> digital output, they have reverse biased diodes to VDD
> >>>>> and VSS.
> >>>> Why would you use the input configured as an analog input,
> >>>> instead of digital? Your circuit will output only two
> >>>> states-- high and low.
> >>> Because the input is from the analog alarm system, which varies
> >>> between 6 to 9 volts. I cannot use that as an input.
> >>>>> A maximum source impedance of 10 k? is rec-
> >>>>> ommended for the analog sources.
> >>>> Only if you need the full analog to digital converter
> >>>> resolution over the full temperature range. What, exactly
> >>>> do you want the microprocessor to know about the input signal?
> >>> Just high or low, alarm on or off...
> >> So you need to distinguish between an output of 9 volts and
> >> an output of 6 volts, with some decision voltage between those?
> > no
>
> > just as 5 volt.
>
> > When the voltage from my source is between 6v and 9 volts, my chip
> > reads high (or 5v)
> > otherwise the chip reads low or zero.
> > like I said, the source is the voltage going to the siren, so it is
> > almost always ZERO.
> > When siren goes off, the voltage jumps anywhere between 6 to 9 volts.
> > Then the chip should read high
>
> Man, it took you enough posts to make that simple
> explanation of what you want. All you need is a series
> resistor to limit the current from the source and a means to
> clamp the input voltage to no more than Vcc +0.3 volts. You
> could do that with a 10k to 100k series resistor and a 5.1
> volt zener or a Schottky diode to Vcc. Set the PIC pin as a
> digital input. If you want the low state to be more noise
> immune, use a 2:1 voltage divider for the input, since the
> decision voltage is between 0.8 volts and 2.0 volts (see
> 18.4, DC characteristics.)
>
I think we have it now, thats sounds pretty good. Sorry for the bad
explanation, I thought I had it good enough.
k
|
|
|
|
Author: gearheadDate: 15:27 01-05-08
|
|
On Apr 30, 2:55=A0pm, Randy Day <randy....@shaw.cax> wrote:
> lerameur wrote:
>
> [snip]
>
> > just as 5 volt.
>
> > When the =A0voltage from my source is between 6v and 9 volts, =A0my chip=
> > reads high (or 5v)
> > otherwise the chip reads low or zero.
> > like I said, the source is the voltage going to the siren, so it is
> > almost always ZERO.
> > When siren goes off, the voltage jumps anywhere between 6 to 9 volts.
> > Then the chip should read high
>
> Just use your micro as a digital input; no analog required.
>
> 6-9vdc in --10K-----+------ micro
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/\ 5v zener diode
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Gnd
>
> HTH
You should rethink the 10k resistor.
You chose to make your input signal the max specified impedance for
the chip -- without even allowing for the additional impedance of the
source signal, or just plain old wiggle room; which you can easily
afford. You should also consider zener current. A smaller resistor
is in order, maybe by an order of magnitude.
|
|
|
|
Author: John PopelishDate: 17:42 01-05-08
|
|
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
>>
>> HTH
>
> You should rethink the 10k resistor.
> You chose to make your input signal the max specified impedance for
> the chip -- without even allowing for the additional impedance of the
> source signal, or just plain old wiggle room; which you can easily
> afford. You should also consider zener current. A smaller resistor
> is in order, maybe by an order of magnitude.
Why?
The lower the resistor, the more the source will be loaded.
--
Regards,
John Popelish
|
|
|
|
Author: gearheadDate: 12:08 02-05-08
|
|
On May 1, 2:42=A0pm, 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
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/\ 5v zener diode
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Gnd
>
> >> HTH
>
> > You should rethink the 10k resistor.
> > You chose to make your input signal the max specified impedance for
> > the chip -- without even allowing for the additional impedance of the
> > source signal, or just plain old wiggle room; which you can easily
> > afford. =A0You should also consider zener current. =A0A smaller resistor=
> > is in order, maybe by an order of magnitude.
>
> Why?
> The lower the resistor, the more the source will be loaded.
>
> --
> Regards,
>
> John Popelish- Hide quoted text -
>
> - Show quoted text -
Well, it's a bell output from an alarm. I guess I was operating on
the assumption that it has the power to drive a physical bell, so it
will hardly be able to tell the difference between 200uA or 2mA;
either way you'd draw magnitudes less than the alarm's potential
output, so it hardly matters.
But if he feeds a maximum specified impedance to the micro input, he
risks having the circuit not work.
But the OP knows more about his alarm than I do. Let him work it out.
|
|
|
|
Author: lerameurDate: 16:00 04-05-08
|
|
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 ?
|
|
|
|
Author: Randy DayDate: 16:55 04-05-08
|
|
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?
|
|
|
|
| |
|
|
|
Contact | Electronic Portal
|
|
|