Force sensitive resistor plus LED plus battery. Will pressure on the FSR be able fade the LED brightness in and out?

I am trying to achieve a handheld firefly effect by using an LED that is controlled by the FSR in order to get the "firefly" light to fade in and out. Can someone give me an idea of how to set this up? Thanks!

If you try a simple series arrangement, you'll run into a problem with the specs of your fsr. Typical LED's require 1.8V to be lit, and no more than 25mA of current. This means that the resistor will have to drop the difference in voltage from the source at this 25mA. R=(V_{source}-1.8)/.025 If you have a typical 9V source, the resistance will be 288Ohms. Any lower, and the current will rise and break the LED. Too much higher, and the current will drop making the LED dim. Since FSR values are on the order of a couple hundred kOhms not pressed. The LED's will not be on when it's not depressed, and on only if you can press the FSR hard enough to get it's value below a couple kOhms.(Which requires almost 100 lbs from this one FSR I'm looking at) I'm pretty sure most of them don't get that low, but there may be low pressure ones and that might be what you have.

Just remember, always make sure there is some sort of resistance along with the LED to keep that current below the specification for your LED (usually 25mA). If your FSR can't get low enough, it can still be done with a transistor. I can help you do that, but this way might work if you FSR is low enough.

Alrighty then, thanks for your response! I guess I don't particularly care if I use an FSR or not, I just need to either be able to make the LED autonomously fade in and out at a specified rate OR be able to control the brightness manually, keeping in mind that this thing has to be able to be held in two cupped hands (like they were holding a firefly). The one other limitation is my own knowledge, as I have never built anything that required much calculation (though I am not afraid to try) and I currently don't possess a microcontroller or the knowledge to program one. If there is a better way to go about this, say with a transistor, then I am all for it. Just walk me through it. Thanks in advance, you guys are saving my butt

For intents and purposes it doesn't even matter if it is an LED, that was just the first thing that came to mind. If an incandescent source was small even and bright enough, I would be open to that as well. This device only needs to be able to run for about 30sec at a time.

Well, you can make a triangle wave generator with an offset and just put it in series with an incandescent bulb. (You may need a current limiting resistor.) That would give you a fading in and out effect. All you would need are some opamps, resistors, and capacitors. The resistor and capacitor values will determine the frequency of oscillation.

This seems like a good way to go...to my simple mind. Would you mind expounding on how to accomplish this? I apologize but you will really have to break down each component, what kind of op amps do I need as well as any formulas to determine the resistors and capacitors? Say I wanted to run this: http://www.amazon.com/Eiko-JCD6V20WH20-15003-G4/dp/B002CYQ5C4

And I wanted the light to fade up in 1.5 seconds and fade down in 1.5 seconds. Would I be able have the light be completely out for a length of time between fading? So it would fade up then down then be out for another 1.5 sec before fading up again? Thanks in advance!

It may look like a bit much, but it's not that difficult. If you don't know, the opamps are the big triangles. I've put the numbers for the pins on them for an LF356N opamp. Since you're thinking of a 1.5s on 1.5s off kind of thing, You'll want the period to be about 3 seconds. Here's a simple combo of R_{1} and C_{1} that works and is easily available: R_{1}= 1.5 MOhm, C_{1}=1 uF. If you're having trouble finding the right ones, remember that resistors in series add and capacitors in parallel add.

On to the triangle wave part. I know the integral may look scary if you haven't had calculus, but it's simply turning your square wave into a linear triangle function where the slope is determined by 1/(R_{2}C_{2}) If you make this equal 1, it will be more or less a perfect triangle with the top at 9V. If you try and make it equal to 2, the math says it will make a triangle twice as big. However, the opamp can't go any higher than the 9V that it's given, so it flatlines at that 9V. The same thing happens on the down slope of the triangle. It goes too steeply and reaches 0V and cant go any lower.

This makes a trapezoid wave, which is almost exactly what you wanted. It slopes up, stays on, slopes down, stays off. Some good values for this is: R_{2}= 500 kOhm, C_{2}=1 uF.

If you can get your hands on some variable resistors, you can make tuning knobs for frequency, brightness, and the integrator trapezoid shape (how quickly it goes from off to on.) Just make sure to put these resistors in series with some regular ones, especially on the brightness knob. LED's are fickle. Too much current and they break, too little and they get dim. With a 9V source, make sure you always have about 300 Ohms in series with a regular LED. If you throw a 10k variable resistor in also in series, it gives you a range of barely on to full brightness. For the frequency adjustment, make R_{1}=1 MOhm in series with a 1 MOhm variable resistor. For the integrator knob, just completely replace R_{2} with a 1 MOhm variable resistor. That way, it just turns into a plain square wave when you set it to zero and super slow rise/fall when it's at 1 MOhm.

Well, I hope that helps. If you can do all that, it will be more epic than you originally planned. If you're wondering, I did actually build this and it works swimmingly.

Wow, thank you so much for the detailed explanation. I have ordered the parts I need from digi-key and I will definitely let you know if I pull this off. I ordered enough parts to make three just in case, haha. Let me ask one more question; how would a higher brightness LED or even multiple LEDs affect this setup? In your explanation you suggest to have about 300 Ohms in series with a regular LED so as not to subject it to too much current correct? Is this figuring for about a 20mA 2.5v LED? I am very excited to get this thing up and running, thanks again!

Yes, you can put on more LED's. You have 9V max at the output, meaning you can get 3-4 LED's in series before you run out of voltage. Let's say you put 3 of these 2.5V LED's in series. You lose 7.5V there, meaning the other 1.5V is through the current limiting resistor. Using Ohm's Law (V=IR), you get R=75 Ohms.

If you want more than three LED's, put banks of two to three LED's in parallel. So, if you want 6 LED's you do a row of three parallel with another row of three. Since each row needs 20mA, the current going into this will be 40mA. Using Ohms law again, you get R=37.5 Ohms. You can do this setup until you have too much current being drawn from the battery, such that it can't supply that current at the specified voltage and it drops below 9V. Or, too much current is going through that resistor and it overheats. At any rate, more LED's means the battery dies quicker.

Not likely to work the way you expect. LED brightness is not really a function of the applied voltage ( for that, you need an incandescent bulb ). In order to dim an LED lamp, you have to think in terms of controlling the current to them, not the voltage. A typical single LED starts to conduct at around 3 Volts, and is at full brightness at about 20mA(for the sake of argument,here).

Dimming the LED by controlling the voltage is futile, as the full dim-to-bright range is covered over less than 0.5V.

On the other hand, a simple current source will provide you with excellent dimmability of your LED array across its full output range.

active| newest | oldestR=(V

_{source}-1.8)/.025If you have a typical 9V source, the resistance will be 288Ohms. Any lower, and the current will rise and break the LED. Too much higher, and the current will drop making the LED dim. Since FSR values are on the order of a couple hundred kOhms not pressed. The LED's will not be on when it's not depressed, and on only if you can press the FSR hard enough to get it's value below a couple kOhms.(Which requires almost 100 lbs from this one FSR I'm looking at) I'm pretty sure most of them don't get that low, but there may be low pressure ones and that might be what you have.

Just remember,

always make surethere is some sort of resistance along with the LED to keep that current below the specification for your LED (usually 25mA). If your FSR can't get low enough, it can still be done with a transistor. I can help you do that, but this way might work if you FSR is low enough.If there is a better way to go about this, say with a transistor, then I am all for it. Just walk me through it. Thanks in advance, you guys are saving my butt

And I wanted the light to fade up in 1.5 seconds and fade down in 1.5 seconds. Would I be able have the light be completely out for a length of time between fading? So it would fade up then down then be out for another 1.5 sec before fading up again? Thanks in advance!

_{1}and C_{1}that works and is easily available: R_{1}= 1.5 MOhm, C_{1}=1 uF. If you're having trouble finding the right ones, remember that resistors in series add and capacitors in parallel add.On to the triangle wave part. I know the integral may look scary if you haven't had calculus, but it's simply turning your square wave into a linear triangle function where the slope is determined by 1/(R

_{2}C_{2}) If you make this equal 1, it will be more or less a perfect triangle with the top at 9V. If you try and make it equal to 2, the math says it will make a triangle twice as big. However, the opamp can't go any higher than the 9V that it's given, so it flatlines at that 9V. The same thing happens on the down slope of the triangle. It goes too steeply and reaches 0V and cant go any lower.This makes a trapezoid wave, which is almost exactly what you wanted. It slopes up, stays on, slopes down, stays off. Some good values for this is: R

_{2}= 500 kOhm, C_{2}=1 uF.If you can get your hands on some variable resistors, you can make tuning knobs for frequency, brightness, and the integrator trapezoid shape (how quickly it goes from off to on.) Just make sure to put these resistors in series with some regular ones, especially on the brightness knob. LED's are fickle. Too much current and they break, too little and they get dim. With a 9V source, make sure you always have about 300 Ohms in series with a regular LED. If you throw a 10k variable resistor in also in series, it gives you a range of barely on to full brightness. For the frequency adjustment, make R

_{1}=1 MOhm in series with a 1 MOhm variable resistor. For the integrator knob, just completely replace R_{2}with a 1 MOhm variable resistor. That way, it just turns into a plain square wave when you set it to zero and super slow rise/fall when it's at 1 MOhm.Well, I hope that helps. If you can do all that, it will be more epic than you originally planned. If you're wondering, I did actually build this and it works swimmingly.

If you want more than three LED's, put banks of two to three LED's in parallel. So, if you want 6 LED's you do a row of three parallel with another row of three. Since each row needs 20mA, the current going into this will be 40mA. Using Ohms law again, you get R=37.5 Ohms. You can do this setup until you have too much current being drawn from the battery, such that it can't supply that current at the specified voltage and it drops below 9V. Or, too much current is going through that resistor and it overheats. At any rate, more LED's means the battery dies quicker.

Dimming the LED by controlling the voltage is futile, as the full dim-to-bright range is covered over less than 0.5V.

On the other hand, a simple current source will provide you with excellent dimmability of your LED array across its full output range.