Announcement

Collapse
No announcement yet.

Controllable LEDs on Robot

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Controllable LEDs on Robot

    Recently, our team has received many requests about how we are able to program our LEDs without using extra motor ports. We are able to control them using the PWM port on the Core Device Interface Module. We use the parts listed below.

    https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
    https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
    A solderable breadboard
    Wire
    Soldering Iron

    Just some background on the LEDs. These LEDs operate with 4 pins. Power 12 volt, Red, Green, Blue. Always have the positive connected to Power 12 volts. Now to turn on a light, the Red, Green or Blue pins have to be grounded. This is how the LED's work. We use transistors to control how to control whether the Red Green or Blue pin would be grounded. To control the transistors, we use the PWM port. This allows us to turn on the LEDs for minuscule amounts of time. If we turn it on so it turns the LED on for half a millisecond and off for half a millisecond, the light will look dimmer. We then soldered the LEDs, Transistors, Power Cables and Signal cables to the breadboard and connected the power cable to the CPDM and the signal cables to their respective PWM port. If the circuit works as planned, the LEDs will turn on when you send a signal to each PWM port. Be careful as you do not want to burn anything out so check to make sure you soldered everything correctly and don't have a short circuit.

    FTC 9794
    Wizards.exe

  • #2
    I have seen forum posts regarding rules against powering/controlling LEDs from the PWM ports on the CDIM, but I do not understand the distinctions on the rules.
    Is it okay to power from the CPDM and only control the transistors with the PWM ports?

    Comment


    • #3
      Is this officially allowed?

      I can't seem to find anything searching in the official forums, but may have missed it. This seems more like a "custom circuit" as a transistor is an active device rather than a passive one. RE17 which would then disallow it (just as the MRI Color Beacon was.) Also, the nod to "passive electronics" is in RE11.b, but this section is pertaining to Sensors, which decorative LED strips are not. Of course the GDC might have some other form a reasoning...

      Have you (or anyone else) asked?

      Comment


      • #4
        We are not using the PWM port as a power source so therefore it should be legal.

        Comment


        • #5
          The color beacon is powered by the CDIM so therefore it would be illegal, but these LEDs are controlled by approved power sources.

          Comment


          • #6
            We did LED lights in our FRC team but didn't do it for FTC because I was under the impression of some rules regarding "custom electronics cannot have any external power source other than from motor controllers or CPM". We used up all our power ports for motor/servo controllers and are not sure we can do a Y-split cable on power connectors. Also, be careful on powering LED strings, it could draw a lot of current especially if you are using RGB (3 times the current). Each color can draw up to 2A each depending on the length. We did it for FRC because FRC robots have big batteries and generally can sustain that kind of current. But for FTC, I rather preserve our power for the motors! Now if somebody tell me that we can put a second battery just for powering LEDs, then it may work but I am under the impression that's not allowed.

            Comment


            • #7
              We dim the lights so that we don't use up much battery. We also only run them during tele-op which helps sustain battery. We asked about using a second battery but it was ruled illegal.

              Comment


              • #8
                Originally posted by RollerCoaster45 View Post
                We dim the lights so that we don't use up much battery. We also only run them during tele-op which helps sustain battery. We asked about using a second battery but it was ruled illegal.
                What is your power source for the LED string? The PWM output in the CDIM is just providing input to the Darlington transistors. Who is powering the transistors? Did you tap into the Core Power Module power? Also, if you have spare motor controllers, you don't even need transistors, you can drive the LEDs from the motor controller output but of course you need one channel per color. So if you have RGB, you need 3 motor channels. Alternatively, if you are satisfied with 7 colors + dark, then you could use digital output channels on the CDIM but in that scenario, you still need transistors, one per color.

                Comment


                • #9
                  Yeah we just tapped into the Core Power Module because it is an approved power source. We don't have spare motor controllers because we don't want to use additional USB hubs. We didn't want to use digital because we already have 2 CDI and with digital, we would not be able to dim.

                  Comment


                  • #10
                    Originally posted by RollerCoaster45 View Post
                    Yeah we just tapped into the Core Power Module because it is an approved power source. We don't have spare motor controllers because we don't want to use additional USB hubs. We didn't want to use digital because we already have 2 CDI and with digital, we would not be able to dim.
                    Wait, RGB requires 3 PWM channels and one CDIM has only two PWM channels. Are you using two CDIM?

                    Comment


                    • #11
                      Yes because of our IMU sensor problem that we have from a previous post we need two CDIM

                      Comment


                      • #12
                        Originally posted by RollerCoaster45 View Post
                        Yeah we just tapped into the Core Power Module because it is an approved power source. We don't have spare motor controllers because we don't want to use additional USB hubs. We didn't want to use digital because we already have 2 CDI and with digital, we would not be able to dim.
                        Actually, if you want to dim you could use 3 AnalogOutput channels driving three transistors. But of course, CDIM only has two AnalogOutput channels so you need two CDIMs.

                        Comment


                        • #13
                          I would have to look into that. We have a ton of robot stuff to get done so I don't know when we'll get the time.

                          Comment


                          • #14
                            I suspect that driving LEDs in this way will be ruled as not in compliance, I suggest you explicitly outline this scenario for a ruling. There have been a number of questions trying to avoid the requirement to use a core motor controller to control LEDs that are not being wired as always-on to the PDM, and all have been disallowed so far. In addition, a breadboarded custom circuit is also disallowed per RE17.

                            FYI, mikets, splitting power connections is explicitly allowed. A second battery for LEDs is explicitly not allowed. Both of these points are covered either in the game manual or in the rules/questions/answers threads.

                            Comment


                            • #15
                              It's fun to play with the AnalogOutput ports because you can use them as a signal generators. Aside from outputting a voltage of your choice (which you can program to make your LED brighter or dimmer without doing pulse width), it can generate sine wave, square wave and triangular wave. Our library has a module that uses it to play music. But of course, you need to hook an audio amplifier to it. It doesn't have the current to drive a speaker directly.

                              Comment

                              Working...
                              X