Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


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.

Reply
 
LinkBack Thread Tools Display Modes
Old 20th January 2008, 04:17 AM   (permalink)
Default AVR (tiny85) differing output on pins...

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?
magician13134 is offline  
Old 20th January 2008, 05:54 PM   (permalink)
Default

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
So what does this all mean? It means that if your VCC = 5 Volts and you try to get 10 mA out of any port B pin (including pin 5) then the voltage at the pin will be at least 4.3 Volts. For a VCC of 3 Volts 5 mA will drop the output voltage to 2.5 Volts.

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.
Papabravo is offline  
Old 21st January 2008, 04:20 AM   (permalink)
Default

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
magician13134 is offline  
Old 22nd January 2008, 01:10 PM   (permalink)
Default

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.
Papabravo is offline  
Old 24th January 2008, 04:11 AM   (permalink)
Default

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...
magician13134 is offline  
Old 24th January 2008, 06:04 PM   (permalink)
Default

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
audioguru is offline  
Old 24th January 2008, 10:49 PM   (permalink)
Default

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?
magician13134 is offline  
Old 25th January 2008, 12:13 AM   (permalink)
Default

Quote:
Originally Posted by magician13134
what do you mean a weird value?
You said 380 ohms which is a weird value.
Common 5% resistors are 330 ohms and 390 ohms.
Sometimes I use 360 ohms.
__________________
Uncle $crooge
audioguru is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
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



All times are GMT. The time now is 12:33 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker