Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Use PWM to control led brightness with a led driver


  • Please log in to reply
2 replies to this topic

#1 Taxi4110

Taxi4110

    New Member

  • Members
  • Pip
  • 2 posts

Posted 15 March 2014 - 09:46 PM

Hello guys,

 

my netduino is working great, but I have some trouble to get this led driver (CCS2-700) working: http://www.anvilex.d.../DS_P011_36.pdf (sorry, didn't found a german description, but I know that a ZXLD1366 is used.

 

Its a led driver that supports DIM with PWM.

 

So, I connected 12v on V+, GND to GND and my led stripe is on. ok, next my netduino... pwm pin9 to DIM and GND on netduino to GND on the led driver. after some coding, nothing happens :-(

PWM ledpwm = new PWM(PWMChannels.PWM_PIN_D9, 400, 1, PWM.ScaleFactor.Microseconds, false);
            
            uint i = 1;
            ledpwm.Start();
            // write your code here
            while (true)
            {
                ledpwm.Duration = 1;

                Thread.Sleep(3000);

                ledpwm.Duration = 100;

                Thread.Sleep(3000);

                ledpwm.Duration = 150;

                Thread.Sleep(3000);

                i++;

                if (i == 5)
                    break;
            }

            ledpwm.DutyCycle = 0;

Can you tell me what's wrong?

 

 

 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 15 March 2014 - 11:35 PM

Hi Taxi4110,

If you plug an LED directly into pin D9 and GND, does it illuminate at the brightness levels you're expecting?

Also, what happens if you set the Duration to 400 (to match your period of 400us) and 0 (for off)? And what happens if you use an OutputPort instead and just turn it on and off (effectively 100% and 0% duty cycles)?

Welcome to the Netduino community,

Chris

#3 Taxi4110

Taxi4110

    New Member

  • Members
  • Pip
  • 2 posts

Posted 19 March 2014 - 08:05 PM

Hi Chris,

 

thanks for your reply. A LED direct on pin D9 is working like expected. I'll test tomorrow again with the led driver and then show you the result. Thank you! :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.