Maker Pro
Maker Pro

Circuit & Component Check

D

Dominic-Luc Webb

Jan 1, 1970
0
Yes, the emitter and collector are the wrong way round: the collector should
go to the piezo, and the emitter should go to ground - as you said.

Also, the base resistor (R5) is unnecessarily small. If we take an
excessively high estimate of 200mA for piezo current, divide by a low
estimate of 50 for gain (beta), we still need only 4ma of base current to
saturate the transistor. The base resistor should be (5-0.7)/4 = 1k.


Andrew and others....

I am thrilled over here... finally getting to the point where I can
question someone else's circuit. I too was suspicous of the base
resistance, having checked the spec sheet for that transistor, very
common small signal type.

A pattern is emerging.... it seems like maybe some of the resistances in
this circuit are off by very close to one order of magnitude while the
collector and emitter are backwards. Dyslexia?

Dominic
 
D

Danny T

Jan 1, 1970
0
Robert said:
It's under 'special features of the CPU', where it talks about MCLR

For the PIC16F627, it reads
The on-chip POR circuit holds the chip in reset until
VDD has reached a high enough level for proper operation.
To take advantage of the POR, just tie the MCLR
pin through a resistor to VDD. This will eliminate external
RC components usually needed to create Power-on
Reset. A maximum rise time for VDD is required. See
Electrical Specifications for details.

The only references in electrical specs I can see are:
Voltage on MCLR and RA4 with respect to VSS -0.3 to +14V
and

Voltage spikes below VSS at the MCLR pin, inducing currents greater than 80 mA, may cause latch-up.
Thus, a series resistor of 50-100W should be used when applying a "low" level to the MCLR pin rather
than pulling this pin directly to VSS.

But I'm pulling MCLR *up*, to stop it resetting, aren't I?! :-\

As far as your circuit goes, if you use these pullups, you don't have to
connect the port to anything, it will automatically read as high when
you look at it, and won't consume inordinate amounts of power.

You can also use this to your advantage with pushbuttons, for example.
Use a normally open pushbutton, set the port to use the internal weak
pullups, and connect the other side to ground. Then, if you push the
button, the port will read 0, otherwise, it'll read high.

If you aren't using the port, however, you can just set it to be an
output using the TRIS register, and then safely leave it unconnected.

Cool, that'll save me a few components then!
So if it's configured as an input, and pull-ups are enabled, I don't
need any resistors, but just leave it unconnected, or connected directly
to ground for a high/low respectively?
 
D

Danny T

Jan 1, 1970
0
Andrew said:
Yes, the emitter and collector are the wrong way round: the collector should
go to the piezo, and the emitter should go to ground - as you said.

Also, the base resistor (R5) is unnecessarily small. If we take an
excessively high estimate of 200mA for piezo current, divide by a low
estimate of 50 for gain (beta), we still need only 4ma of base current to
saturate the transistor. The base resistor should be (5-0.7)/4 = 1k.

LOL!
And they published this guys book! ;)

Maybe you can clear up a few terms I keep hearing, but keep ignoring cos
I don't full understand!

Base / Collector / Emitter - I don't completely understand.. Is the
collector always +ve and the emitter grounded/-ve?

Sink / Drain - These seem to be used in describing which way things are
connected... Used in the datasheets quite a bit too, such as "input/open
drain output"
 
D

Danny T

Jan 1, 1970
0
Dominic-Luc Webb said:
Maybe you mean RB0 and RB1.... if the supply is 5 volts and these
are typical 5 mm 2.0 volt and 0.03 amp LEDs, then a typo would
make more sense. This would work out to exactly 100 Ohm, just
obeying Ohm's law.

I did mean RB0 & RB1, correct.

100 Ohm sounds more like it, I've got a few different LEDs here, and the
resistors have worked out as 120 and 160. *However*, I did connect a 1K
today, since it's the lowest I have till my stuff arrives, and the LED
is more than bright enough. Maybe he can get 1K resistors cheaper than
100 Ohms ;-)

I'll wait and see if anyone suggests an explanation for that
transistor. It would more more sense to me if the collector
and emitter were in reverse order.

LOL! I can't believe so many of you noticed that so quickly! Guess I'll
double check before copying any examples from that book ;o)
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
LOL!
And they published this guys book! ;)

Maybe you can clear up a few terms I keep hearing, but keep ignoring
cos I don't full understand!

Base / Collector / Emitter - I don't completely understand.. Is the
collector always +ve and the emitter grounded/-ve?

The base, collector and emitter (B, C, E) are the three terminals of a
bipolar transistor. The base and collector are positive with respect to the
emitter of an NPN transistor. The reverse is true of a PNP transistor.

The emitter of an NPN transistor is not always connected to ground.
Sink / Drain - These seem to be used in describing which way things
are connected... Used in the datasheets quite a bit too, such as
"input/open drain output"

Gate, drain and source are the terminals of a field effect transistor. They
are in, a limited sense, equivalent to base, collector and emitter.

A "current sink" is something into which current flows; a "current source"
is something out of which current flows. An output "sinks" current when it
pulls low; and "sources" current when it pulls high.

An "open drain" output can only pull low. The pull-up transistor is
disabled in this mode. It goes tri-state (i.e. floating, high-Z, open
circuit) for logic 1. The external circuitry determines the pin's
potential: it must not be allowed to float.

The bipolar equivalent of "open drain" is an "open collector" output.

Well, I've answered your specific questions. I could go on, but this is a
MASSIVE subject. I recommend the book "The Art of Electronics" by Horowitz
and Hill if you fancy some good arm chair / bed time reading on the subject.
It's informal, readable and not at all stuffy or dry.
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
For the PIC16F627, it reads


The only references in electrical specs I can see are:


But I'm pulling MCLR *up*, to stop it resetting, aren't I?! :-\



Cool, that'll save me a few components then!
So if it's configured as an input, and pull-ups are enabled, I don't
need any resistors, but just leave it unconnected, or connected
directly to ground for a high/low respectively?

Correct. You don't need external pull-up resistors on your inputs if you
enable the internal pull-up facility.
 
D

Danny T

Jan 1, 1970
0
Andrew said:
Well, I've answered your specific questions. I could go on, but this is a
MASSIVE subject. I recommend the book "The Art of Electronics" by Horowitz
and Hill if you fancy some good arm chair / bed time reading on the subject.
It's informal, readable and not at all stuffy or dry.

At £50, I think I'll see if the Library have it first ;-)

Ta!
 
D

Dominic-Luc Webb

Jan 1, 1970
0
I did mean RB0 & RB1, correct.

100 Ohm sounds more like it, I've got a few different LEDs here, and the
resistors have worked out as 120 and 160.


In this case, they are both 100 Ohm. There is fundamentally no difference
between the two LEDs that would justify two different resistor values
unless you want different brightnesses.

LOL! I can't believe so many of you noticed that so quickly! Guess I'll
double check before copying any examples from that book ;o)


I actually thought it was excellent that you showed this. I started in
electronics from a design in a book that did not work all that well,
although, the components were probably about the right values and the
transistor orienation was correct. This helps a lot because mainly
people assume that if you are not familiar with electronics and you
are following a schematic from a book, then if it fails, it must be
your fault. You now learned what I have: Examine every component. Ask
what it is doing there and why the values for each component are what
they are. I am more and more finding published schematics that I could
make improvements on.

Dominic
 
D

Dominic-Luc Webb

Jan 1, 1970
0
The base, collector and emitter (B, C, E) are the three terminals of a
bipolar transistor. The base and collector are positive with respect to the
emitter of an NPN transistor. The reverse is true of a PNP transistor.

The emitter of an NPN transistor is not always connected to ground.


Is the emitter ever connected and actually running at a voltage that is
higher than the collector? Is this described in the Horowitz book?

Dominic
 
A

Andrew Holme

Jan 1, 1970
0
Dominic-Luc Webb said:
Is the emitter ever connected and actually running at a voltage that
is higher than the collector? Is this described in the Horowitz book?

Dominic

No, not the emitter of an NPN transistor: the minimum collector-emitter
voltage is about 0.2V when the transistor is saturated.

The H+H book covers this in detail.
 
R

Robert Monsen

Jan 1, 1970
0
Danny said:
At £50, I think I'll see if the Library have it first ;-)

Ta!

Try bookpool. They had it for $50 US. Who knows now, though, with the
dollar having 'issues'?

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.
 
D

Danny T

Jan 1, 1970
0
Robert said:
Try bookpool. They had it for $50 US. Who knows now, though, with the
dollar having 'issues'?

$53... with $25 shipping to the UK... Even with the exchange rate in my
favour, that's gotta be over £40!
 
D

Dominic-Luc Webb

Jan 1, 1970
0
At £50, I think I'll see if the Library have it first ;-)

Ta!

Danny,

I just bought this book at Ebay for 27 brittish pounds with shipping
within USA... There were a number of copies of this book being sold
there. Be cautioned there is another, related book, maybe a lab manual,
etc, that sells for about half the price. If you go the auction route,
pay close attention to what people are wanting for shipping and handling,
and stick with people with a good record from previous deals.

Here is the one I got: Ebay #4515997432

There is another auction right now, even lower price. Just type in
the name of the book and you should find several examples, such
as: Item 4516689114

Dominic
 
D

Danny T

Jan 1, 1970
0
Dominic-Luc Webb said:
Danny,

I just bought this book at Ebay for 27 brittish pounds with shipping
within USA... There were a number of copies of this book being sold
there. Be cautioned there is another, related book, maybe a lab manual,
etc, that sells for about half the price. If you go the auction route,
pay close attention to what people are wanting for shipping and handling,
and stick with people with a good record from previous deals.

Yep, the Student Manual - I noticed that right away :)

Here is the one I got: Ebay #4515997432

There is another auction right now, even lower price. Just type in
the name of the book and you should find several examples, such
as: Item 4516689114

I'll take a look, though I don't usually buy things more than about £20
from ebay - there are too many scammers (ebay don't make a big enough
deal of feedback - some people with hundreds of "good feedback"s are
from small £1 auctions with their mates) and ebay seem to be useless at
sorting out mishaps! :-(
 
D

Danny T

Jan 1, 1970
0
Thanks everyone - picked my bits up today (postman had claimed he
couldn't deliver them and left them at the sorting office!), and put it
together. All works brilliantly! :)

I tried yesterday with some odd components lying around, but only had an
NPN transistor, no MOSFET, which resulted in my motor going fast and
slow, instead of fast and off!!

Now I just need wheels and a chassis! ;)

Ta,
 
D

Dominic-Luc Webb

Jan 1, 1970
0
I tried yesterday with some odd components lying around, but only had an
NPN transistor, no MOSFET, which resulted in my motor going fast and
slow, instead of fast and off!!


Danny, it will be great to see how this progresses. I am interested in
the reason why the effect on speed is occurring. It sounds like a
problem I am encountering with the 2N3055 NPN power transistor. I do
not find conditions under which it actually shuts off and I do not
understand why. I do know the basic calculation strategies using beta
to determine Ib from a pre-determined Ic, etc. It is maybe noteworthy
that some of these inductor circuits (speakers, transformers, motors,
etc) have variable current draw, so this must mean that Ic will vary.
If one clamps the Vbe and Ib with a fixed voltage and resistance,
respectively, I presume that beta changes. I am quite curious how each
of these parameters effects the others. At least in the case of the
2N3055, it has both low frequency 0.8 MHz, and I suspect slow rise and
fall times and also relatively low beta (between 20 and 70). I suspect
this obligates a very narrow dynamic range. Compare, for instance to a
BD139 with a beta around 160 and frequency of 250 Mhz. Very different.
I suspect the 2N3055 is leaky, but I lack good proof. It came as a
surprise that I could run such inductor circuits a lot better with much
lower power NPNs than the 2N3055. One of the most reliable was a BF658,
which is small signal 1 Watt, Ic 0.12 Amp.

It is also frustrating that the specifications often do not tell what
kind of NPN transistor. I have seen the 2N3055 called a Darlington,
and I have seen internal schematics that clearly show that it is not.
I suspect the latter, and nonetheless, this transistor has not been
real popular with me, despite its massive power rating. I think it is
the low beta (and leakage?) that has made working with it a challenge.


Dominic
 
D

Danny T

Jan 1, 1970
0
Dominic-Luc Webb said:
Danny, it will be great to see how this progresses. I am interested in
the reason why the effect on speed is occurring. It sounds like a
problem I am encountering with the 2N3055 NPN power transistor. I do
not find conditions under which it actually shuts off and I do not
understand why.

I still don't fully understand the differences between all these
different types of transistors/FETs... Since all works fine with the
MOSFET (ZVN4206A), I assumed the transistor was just "amplifying" or
something. A low from my chip seems to vary between 0V and -0.04 or so,
so maybe this is by design - dunno! The resistor I was using was an BC108A.
 
D

Danny T

Jan 1, 1970
0
Dominic-Luc Webb said:
Danny, it will be great to see how this progresses. I am interested in
the reason why the effect on speed is occurring. It sounds like a
problem I am encountering with the 2N3055 NPN power transistor. I do
not find conditions under which it actually shuts off and I do not
understand why.

I still don't fully understand the differences between all these
different types of transistors/FETs... Since all works fine with the
MOSFET (ZVN4206A), I assumed the transistor was just "amplifying" or
something. A low from my chip seems to vary between 0V and -0.04 or so,
so maybe this is by design - dunno! The resistor I was using was an BC108A.
 
J

John Popelish

Jan 1, 1970
0
Danny said:
I still don't fully understand the differences between all these
different types of transistors/FETs... Since all works fine with the
MOSFET (ZVN4206A), I assumed the transistor was just "amplifying" or
something. A low from my chip seems to vary between 0V and -0.04 or so,
so maybe this is by design - dunno! The resistor I was using was an BC108A.

Study the data sheets and come back with anything you see that doesn't
make sense to you.
 
Top