LEDs For Night Driving A GoPiGo3?

Carl wants to go cruisin’

For Carl to use the PiCamera to line up with the dock at night, when the lights in the room are out, I need to wire up a couple LEDs. I purchased some 5mm white LEDs that have a 560 ohm current limit resistor in series, so each LED will draw around 9mA when driven by 5v.

I’m guessing (GoPiGo3 schematic) that the 820 ohm resistor on the AD1/AD2 port input/output line is to limit the max current to 6mA (5v / 820ohm).

Supposedly a single RPI GPIO pin could source 3mA, up to a max of 16mA, with a 51mA “all pins” limit, but I don’t really want to connect wires direct to the Raspberry Pi.

I could probably figure out the resistor(s) for an NPN switching transistor, but I’m not eager to go that route if the DI Grove LED board can do the job.

I found the schematic for it, but I don’t know how to analyze the current flow if I connected two of my “560ohm-LED” (in parallel) to the LED socket of the board.

Is it 5 / (220+560) or 6mA through each LED? Or the 220.10k are forming a voltage divider so I really don’t know how to calculate this.

Maybe I need to cannibalize back to raw LEDs, then it should be 5/220 or 23mA through each led, but there is that 10k across the LEDs so who knows how this works out?

Any EE types able to help me out?

I should just buy it and see how it works, but I like to understand things first.

1 Like

Are you just trying to illuminate Carl’s way back or allow him to follow a signal?

Assuming that you just want visible light “headlamps”, the LED design you show would work if you tie V+ to +5 and the signal input to any Pi I/O pin you desire.

You can tie the inputs, VCC and VDD together and I don’t think you’d have a problem with the input current draw, since even if we assume the transistor b/e junction is zero ohms, the max draw at 3.3v is 0.0033 amp. I would expect it to be significantly less.

If you are really curious, find the part number for the LED/transistor driver and look up the data-sheet. That being The Word of God in this case. This should give you real-world numbers to work with.

Say “Hello!” To Carl from both Charlie and I, and have a wonderful New Year!

1 Like

Subsequently, Carl “discovered” that he can see in the dark using his accouterment of LEDs:

1 Like

Thanks, Be sure to check out Carl’s latest New Year Countdown Code for any GoPiGo (with a speaker, and espeak-ng TTS)

1 Like


Setting the LED’s to “bright” is a waste of power.

There is an interesting article on Adafruit’s site about power management for LED displays.

On this page:

if you scroll down to the “tone down the brightness” and “gamma correction” sections, it mentions that if you run your LED’s at closer to half power, you still end up with something like 90+ percent of the light.

Though this article is primarily about Adafruit devices and wearable costumes and such, these concepts are valid for any project using LEDs.

I think Carl will enjoy this article. :wink:

1 Like

Wow!! Thanks for linking it.

A long way down the days of future past, I hope to have Carl “teach himself” how to optimize his “life”, including figuring out how much additional light and when to achieve sufficient error rates on his object recognition to minimize processor load and power needs while maximizing success and error tolerance. (And codify what he has learned so we can pat him on the back - I’m pretty sure smart bots will still need a little encouragement sometime.)

In the meantime, I will experiment with toning down the brightness to find a safe level for Carl to start with.


1 Like


You and @thomascoyle11859 are working on getting your 'bots to walk on water and talk to the angels while I’m still working on getting Charlie to drive in a circle or square; without slamming into half the living room furniture or catching fire!

I look at your code base and get depressed.

Imaging? I’ll be happy if I can get the camera working!

Recognizing different objects or people?
Intelligent power management?
Finding its way “home” to charge?
Weed might be legal in Massachusetts, but I’m not gonna try it in Russia! And you gotta be getting better drugs than I am! :wink:

All I can hope for now is to “play” with my “toy chassis” and hope (eventually) to reach this rarified level of accomplishment.

1 Like