Powering 4 LEDS for a Halloween Costume Accesory

Hey everyone! I’m pretty new at trying to design my own circuits and need someone to double-check me and let me know if this little setup I’ve got going will work or not. It’s going to be integrated into a halloween costume. I’ve got a pretty basic understanding of electronics but I’m trying to expand it by working on little projects like this.

What I’m trying to accomplish:
I’ve got a force sensitive resistor that I would like to control the brightness of 4 small LEDs in unison. The harder I press on the FSR, the brighter the LEDs will get. It seems simple enough and I think I’ve got the code for it down.

I’m attaching the schematic, as I’m planning it now, in JPG format.

Parts info:
The LEDs I’m using are Vishay VLMU3100-GS08 Data sheet:Here
Main infos - the LEDs have a forward current of 20mA, forward voltage of 3.2V, they’re tiny, surface-mount numbers.

I’m using an Arduino Micro board. Currently I’m planning on using a 9v battery for power, though I may switch to AA’s if that’s highly recommended. I will be using it over the course of about 3 hours with the lights only being turned on in short bursts, probably once or twice every few minutes.

What I need more experienced Pros to tell me:
Can I actually power 4 of these LEDs at the same time from the 3.3v line with them wired in parallel, as shown? I understand the 3.3v line has a max of 40mA. This is where I’m fuzzy. Would all four lights being powered at once draw 80mA and burn out the controller?

If the 3.3v line won’t do it, would the 5v line?

If that won’t do it, would splitting them in groups of 2, one on the 3.3v and one on the 5v line work?

I’m planning on using PWM to dim the LEDs. This setup works great with the FSR to dim a single LED, but will the PWM still work now that I’m planning on running the signal through a transistor?

Is the diode between the LEDs and the collector necessary?

Assuming the parallel wiring setup will work, do I have the proper resistance? I’m using this LED resistor calculator to figure it out, I’m just hoping I’m putting the right numbers in.

Hopefully that’s not too much to ask! I genuinely appreciate any help. This should be a pretty cool effect for my costume if I can get it all to work. :smiley:

HalloweenEye-Schematic.jpg

You can not wire the LEDs in parallel like that. Each LED needs it's own resistor.
Next the supply is too low, you need to power them from 5V and use a more appropriate value of resistor.

Finally those small 9V batteries are useless but might just do at a pinch for this low power application but I would recomend a bunch of AA battries.

Forgot to say how can you get anything but 1023 from that flex sensor as the analogue input is connected to 5V? So no matter what the resistor value is the voltage on the A0 is always 5V.
You need a resistor as well as your flex sensor.

Grumpy_Mike:
Forgot to say how can you get anything but 1023 from that flex sensor as the analogue input is connected to 5V?

Funny - he is doing the same as that other hit-and run merchant recently. Do I sense an "instructable"?

Paul__B:

Grumpy_Mike:
Forgot to say how can you get anything but 1023 from that flex sensor as the analogue input is connected to 5V?

Funny - he is doing the same as that other hit-and run merchant recently. Do I sense an "instructable"?

That is a destinct possibility.

Grumpy_Mike:

Paul__B:

Grumpy_Mike:
Forgot to say how can you get anything but 1023 from that flex sensor as the analogue input is connected to 5V?

Funny - he is doing the same as that other hit-and run merchant recently. Do I sense an “instructable”?

That is a destinct possibility.

I don’t think I follow? I’m specifically avoiding instructables and tutorials so that I can try to learn from my mistakes here. I know what I’m trying to do isn’t original, but I’m doing it more for the experience of piecing this all together “on my own”. Following tutorials is great and all, but I find that I don’t actually start learning anything until I start bending outside of the lego-instruction style “do this, expect this” box.

What I’m actually doing is putting this tutorial from the ARDX learning kit I got for an Arduino Uno a while back, and trying to combine it with what I’ve learned about transistors from repairing a blown amplifier board a few months ago. I know it’s a baby-step but that’s just where I am right now.

So upon review, it looks like I originally had the + and - flipped around for my force resistor, and I was missing a resistor on the - leg. I’ve referred back to the tutorial there and put in a 10kOhm resistor in the schematic now.

As for the LED resistors, that’s why I got on here and asked before I built this thing. The LED calculator website made it seem like a single resistor would do, but I knew that seemed odd. I’ve changed the schematic now to reflect the LEDs running from the 5v line, each with their own resistor of 27ohms.
Does this seem better/less smokey now?

Also, could someone elaborate why the 3.3v line wouldn’t work here? Is there not enough available current from this pin, or would 3.3v not be enough to power 4 components pulling 3.2v each?
Thanks!

HalloweenEye-SchematicRev2-01.jpg

could someone elaborate why the 3.3v line wouldn't work here?

There is not enough voltage to allow anything much to drop across the resistor.

That means it is not very effective at regulating the current. As a rule of thumb always have at least 1V across the resistor otherwise the resistor is too low to be effective.