0
\$\begingroup\$

I need to control the colors of an RGB ribbon. This requires 3 PWMs. But I have only one output of my microcontroller available. So for this I need to find a circuit that stays between the microcontroller and the RGB tape that allows me to change the colors receiving only a signal from the microcontroller (as in the image) I thought of an analog converter for PWM but I do not know how to do it or if it is possible.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 4
    \$\begingroup\$ (Asynchronous) serial communication will do. \$\endgroup\$ – Eugene Sh. Jan 16 at 16:49
3
\$\begingroup\$
  1. Go with led driver like WS2801 with external power switches. With which you will get very fine control over your strip with a 2-wire interface.

enter image description here

  1. where as this driver WS2811 which is a 1-wire interface.
\$\endgroup\$
  • \$\begingroup\$ This requires two outputs from the OP's microcontroller, but they only have one available. \$\endgroup\$ – Elliot Alderson Jan 16 at 19:02
  • \$\begingroup\$ The ic supports 1-wire ( 1 wire device communications bus system). \$\endgroup\$ – Satish Singupuram Jan 16 at 19:05
  • \$\begingroup\$ Can you clarify your comment, please? Where can I find information about using the WS2801 with a single communications wire? \$\endgroup\$ – Elliot Alderson Jan 16 at 19:16
  • \$\begingroup\$ @ElliotAlderson sorry edited my answer please check. \$\endgroup\$ – Satish Singupuram Jan 16 at 19:30
  • \$\begingroup\$ WS2811, one-wire interface with specific timing needs. adafruit.com has a library with the specific timing for Arduino boards. \$\endgroup\$ – CrossRoads Jan 16 at 20:41
2
\$\begingroup\$

Use another microcontroller as your "intermediate circuit". Use the TX of a UART on your original microcontroller to send text commands to the RX pin of the new microcontroller. Define commands that set the PWM parameters for each channel. Program the new microcontroller to parse the commands and generate the PWM signals.

\$\endgroup\$
  • 1
    \$\begingroup\$ That's rather excessive and invokes unnecessary development when there are fixed function I2C, SPI, and unique interface solutions for this. \$\endgroup\$ – Chris Stratton Jan 16 at 18:06
  • \$\begingroup\$ @ChrisStratton Both I2C and SPI require more than one line from the microcontroller, which doesn't satisfy the OP's request. Furthermore, I didn't want to turn this into a recommendation for a specific product. \$\endgroup\$ – Elliot Alderson Jan 16 at 19:04
  • 1
    \$\begingroup\$ Actually what the question says is that they only have one PWM output available. Also note that there are single wire LED data interfaces (the "unique" in the above comment), again available off the shelf without needing to do development and programming of an additional MCU. \$\endgroup\$ – Chris Stratton Jan 16 at 19:07
  • \$\begingroup\$ 1-wire can be implemented for low-data rates with longer distances which is similar to I2C protocol \$\endgroup\$ – Satish Singupuram Jan 16 at 19:08
  • \$\begingroup\$ @ChrisStratton No, the OP states "But I have only one output of my microcontroller available." And I still don't want to recommend specific products. \$\endgroup\$ – Elliot Alderson Jan 16 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.