Is it possible to adjust built-in Status LED properties?

I have the OPTA AFX00003 PLC. Is it possible to change the colors from GREEN, to RED, or BLUE? How about the brightness level? I put them into flashing mode, but they're about half the brightness of the non-flash mode.

I have a Sketch based on the "Knight Rider Scanning Effect" sketch, using digitalWrite().

It is possible if you are experienced with soldering small components. If not then NO unless you want to risk ruining your board.
Instead, why not buy the coloured LEDs you want and create a sketch to display them how you want. Maybe even employ a digital resistor to modify the intensity.

I'm already doing that. Was hoping for a programmatic soln in the I_O_mappings_LEDOut resource for the Status lights.

I have never run across anything like that. Doesn't mean it can't be done, but I really doubt it. Why not just add normal LEDs, it's trivial and then you have full programmatic control, you might even want to look at addressable RGB's.

This is not a hobby item, it's a commercial product. Extra costs need to be avoided.

Surely you can control brightness level, just look at the green LED in bootloader mode - it turns on and off smoothly. I just don't know how to do it in code and i'll be great to make it work.

Hi Bob, as you can see in the pinout, the status LEDs are not RGB LEDs.

1 Like

OK, I forgot to look for that doc. I see now; green only. Too bad.

I'll have to look into the brightness adjustment that @darrag212 mentioned.

It's done by simply linking the MCU pin to wich is connected the led to a PWM (pulse-width-modulaton) MCU peripheral. After setting the precise PWM register with a value, PWM will generate a squared signal with high/low timing proportional to the value. Usually, low level drives ON the led.

Note: before attempting, check if that pin can be PWMed.

This method offloads your software, but it also can be done with software loops+microtimings.

PWM can also be used to produce:

  • Periodic Pulse triggers
  • Clock output
  • Digital to Analog Converters (when joing a RC network)

PWM timings can be scaled selecting the correct internal clock source

@ticoti, I've actually done that in a Sketch. Was hoping for a programmatic soln in the I_O_mappings_LEDOut resource for the Status lights, because I was not planning to add a Sketch to my program to keep maintenance time/cost down. But, in the end, I probably will add a Sketch for other requirements I am developing, therefore using the PWM technique for pulsing the LED would also be done.

Thanks!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.