Help with LED Cluster needed (Urgent)

Hi,

I need to get this project done as soon as possible (it's part of a bigger project for university), so any help is much much appreciated! Everything works with 1 LED as well as 8 LEDs (on a breadboard using 330 ohm resistors), however I would like to use the LED cluster I bought instead of just 1 LED or 8 LEDs. Also, if you have an ideas for increasing the sensitivity of a sound sensor, please let me know :)

I have the following LED Cluster from Maplin: http://images.maplin.co.uk/300/pd01b.jpg How would I go about connecting this LED cluster to the Arduino? (Please bear in mind I am a total newbie in electronics).

int sensorPin = 4;
// Setting the input pin for the sound sensor
int ledPin = 13; 
// Setting the output pin for the light emitting diode 
int val = 2;
// Variable to store the value coming from the sensor

void setup() {
pinMode(ledPin, OUTPUT); 
// Setting ledPin as the output
Serial.begin(9600);
// Initialising serial communication with computer
}

void loop(){
val = analogRead(sensorPin);
// Reading the analogue value from the sensor
Serial.println(val); 
// Sending the signal to the computer in the form of ASCII digits

if (val > 3) { 
// If the signal value received from the sensor is higher than 460 
digitalWrite(ledPin, HIGH); 
// Then turn the LED on
} 
else { 
// Otherwise
digitalWrite(ledPin, LOW); 
// Turn the LED off
}
delay(30);
}

LED Cluster details:

Specifications (IF=200mA) Maximum luminous intensity: 23000mcd Viewing angle: 40° Typical forward voltage: 9.6V (11.2V) Peak wavelength: 660nm Maximum reverse current: 100µA @ VR=18V Power dissipation: 2.5W max. DC forward current: 250mA max. Reverse voltage: 5V max. Operating temperature range: -5°C to +65°C

As I said before, this is for uni, so I am stressing a lot right now, any help is appreciated :)

There’s more than one way to go about this.
The attachment is but one of many.
(It features a “logic-level” MOSFET.)

pd01poss.JPG

Hi thanks for your reply. My problem is also I don't really understand most technical schematics :/ The only thing I recognise are the resistors :blush: I have a 9v battery box the cluster can run off by itself (if attached directly). Would I be able to use this as power for the Arduino, that will then power the LEDs?

cschmeer: Hi thanks for your reply. My problem is also I don't really understand most technical schematics :/ The only thing I recognise are the resistors :blush: The LED cluster is represented by the diode inside the big circle, you get the resistors, so all what's left is the MOSFET. You can do a little "googling" on that much, mate.

I have a 9v battery box the cluster can run off by itself (if attached directly). Would I be able to use this as power for the Arduino, that will then power the LEDs? 9V is not enough. The name of the game for the LED circuit is: "12V Or Bust". The Arduino should be OK with 12V as "V_in".

Is there any way of doing the same with one of the products Maplin offers? (They're open on Sundays, so I can go and buy it tomorrow.) http://www.maplin.co.uk/search?criteria=MOSFET+op-amp

Why search for op amps? You want a logic level FET and a 12 V supply, a 9V battery pack is not sufficient.

Maplin doesn't have a lot in the way of MOSFETS, two actually. They have an IRF540, but it will require an NPN in front of it, to switch the gate voltage (5V not enough.)

http://arduino.cc/forum/index.php?action=dlattach;topic=101169.0;attach=16753;image

In that schematic, the LED cluster and those 33? resistors is/are the block labelled "Load". It's "On" when the Arduino output is LOW and it's "Off" when the Arduino output is HIGH.

  • * * I know that there are NPNs good with getting > 200mA and more stuffed down them, but I was thinking how 1 cluster turns into 2, turns into 4... Anyway, I don't know what's "ideal", but this'll get the job done. It's not beta-dependent and V_ce isn't an issue either. * * *

I only need that one cluster and I want to use the simplest way possible. Would that be by using the Logic Level Mosfet you described in the first post? I have ordered one off eBay, hope it arrives soon...

Well you could get the NPN transistor and the FET from Maplins today, it will do the same job as the logic level FET.

Thanks for helping everyone. Just to make sure are these all the things I need?

http://www.maplin.co.uk/480-piece-e3-resistor-starter-pack-42453
for one 4K7ohm resistor.

http://www.maplin.co.uk/mos-fet-transistors-33843
one IRF540A MOS-FET transistor.

http://www.maplin.co.uk/33andohm-to-91andohmmetal-film-0.6w-resistors-341561
three 33ohm resistors

As I said, I am a total newbie in electronics, still kind of clueless (see illustration of my cluelessness below) :zipper_mouth_face: :blush:

I would go for a 10 ohm 10 Watt resistor in place of the three 33R resistors the catalog number is H22R

Hi thanks, I have now reserved these items:

H22R - 10W W/W 22R1 N63BH - E3 Resistor Pack1 (for the 4K7 ohm resistor) N10AH - IRF540A

Is there anything else I need? Could someone please have a look at the image I posted, I don't understand it completely. What's 2k? Another resistor? And why are there two 12v inputs? :blush: Again, thank you so much for helping out :astonished: :)

What's 2k? Another resistor?

Yes but you could use the 4K7 to save you getting another value.

And why are there two 12v inputs?

Just connect them to the same place.

You might want some strip board to build it on.

Grumpy_Mike: I would go for a 10 ohm 10 Watt resistor in place of the three 33R resistors the catalog number is H22R

The big, fat leads of those guys are hard to cram into breadboards.

cschmeer, Are you an adept solderer?

I made you a pictorial - I’m in an unusually good mood this morning.
I’m an atavism, an unapologetic fossil, a techno-coelacanth who puts pen to paper and uploads a picture of same. (I don’t/won’t do the “fritzing” thing).

That cluster/module has a red lead and a white lead, but I didn’t see anything in their info as to which is which, so I’m going with the “red=positive” assumption. You may want to get some guidance from the good people at Maplin (who are anxiously awaiting your call.) :smiley:

[I have some similar devices which have red & green LEDs. Their lead out is White (CA), Red (reds K), Green (greens K).]

howtodoit.jpg

Hi again,

the Maplin store I went to ended up not having the IRF540A afterall, although it was in their system and reserved :astonished: :~ I got everything except for the IRF540A, so I'll go to another Maplin first thing tomorrow morning (I didn't get a 2k resistor, as Mike suggested using a 4k7 resistor will be fine?)

@Runaway Pancake: I have soldered before when putting this sound level meter together: http://www.maplin.co.uk/pocket-sound-level-meter-26071 At the beginning I had some difficulties, but after a few times it was fine. This was before deciding to go the Arduino route for the project and wanting to use a cluster of LEDs :P I think I may buy a strip board. This will do, right? http://www.maplin.co.uk/stripboard-1918

Thank you so much for that pictorial, it's exactly what I needed! XD I just don't seem to get technical schematics :~ I'll try to put everything together tomorrow once I have the IRF540A and strip board.

4.7K vs 2K = OK by me.
You have some soldering skills - Check.
If you know how to make use of a strip-board then that one should suffice.
Your work’s cut out for you.
Space stuff out as much as you can, in case you need to take a picture if/when you need more help.

Please post again when you have it working, too.

Thanks, I’ll post again once I have set everything up (or when I am stuck :blush:).
Meanwhile, I also wanted to ask: do you have any ideas for increasing the sensitivity of a sound sensor?

At the moment I am using the code below and the following sound sensor: http://www.ebay.co.uk/itm/Mini-High-Sensitivity-Sound-Sensor-Module-Arduino-Compatible-/280850850171?pt=LH_DefaultDomain_0&hash=item416403e17b#ht_3084wt_1151

Although its sensitivity is adjustable, it’s still not quite as sensitive as I would like it to be (it’s supposed to react to speech rather than louder noises). Is there any way of doing this using code or will I need some kind of amp? At the moment it does react to speech, but you really have to be quite close to the sensor.

int sensorPin = 4;
// Setting the input pin for the sound sensor
int ledPin = 13;
// Setting the output pin for the light emitting diode
int val = 2;
// Variable to store the value coming from the sensor

void setup() {
pinMode(ledPin, OUTPUT);
// Setting ledPin as the output
Serial.begin(9600);
// Initialising serial communication with computer
}

void loop(){
val = analogRead(sensorPin);
// Reading the analogue value from the sensor
Serial.println(val);
// Sending the signal to the computer in the form of ASCII digits

if (val > 3) {
// If the signal value received from the sensor is higher than 460
digitalWrite(ledPin, HIGH);
// Then turn the LED on
}
else {
// Otherwise
digitalWrite(ledPin, LOW);
// Turn the LED off
}
delay(30);
}

I looked at the schematic that they made available. It's a LM386 and they're using the 10uF gain programming cap, and that makes it X200 - so it's cranked all the way up, you could say. Maybe experiment with some "low tech" to improve the directionality and capture? Try a paper cone (a small funnel or something) around the mic?

Hi thanks, I'll try some low-tech solutions :)

About the 12v input, would I be able to use this http://www.maplin.co.uk/12vdc-0.5a-power-supply-with-2.1mm-tip-513515 cut the connector and use the two wires as power input for what I am doing?

Also, where can I get a PWM connector? (Is it a 4 pin connector usually used for computer fans?) Maplin didn't seem to have any or know what that is :roll_eyes: Is there another way of connecting everything to the Arduino?