ArmyTek        
Results 1 to 10 of 10

Thread: Creating a USB-powered 5V vanity mirror

  1. #1

    Default Creating a USB-powered 5V vanity mirror

    Iím in the process of creating a jewelry box in solid oak, where the lid of the box acts as a mirror. Iím exploring the possibility of adding LED lighting into the mirror the same way it's done with a lot of other vanity mirrors: https://www.amazon.com/FUNTOUCH-Rech...707996&sr=8-39.


    I want the lights to be powered by USB (which would make it 5V LEDs from what I understand), to avoid the multiple-different-power-connecters issue. It would be great if one could dim the LEDs to different brightness levels and it would be nice if one could choose between different light levels (different K-values), but these two things are not a necessity.


    I've read up a bit on LED lighting on - https://www.waveformlighting.com/learn - but I'm still very new to LED, so I have a lot of questions that I was hoping you could help me out with:



    • What do I need to create different brightness levels for my LEDs?
    • What do I need to create different light levels (K-values) in my LEDs?
    • Do you think the aforementioned mirror uses something similar to LED light strips - https://store.waveformlighting.com/c...for-commercial - behind the glass?
    • To diffuse the light, would it be enough to simply sandblast the surface or what would you do to diffuse the light properly?
    • Where would I go about buying what I need for a project like this?



    I know that was a lot of questions. I hope some of you can put me on the right track.

  2. #2
    Flashaholic* DIWdiver's Avatar
    Join Date
    Jan 2010
    Location
    Connecticut, USA
    Posts
    2,655

    Default Re: Creating a USB-powered 5V vanity mirror

    Hello, and welcome to the forum!

    Well, I'll answer a few of your questions. There are three ways I can think of to change brightness levels - change the current in the LED, change the duty cycle of the PWM (more on that later), and turn off some LEDs.

    A "5V" LED is actually a lower voltage (around 3V if it's white) plus a resistor to drop the extra voltage. Changing the value of this resistor would change the current it lets through, so would change the brightness. If you changed the supply voltage instead, that would also change the current, and thus the brightness.

    Another way to change the brightness is to PULSE the current on and off. Usually this is done at a fixed frequency, and the WIDTH of the pulse is varied, or MODULATED, you have Pulse Width Modulation or PWM. By modulating the pulse width you are varying the ratio of on time to off time. If the frequency is high enough, the human eye will average them and the light will appear smooth, and varying in brightness.

    Turning on more or fewer LEDs is pretty obvious.

    The K-value you refer to is commonly called the 'color temperature' because it is the color of a black body radiator at that temperature in Kelvins (abbreviated 'K', if you can imagine that . Once an LED die is completed, it will have a fixed color temperature (not completely, but under normal operating conditions it won't shift but a tiny amount). The only practical way to change color temperature is by mixing. By changing the brightness of various color LEDs, you can change the appearance. If you use Red, Green, and Blue (maybe one or two others for good luck) you can create almost any hue. This is what the Philips Hue bulbs do. A common way to do 3-temperature white is to have some cool whites and some warm whites. Turn them both on and get neutral.

    I would imagine the mirror you linked to probably has a fully custom printed circuit, but it may not be very different from the strip you linked to except for the shape. For a 1-off DIY project, basing it on a strip may be the best way. There are strips designed for variable color temperature.

  3. #3
    Flashaholic
    Join Date
    Nov 2009
    Location
    Ottawa Ont. Canada
    Posts
    398

    Default Re: Creating a USB-powered 5V vanity mirror

    Strips you link to are pricey and run from 24v.

    "USB" 5v strips have white LEDs wired in parallel with series dropping
    resistors on the strip itself. To vary brightness you need some sort of
    controller, which will either vary the voltage up or down (inefficient)
    or as DIW suggests uses PWM dimming with higher efficiency. Overall
    efficiency will still not be great (dropping 5v down to 3v), if that
    matters e.g. using batteries. You could supply less than 5v from (say) three
    rechargeable 1.25v cells in series, for lower intensity.

    An advantage of PWM dimming is it does not affect the tint of white
    LEDs which changes with current (but not sure how many would notice).

    I have been playing with low-cost RGB strips. They can create white
    by mixing RGB, but some not very good at doing so; mine is typically very bluish.
    However, the controller itself could be connected to a white LED strip and dim it.
    Mine uses eight steps of dimming, controlled conveniently from an IR remote.


    Dave

  4. #4

    Default Re: Creating a USB-powered 5V vanity mirror

    Thanks a lot for the responses. I know the questions are newbie questions, but I'm kind of new to all of this :-).

    Changing the color temperature is secondary. I just wanted to hear if there was an easy way of doing it, but it sounds like it might become unneccesarily complicated, so I think I'll skip that.

    It sounds like there are some interesting solutions to the "dimming" issue. The light has to be pretty uniform, so turning half the lights off would probably create areas behind the tinted glass where the light is stronger than other places. Pulsing the light seems interesting as well, but it needs to be calm to the eyes, since people will be looking almost directly into the light.

    Using a resistor to change the current seems like the best option to me. Isn't it also the most "normal" way to do it? I haven't got a lot of space to work with in the mirror, so it needs to be relatively small. How would you go about finding USB-powered LEDs, resistors and whatever else I might need? Can you link me to some examples, so I can get an idea of what I should be looking for?

  5. #5
    Flashaholic* DIWdiver's Avatar
    Join Date
    Jan 2010
    Location
    Connecticut, USA
    Posts
    2,655

    Default Re: Creating a USB-powered 5V vanity mirror

    PWM dimming is generally best if you can do it, and you aren't doing lighting for cameras. To ensure that the human eye can't see the flicker, you need to be at 100 Hz or higher. Some people claim headaches or other ill effects from PWM even if the frequency is high enough they can't see the flicker. This should not be an issue with a vanity light due to short exposure, and even these issues go away at frequencies of 200 Hz, which are not difficult to achieve.

    If not working with cameras, PWM at 200 Hz or higher (I generally try for 500 Hz) would be my first choice.

    If you have any kind of intelligent controller, PWM should not be difficult to implement.

    Resistors are definitely a viable choice, especially in devices where high efficiency is not critical and/or controller inelegance is minimal.

    Don't pay any attention to thoughts about tint/CRI/color temperature changing if you change the current. Don't get me wrong, this is a real effect. In photography, where small changes are important, or with large dimming ratios, this could be significant. But with dimming ratios not more than 10:1, these differences will not be detectable to 99% of humans, and not important to most of those who can see it.

  6. #6
    Flashaholic
    Join Date
    Nov 2009
    Location
    Ottawa Ont. Canada
    Posts
    398

    Default Re: Creating a USB-powered 5V vanity mirror

    The only low-cost strips I have seen where you can change tint are ones with two interleaved sets of LEDs,
    of each tint; each set can be controlled individually. I can't point to specific product at the moment; the
    one I recall was set up for 12v operation. Gap between LEDs of the same tint may be enough to make
    the effect not very smooth.

    Selectively turning off some of the LEDs is not an option with many low-cost strips. That would require a setup
    with individually-addressable LEDs. Sounds like overkill for what you want.

    PWM control should be at a rate that your eye can't detect flickering. The cheap RGB string I refer to was running
    at 110Hz, below the 200Hz recommended but seems OK.

    Rather than sticking a resistor in series, why not look for a white LED strip of the right tint, which has
    PWM dimming control, which would be a whole lot easier and cleaner.

    If you decide to do the resistor thing, you'll need to experiment with the resistance until you get the right
    brightness.


    Dave

  7. #7
    Flashaholic
    Join Date
    Nov 2009
    Location
    Ottawa Ont. Canada
    Posts
    398

    Default Re: Creating a USB-powered 5V vanity mirror

    Quote Originally Posted by DIWdiver View Post
    PWM dimming is generally best if you can do it, and you aren't doing lighting for cameras. To ensure that the human eye can't see the flicker, you need to be at 100 Hz or higher. Some people claim headaches or other ill effects from PWM even if the frequency is high enough they can't see the flicker. This should not be an issue with a vanity light due to short exposure, and even these issues go away at frequencies of 200 Hz, which are not difficult to achieve.

    If not working with cameras, PWM at 200 Hz or higher (I generally try for 500 Hz) would be my first choice.

    I would have thought 120Hz or a bit below would be enough, but even 110Hz at lower brightness
    (shorter pulse width) on these cheap RGB strips, very fast flicker is still detectable; more out
    of the corner of the eye (peripheral vision). Not objectionable, not nearly as evident as with Christmas
    lights, and not complaining as strips cost $4.50 each. Controller and remote are worth the price; both
    can be used with some other devices, for experiments, or as spares.


    Dave

  8. #8
    Flashaholic* DIWdiver's Avatar
    Join Date
    Jan 2010
    Location
    Connecticut, USA
    Posts
    2,655

    Default Re: Creating a USB-powered 5V vanity mirror

    At 120 Hz, I think few or no humans can see the flicker in central vision. There are however some who report queasiness and headaches at this and even higher frequencies.

    I can't imagine this is a problem with decorative lighting, i.e. Christmas lights, but when the LEDs are the primary light source, it certainly can be. In this case I recommend a minimum of 200 Hz, to eliminate the possibility of such effects.

    If 200 Hz is difficult to achieve, and it's a 1-off for someone, then maybe take a chance and see if that person is one of the few who have a problem with flicker.

  9. #9
    Flashaholic
    Join Date
    Nov 2009
    Location
    Ottawa Ont. Canada
    Posts
    398

    Default Re: Creating a USB-powered 5V vanity mirror

    I wouldn't consider the 110Hz situation "bothersome", just noticable in some situations.

    Side story:

    A friend who is particularly sensitive to ac flicker from Christmas lights resorted to full-wave rectifying
    his strings. With longer strings which were two stiched togther, only half were lit as they were crossed
    over on different polarities (I found this myself); so he proceeded to rewire them! Talk about unintended
    consequences.

    For low voltage strips, controller PWM rate is usually not specified. I just happened to put a 'scope on
    mine. One way to observe the duty cycle is to grab the string or strip close to the end, and wave it
    back and forth rapidly. So if flicker is likely to be a problem, may be better off with a better i.e. more pricey
    controller, but without specs, no assurances

    I guess the resistor dropping scheme would avoid all of this.


    Dave

  10. #10
    Flashaholic
    Join Date
    Nov 2009
    Location
    Ottawa Ont. Canada
    Posts
    398

    Default Re: Creating a USB-powered 5V vanity mirror

    Another "side story":

    I just completed a bench project to adapt a low-cost RGB LED IR controller to drive a high-power
    automotive-type LED spotlight (12v at approx. 1A), for on/off and PWM brightness control.

    Controller comes from translucent 3" Christmas tree ornament which lights up in single colours, or small
    selection of mixes by keys on the remote; all powered by one 1AA. These work well and look
    nice, set of 5 cost $10. It also has a 4h or 8h timer, and colour shift effect.

    RGB LED was disconnected and the "blue" drive output connected to the PWM input of the
    spotlight's driver (PT4115). A transistor was inserted in the path to drive the right sense of PWM,
    otherwise it would have been inverted. Also, controller PWM outputs 0v to 3.3v whereas the LED driver
    expects 0v to 5v.

    It works! By pressing various remote keys, several duty cycle steps ranging from 5% to 95% (and
    corresponding brightness) are available.

    On the scope, PWM period was 3.5ms, approaching 300Hz, much better than 110Hz of the
    low-cost RBG strips.

    Possibly it's my imagination but at very low duty cycle/brightness I can still slightly notice a bit
    of fine flicker, moving my head back and forth, and only in peripheral vision.

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •