cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

Is there a method to do it? I have a PSOC1 dev kit, and was wondering if there was a way to controll a 10 watt led. with maybe dimming or such. external components okay 🙂 

   

forgive me if theres a easy way, I didnt find anything

0 Likes
1 Solution
Anonymous
Not applicable

 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. 

   

 

   

-Rajiv Badiger

View solution in original post

0 Likes
15 Replies
ETRO_SSN583
Esteemed Contributor

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 -

   

 

   

http://www.cypress.com/?id=2308

   

      http://www.cypress.com/?docID=31668

   

 

   

PPSOC has 1A onboards MOSFETS, may be a little light for 10W,

   

but can handle external MOSFETs with lower RDSon.

   

 

   

Regards, Dana.

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Expert II

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!

   

 

   

Happy coding

   

Bob

0 Likes
Anonymous
Not applicable

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 🙂 

0 Likes
Anonymous
Not applicable

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.

0 Likes
ETRO_SSN583
Esteemed Contributor

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.

   

 

   

http://www.ti.com/lit/an/snva008/snva008.pdf

   

 

   

SSDM has its advantages but wants a "clean" gate drive to handle the narrow

   

pulses that SSDM can produce. See considerations here -

   

 

   

      http://www.cypress.com/?docID=30782

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

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)

0 Likes
Anonymous
Not applicable

 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.

   

 

   

-Rajiv Badiger

0 Likes
ETRO_SSN583
Esteemed Contributor

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.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

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.

0 Likes
ETRO_SSN583
Esteemed Contributor

 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. 

   

 

   

Regards, Dana

0 Likes
Anonymous
Not applicable

 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. 

   

 

   

-Rajiv Badiger

View solution in original post

0 Likes
ETRO_SSN583
Esteemed Contributor

If you want to understand in more detail Del Sig type A/D's, and error management

   

some reference material, attached.

   

 

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

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 🙂 

0 Likes
Anonymous
Not applicable

 You're welcome

0 Likes
Anonymous
Not applicable

http://youtu.be/XWsf6ctR3gc < here is a short video of the led dimmer, thanks guys, and yes thats a 40x2 hd44780 based lcd from optrex instead of the standard 2x16 lcd. when I got this kit, they werent including the lcd.

   

cant wait till I can order a few more psoc1's while I wait for the psoc5lp  kit I got from psocworld to be found and sent.

0 Likes