Improving IR LED output

Hmmm… Well, I’m certainly no expert at hardware but I’ve picked up a few things :wink: I’m not sure what OutputCompare may be doing. However, one thing you could do to test your circuit would be to just use an OutputPin and set it true then false to see if anything happens. Remember to only do this for a few milliseconds so you don’t burn up your LED.

@ Ian

Tried using a DigitalOutput to write to the output pin, no luck.

If I switch to using an unmodified cable, everything works properly, but it does not seem to work with the modified cable. Beginning to think that it’s not possible to use a separate power source for the eblocks, and still be able to signal them using the white wire.

I think I’m too tired to sensibly try to work this out any more tonight. Will have to take a fresh look in the AM.

Thanks for your help and suggestions!

ok, so let me just say I don’t have an IR led, never seen one.

Conceptually, a LED is a diode, with two pins a cathode and an anode. If you put the cathode to the positive and the anode to the negative then it won’t light up - reverse it and it will. Is there any chance you might have got the polarity wrong when compared to the robosapien one you borrowed?

Also, IR LEDs don’t necessarily emit visible light - so you may not know it’s on - if you took that earlier photo with the same LED then one of three things is going on, either you have connected the LED in reverse polarity, you’ve destroyed that LED, or you actually don’t have the power you expect to be there.

To eliminate these as issues, swap polarity, try it back in your eblock, and measure with a voltmeter.

So now back to circuits. I can’t really understand what your end-state is. If you want to use the signal wire (which is connected to a uC pin) to control the circuit, then you need to either source or sink current through that - if you source current via the pin, you need to connect the other side of the “component” to the GND, and if you sink current to the pin then the other side needs to be connected to +ve power.

If all you really want to do is provide more power to the LED you have/had on the eblock then all you need to do is reduce the size of the resistor. The resistor is the current limiting portion of the circuit, so by increasing the resistor you allow more current to flow through the LED producing a more intense light. If you do this long enough then the LED generates too much heat and will burn out.

So in my view, the simple test would be to short-circuit the resistor in the eblock you showed us, and see if the intensity increases.

If the reason you’re doing the test with a sacrificed eblock connector wire was to get a different connection method, then I would also set up an IR reciever on a Fez and see if you can detect a signal from a working IR remote control; then you can use that to prove that the wire method does or does not work as expected.

Good luck !

Hi Brett,

Thanks for the feedback, first of all.

After a bit of much-needed sleep, I think the issue is that what I put together with the sacrificed cable is not a complete circuit. I think perhaps I haven’t thought through the suggestion Ian made sufficiently to visualize it properly.

Perhaps I will take a step back and see about reducing the resistor size. That’s a great idea shorting the resistor…just have to make sure to do it in such a way that I don’t burn out the LED.

As for testing, I’ve been using my cell phone camera to check the state of the IR LED visually, since the cell camera doesn’t have an IR filter, which means you can (as in the previously posted pic) see the IR light output on the camera.

I’ve been periodically checking the output of the IR LED with a normal 3-wire eblock cable to ensure that I haven’t burnt anything out, and it’s still working fine with the normal wiring. So I’m definitely leaning towards this being a problem of poor wiring on my part.

Will test shorting the resistor and reply back with results. If that works, I’ve got a bunch of resistors available from my discover electronics kit, so it probably wouldn’t be too hard to swap the existing resistor out of the eblock.

Well, I woke up with fresh eyes also and have determined that I totally misread the eBlock last night. Here is what I believe you have at the moment which isn’t what I had in mind. Honestly, I don’t understand what is going on here. I thought the transistor was being used to switch the current on & off but it seems it has another purpose. Brett, please enlighten us.

Brett, what we were trying to accomplish was an amplifier circuit so we could get more current from the battery than the FEZ can safely source. Do you see any way to make this happen by only modifying the inputs? Everything else is fixed on the eBlock.

@ Ian,

Thanks…that means I’m not completely nuts. :slight_smile:

The pic makes the routing you had in mind quite a bit clearer…what software did you use to generate that?

One other little twist…this isn’t on a panda…I’m using the FEZ Spider with an eblock expander module, which unfortunately makes the connections a bit more obscure when you want to do this kind of tweaking (I’m a big fan of abstraction in general, but it does sometimes make it a little harder to get under the covers, so to speak).

All that said, what you have in the pic is, I believe, essentially how I have things wired up with the modified eblock cable, save for the fact that I’m using a voltage regulator and a couple of capacitors to provide a stable 5v, rather than the full 9v from the battery.

But the question is…when current is applied to PWM1 in your illustration, where does it go in the end? There’s no path for the current to return to the board, so there’s no circuit? Or am I missing something?

http://www.tinyclr.com/forum/1/2673/

@ Brett,

I tested shorting the resistor, and as expected, that significantly increased the output of the IR LED.

So next, I suppose, would be to try to make a rough guess of how much I can reduce the resistance before I end up burning out the IR LED. If I’m reading it right, it appears that the installed resistor for the LED block is a 5100 ohm resistor, which seems like a lot, at least for this LED.

Looking at my electronics kit book, it gives the desired resistor formula as:

R = (VS - VL) / I

VS on the FEZ Spider should be 3.3V.

On the package for the IR LED, it lists “foward voltage” [sic] as 1.2V.

Looks like the desired current for the IR LED is around 100mA (the package lists “radiant power output (100mA)”).

This gives us (if I’m calculating all this correctly) a desired resistor value of 21 ohms. With a supply voltage of 5v, the desired resistor value would be 38 ohms. I have 10 ohm and 100 ohm, but nothing between, so I would assume it would be wise to step up to the next highest above the desired value which would mean swapping the 5100 ohm resistor for a 100 ohm one.

Does that all make sense?

@ Architect

Nifty! I will have to spend some of my copious free time getting up to speed on fritzing. Looks like an extremely useful tool. :slight_smile:

It is actually really easy to use. You’ll be up and running quickly. ;D

Yep, Fritzing is very cool & easy to use. Virtually no learning curve involved. I know you’re using a Spider but since it doesn’t have individual pinouts and I haven’t got around to downloading all the new Fritzing parts, it was just easier to show using a Panda. If just adjusting the resistor gets you the range you need then that’s certainly going to be the easiest solution. I thought we were trying to get something closer to 1A which isn’t possible to source from the Spider w/o causing damage. Let me know how it goes and we’ll try again tonight if you don’t have it working by then. I hope you’re planning to document all this on your blog when you’re done.

@ ian

Smaller resistor seems to be working, within reason. I don’t have an accurate way to measure the IR LED output, but range seems to be better, it certainly seems brighter on my cell phone camera, and no magic blue smoke is coming out of the LED, so I think that’s all good.

So in the end, I started with the yellow LED eblock, replaced the yellow LED with a 5mm IR LED, and replaced the existing resistor (which I think is a 5100 ohm…Gus, can you confirm that?) with a 100 ohm resistor.

Here’s a pic of the final modded eblock:

After a good bit of testing, I can say with confidence that the range is significantly improved.

I may want, when I have a bit more time, to build an IR LED array to get a bit more coverage (wider angles), but this is pretty good for demo purposes.

Thanks to everyone who provided tips or ideas…feels great to have accomplished this with all your help! :slight_smile: