Yes that is very straightforward to do with a PWM followed by a
simple power switch, MOSFET, bipolar to handle the high LED
currents. Simple dimming like this can be done by any PSOC.
Power PSOC gives additional advantages, some ref material -
PPSOC has 1A onboards MOSFETS, may be a little light for 10W,
but can handle external MOSFETs with lower RDSon.
Additionally there is an SSDM-Module to control the brightness of LEDs without having the downgrade of a single frequency increasing the noise-level and influencing other electronic. Instead the noise is spread (and thus lowered) about w wider frequency range.
You may easily thest the SSDM-module with your development kit.
The external circutry to control the LED's current will still be needed, stick to Dana's advices, he nows more about that than me!
yeah I figured a mosfet was needed, since the led uses 12volt at 900ma
I'll read those files and see what I can see :)
I dont have the means to use a power psoc though, not good at soldering smt stuff. nor a method to make a pcb :)
I'll see what I can find to use a pot to dim a led. using pwm.
Be aware that when you drive the gate of a power MOSFET it has a high
C load due to miller effect and other parasitics. This causes MOSFET to
dissipate a lot of additional power because its Vgs is exponentialy taking
too long to get switch to Rdson rating.
You can parallel PSOC outputs to get more drive level, or use an external
MOSFET gate driver to alleviate this. If you use an external driver beware
its own issues due to board inductance generated transients. Grounding
is everything when swicthing high currents.
SSDM has its advantages but wants a "clean" gate drive to handle the narrow
pulses that SSDM can produce. See considerations here -
okay Psoc 1's are harder to do. I cant seem to figure out how to do what I want with it, controll the pwm output via a pot. and a switch to turn the led on and off..
switch on p14, pot on p01 and led on p20-3 (any)
You can implement LED current controller as given in the diagram below:
PWM duty cycle will be adjusted based on the comparison between reference value (Vset) and the feedback. The presence of integral control helps in getting slow start to avoid sudden inrush of current from the supply. PWM duty cycle can be limited using "one shot" user module. This technique doesn't require CPU for control operation.
The other technique is to control the PWM duty cycle using CPU after reading the feedback voltage using ADC. If sufficient CPU bandwidth is available, you can use this technique.
If you choose not to do a closed loop design, probably not a good
idea in a high power LED, then A/D reading a pot, A/D value then
controlling PWM duty cycle is one simple approach. You would have
to use an R to curremt limit Iledmax. Power wasted however.
Closed loop, another approach is to use A/D to read LED package temp,
which can be extrapolated to Tj, and use that in a closed loop to maximize
flux while not damaging device, eg. to put the breaks on another A/D or
a muxed A/D that is reading pot to control PWM dutry cycle.
Quite a few ways of doing brightness of an LED along with protection
for the LED.
rajiv I'd do this since the only thing the cpu is going to be doing is reading the adc, and telling the pwm what setting.. But my issue is being a complete noob with C, I can understand it a lil bit. but havent learned it yet. I'm sort of stumbling along as I go, not that it matters, I cant figure out how to set up the adc, I can sort of figure out the pwm output, but thats it. I can do it easier on creator for 5lp, but still the code part is a stumbling block.
If you open up designer on the startup page are a number of example
projects you can open and look at code and settings, 2 projects for the
adc if I remember correctly.
In addition to what Dana mentioned, I would like to suggest following materials to begin with -
Application note AN75320 - Getting Started with PSoC 1 - http://www.cypress.com/?rID=58639
Application note AN2096 - Using the ADCINC - Analog to Digital Converter - http://www.cypress.com/?rID=2843
In addition to these application notes, you can refer particular user module datasheet which gives the 'C' and the assembly code snippet to configure the user module.
thanks rajiv that was exactly what I was looking for, that helps a lot, since my code is so simple at first, this is exactly what I wanted.
thanks to everyone else who helped. later I'll work on using feedback to limit the output, for now I'll use a big power resistor to limit the current to a safe level then I can worry about the rest :)