We programmed our robot to have LEDs on our robot when it does a certain action, but for some reason, the green LEDs became hot, hot enough to burn the skin. Is this normal? if it helps, we had it on a Y-cable. Any help on this would be great thanks.
And also, is there any way to program the LEDs to light up when the battery reaches a certain level? I’m a little doubtful of our batteries and the indicator on both the VexNet and Power Expander.
On the power expander there is a status port that can be connected an analog input on your microcontroller. Divide the value that it returns by 70.5 to calculate the power expander’s battery voltage. Choose a minimum value and set your LED’s digital output accordingly.
As for overheating… can’t say for sure, we’ve never used an official VEX LED.
The Vex LEDs should not become hot to the touch - something is wrong.
Are you sure you haven’t plugged them into the Y cable backwards? The two pins from the LED must be between the White and Red wires.
If you plug it in the wrong way around, it will be wired from Red to Black. This will cause it to stay on continuously and dissipate way too much power. An LED operated this way will not last long (I’m surprised it lasted long enough to even get hot).
If it got hot to the touch yet didn’t light you most likely connected it backwards unintentionally.
Those led’s don’t generate much heat at all, the only kinds of led’s that generate LOTS of heat are ones like this.
That will generate blindingly bright light along with the heat.
I am pretty sure that they have built in resistors in the led but it may not have and you could have also burnt the led out. However I have done this many times with other led’s and they didn’t get hot they simply ceased to work.
Using PWM you can control the duty-cycle, so resistors aren’t necessary. What I think happened is that swimmerhaid put the LED across red to black instead of white to black.
I wouldn’t bet on the use of PWM alone as a substitute for current-limitting resistors. Despite their name, current-limitting resistors limit the current through the LEDs by limitting the voltage across the LEDs. If you use only PWM as your control, you’re supplying the full DO voltage across the LED, but for only some of the time. The LED may well not be able to tolerate this.
If you place a capacitor between the lead from the DO to the LED and ground, then the capacitor will smooth out the voltage to the LED at duty cycles less than 100%. At 100% duty cycle, though, the capacitor will soon be at the DO voltage and won’t, therefore, be protective. A capacitor will also reduce the LED flicker. In most cases, though, the PWM frequency is high enough that flicker isn’t visible to the human eye, and it’s easier to use a resistor in series with the LED to ensure that the LED’s current limit is not exceeded.
It is, of course, possible that the VEX LED modules contain current-limitting resistors. (If I were making that sort of product, I’d certainly include them.) If that’s the case, then it may be the resistor, not the LED, that’s doing most of the heating.
The VEX LEDs do not contain internal current limit resistors because all the I/O Ports already have 1KΩ current limiting resistors. The LEDs are put together so that the anode is connected to the red wire (+5V) and the cathode is connected to the white wire (control signal). This is why writing a ‘0’ to the LED’s port turns it on, and a ‘1’ turns it off.
I would not recommend inserting a VEX LED into a motor port, since the red line carries full battery voltage. Plus you’d have to take over driving the motor ports yourself, since the 0.5ms-1.5ms PWM signal that the motors/servos use wouldn’t show anything interesting on the LED.
I agree - it appears to be enough current to light a fairly sensitive LED for status purposes, but you aren’t going to be powering any high-brigthness LEDs this way.
Yes, but the only ports on the Vex microcontroller that can (easily) generate PWM are the motor ports.
Right, which was the basis for my first post on this thread. If you plug an VEX LED directly into the microcontroller, it is impossible to insert backwards due to the polarized connector. The Y cable obviously allows them to be plugged in backwards, but it also allows you to plug a 2nd device in parallel - the 2nd device could be the cause of their problems.
A 2nd LED wouldn’t be interesting, because it would divide the available current across 2 LEDs (and neither of them would get hot). Plugging a limit switch in the Y adapter would cause the LED to receive a full 5V whenever the switch was closed, so that would be bad. Basically, I can’t think of a good reason to use these LEDs in conjunction with a Y cable.
Unless swimmerhair checks back into this thread with more info, I guess we’ll never know what was going on…
Well I think it was most likely that the LEDs were plugged in wrong. Thanks for all the help everyone. Unfortunately, however we burnt out the majority of the LEDs most likely because of this problem.