Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Source or sinking current of a microcontroller

Status
Not open for further replies.

Ogu Reginald

Full Member level 6
Joined
Oct 7, 2011
Messages
369
Helped
47
Reputation
94
Reaction score
46
Trophy points
1,308
Location
Nigeria
Activity points
3,391
I have been using the AT89S52 microcontroller for more than four years in all my microcontroller projects and it has been working very well.

Of late, I designed a device in which the microcontroller should turn ON and OFF a transistor which is used to switch a relay ON and OFF, after producing my hex file, I virtually simulated the circuit and it is working as designed but upon construction I discovered that it is not working.
When I removed the relay and connected the output of the microcontroller to an LED, I dicovered that the LED is coming ON and OFF as designed but its brightness is very low.

Then I connected a multimeter in series with the LED to measure the current that the microcontroller is producing, I discovered that it is 1.2mA.

I have changed more than seven microcontrollers and the problem still continues, can someone help me figure out the problem. My Circuit.gif
 

The pin used for relay should be configured as digital output pin. Post your code. The 12V battery GND and MCU GND must be made common. The 4 switches need 10k pullup resistors and in code debounce delay.
 

The pin used for relay should be configured as digital output pin.
The feature doesn't exist for standard 8051 output ports. Port1 to 3 are open drain with weak pull-up. To get more output current in high-state, you have to place pull-up resistors.

The outputs are driving high during µC reset, which may be problem in some cases. The perfect solution would be an inverter or PNP transistor driving the relay switch transistor and active low state for P1.4.

The 4 switches need 10k pullup resistors
No. I presume you never worked with 8051 processors?
 
Check the power supply!!!
Try without mcu too, switch pin of base of transistor, if works...
 
Last edited:

@FvM

Yesy, I have not done many 8051 projects. I mainly use PIC MCUs.
 

Thank you very much for all your advice and suggestions. I just added a 1k resistor between my VCC and P1.4 and it is working. Pls what will happen if I replace the 1k with:
a) 100k
b) 100R
 

Did you heared about Ohm's law? With 100R current will be about 45mA, which it too much for individual pin. With 100k current will be 45nA, with is not enought to open the transistor.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top