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
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
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
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".
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.)
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...
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?
Again, thank you so much for helping out
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.)
[I have some similar devices which have red & green LEDs. Their lead out is White (CA), Red (reds K), Green (greens K).]
the Maplin store I went to ended up not having the IRF540A afterall, although it was in their system and reserved :~ 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 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.
Thanks, I'll post again once I have set everything up (or when I am stuck ).
Meanwhile, I also wanted to ask: do you have any ideas for increasing the sensitivity of a sound sensor?
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?
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 Is there another way of connecting everything to the Arduino?