Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Re: Part ID on the Mega 2560 on: November 30, 2012, 10:14:29 am
Thanks Krupski and CrossRoads. I was also wondering what those parts where. SMD Capacitor make sense. If I am not wrong, I believe they are a part of the Voltage Regulator circuit, is that correct?
2  Using Arduino / General Electronics / Re: Help! - I am new to Arduino, please. on: November 29, 2012, 08:12:48 pm
Lefty, I can't thank you enough. What you pointed out was the exact problem. After I connected the ground on the Arduino it worked great. Thank you again.
3  Using Arduino / General Electronics / Re: Help! - I am new to Arduino, please. on: November 29, 2012, 04:57:33 pm
No Lefty, I did not but will try it now. Thank you much.
4  Using Arduino / General Electronics / Re: Help! - I am new to Arduino, please. on: November 29, 2012, 04:02:09 pm
Thank for the reply MarkT.

I do apologize for that. I did not realize that I had the wrong schematic. Here is the correct one.

https://picasaweb.google.com/lh/photo/ff50bocX-TctsVESdf9qzNX-t50N34v9Q3AjJRYm57o?feat=directlink

I have two wire from both terminals of the record button on the camera connected to the E and C of the Transistor.
5  Using Arduino / General Electronics / [Solved] Contolling digital camera with Arduino Mega on: November 29, 2012, 03:40:34 pm
Hi,

I am new to Arduino and am in need of help. I do apologize in advance if I am not clear on what I am trying to achieve.

I am trying to use a Arduino Mega to control a Digital Camera (Mini DV). The Arduino is connected to a PIR which when detects motion sets Digital Pin 3 to High. The Digital Pin 3 is connected to a 1k resistor and a NPN Transistor (P2N2222AG) which is then connected to the record button of the Digital Camera which operates on its own 5V battery.

I am unable to trigger the record function.

The general picture of the schematic is included

https://picasaweb.google.com/lh/photo/9aj4dXb8Y5QwX-y3RRo83dX-t50N34v9Q3AjJRYm57o?feat=directlink

Code:

Code:
int ledPin = 13;                // choose the pin for the LED
int inputPin = 2;               // choose the input pin (for PIR sensor)
int camPin = 3;
int pirState = LOW;             // we start, assuming no motion detected
int val = 0;                    // variable for reading the pin status

void setup()
{

  pinMode(ledPin, OUTPUT);      // declare LED as output
  pinMode(inputPin, INPUT);     // declare sensor as input
  Serial.begin(9600);

}

void loop()
{
  
  val = digitalRead(inputPin);  // read input value
  if (val == HIGH)              // check if the input is HIGH
  {            

    digitalWrite(ledPin, HIGH);  // turn LED ON
    delay(150);

    if (pirState == LOW)        // we have just turned on
    {

      Serial.println("Motion detected!");
      // We only want to print on the output change, not state
      digitalWrite(camPin, HIGH);
      delay(150);
      digitalWrite(camPin,LOW);
      pirState = HIGH;

    }

  }
  else
  {

    digitalWrite(ledPin, LOW); // turn LED OFF
    delay(300);    
    if (pirState == HIGH)      // we have just turned off
    {

      Serial.println("Motion ended!");
      // We only want to print on the output change, not state
      digitalWrite(camPin, HIGH);
      delay(1000);
      digitalWrite(camPin,LOW);
      pirState = LOW;     }

  }

}

Any and every help will be greatly appreciated.

Than you.
Pages: [1]