Newbi need some help please

http://www.ebay.com/itm/Free-Shipping-New-2-pcs-x-2SA1020-A1020-PNP-50V-2A-Transistor-/150678364756?pt=LH_DefaultDomain_0&hash=item2315216254

Will this work for a 2amp current

I would suggest an N-channel mosfet over-rated at least 2x especially if you run it without a heatsink.

Thx i will wait a little with the 5m strip i placed an order for the transister for the 30cm strip Now i just need someone to translate that diagram into newbi please

You understand the basics of a transistor? That diagram is used for switching high voltage devices from a low voltages source safely. Basically when the base is HIGH, the output will be HIGH, (in that configuration) normally the output would be inverted.

The arduino can only put out 5V, but you need 12V to run the LED strip. So you would use a transistor to act as a switch, with the arduino being what switches it on or off. Same can be done with a relay, but they are too noisy. So with the arduino outputting a HIGH signal, the transitor will allow the current to flow to ground, to complete the circuit. So like a switch, if the switch is off, the LED won't go on.

Yes i know the basics collector emitter and base OK VDD side is for the 12v supply From the 1k you go to a pin on the arduino And the upside down triangle is the ground, i take it you have to get the ground from the supply and the arduino there? please correct me if i am wrong

yep, thats correct, as long as the grounds are connected.

Tx HazardsMind
I am of to bed now i is just about midnight here. Have a good one :slight_smile:

Edit:

I got it to compile :)

Hi
i need some help please. I am playing with a RTC. Now i want to turn a LED on at a certain time, but for some reason it does not work. Can someone check for me, the code compiles but all i get is the time ticking and a dead LED.

#include <Wire.h>
#include "RTClib.h"

/*-----( Declare objects )-----*/
RTC_DS1307 RTC;
int ledPin = 7;

void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  Serial.begin(9600);  // Ready to print to Serial Monitor  
  delay(500);  
  Serial.println("YourDuino DS1307 RTC Test. http://yourduino.com");
 
  Wire.begin();        // Start the Wire (I2C communications)
  RTC.begin();         // Start the RTC Chip
  
 /* Set the date / time to the time this program was compiled.
    Comment this OUT later to let the clock just run.  */ 
  RTC.adjust(DateTime(__DATE__, __TIME__));
  
}/*--(end setup )---*/

void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
  DateTime now = RTC.now();  //Get the current data

  
  Serial.print(" Time = ");
  Serial.print(now.hour(), DEC);
  Serial.print(':');
  Serial.print(now.minute(), DEC);
  Serial.print(':');
  Serial.print(now.second(), DEC);
  Serial.println();
 
  delay(3000);
{
if (now.hour() == 9 && now.minute() == 6);{}
  digitalWrite(ledPin, HIGH);
}
 }
if (now.hour() == 9 && now.minute() == 6);

There's your problem

@kimbo001 - I am new to Arduino as well and am fascinated by your project. I am curious about the Arduino board you linked to on eBay; I suspect that it is a clone, and not made by the actual Arduino project in Italy. The cloning part isn't that big of a deal since this is all open source, but the part that concerns me is that the "clone" board might not have the same quality as an actual Arduino board, and may not work 100%.

So, I am wondering if you bought the baord that you linked to in your original post? And if so, have you had any issues with it?

I'm only asking because I have a lot of projects I am wanting to do, but have a limited budget (don't we all), but I have always been hesitant at trying a clone.

@bryanschmidty: I thought it will be but it is original, white in the bottom made in italy :) @AWOL: I still get a dead LED. I checked the LED with another circut and it works fine. Is my time format right for the morning (is it 24 hour clock)

But you removed the semicolon and sorted out the braces, right?

The cloning part isn't that big of a deal since this is all open source

And the cloners contribute to this community, do they?

Tx AWOL I just copied your code piece and now it works. I took the curly brackets out but i could not what else to change in min :blush:

You copied it? I left the semicolon in to point out the error - the semicolon should not be there. Post your code.

if (now.hour() == 11 && now.minute() == 39);
  digitalWrite(ledPin, HIGH);

The LED turn on at a random time but very faint. :cold_sweat:

 now.minute() == 39);

A semicolon doesn't belong on the end of an "if" expression. Get rid of it.

Please post ALL of your code.

I did that thank you, but why is the LED so faint

I don't know, because I can't see a) YOUR CODE b) your schematic.

@AWOL If i do this for that minute the LED flickers, how can i make it so that the LED just come on for secs and go of?

if (now.hour() == 11 && now.minute() == 12)
  digitalWrite(ledPin, HIGH);
  delay(5000);
  digitalWrite(ledPin, LOW);