Community Question

Hi all, I could use some advice from more knowledgeable folks (and ‘more knowledgeable than me’ in this case likely includes: everybody who could possibly be reading this post, ha)

Goal: I would like 2 warm-light spot-lights with brightness control via EZB (presumably via PWM object or the equivalent script command).

Purpose: these lights will be mounted/fixed in position (ie not on a mobile robot) to illuminate a target (~ 5 inch diameter) from a distance of ~ 8 inches.
The cable distance from the EZB to the LED will be 4 or 5 feet. The EZB is powered via a fixed 7.4V power supply.

I found these threads
Connecting Leds To The Ez-b V4:
https://www.ez-robot.com/Community/Forum/Thread?threadId=8756
Running A Led Of Port D6:
https://www.ez-robot.com/Community/Forum/Thread?threadId=7305
And these are helpful, but to be honest I don’t understand the tradeoffs between what LEDs I choose, the current they use, how bright they are, which pin (or supply?) they draw power from, whether I need multiple LEDs in series (or parallel?) etc.

As a datapoint I did buy these 2 Jorunhe LED spotlights: https://www.amazon.com/gp/product/B01DP874KC
User-inserted image
These are 1W LEDs that have a (detachable) AC driver. I hooked them up via an AC power cord and they are certainly bright enough (my primary criteria) and the light is warm in color. These have a substantial housing with a rotational pivot, but that is not a requirement. These have a lens that creates a spotlight but the lens is not a requirement (Edit: I removed the lens and housing, and am happy with how the 'bare' Jorunhe LEDs look).
(One solution that I considered is using a opto isolated relay like this: https://www.amazon.com/gp/product/B00TGTX23I -- {tho i’ve never hooked up anything like that, it sounds straightforward} with these Jorunhe LED spotlighs connected via EZB, but ideally I would like to have PWM brightness control.
I also considered disconnecting the AC driver from these LEDs and connecting the LEDs directly to the EZB and experimenting to see how bright they can be, but I decided I was likely to either ruin a port on the EZB or burn out the LED. Seeking advice seemed best instead.)
I would be happy to use these Jorunhe LEDs if possible, and/or happy to buy a different solution off the shelf (especially if it is under $40) or as parts. I am semi-capable enough to solder an LED to a cable with some heat shrink, but would prefer (is lazy the word I’m looking for? ha) to pay a little extra not to worry about whether I got the ‘short is minus long is plus' thing correct in all cases, ha

Is anybody willing to help point me in the right direction as to which 'warm light' LEDs (and other parts?) to use and how to connect it to the EZB? Thank a bunch for any advice and ideas.

-Richard ‘Twitch’ R
rregister
Commented July 2
Hi ptp

Quote:

I asked to measure the DC voltage:
1) Red/Black cables is the DC side, if you have a multi-meter double check the DC voltage



I measured the voltage across red and black where they emerge from the box
- with the Johunre LED detached: 17.2V
- with the Johunre LED attached/energized: 3V

ptp
Commented July 2
Solution 1
User-inserted image
ptp
Commented July 2
Solution 2
User-inserted image

You mentioned before:
EZB VIN = 7.4V

Resistor R value calculation:

R(Ohm) = V(V) / I(A) =>
R = (7.4 V - 3.0V ) / 0.3 A =>
R = 4.4 V / 0.3 A =>
R = 14.66 (Ohm)

Resistor R power dissipation:

P(W) = V(V) x I(A) =>
P = 4.4 V x 0.3 A =>
P = 1.32 Watts

something like:
15 ohm 2 W resistor will work.
https://www.digikey.com/product-detail/en/yageo/FMP200JR-52-15R/15ZCT-ND/2058972

Can someone validate both solutions ?
rregister
Commented July 3
Hi ptp,
This is great, i really appreciate your spelling-out these 2 solutions for me.
Solution 2 seems preferable to me as it is simpler and avoids the AC power connection. (I like these Johunre LEDs and now that i think i can control the brightness, i will likely buy some more of them.)
I think i understand the ohm's law (that's my level of sophistication, ha) calculation and i ordered the 15ohm resistors (i found some on ebay and think they are the same: https://www.ebay.com/itm/15-Ohm-2w-2-Watt-5-Tolerance-Metal-Oxide-Film-Resistor-10-Pieces/272507518919).

Question for Solution 2: Do i still need to worry about heat measurement and possibly adding a heat sink?

-thanks again so much for helping out!

-Richard 'Twitch' R
rregister
Commented July 9
LED work great with PWM now, here's some follow up photos
User-inserted image

User-inserted image

User-inserted image

User-inserted image

-thanks for the advice ptp!

-Richard 'Twitch' R
Question
Avatarrregister
Asked on Sunday, July 1, 2018