# 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!

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.