Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/18/06 15:41
Modified:
  07/18/06 16:33

Read: times


 
#120493 - This will not work properly!
Responding to: ???'s previous message
Dick said:
Use a NPN (e.g. BC547) not PNP (BC557) transistor.

Connect the output pin of the controller to the base of the transistor. Connect the emitter to ground. Connect the collector to the relay and the other side of the relay to +12v. The diode goes over emittor and collecter.

When the output pin is high the relay goes on.

You mean something like that (free wheel diode corrected)?



This circuit will not work, unfortunately!

Have a look at standard port citcuitry inside 80C52 to find out why:





pFET1 provides a strong pull-up and is turned-on for only two oscillator periods of micro. Whenever a 1s is going to be written into the according SFR (port latch), pFET1 is turned-on for two oscillator periods.

pFET2 is turned-on, whenever 1s is written into the according SFR. It's permanently on, not only for two oscillator periods like pFET1. pFET2 serves as a very weak pull-up. Although not being a resistor but more a current source, pFET2 roughly behaves like a resistor of about 100...200kOhm.

pFET3 is a weak pull-up, roughly behaving like a resistor of about 10...20kOhm. pFET3 is active, whenever the port pin is at high level.


Now: When you have a pn-junction connected from port output to ground, then you force the output potential to be about 0.7V. But this will turn-off the weak active pull-up pFET3, leaving only the very weak active pull-up pFET2 driving the transistor, which results in about 20µA base current. This is not enough to fully turn-on the transistor and allowing a collector current of 30mA to flow, and this at a needed low collector emitter saturation voltage!

Also, whenever 1s is written into the SFR of according port, pFET1 is turned-on for two oscillator periods and drives an enormous current into the base of transistor, not necessarily destroying the transistor, but causing huge ground noise due to the brief short circuit.

Kai

List of 49 messages in thread
TopicAuthorDate
Driving 12 Volts relay by 5 Volts microcontroller            01/01/70 00:00      
   12v relay            01/01/70 00:00      
      This will not work properly!            01/01/70 00:00      
         well, it might            01/01/70 00:00      
         pullup?            01/01/70 00:00      
            Doable, but disadvantagous            01/01/70 00:00      
               language and a comment            01/01/70 00:00      
                  Makes only 3 drivers per port            01/01/70 00:00      
      12v relay            01/01/70 00:00      
   12V relay driver for 80C52            01/01/70 00:00      
      12V relay driver for 80C52            01/01/70 00:00      
      Analysis            01/01/70 00:00      
         sure.but why? this is \"grab bag values\"            01/01/70 00:00      
            Re: Analysis            01/01/70 00:00      
               basically they are 'bleeders'            01/01/70 00:00      
                  Choosing Bleeder resistor values            01/01/70 00:00      
                     Values Are design Specific            01/01/70 00:00      
                        how to calculate?            01/01/70 00:00      
                           what you are missing is that a transistor junction            01/01/70 00:00      
                           Two ways of calculation...            01/01/70 00:00      
                              Thank you very much!            01/01/70 00:00      
                                 Nearly....            01/01/70 00:00      
                                    BC556 base current direction...            01/01/70 00:00      
                                       Three currents arround the base...            01/01/70 00:00      
                                          Yes. Its clear for me now.            01/01/70 00:00      
                                             Was a pleasure...            01/01/70 00:00      
                                                So Nice of You. Thanks again!            01/01/70 00:00      
   Didn't search first            01/01/70 00:00      
      Everything is already here. That is not the point!            01/01/70 00:00      
         Maybe it IS the point            01/01/70 00:00      
            Please read again his post            01/01/70 00:00      
               He'd have seen other alternatives            01/01/70 00:00      
                  I give up...            01/01/70 00:00      
                     don't            01/01/70 00:00      
         faq            01/01/70 00:00      
            Beat me to it            01/01/70 00:00      
            freewheling            01/01/70 00:00      
               1n4148            01/01/70 00:00      
               Heaven, no!            01/01/70 00:00      
                  as usual, the global became specific            01/01/70 00:00      
                     That's why I...            01/01/70 00:00      
                  FAQ update            01/01/70 00:00      
                     Comment            01/01/70 00:00      
                        It's fixed now. Thanks.            01/01/70 00:00      
   Alternatives            01/01/70 00:00      
   yet another way            01/01/70 00:00      
      Trouble making            01/01/70 00:00      
   the case of fault            01/01/70 00:00      
      Some thoughts            01/01/70 00:00      

Back to Subject List