![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I'm working on a project using an ATtiny85, and when I set pin 5 to high, I'm getting less current than pin 6, and that's preventing my transistor circuit, therefor the entire project from working... Any ideas why this might be? | |
| |
| | (permalink) |
| What does the datasheet say about how much current pin 5 can source? Does it say the same thing about pin 6. Could you be troubled to provide a schematic for us to review? So here is an excerpt from the datasheet on the subject of the voltage and current you can expect Code: VOH Output High-voltage, (5) IOH = -10 mA, VCC = 5V 4.3 V
Port B (except RESET) (6) IOH = -5 mA, VCC = 3V 2.5 V For a transistor with a beta of 100 that should be good for up to an amp of collector current. If your trying to drive a power transistor base then it's not going to work very well. That's why we need the schematic. (5)(6) are datasheet footnotes that say don't let the total current demand on all pins exceed 60 mA, and RESET must tolerate high voltages.
__________________ We never have time to do it right; but we always have time to do it over. Last edited by Papabravo; 20th January 2008 at 06:09 PM. | |
| |
| | (permalink) |
| I actually don't have a schematic... I'm just working on breadboard... I guess I got it working, I just added a 380ohm resistor to the base of the transistor | |
| |
| | (permalink) |
| You mean to tell me that you tried to connect pin 5 to the base of a transistor. Was the emitter connected to GROUND?
__________________ We never have time to do it right; but we always have time to do it over. | |
| |
| | (permalink) |
| Yeah it is, it works fine with the output from pin 6, I added a resistor to the transistor base, now it works, but is dim... | |
| |
| | (permalink) |
| The base of a transistor with its emitter grounded is like a dead short to the output of a microcontroller. The max allowed output current from the output is much less than it can supply to the short. The max allowed output current from the output of a PIC is 25mA. An AVR might be the same. The 380 ohm (strange value) resistor will limit the transistor's base current to about 13mA. Without knowing if the collector and emitter are backwards on the transistor or the current-limiting resistor for the LED is wrong then we don't know why your LED is dim.
__________________ Uncle $crooge | |
| |
| | (permalink) |
| I'm pretty sure the transistor is right, as if I plug my resistor into pin 6. And what do you mean a weird value? I just grabbed the first one I came across with a fairly low value. As I've been learning this stuff, I notice several often appearing values (22, 47pF capacitors, 330ohm 10kOhm resistors), is there a reason? Are these just common? | |
| |
| | (permalink) | |
| Quote:
Common 5% resistors are 330 ohms and 390 ohms. Sometimes I use 360 ohms.
__________________ Uncle $crooge | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Datasheet for 16 output pins Anode Display Driver | pmphilip | Datasheet/Parts Requests | 1 | 30th January 2005 12:09 AM |
| output got problem | pepperman | General Electronics Chat | 2 | 16th July 2004 05:49 PM |
| Effects | stephenpic | Micro Controllers | 6 | 19th January 2004 12:57 PM |
| VERY low voltage on output pins, please help! | New2PIC | Micro Controllers | 1 | 18th January 2004 04:22 AM |
| How do I generate a potentiometer output? | klick | General Electronics Chat | 3 | 23rd November 2003 03:26 PM |