Show Posts
Pages: 1 2 3 [4] 5 6
46  Using Arduino / Project Guidance / Re: Random Strobe Code help on: January 01, 2012, 03:46:00 am
ok i'm am only a beginner but try this
it should set how long the light will be on and off
Code:
void loop() {
  ontime = random(20, 50);
  offtime = random(20, 50);
  digitalWrite(13, HIGH);
  delay(ontime);
  digitalWrite(13, LOW);
  delay(offtime);
}
47  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 29, 2011, 08:37:24 am
well i wont need the resistor between the LEDs and the mosfet because i am using a pre-made LED strip.
with the resistor between the arduino and the mosfet what value should it be and with the caps for the regulators will 50 Volt Ceramic Capacitors work well.

P.S. the data sheet calls for 0.22uF and 0.1uF
48  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 29, 2011, 06:55:06 am
Quote
because the arduinos regulator can not supply enough current to run the LEDs and it would over heat
No the power to run the LEDs will not come from the arduino but directly from the 12V.
hmmm
i will still use the two regulators, it will  give me some good soldering practice and will ceramic caps work
49  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 29, 2011, 06:04:33 am
Why not buy a 12v regulated wall wart, and power the Arduino from it as well as the lights, through either barrel jack or the Vin pin? That way, you don't need to mess around with regulators.

Your schematic isn't right. You need to connect the -ve side of the 15v input to Arduino ground and the source terminal of the mosfet (and the ground terminal of any regulators you may be using). The resistor goes between the mosfet gate terminal and the Arduino output pin.
because the arduinos regulator can not supply enough current to run the LEDs and it would over heat
50  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 28, 2011, 01:28:40 pm
ok one last thing, the data sheet for the voltage regulators call for a 0.1uF and a .22uF cap
i would like to know if i can use these 0.1uF, 0.22uF 35V Tag Tantalum Capacitor

P.S. i don't know what type of cap to use
51  Using Arduino / Programming Questions / Re: DS1307 RTC library on: November 28, 2011, 10:57:24 am
ok now it prints the correct value,
thanks for your help smiley
i will get back to you if i run into another roadblock
52  Using Arduino / Programming Questions / Re: DS1307 RTC library on: November 28, 2011, 10:38:54 am
i looked at the library from here, but i can't find much documentation about it http://www.ladyada.net/learn/breakoutplus/ds1307rtc.html
You really shouldn't need much in the way of documentation.  The examples provided with the library and on Ada's tutorial page tell you how to set the time and read the time.  That's all you need to do.

Don't overcomplicate your design by trying to set alarms or anything.  Just write your code to check what time it is and if you should be turning lights on or off.  
i did play around with the example code that only use the arduino but i could not work out how to make the minutes into an integer
i tried

Code:
// Date and time functions using just software, based on millis() & timer

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

int minval;

RTC_Millis RTC;

void setup () {
    Serial.begin(57600);
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.begin(DateTime(__DATE__, __TIME__));
}

void loop () {
    DateTime now = RTC.now();
    
    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
    
//i wrote everything below this

    int minval = (now.minute(), DEC);
    Serial.println(minval);
    Serial.println();
  
    delay(1000);
}

and then printed it out in it keep coming up with the number 10
53  Using Arduino / General Electronics / Re: Good Solder Wire on: November 28, 2011, 09:53:33 am
Quote
it is weird the solder from sparkfun says it is lead free but in the MSDS it says it contains lead

That MSDS is for several of this company's solders, including some lead bearing types.

-j

hmmm that explains alot
54  Using Arduino / Programming Questions / DS1307 RTC library on: November 28, 2011, 09:51:38 am
ok so i am making a light for my fish tank and i will be using the DS1307. i just finished planing the hardware side of my project and now i need an easy to use library for the DS1307 RTC.
i want to make it turn on leds at 7:30am and turn it off at 8:30pm
i looked at the library from here, but i can't find much documentation about it http://www.ladyada.net/learn/breakoutplus/ds1307rtc.html



P.S. i have no code as of yet
55  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 28, 2011, 09:15:14 am
Yes that look fine on the FET.
ok that is good to know. you and CrossRoads have been a great help
now i just need to find a easy to use library for the DS1307 RTC
56  Using Arduino / General Electronics / Re: Good Solder Wire on: November 28, 2011, 09:12:09 am
it is weird the solder from sparkfun says it is lead free but in the MSDS it says it contains lead
57  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 28, 2011, 09:09:18 am
Quote
do i really need caps on the regulator.
Yes I don't say these things for fun.

Quote
the 5v one i use to power my servo is doing fine with out them
No it is not, it is just that you haven't noticed the instability it causes, it is not doing fine.
ok i will add them in the final plan
and i fixed the mosfet
58  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 28, 2011, 07:49:21 am
You need capacitors on those regulators, see the data sheet for exact minimum values but I would put a 0.1uF across the input and output of both regulators plus put an additional 47uF capacitor on the input of the first regulator.

The FET needs to have the load connected to the 12V, so source to ground, drain to load, other end of load to +12V.
do i really need caps on the regulator. the 5v one i use to power my servo is doing fine with out them
59  Using Arduino / General Electronics / Re: 12v 5v power supply, and transistor question on: November 28, 2011, 04:47:42 am
ok so i made the schematic messer and added the mosfet and a pull-down resistor for the gate

EDIT: removed pic
60  Using Arduino / General Electronics / Re: Good Solder Wire on: November 28, 2011, 03:12:02 am
i really like the SparkFun solder http://www.sparkfun.com/products/10243
Pages: 1 2 3 [4] 5 6