1
\$\begingroup\$

I'm having a bit of trouble figuring out a suitable method to sense when some LEDs in my Garage Door Opener are on. This is a continuation of this project I asked for advice on recently. However I had made assumptions which turned out to be incorrect.

Situation

A power source (perhaps the same as Vout below) runs to a 1.5Kohm resistor which runs to 6 LEDs then a transistor of some sort. The transistor is attached to ground and pin 7 on a PIC18F4520. Pin 7 on the PIC is a digital out thus I'm assuming PWM is used to dim the LEDs.

I was hoping to use the voltage across the resistor as the control signal but it seems this will be too messy/difficult.

There are four points where I can easy wire into:

  1. Vout which labelled as 24Vdc 55mA. I measured it unloaded to be 37.5V. However with a 436ohm load the voltage was indeed 24V.
  2. Gnd
  3. Vrs the source side of the 1.5k current limiting resistor
  4. Vrl the load side of the 1.5k current limiting resistor

Goal

To use the Opener as a control signal to control an external light repeating the PWM for fancy dimming. The external light is a 12V 1W LED strip. Power for the external light I was hoping to also take from the Opener's Vout using a buck converter.

Current draft

Circuit schematic

Existing parts in the Opener: V2 = Vout and/or the LED power source (not sure if they're one and the same) R1 is the current limiting resistor D1-6 are the existing LEDs

Additional components for my circuit are: R3,R4 voltage divider to power the mosfet. M1 FQP27P06 mosfet, I've chosen another mosfet in ltspice which should be similar. V1 12v out from the D24V3AHV buck converter. R5 simulated load for testing in ltspice. This will be replaced with the external light.

Datasheets:

What I'm not showing here is the power coming into the buck converter. This will come from Vout and Gnd. My primary concern here is that my output will be all whack because Vout is not a constant voltage source it seems. That and I will be modulating the load on the buck converter meaning it's voltage might go all over the shop. There doesn't seem to be any data available from Pololu on the exact behaviour.

I've simulated the PWM from the PIC with S1 and V3.

The buck converter is > 80% efficient when Vin is 24v and driving 12v @ 48mA for the LEDs. Given 24v @ 55mA is 1.32W I calculate that I can safely draw 80% of this which is 1.056W. Not much room for error however?

Summary

I haven't yet received the parts I will be using for this so I haven't tested how the regulator is affected by changes in voltage supply or loading. The info on the site hasn't been much help.

I'm wondering if there's a better way of doing this? I'm probably causing myself headaches by trying to pull a signal from these four connection points. The problem is that nearly everything is SMD and I'm not confident enough with an iron to wire into the PIC pin or anything there.

Here's a picture of the circuit board showing the PIC and some of the existing LEDs

Also, I was wondering if there would be a way to also use the SHDN pin on the buck converter to draw less power when the system is inactive. With my current draft I can't see it being possible.

\$\endgroup\$
2
\$\begingroup\$

The circuit is fun to follow but very very very unconventional.
If you submit circuits like that Olin will have a triple fit and explode on the spot :-). The zig zagging layout style and having current flow and control "flow" in both directions makes the diagram very hard to follow, and the bits that you have left out also do not help.

BUT

Most of it seems possibly OK.

  • The Pololu buck converter information here accepts a wide range of inputs voltages and has an adjustable output voltage of 4 to 25V at 300 mA max.

  • The drive to M1 is ingenious but not certain to give good results. M1 should have a gate signal of no greater than 12V when it is turned off and a gate signal of between about ground and 6V when turned on. Your arrangement achieves something like this but relies on the supply rising to 37V when the LEDs are off (so 1/3 of 37 ~= 12V. and when LEDs are on and Vload supply ~~~= 24 V Vgate = 24/3 = 8V. This gives 4 Volts of gate drive which will work for some FETs BUT it is based on an ill defined loading of the power supply.

  • The FET that you have chosen datasheet here is a good one and the gate threshold voltage about matches your control method. It will probably but not certainly work in practice.

  • A more reliable method would be to use the PIC pin 7 to drive a small "jellybean" npn transistor - say 10K from PIC pin 7to NPN base. NPN emitter to ground. Then connect NPN collector via a say 1K to P Channel FET gate and connect a say 10k to 100k resistor between P Channel FET gate and source.
    Supply FET source from 12V from buck converter as already planned. The FET is now driven by the PWM signal and you will also get dimming of your 1 Watt 12V LD strip if PWM is applied to the original LEDs.

  • If you do not want dimming you can add a say 1 uF or so to the NPN base and a diode across the base drive resistor. The capacitor will be charged via the diode and discharged by the resistor when the PWM stops. The capacitor on the base will smooth the diode provided PWM so that you FET stays on during PWM. Fine tuning of cct required. Out of my head - probably OK but values may change.

\$\endgroup\$
  • \$\begingroup\$ Yeah I'm not overly keen on my design, hence my quandary. The main reason for it being whack is I'm trying to stick to the four points I can easily get wires to. Most of the Openers circuit is smd. The points I've chosen either have header posts or will be easy to solder wires to. I do like your solution using Pin 7 of the PIC but I'd have to solder a lead directly to the leg of the IC or one side of a smd and I'm not confident enough with an iron to try that. \$\endgroup\$ – snoopen Sep 26 '11 at 23:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.