Wiimote Project

Hardware Support => Other => Topic started by: Maxx2206 on June 01, 2008, 09:03:26 PM

Title: pulsed (pwm) leds?
Post by: Maxx2206 on June 01, 2008, 09:03:26 PM

has anyone yet successfully tried to use pwm driven leds for head tracking projects to save power?
i was wondering if driving the leds (preferably 940nm since thats apparently the highest sensitivity wavelength) with e.g. a small ATiny uC and pulse the output at some 10khz and 20-50% active state would still be sensed properly by the module or if it would result in noticable loss of quality.
i just began experimenting with the wiimote and im still away from actually deslodering the module (unless someone finds out where to buy them anyway ;) ), so maybe someone who already started using the module independently via i2c could run some tests and see if pulsing the leds would still give stable and strong readings.

in theory the scan should still be good if the pulsewidth is high enough, even with shorter active states, but the battery saving should be remarkable. that would be especially convenient for head tracking projects where people want good recognition without the need to build a massive ir led array (which would most likely be mandatory if you want to use reflectors and not active leds applied to your head, right?).

looking forward to hear your ideas/thoughts...
Title: Re: pulsed (pwm) leds?
Post by: inio on June 01, 2008, 11:50:50 PM
PWM won't save you power - LEDs don't get more efficient by pulsing them.  If you do want to use PWM driven LEDs for some reason, make sure the modulation frequency is at least 500Hz, and hopefully more towards 1kHz below that could cause tracking errors.  the timer module on an ATTiny should have no trouble generating that.
Title: Re: pulsed (pwm) leds?
Post by: Maxx2206 on June 02, 2008, 02:20:09 AM

sorry to disagree, but pwm on leds DOES save you power.
this is simply caused by the fact that the leds will be driven less than 100% (not continuously). a 50% pwm cycle will save you right those 50% batterie power over time. hence why all modern led flashlight applications use pulsed drive and achieve up to 50 hours and more with 5-10 leds driven out of 3 AAA batteries. the only thing to keep aware of is the reduced total light emission, but the exact ratio depends on running some tests.

so, the question wasnt if it saves current (as it does for sure), it was more the pwm frequency that would be needed to ensure safe and stable reading.
since the camera should scan at up to 200hz (gathered from various sources) i would think that 10 times this frequency would be the least to use. so 5-10khz seem a good choice.
anyway, im going to buy a bunch of 940nm leds later and run some simple tests myself. since my camera isnt desoldered i'll have to use the much simpler and much less accurate wiimote-tester app to see if theres a difference in dot size or recognition safety at different pwm settings.
Title: Re: pulsed (pwm) leds?
Post by: MyYz400 on August 07, 2008, 05:08:26 PM
Well I have to agree with 'inio'.  You wont save power.  LEDs draw VERY little power as it is.  The LEDs I use draw 100mA, which is about average for a typical LED.  If you were to PWM the LED, and say you ran it at 50% duty cycle, you'd use equivalent of 50mA to power the LED, yes.  However all the support electronics needed to run the LED, you'd be using 120mA just for that, no including the LED.  So yes your LED is only drawing 50mA now, but the device as a whole will be drawing quite a bit more. So even if you were to build a device that were able to draw less then 50mA, with a 50% duty cycle LED.  You'd be hard press to be really saving that much battery.  I think it would be cheaper, easier, and more space effective to use larger batteries.