Searching \ for '[EE]: Simple switching question.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/power/priswitch.htm?key=switching
Search entire site for: 'Simple switching question.'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: Simple switching question.'
2002\08\21@110750 by A.J. Tufgar

flavicon
face
Hey all,
       Simple question but it's bothering me.

I've got a simple 2n2222a driving a coil from a pic pin.  When I put
the coil between +5V and the collector, works fine turns the coil on
and off.  But when I try to the coil between the emitter and ground it
doesn't work.  A voltage appears across it, but it's only 3.6V.

I'm trying to switch supplies to the coil so I have to use the emitter
ground set-up.  What's wrong, why can't I use a set-up like this?

I thought it might be due to internal resisitance of the transistor,
but this doesn't make sense because I tried it with a mosfet (IRF540)
and I only get 2.2V across the coil.

Can anyone help me out in finding a way to switch the supply to the
coil?

I'm using 5V and 1.2V if this matters.  Both supplies share ground.

Thanks in Advance,
Aaron

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@112238 by Spehro Pefhany

picon face
At 11:07 AM 8/21/02 -0400, you wrote:
>Hey all,
>         Simple question but it's bothering me.
>
>I've got a simple 2n2222a driving a coil from a pic pin.  When I put
>the coil between +5V and the collector, works fine turns the coil on
>and off.  But when I try to the coil between the emitter and ground it
>doesn't work.  A voltage appears across it, but it's only 3.6V.

You have a base resistor? The emitter-follower adds one diode drop,
~0.7V, to the drop, so you get 4.3V typically, not counting
any drop in the base resistor and PIC output.

DON'T FORGET A CATCH DIODE ACROSS THE COIL!!

>I'm trying to switch supplies to the coil so I have to use the emitter
>ground set-up.  What's wrong, why can't I use a set-up like this?

You can use a similar setup with a PNP transistor (eg. 2N4403) with
the emitter connected to +5 and the base to the PIC output through
a suitable resistor. Low = ON in this case, however.

DON'T FORGET A CATCH DIODE ACROSS THE COIL!!

>I thought it might be due to internal resisitance of the transistor,
>but this doesn't make sense because I tried it with a mosfet (IRF540)
>and I only get 2.2V across the coil.

N-channel MOSFET will require drive about the +5 rail to get full output.
IOW, if you could drive it with 15V/0 you would get full output.

Same deal, though, use a P-channel logic-level MOSFET, connect the
source to +5 and low = ON

Oh, and..

DON'T FORGET A CATCH DIODE ACROSS THE COIL!!

>Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spam_OUTspeffTakeThisOuTspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@112649 by Wouter van Ooijen

face picon face
> I've got a simple 2n2222a driving a coil from a pic pin.  When I put
> the coil between +5V and the collector, works fine turns the coil on
> and off.  But when I try to the coil between the emitter and ground it
> doesn't work.  A voltage appears across it, but it's only 3.6V.

An emitter follower (load at the emitter, also called common collector)
does not amplify a signal, do you get *less* voltage swing at the
emitter than you supply at the base (but you get lots of current
amplification, unfortunately that is not what you need). Your first try
(common emitter, load at the collector) gives both voltage and current
amplification, so it worked.

Solutions:
- (best) use a pnp transistor in common emitter (load at the collector)
- (might work) in the npn emitter follower do not use a R between the
PIC and the base, but an R (try 1k) between the base and the +5V. When
your load is sufficiently small (compared to the R and the B of the
transistor) you will get a small volatge drop.

BTW you did not forget the diode over the coil, did you?

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@112653 by Eisermann, Phil [Ridg/CO]

flavicon
face
> -----Original Message-----
> From: A.J. Tufgar [.....tufgarajKILLspamspam@spam@MUSS.CIS.MCMASTER.CA]
> Subject: [EE]: Simple switching question.
>
>
> Hey all,
>         Simple question but it's bothering me.
>
> I've got a simple 2n2222a driving a coil from a pic pin.  When I put
> the coil between +5V and the collector, works fine turns the coil on
> and off.  But when I try to the coil between the emitter and ground it
> doesn't work.  A voltage appears across it, but it's only 3.6V.
>

       are you connecting the collector to +5V, emitter to one side
of the coil, and the other side of the coil to ground? if so, then
it won't using a NPN work because the emitter will be at around
0.6V or 0.7V lower than the base. As an output, the PIC is only guaranteed
to output Vdd-0.7V. So that could be as much as 1.4V less than the 5V.

> Can anyone help me out in finding a way to switch the supply to the
> coil?

for a NPN, you should switch the coil to ground. Connect one side of the
coil to +5V, the other to the collector. emitter goes to ground.
don't forget the diode across the coil and a current limiting resistor
in the base of the NPN. in this configuration, driving the base high
turns the coil on. The difference in this case is you only loose the
saturation voltage (called Vce, sat on datasheets), not the Vbe
drop plus microcontroller voltage drop as in the original setup.

the other way is to use a PNP. This is hooked up as you describe above.
collector goes to +5V, emitter to one side of the coil. the other side
of the coil goes to ground. still need diode and base resistor. in
this configuration, pulling the base low turns the coil on, opposite
of the NPN configuration. again, you only loose the saturation voltage
in this setup.

>
> I'm using 5V and 1.2V if this matters.  Both supplies share ground.
>

what's the 1.2V used for? PIC and coil are supplied by the 5V?

-Phil

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@112908 by A.J. Tufgar

flavicon
face
Got it Spehro,
             The catch diode is dropping my voltage so take it out
right?  ;)

Thanks a bunch, I'll try what you suggested and let you know how it
goes,
Aaron

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@113929 by Wouter van Ooijen

face picon face
> Got it Spehro,
>    The catch diode is dropping my voltage so take it out
> right?  ;)

The catch diode (bleeder diode?) sure takes the punch out of the
circuit, so if you want more power effect....

Wouter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@115634 by A.J. Tufgar

flavicon
face
I used a 2N3906 and tried the common emitter approach, however I'm
still getting a voltage drop across the transisitor looks like .8V.

My coil's resistance is about 65 ohms...  Maybe now the drop is due to
internal resisitance, or is it still the diode drop?  Maybe a p-channel
mosfet would be better?  Thoughts?

Thanks again,
Aaron

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@120347 by Eisermann, Phil [Ridg/CO]

flavicon
face
BIG OOPS. I wrote:

>
> the other way is to use a PNP. This is hooked up as you
> describe above.
> collector goes to +5V, emitter to one side of the coil.


that should, of course, be emitter to +5V, collector to coil.
sorry for the brain-fart.

-Phil

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@120920 by Spehro Pefhany

picon face
At 11:56 AM 8/21/02 -0400, you wrote:
>I used a 2N3906 and tried the common emitter approach, however I'm
>still getting a voltage drop across the transisitor looks like .8V.
>
>My coil's resistance is about 65 ohms...  Maybe now the drop is due to
>internal resisitance, or is it still the diode drop?

2N3906s are a bit wimpy, but with the proper value of base resistor,
say 470R, (forced beta ~=10) the voltage drop should be around 120mV at
25'C. With the 2N4403, it would be more like 100mV.

>  Maybe a p-channel
>mosfet would be better?  Thoughts?

With a logic-level P-channel mosfet with low Rds(on), sure. But it will
be much more costly than the jellybean BJT, and 120mV is only a couple
percent of 5V.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@123509 by Herbert Graf

flavicon
face
{Quote hidden}

       You are trying to use the resitor in emittor follower config, a perfectly
fine config for some purposes, but not yours. Switch to a PNP transistor.
TTYL

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@131356 by Herbert Graf

flavicon
face
> I used a 2N3906 and tried the common emitter approach, however I'm
> still getting a voltage drop across the transisitor looks like .8V.
>
> My coil's resistance is about 65 ohms...  Maybe now the drop is due to
> internal resisitance, or is it still the diode drop?  Maybe a p-channel
> mosfet would be better?  Thoughts?

You will ALWAYS have a drop across the transistor (no device is perfect),
however 0.8V is a little on the high side, it should be around 0.3 or 0.4V,
depending on the current. What resistor are you using on the base? What is
driving the base? It sounds like you might not have enough drive current to
get the transistor fully into saturation. TTYL

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@134725 by A.J. Tufgar

flavicon
face
Hey all,
       I got the 2N4403 and still no luch, there is a 742mV drop.  I'm
using a 470 ohm resistor to bias the transistor.

Emitter to 5V.
Collector to Coil to ground. ( and yes a diode :) )

The only thing on the board right now is JUST the transistor and coil,
coming off a 5V ps.

Any more ideas?  Can I get rid of this 700mV drop?

Thanks for all your help,
Aaron

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@135704 by Spehro Pefhany

picon face
At 01:45 PM 8/21/02 -0400, you wrote:
>Hey all,
>         I got the 2N4403 and still no luch, there is a 742mV drop.  I'm
>using a 470 ohm resistor to bias the transistor.
>
>Emitter to 5V.
>Collector to Coil to ground. ( and yes a diode :) )


*Exactly* like this?

                    +5
                     |
                     x------------------------------x
                     | E                            |
                B  |/
  x----[470R]------|  2N4403                     (Voltmeter)
  |                |\
  |                  | C                            |
  |                  x--------x---------------------x
  |                  |        |
  |                  |       ---
  |               [coil]     / \
  |                  |       ---
  |                  |        |
  0V                 0V       0V


Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@140353 by Spehro Pefhany

picon face
At 02:07 PM 8/21/02 -0400, I wrote:


>*Exactly* like this?

P.S., I think it's possible you've mixed up the B and C
leads or something like that.

E-B-C, with the flat towards you, leads down, is pinout of 2N4403

http://www.fairchildsemi.com/ds/MM/MMBT4403.pdf




{Quote hidden}

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
EraseMEspeffspam_OUTspamTakeThisOuTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\21@141642 by A.J. Tufgar

flavicon
face
Sperho,
      First transistor was bad, great luck eh?  :)
I popped in a second one and the voltage drop is about 118 mA.  :)

Works fine on the breadboard but the DC to DC converter doesn't like
all this current draw (from the coil), but I think with a larger coil I
should be ok looking at the LTC3400 datasheet.

Anyways thanks for your help, such a simple problem leads to a
frustrating day.  :)

Aaron

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\08\22@022229 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

The difference is that you are using the transistor in two entirely separate
configurations.  The first, the the coil in the collector is called "common
emitter" which gives high gain, and is very usefull for switching
applications like you are using.  When you connected it to the emitter, you
have the transistor configured as an "emitter follower" which gives a
voltage gain of around unity, and also introduces a voltage drop accross the
base-emitter junction of around 0.6volts.

You need to use a common emitter stage, but if you want to source current
instead of sinking it, you need to use a PNP transistor.  The PIC's
operation will then be reversed i.e. you will need to sink current from the
transistor base by driving your PIC pin low rather than high.

As you are driving an inductive load make sure you have a diode or snubber
accross your load to reduce the large induced voltages when you switch the
transistor off.  Failure to do so will kill the transistor and could
possibly hurt the PIC.

Regards

Mike

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...