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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Michael Karas
10/03/10 19:43
Read: 623 times
Beaverton Or

#178883 - The better way..
Responding to: ???'s previous message
You have been trying out an NPN driver circuit. Such circuit should be like this:

Do note though that the standard type 8051 type I/O pin is not so good at driving high. The internal weak pullup is a poor excuse as a good drive for an NPN transistor. The port pins do far better when pulling down to a low level. For this reason a PNP transistor as in the following circuit is a far better choice, even for driving an LED.

Since you are trying to drive a 12V RELAY the best situation is to combine the PNP idea at the port pin with the NPN to drive the relay as shown below:

These circuits that use a PNP transistor off the port pin also have the added advantage they stay off at initial power on so there is no glitch of the relays until such time that the software in the MCU gets things initialized.

Michael Karas

List of 10 messages in thread
8051 driving 2n3904      Tom Roth      10/03/10 18:53      
   NPN transistor...from port pin...      Michael Karas      10/03/10 19:25      
   The better way..      Michael Karas      10/03/10 19:43      
   Best is to reply inline in another posting.      Michael Karas      10/03/10 19:50      
      sorry!      Tom Roth      10/03/10 20:03      
   An efficient relay driver...      Michael Karas      10/03/10 19:55      
      Zetex, RIP.      Andy Neil      10/03/10 23:58      
   8051 driving relays      Andy Neil      10/03/10 23:59      
      Try a 'Search'.      Tom Roth      10/04/10 19:11      
         Bidirectional port driver topology      Kai Klaas      10/05/10 06:40      

Back to Subject List