CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC18F46K20 PWM not working
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ellest96



Joined: 15 Nov 2013
Posts: 17

View user's profile Send private message

PostPosted: Sun Jan 25, 2015 2:54 pm     Reply with quote

temtronic wrote:
Yes BUT you MUST use a resistor to connect PIC to base of transistor !!
I'd suggest a 470r or 1K to start.
Typically you use an NPN transistor, with emitter connected to ground, 1K resistor from base to PIC I/O pin, collector to fan -ve lead, fan +ve lead to +5 volts.
This is all basic Electronics101 , tons of info on the web, be sure to get/read the datasheet for the NPN transistor you've chosen.

NOTE!!! I had a look at your schematic.
NOTE!!!! The 2N706 will NOT work for you!!! It is only rated for 50ma of collector current. Your fan needs 500 ma. You'll need to choose another transistor. It should be 'ok' for the backlight LED drive but NEEDS a base resistor(say 470r ).


hth
jay

ok, I will use a resistor for the transistor.
I've removed the PNP and put on a NPN, and on the schematic the transistor is wrong becouse there isn't the one that I have so I picked one random just for the symbol.

Now I'm using the BC546B and the BC337, which one is better for the fan (500mA) and which for the lcd backlight (220mA)?
Thank you Smile
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Jan 25, 2015 5:06 pm     Reply with quote

The BC337 is the better device to use. If you look at the first page it shows 'collector current - continuous' to be 800ma, whereas the BC546 is only 100ma.
You'll still need a base resistor, try 470r to begin with.

These days though 'logic level' FETS are the best choice.They're easier to interface to PICs, control more power, and usually cheaper than a 'regular' transistor.


jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group