Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Just want a pulsing led

Status
Not open for further replies.
AnalogKid- ideally I want the light to fade on when the temp is above a threshold and fade off when it is below the threshold.
One transistor and a couple of resistors should do it. I'll try to whip up a schematic tomorrow.

ak
 
This is [hopefully] another way of doing it, that gives the brightness proportional to temperature; excuse the quick & nasty sketch, I was trying to emphasise everything as I did not know how clear a pencil drawing would come out in a photo..

The thermistor is the circled resistor.


The zener provides a fixed reference voltage to compensate for battery voltage variations; a "9V" battery drops to near 6V over its lifetime.

The circuit is in principle a voltage controlled current sink; adjust the preset so there is no LED current when the thermistor is cold.
With the thermistor warm, the emitter should be at around 0.3V and the 15R emitter resistor sets the current at that to around 20mA.
You can change that to vary the "warm" brightness.

The upper resistor in the LED feed is idiot proofing, as without that the current will continue to increase with temperature - if it's eg. ever left leaning on a heater, it could fry the LED with excess current.
That extra resistor should be selected to match the maximum wanted LED current, based on a 6V supply so it does not limit as the battery voltage reduces.

There should also be a resistor from base to emitter on the transistor; I forgot that when drawing it... Use something like 100K or 1M, just to bypass any leakage currents.

You could use a darlington rather than the single NPN transistor; if so, omit one of the base diodes to keep the same voltage relationships.

IMG_8764.JPG
 
This is [hopefully] another way of doing it,
That is a variation of where I was headed. I get the zener addition, but that is a lot of battery power down the drain when the circuit is waiting. Maybe something with a TL431 would have lower standby current.

Another thought is to ditch the thermistor and go with a switch. Not a clicky switch, but two small pieces of aluminum foil. Now the circuit is nothing more than one FET, one LED, and two resistors, and standby current is 0.0 mA. As long as something has to be placed on the outside of the cane handle somewhere ...

That is a question for the TS: What is your plan for locating the thermistor in the cane handle?

ak
 
Last edited:
I know simulations are not always accurate to a real circuit but I tried simulating that diagram and I can't get the resistor relationship right with only a 3k ohm difference between on and off.

AnalogKid- Was going to put the thermistor under the copper cap so my palm will warm it. I have also considered giving the cap a little play so when I press on it it makes contact with something inside to act as a switch. 15590479383594978758705550831596.jpg
 
If you've already got two pieces of copper with an insulator between them, that is perfect for a contact switch. Your skin resistance completes a circuit that turns on a small MOSFET that turns on the LED.

ak
 
Ha never considered using myself to complete a circuit. In my line of work that usually hurts. Will an IRF640N power MOSFET work?
 
Will an IRF640N power MOSFET work?
Massive overkill, but yes. A more typical part for this is the 2N7000 / 2N7002.

Here are two variations on a theme.

In the left (#1) schematic, the transistor is configured as a source follower. The voltage at the source approximately tracks the voltage at the gate. It is not nearly as close to 1:1 as with a bipolar transistor, but close enough for this application. C1 slowly charges up through your hand resistance, and this voltage ramp makes the LED come on slowly. When you let go, R1 discharges C1.

In the right (#2) schematic, the transistor is operating at full gain. The up and down voltage ramps on the gate are the same, but the transistor gain makes them appear nuch faster across the LED; the LED still will ramp on and off, but with more "snap".

There is a third variation where the charge in the timing capacitor is recovered to power the LED during the turn-off ramp, but the capacitor is much larger.

As above, the current drain on the battery between uses is essentially zero.

ak
LED-Cane-1-c.gif
 
Last edited:
Massive overkill, but yes. A more typical part for this is the 2N7000 / 2N7002.

Here are two variations on a theme.

In the left schematic, the transistor is configured as a source follower. The voltage at the source approximately tracks the voltage at the gate. It is not nearly as close to 1:1 as with a bipolar transistor, but close enough for this application. C1 slowly charges up through your hand resistance, and this voltage ramp makes the LED come on slowly. When you let go, R1 discharges C1.

In the right schematic, the transistor is operating at full gain. The up and down voltage ramps on the gate are the same, but the transistor gain makes them appear nuch faster across the LED; the LED still will ramp on and off, but with more "snap".

There is a third variation where the charge in the timing capacitor is recovered to power the LED during the turn-off ramp, but the capacitor is much larger.

As above, the current drain on the battery between uses is essentially zero.

ak
The capacitors I have are 1000uf. How does that effect these schematics and does that open up the third option?
 
With that size cap I'd start with circuit #2. If things don't happen fast enough, decrease R1.

To try #3, start with #1. Disconnect the top of C1 from the gate. Connect it to the source (top of R2).

ak
 
With that size cap I'd start with circuit #2. If things don't happen fast enough, decrease R1.

To try #3, start with #1. Disconnect the top of C1 from the gate. Connect it to the source (top of R2).

ak
Thank you. I'll have to wait till tomorrow to try it. That's when I can get the mosfets. I appreciate the time you have spent helping me.
 
If you are going to go with #3, add a 0.1 uF to 1.0 uF cap from the gate the GND. This will help protect the gate from transients.

ak
 
Hi

Suggestion...

Its up to you....but it seems like it would be difficult to see the difference of intensity. Wouldn't it be more useful if the LED turned steady on, or steady off, or blink, when some temperature threshold was reached?

eT
In case no one noticed. My design turns on at certain temperature above room temp and increases in flash frequency and average intensity by increasing duty cycle that is almost heart beat like rate. It also absorbs some static to protect the CMOS with a cap across the sensor and a large series resistor to limit current.

However the biggest consumer of current is the thermistor when OFF. So a 1M part would have been better than a 20k~25k part
 
Thank you. I'll have to wait till tomorrow to try it. That's when I can get the mosfets. I appreciate the time you have spent helping me.
So I built the circuit on a breadboard the led will only light when I touch the touch contacts together. Even wet, the resistance of my skin is too high I assume. The battery is down to 7V
 
1. Which circuit?
2. LED color?
3. Increase R1 to 1 M.

7V for circuit #1 and a large power MOSFET are not a good combination, because there is 2 V -ish voltage drop across the FET (look up the FET's Threshold Voltage on its datasheet).

ak
 
I didnt realize the V drop was so much on my mosfet.
Circuit #2
Led is pink but that can change. Green or blue work well also.
No difference with a 1M.
I will try a new 9V tomorrow. And I can re design the switch so that it is metal to metal contact
 
In circuit #2 the FET is fully enhanced ("saturated"), and the threshold voltage does not affect the drain-source voltage because of the circuit configuration. Hmmm ...

ak
 
Why do you talk about the "threshold voltage" which is when a Mosfet is barely turned on (0.25mA) and is almost turned off? The datasheets for the 2N7000 and IRF640 show that they are turned on well when their Vgs is 10V. A modern "logic level" Mosfet should be used like an IRL540 (see the L in the part number?). A logic level Mosfet turns on well when its Vgs is only 4V. A 9V battery soon drops to 4V.

The graphs show a "typical" device which turns on well when it has a low Vgs but where can you buy one that does not have minimum spec's? Don't you want all circuits you build to work properly and not just the ones that have typical or better spec's?
 
Because teaching is more productive than complaining.
The complain From Thejcnr was that the Mosfet that needs a Vgs of 10V to fully turn on was not turning on properly when the battery was 7V and his skin resistance is high (dividing the 7V).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top