Page 1 of 1

Using GPIO for Warning lights: Lights remain partially lit

Posted: Wed Jan 04, 2017 4:35 am
by rphelan
Hi Race Capture-ers (Is that a thing?)

I'm trying to use the GPIO ports to trigger a warning light on my dash. I have 12V from the battery hitting the positive side of a 12V LED. The negative side of the LED is attached to a GPIO port on my RCP. Since the documentation says that GPIO connects to ground, I figured this would do the trick.

Everything works great, my scripting triggers the lights as expected, but the problem is that the bulbs stay slightly lit when the GPIO signal is set to OFF.

When the GPIO signal is set to ON, the light shines brightly. When it's set to "Off" it's still dimly lit instead of off.

I've attached a diagram of what I've wired up.

Anyone have any idea why this would still be an issue?

Posted: Thu Jan 19, 2017 6:13 pm
by brentp
Hi,

The wiring looks reasonable. Do those LEDs have built in current limiting? Are the LEDs purchasable (link?)

What version of RaceCapture/Pro are you using (MK1 or MK2). When you say dim - how dim is it? I'm wondering if the LEDs are super sensitive to any leakage current that might exist when the output is off.

Posted: Fri Jan 20, 2017 5:19 pm
by rphelan
Hi Brent, thanks for the response!
I'm running an MK2

Here's the link to the LEDs: https://www.amazon.com/gp/product/B00PI ... UTF8&psc=1

They have a resistor built in and are supposed to be run off of 12v.

In terms of how bright they are when they're off, I'd say you could tell the difference between them and a fully un-powered bulb in bright sunlight if they were side by side, so enough to be bothersome on my gauge panel.

I'd be happy to consider a different LED if that would help.

Thanks,
Rob

Posted: Fri Jan 20, 2017 5:43 pm
by brentp
I just checked out those LEDs to purchase a few, but it's out of stock. Is there an equivalent in a smaller pack?

Posted: Fri Feb 24, 2017 11:39 pm
by GTIspirit
Not sure if it's related. When I tried to control the ShiftX LED's with a Mk1 I noticed they weren't as bright with the GPIO as the analog output. No response to my observation Why is ShiftX brighter on AnalogOut than GPIO?

My conclusion was that GPIO didn't totally get to 5V and 0V, there was some residual.

It doesn't take much to dimly illuminate a LED, sometimes a circuit diagnostic current is enough to dimly illuminate a LED.

How about driving your LED's using the RCPro 5V supply and controlling them with analog output like I ended up doing for the Improved script for staged, variable blinking ShiftX light

Posted: Sat Feb 25, 2017 12:25 am
by brentp
The GPIO outputs on RCP MK2 switch ground, and when off there is an open circuit. On earlier versions of MK1 the GPIOs have an internal pull-up resistor, which likely explains what you're observing. In MK2 we removed that pull-up so it could be compatible with a wider variety of operating voltages (5v - 12v)

I've tested these same LEDs (thanks for the samples!) and they light up somewhat dimly with a very low 0.3 mA current, which is likely coming the leakage current from the mosfets we're using.

I have it on my list to test with other LEDs we have at the Lab.

Posted: Mon Mar 12, 2018 11:29 pm
by PS14
Brent is there a fix for this, im having the same issue on a MK2. Dave

Posted: Fri Mar 16, 2018 5:01 am
by brentp
Hi,

Yes. The small amount of leakage current between the output and 12v causes sensitive LEDs to dimly illuminate.

The solution is to power the the LED with 5v, so there is no voltage differential. If this is a standard LED (not super high powered) then you can power it with the 5v reference from RCP.

Hope this helps,

Re: Using GPIO for Warning lights: Lights remain partially lit

Posted: Sat Mar 20, 2021 10:48 pm
by lightningrod
I know this thread is getting very old, but I just found it as I'm facing the same problem with my mk3. Since it still seems to be unresolved I thought I'd add my solution.

My circuit is exactly the same as OPs, but now I have added pull-up resistors across each of my LEDs. 1.9k ohms seems to have done the trick. 3k was too high.

Rod.