Raspberry - PWM - PCA9685

JAPIB
2020-11-30
2020-12-05
  • JAPIB

    JAPIB - 2020-11-30

    Hello,

    I'm trying to drive LEDs (intensity variations) with a raspberry, a PCA9685 module communicating by I2C.
    I tried the PWM examples provided with the raspberry runtime, I tried the various (very succinct) examples found on the forum, nothing works.๐Ÿ˜Ÿ
    The only thing that works is to use the outputs of the PCA9685 and make them flash quickly, which shows me that my PCA9685 module is properly addressed and working.
    How to find relevant information about libraries, for example "Raspberry I2C AdafruitPWM".
    All this to manage the lightning of my Christmas crib.โ˜บ
    Thank you in advance for any help.

     
  • Ingo

    Ingo - 2020-11-30

    I don't want to promote my stuff, but I use this library with local GPIOs and a custom driver to regulate the fan of my BBQ grill:

    https://forge.codesys.com/drv/gpio-mod/

    From my experience, the accuracy on a Raspi with local I/Os is enough for those uncritical usecases.

     
    ๐Ÿ‘
    1
  • JAPIB

    JAPIB - 2020-12-05

    Thanks Ingo, I tried your stuff, but, for me , it work as all others I tried. That is to say, I get a blinking Led whatever settings I use.

    Finally I tried a MCP4725 chip and I get a a variation of the light intensity of my led, without flashing... ๐Ÿ˜„๐Ÿ‘
    The problem is that I can only address 2 circuits of this type on the I2C bus.๐Ÿ˜ฎ

    I noticed that most of the examples found with the PCA9685 circuit use servo motors or motors for which the notion of blinking seems not to be a problem... Or I really don't know how to use this circuit with my little led. ๐Ÿ˜จ
    For the moment I am making progress on my project, but I will have to try again later.
    Thanks again.
    Best regard.

     

Log in to post a comment.