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

Any other way
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
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Jul 15, 2008 1:30 am     Reply with quote

pdl wrote:
I have a Mosfet which i supply 7.4v to and with the 50%duty from the PWM i was hoping to get 3.7v output from the Mosfet.
Mathematically you are correct but this is not how electronics work. Sad

You will get 7.4V for 50% of the time and 0V for the other 50%. Measuring the voltage with a digital multimeter you will read some kind of averaged value but that's a limitation of the multimeter, not what actually is seen by the circuit. Studying the signal with an oscilloscope you would see a square wave with peaks of 7.4V and low of 0V.

Quote:
I am trying to light an led with out a resistor
Now this remark starts to make more sense...

As SherpaDoug already mentioned it is quiet tricky to drive a led without resistor or other current limiting means. I can't give a course into electronics here but important to note is that a led is a (special) diode, i.e. once the Forward Voltage exceeds a certain voltage it lets through all applied current. For a normal diode the Forward Voltage is about 0.6V, for a led somewhere between 1.5V and 3.5V depending on the type and colour.

By switching 7.4V what happens is that about 3.6V is 'consumed' by the LED and 1V by the MOSFET, the remaining 2.8V is a problem... Current will increase until internal resistance of the MOSFET, led, wiring and power supply will have accounted for this. A large current of several Amperes is possible, often limited by the power supplies capabilities. If your led has not died yet than this is most likely because you are using a cheaper type of power supply.

In short: driving a led is not easy as it is current driven and not voltage driven as many other components. You will have to switch a constant current instead of a voltage as you are doing now.
Many solutions for driving a led can be found on the internet but I can't give you advice on this as you never told us why you wanted to drive the led without a resistor in the first place.
pdl



Joined: 01 Jun 2005
Posts: 45
Location: UK

View user's profile Send private message

PostPosted: Tue Jul 15, 2008 2:03 am     Reply with quote

the led that i want to drive has a forward voltage of 3.6v and the current is 350Ma. To use a resistor with i would need 12R a 1.5W. The resistor size is too big and this has to fit in a small model.

Pete
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Jul 15, 2008 3:25 am     Reply with quote

If size limitations don't allow for a 1.5W resistor, than other solutions will be tough too.

The first solution that comes to mind is building a step down converter using your already present MOSFET and a coil. This is about the same idea you originally had but now a coil is present for 'averaging' the current. For the coil to be small enough you'll need a high switching frequency of let's say 300kHz. To control the output voltage/current some kind of feedback to the PIC is required. Designing this circuit requires more electronics knowledge than I have at te moment. If you want I can post a few links to related articles this evening but those are not easy projects.

Or search the internet for an all-in-one led driver chip.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Tue Jul 15, 2008 10:44 am     Reply with quote

ckielstra wrote:
If size limitations don't allow for a 1.5W resistor, than other solutions will be tough too.

The first solution that comes to mind is building a step down converter using your already present MOSFET and a coil.


Actually if the PWM frequency can be high enough he could just use an LC filter off of the MOSFET to low pass filter the 7.4V square wave to the low voltage DC he wants. It would still be good to have some feedaback, maybe through the PIC software, or a smaller ballast resistor. Either way it is going to take some hardware to do this reliably.
_________________
The search for better is endless. Instead simply find very good and get the job done.
pdl



Joined: 01 Jun 2005
Posts: 45
Location: UK

View user's profile Send private message

PostPosted: Tue Jul 15, 2008 12:23 pm     Reply with quote

The easy way for now is to lower the voltage to 3.6 and use a 1r 1/4 watt resistor and turn the fet hard on

thanks

Pete
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