Help with LED Cluster needed (Urgent)

cschmeer: 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? No, I think not. That's likely an unregulated supply. If you don't have a "lab supply" / "bench supply", you might consider making your own battery pack (AA, or C or, best = D cells maplin's JG74R) to come up with that 12V.

Also, where can I get a PWM connector? (Is it a 4 pin connector usually used for computer fans?) I have in that drawing "PWM pin". Yes. That means one of the Arduino's special-purpose PWM pins (so-marked on your board). Maplin didn't seem to have any or know what that is :roll_eyes: I'm sure they were wondering about you. :D Right - they're at the back of the store there, by the disgronificators. Is there another way of connecting everything to the Arduino? Depends on your needs. #22 solid wire works pretty good for interconnect with those Arduino board connectors. I'm trying to work the Maplin inventory for you, but they don't have much in the way of 0.1inch headers and so on that I noticed. Necessity is the Mother of Invention. Improvise.

I asked, but they were all out of disgronificators :grin:

Tomorrow I'll go and exchange that 12v supply :blush: and get the following: 2x Energizer Ultra Plus D 4 Pack (= 8x 1.5v) 1x Battery Pack for 8 "D" batteries

I am starting to set up the strip board now :) Thanks for all your help!

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

Catalog no. H22R is the wrong one isn't it? I thought "10W W/W 22R" means it's 10 watt / 22 ohm? Isn't H10R the one I need? ("10W W/W 10R"). At the moment I got the H22R / "10W W/W 22R"...

Also, any idea which side +/- is on the wirewound resistor?

Catalog no. H22R is the wrong one isn't it?

That is what the web site said was the number for a 10 ohm resistor, it could always be wrong but that is what it said. I would send you a screen dump but it is such a rubbish site it will not load the high power wire wound resistor page at the moment.

Also, any idea which side +/- is on the wirewound resistor?

There isn't one, you can connect it any way round you like. It is known as a non polarised component.

Grumpy_Mike:

Catalog no. H22R is the wrong one isn’t it?

That is what the web site said was the number for a 10 ohm resistor, it could always be wrong but that is what it said. I would send you a screen dump but it is such a rubbish site it will not load the high power wire wound resistor page at the moment.

Hi, I’ve attached a screenshot of what I mean. Isn’t catalog no. H10R, “10W W/W 10R” the right one? 10R = 10 ohm?

EDIT: Also, I have tried to make a final schematic. Is it right, or did I miss something / make a mistake? (see below)

10w.jpg

No that diagram is very wrong. A FET only has three connections and you have drawn four. The LEDs should be connected one end to the +ve and the other to the drain of the FET.

EDIT changed advice to correct one. That diagram had my head swimming it was so mixed up.

..the MOSFET's Drain (not its Source).

I previously posted a "technical schematic", as you call it, as well as the pictorial.

Why "re-do" it/them?

Hi, I needed to create another complete schematic including the 10 ohm W/W resistors etc. because since all of this is part of a larger project for university, I need to document all the steps / the process.

This is probably the most stupid question, but what do I connect the negative side of the 12w battery supply to?

12*V*

To Ground (Gnd)

! ! !

Sorry for the stupid question, I’ve never really worked with electrics before this project.
Also: It works, the light is on and it reacts to the sound, the problem is: the light should be off and only turn on when a sound is made (at the moment it’s constantly on and turns off when a sound is made).

EDIT: Argh, forgot the 10 ohm W/W resistor :fearful: Could that be the cause?
EDIT: Nope, I’ve added it, but the light is still constantly on when there is no sound :confused: Now it’s even on if the Arduino doesn’t have any power ?!

EDIT: Added photo (the yellow cable goes to the negative side of the battery)

the problem is: the light should be off and only turn on when a sound is made

Just turn it round in the software. If you are using analogWrite, use 255 - val in place of just val, or what ever variable name you use.

How would I do it if it's digitalWrite?

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 > 10) { 
// 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);
}

digitalWriting a HIGH turns it OFF digitalWriting a LOW turns it ON

analogWriting a 255 turns it OFF analogWriting a 200 makes for a dim ON analogWriting a 50 makes for a bright ON analogWriting a 0 turns it all the way ON Follow? It's opposite what you expect because the NPN inverts the Arduino output. You can deal.

[Hey, no more "forgetting" stuff!]

  • * * Try running it with "Blink", first * * *

Hi guys, just wanted to say thank you for helping again. Everything worked out great. I will post some pictures of what all of this was for once I am done :)

Meanwhile, I am looking for some help using an HC-SR04 Ultrasonic sensor to trigger a camera at a given distance: http://arduino.cc/forum/index.php/topic,103508.0.html

see you, chris :)