Maker Pro
Maker Pro

Driving a PNP Darlington transistor from a PIC16F877A

S

scouselad

Jan 1, 1970
0
Hi,

I'm designing an electronically-controlled light dimmer circuit based
on one I found at: http://www.edn.com/article/CA46649.html
I'm replacing the SG3524 PWM chip with a PIC16F877A and I intend to
take a digital input from the user and (scale it, then) compare it
with the 0-5V from the op-amp (digitised using the PIC's ADC). As you
can see from the diagram, the PWM signal drives a PNP Darlington
transistor*. However, the SG3524 can provide 100mA of current, whereas
the PWM pin on the PIC can only provide 25mA. (Note that this current
is not only injected into the base; it also feeds through to R1.) So,
do I need some sort of driver between the PIC and the transistor? If
so, what sort of circuit would I need?

*Incidentally, the model used by EDN is no longer available so I
intend to replace it with a BD678 - can anyone advise me if this is a
suitable replacement?
 
A

Anthony Fremont

Jan 1, 1970
0
scouselad said:
Hi,

I'm designing an electronically-controlled light dimmer circuit based
on one I found at: http://www.edn.com/article/CA46649.html
I'm replacing the SG3524 PWM chip with a PIC16F877A and I intend to
take a digital input from the user and (scale it, then) compare it
with the 0-5V from the op-amp (digitised using the PIC's ADC). As you
can see from the diagram, the PWM signal drives a PNP Darlington
transistor*. However, the SG3524 can provide 100mA of current, whereas
the PWM pin on the PIC can only provide 25mA. (Note that this current
is not only injected into the base; it also feeds through to R1.) So,
do I need some sort of driver between the PIC and the transistor? If
so, what sort of circuit would I need?

The part is only sinking a couple of mA, so the PIC should have no problem.
What is a problem is the 17V that the PIC will see on the pin. Some people
will think this is OK; I am of the camp that thinks otherwise. I suggest
using a 2n3904 (or something similar) to pull the base low on the
darlington. Just use a 10K resistor from the PIC output pin to the 3904's
base. Connect the emitter of the 3904 to ground and the collector to where
pins 12 and 13 of the SG3524 connected.
 
S

scouselad

Jan 1, 1970
0
The part is only sinking a couple of mA, so the PIC should have no problem.
What is a problem is the 17V that the PIC will see on the pin. Some people
will think this is OK; I am of the camp that thinks otherwise. I suggest
using a 2n3904 (or something similar) to pull the base low on the
darlington. Just use a 10K resistor from the PIC output pin to the 3904's
base. Connect the emitter of the 3904 to ground and the collector to where
pins 12 and 13 of the SG3524 connected.
Anthony, thanks for your advice.
Are you able to answer my additional question, below?

Thanks again,
Allan Lewis.
 
M

Mike

Jan 1, 1970
0
Hi,

I'm designing an electronically-controlled light dimmer circuit based
on one I found at: http://www.edn.com/article/CA46649.html
I'm replacing the SG3524 PWM chip with a PIC16F877A and I intend to
take a digital input from the user and (scale it, then) compare it
with the 0-5V from the op-amp (digitised using the PIC's ADC). As you
can see from the diagram, the PWM signal drives a PNP Darlington
transistor*. However, the SG3524 can provide 100mA of current, whereas
the PWM pin on the PIC can only provide 25mA. (Note that this current
is not only injected into the base; it also feeds through to R1.) So,
do I need some sort of driver between the PIC and the transistor? If
so, what sort of circuit would I need?

*Incidentally, the model used by EDN is no longer available so I
intend to replace it with a BD678 - can anyone advise me if this is a
suitable replacement?

I would hesitate to say the BD678 is suitable. The data sheet I saw gives
almost no info on it's switching speed. I'd look around for a darlington
designed for switching applications, or maybe a power mosfet like an IRF9530.
As has been pointed out already, You'll need a level shifter anyway.

Mike


"In view of such harmony in the cosmos which I,
with my limited human mind, am able to recognize,
there are yet people who say there is no God.
But what really makes me angry is that they quote
me for the support of such views."
Albert Einstein (theoretical Physicist)
 
I

Ian Malcolm

Jan 1, 1970
0
scouselad said:
Hi,

I'm designing an electronically-controlled light dimmer circuit based
on one I found at: http://www.edn.com/article/CA46649.html
I'm replacing the SG3524 PWM chip with a PIC16F877A and I intend to
take a digital input from the user and (scale it, then) compare it
with the 0-5V from the op-amp (digitised using the PIC's ADC). As you
can see from the diagram, the PWM signal drives a PNP Darlington
transistor*. However, the SG3524 can provide 100mA of current, whereas
the PWM pin on the PIC can only provide 25mA. (Note that this current
is not only injected into the base; it also feeds through to R1.) So,
do I need some sort of driver between the PIC and the transistor? If
so, what sort of circuit would I need?

*Incidentally, the model used by EDN is no longer available so I
intend to replace it with a BD678 - can anyone advise me if this is a
suitable replacement?
If you are designing from scratch, consider low side switching (i.e. +ve
supply -- Load -- Switching device -- ground (-ve supply).

Does away with the need for level shifters and NPN power devices are
somewhat more common. You could also easily drop in a power mosfet.

Alternatively, look at automotive lamp control ICs, High side switching
and protection against lamp faults.

Whatever you use, it should be seriously overrated to drive a lamp load.
If you dont allow for lamps taking typically 10 times the current during
startup and failing often with a momentary short as the filament blows
your expensive semiconducter *will* fail protecting your cheap fuse ;-(
 
B

Bob Monsen

Jan 1, 1970
0
scouselad said:
Hi,

I'm designing an electronically-controlled light dimmer circuit based
on one I found at: http://www.edn.com/article/CA46649.html
I'm replacing the SG3524 PWM chip with a PIC16F877A and I intend to
take a digital input from the user and (scale it, then) compare it
with the 0-5V from the op-amp (digitised using the PIC's ADC). As you
can see from the diagram, the PWM signal drives a PNP Darlington
transistor*. However, the SG3524 can provide 100mA of current, whereas
the PWM pin on the PIC can only provide 25mA. (Note that this current
is not only injected into the base; it also feeds through to R1.) So,
do I need some sort of driver between the PIC and the transistor? If
so, what sort of circuit would I need?

*Incidentally, the model used by EDN is no longer available so I
intend to replace it with a BD678 - can anyone advise me if this is a
suitable replacement?

The BD678 has a maximum Vceo of 60V, and an hFE of 1 at 1MHz. If you are
trying to switch it at 10kHz, like the replaced part, it should be fine.

The max current on the pass device is 4A, but the hFE is going to be very
large, so 100mA will probably not be required. The hFE is 750 in normal
circumstances, so that works out to about 6mA. You'll need more to overcome
the miller capacitance, but that should not bring it up to 100mA. I'd say it
should be fine.

The EDN circuit it is in has a 10k resistor on the output, so it isn't going
to be drawing much more than a few mA anyway, given a 20V input.

Regards,
Bob Monsen
 
Top