Main > Main Forum

Turning CP lighting on/off and other related issues

Pages: << < (2/2)

PL1:


--- Quote from: OTT on November 02, 2023, 10:09:58 am ---For a small project of mine I would like to implement the following features:

1) turn on/off the CP lighting with a toggle switch
2) illuminate some text on the CPO graphics only when a certain event is detected (by activating a microswitch)

--- End quote ---
You can do both without software/controllers.

Get 5v and ground from either a Molex or a modded USB cable.
- Calculate the max current draw for the number and type of LEDs you'll be using.
- If you'll be using a USB cable, limit the max draw to 500mA (regular USB port) or 100mA. (unpowered hub port)
- Remember to add current-limiting resistors if the LEDs don't already have them built-in.

#1 is the easiest.
- Wire the toggle switch in series with the panel lighting circuit.  You can put it between the LEDs and Ground (shown) or between 5v and the LEDs.

                                                  Switch
    5v ____ Panel lighting LEDs ____/____ Ground


--- Quote from: OTT on November 02, 2023, 10:09:58 am ---About 2): in my intentions, I would like to place a couple of microswitches under the CP as "sensors", i.e. to detect a a specific mechanical movement: the idea would be to illuminate a certain text when microswitch #1 is activated, another text when the #2 is activated and a third text when neither is activated. I want only one text to light up at a time, depending on the state of the microswitches-sensors

--- End quote ---

For #2, you'll need 3-tab (COM, NO, NC) microswitches.

                    ____ NC
  COM ____/____ NO

Wire them like this.

           SW1    SW2
                          ____ Msg.#3 LEDs ____Ground
                ____/____ Msg.#2 LEDs ____Ground
  5v ____/_________ Msg.#1 LEDs ____Ground


Scott

OTT:


--- Quote from: PL1 on November 02, 2023, 09:46:24 pm ---
--- Quote from: OTT on November 02, 2023, 10:09:58 am ---For a small project of mine I would like to implement the following features:

1) turn on/off the CP lighting with a toggle switch
2) illuminate some text on the CPO graphics only when a certain event is detected (by activating a microswitch)

--- End quote ---
You can do both without software/controllers.

Get 5v and ground from either a Molex or a modded USB cable.
- Calculate the max current draw for the number and type of LEDs you'll be using.
- If you'll be using a USB cable, limit the max draw to 500mA (regular USB port) or 100mA. (unpowered hub port)
- Remember to add current-limiting resistors if the LEDs don't already have them built-in.

#1 is the easiest.
- Wire the toggle switch in series with the panel lighting circuit.  You can put it between the LEDs and Ground (shown) or between 5v and the LEDs.

                                                  Switch
    5v ____ Panel lighting LEDs ____/____ Ground


--- Quote from: OTT on November 02, 2023, 10:09:58 am ---About 2): in my intentions, I would like to place a couple of microswitches under the CP as "sensors", i.e. to detect a a specific mechanical movement: the idea would be to illuminate a certain text when microswitch #1 is activated, another text when the #2 is activated and a third text when neither is activated. I want only one text to light up at a time, depending on the state of the microswitches-sensors

--- End quote ---

For #2, you'll need 3-tab (COM, NO, NC) microswitches.

                    ____ NC
  COM ____/____ NO

Wire them like this.

           SW1    SW2
                          ____ Msg.#3 LEDs ____Ground
                ____/____ Msg.#2 LEDs ____Ground
  5v ____/_________ Msg.#1 LEDs ____Ground


Scott

--- End quote ---

Thank you!! Yes, this was pretty much my first idea, but you explained it technically in detail  :notworthy: Obviously this method is more straightforward and less laborious to implement, as well as software failure-proof 👍
I will still have to learn to use LEDBlinky (for other projects too) but for what I have to do now I will try to follow your instructions first and see how it comes out.

PL1:

Glad to assist.   :cheers:


Scott

arzoo:


--- Quote from: OTT on November 02, 2023, 01:54:50 pm ---By any chance is it possible to collect a sequence of actions in a file (such as txt) and then LedBlinky reads it and executes them one by one?

--- End quote ---
You can create a script or batch file that chains together multiple LEDBlinky commands. LEDBlinky will queue them up and execute in order.

OTT:


--- Quote from: arzoo on November 03, 2023, 04:23:52 pm ---
--- Quote from: OTT on November 02, 2023, 01:54:50 pm ---By any chance is it possible to collect a sequence of actions in a file (such as txt) and then LedBlinky reads it and executes them one by one?

--- End quote ---
You can create a script or batch file that chains together multiple LEDBlinky commands. LEDBlinky will queue them up and execute in order.

--- End quote ---

Thanks for the clarifications! I will contact you in the next few days because I still have a couple of questions about LEDBlinky  ;D

Pages: << < (2/2)

Go to full version