Help figuring out how this Circuit functions

Discussion in 'The Projects Forum' started by mattaus, Jan 18, 2013.

  1. mattaus

    Thread Starter New Member

    Jan 18, 2013
    16
    1
    Hi all,

    I'm a new member here so please go easy on me.

    Anyway, I'm busy trying to build a super simple and very small footprint controllable high brightness LED driver. Long story short I've spent the last 2 days trying to find appropriate integrated solutions and was at my wits end when I stumbled across this driver:

    [​IMG]

    It's perfect - a simple linear LED driver. It uses only 3 components, has multiple output levels (low/medium and a user configurable high) and functions off a single battery (Lithium Ion Rechargeable).

    What I would like to do is firstly modify the circuit to use a higher power LDO (between 800mA and 1000mA) and hopefully use a ATtiny controller.

    Now I can't really do this because of two reasons.

    1) I don't know how it's all connected. The VCC and GND pins on the uC and the LDO are obvious, as is the OUT pin on the LDO connecting to the positive LED terminal. I can't work out what other pins on the uC are connected.

    2) I want to know how this circuit actually works. It's no good blindly copying something because I've learnt nothing.

    Now in relation to part 2, I'm stumped as to how the LDO is working here. LDO's are constant voltage regulators, which as far as I am aware is bad for LEDs as they prefer constant current sources. So is the LDO providing constant voltage, or has it been set up in a manner I am unaware of that enables constant current? Furthermore the LDO only has an enable pin which I do no believe to be compatible with PWM, but I'm pretty sure it is using PWM to control the brightness.

    Any ideas? Your help would be greatly appreciated! This is doing my nut in lol.

    Thanks,

    - Matt
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    Reverse engineering is tougher than forward engineering. Instead of trying to adapt and modify an existing circuit, time might be better spent creating your own solution. I'm not suggesting reinventing the wheel. LED dimmers are a pretty well covered topic around here.
     
  3. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    It's likely also illegal and against forum rules to break copyright on a commercial product.

    If you had to repair on or just make one for yourself for hobby use that's a different thing, but your wording makes it sound like you want to design a product and want us to conspire to help you rip off someone else's product...
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    In the picture it looks like a PIC12F629 to me. If I hit "next" on ImageShack I get a schematic which is a pretty good representation of what you want to do... maybe. I have a personal adversion to giving a LED a voltage (without a limiting resistor) and not a current, but it is done. Perhaps the max current of the LDO is selected to keep the LED safe, that works.

    And yes, you can PWM the voltage like this to change the brightness. That's all the micro needs do, that and accept whatever changes the brightness level.

    I've done this before (using a current drive) and could set the brightness from nothing to full on.
     
  5. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    There are SOOOOOOO many LED driver specific IC's out there..

    That looks like its using a TI LDO (TPS736 series) with a max of 400mA..
     
  6. mattaus

    Thread Starter New Member

    Jan 18, 2013
    16
    1
    Thanks for the replies guys :)

    1) I'm not trying to rip someone off - the driver I have pictured above went out of production nearly 4 years ago and besides, I have since learnt the circuit is so common it'd hardly be seen as cheating to create a similar one.

    2) The circuit you hit by clicking next is one I drew up while trying to work it out. A friend actually ended up figuring it out :) I have since swapped out the uC for an ATtiny13, and the regulator for a TPS73512...so my max drive current is around 1000mA where I wanted it. I've also included thermal protection and battery voltage monitoring plus reverse polarity protection. The circuit is pretty different to what I originally was looking at:

    [​IMG]

    Please ignore my scribbled PCB on the left. I started experimenting with layout because I want to fit this all on one side of an 8mm or 10mm PCB and got lazy as midnight approached and passed me by. I'll sit down at some point and draw it up in CAD hopefully. If you notice anything wrong with the circuit itself I'd be happy to hear it. Sorry the drawing's a bit basic.

    The connections to pins 1 and 4 on the uC are for a voltage divider network setup to perform thermal measurements (thermal control). Pin 1 outputs a reference voltage and pin 4 reads the resultant value (which fluctuates based on temperature due to the NTC resistor forming the second half of the divider). The connection to pin 9 is a normal voltage divider for battery voltage monitoring. The Diode is for reverse polarity protection. Pin 6's output drives the enable pin on the regulator for dimming control.

    3) For the curious this is the explanation I got on the circuits function:

    4) I know there are thousands of potential solutions. This post wasn't just about finding one, but also an attempt to learn how this particular one worked, but while I am familiar with linear LED drivers, the way this one worked was doing my nut in, and I wanted to know! I am trying to learn after all :)

    Thanks,

    - Matt
     
    Last edited: Jan 18, 2013
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    So you ask "how does this circuit work?" then provide the detailed explanation you had in your pocket all along?

    What a waste of our time.
     
  8. mattaus

    Thread Starter New Member

    Jan 18, 2013
    16
    1
    And why on earth would I bother doing that? Honestly, please tell me because I can't figure it out.

    When I asked I didn't know. That's why I ask questions - to learn. I spent the better part of 2 days trying to figure it out. It was purely coincidental that I found out how it worked so soon after posting. Did it ever occur to you that I asked in more than one place? The internet is a great resource and using one forum or website is akin to going to a library and doing all your research from only one book. Or getting all your news from one TV station.

    Just. Plain. Dumb.

    Honestly I could have not bothered replying to this thread after I figured it out. Instead I came back and explained it. In fact I've gone and replied to all 3 forums I posted the same question in.

    I find that much more constructive than making disparaging comments.

    Thanks,

    - Matt
     
    DickCappels likes this.
Loading...