Show Posts
Pages: 1 2 3 [4] 5 6 ... 36
46  Using Arduino / Project Guidance / Re: odd or "shorted" pin transistor? on: July 14, 2014, 07:26:39 pm
This how PNP transistor connect.


Edit:
I have attach your image, where is the collector and emitter of your diagram? where is your load connect?
47  Using Arduino / Project Guidance / Re: how to combinig this two coding (newbie) on: July 12, 2014, 06:35:30 pm
Take a look on this
http://forum.arduino.cc/index.php?topic=223286.0




Code:
/* This will combining two coding using Blink without Delay
*/

int E1 = 5;
int M1 = 4;

int inRelay = 8 ;
int inRelay1 = 9 ;
int inPin = 11 ;
int inLimit = 6 ;
int inLimit1 = 7 ;


int val1 ;
int val2 ;
int val3 ;

int inRelay2 = 12 ;


// Generally, you shuould use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0;        // will store last time LED was updated

// constants won't change :
const long interval = 3000;           // interval at which to toggle (milliseconds)

// Variables will change :
int relayState = HIGH;             // relayState used to set the Relay


void setup()
{
  pinMode(inRelay, OUTPUT);  // set the digital pin as output:
  pinMode(inRelay1, OUTPUT);  // set the digital pin as output:
  pinMode(inPin, INPUT);  // set the digital pin as input:
  pinMode(inLimit, INPUT);   // set the digital pin as input:
  pinMode(inLimit1, INPUT);  // set the digital pin as input:

  pinMode(inRelay2, OUTPUT);   // set the digital pin as output:

  digitalWrite(inRelay2, HIGH);
}

void loop()
{
  // check to see if it's time to toggle the Relay;
  unsigned long currentMillis = millis();


  if (currentMillis - previousMillis >= interval) {
    // save the last time you toggle the Relay
    previousMillis = currentMillis;

    // if the Relay is off turn it on and vice-versa:
    if (relayState == LOW)
      relayState = HIGH;
    else
      relayState = LOW;

    // set the Relay with the relayState of the variable:
    digitalWrite(inRelay2, relayState);
  }


  val1 = digitalRead(inPin);
  val2 = digitalRead(inLimit);
  val3 = digitalRead(inLimit1);


  if (val1 == HIGH)
  {
    digitalWrite(inRelay, HIGH);
    digitalWrite(inRelay1, LOW);
  }
  else if (val2 == HIGH)
  {
    forward();

  }
  else if (val2 == LOW)
  {
    forwardstop();

  }
  if (val1 == LOW)
  {
    digitalWrite(inRelay, LOW);
    digitalWrite(inRelay1, HIGH);
  }
  else if (val3 == HIGH)
  {
    backward();

  }
  else if (val3 == LOW)
  {
    backwardstop();

  }

}

void forward()
{
  digitalWrite(M1, LOW);
  analogWrite (E1, 255);
}

void backward()
{
  digitalWrite(M1, HIGH);
  analogWrite (E1, 255);
}

void forwardstop()
{
  digitalWrite(M1, LOW);
  analogWrite (E1, 0);
}

void backwardstop()
{
  digitalWrite(M1, LOW);
  analogWrite (E1, 0);
}

48  Using Arduino / Sensors / Re: Aruino for IMAGE PROCESSING on: July 12, 2014, 12:55:34 am
http://blog.oscarliang.net/raspberry-pi-face-recognition-opencv/
49  Using Arduino / Project Guidance / Re: Slowing Servo While reading data from a photo resistor (light sensor) on: July 11, 2014, 05:29:31 am

     for(pos; pos < 180; pos += 1)
 


variable pos was not assign with any value, so it start with random numbers, your result is unpredictable.

check this out c-tutorial-for-loop

Code:
else if (val <= 7)
    {
      for(pos; pos > 5; pos -= 1)
      myservo.write(pos);
      delay(30);
    }
but then ratchets back down to 0 at full speed.

Because you for loop need to be Compound statement form else only the myservo.write(pos); is run therefore it at full speed.

Quote
Compound statement
A compound statement or block is a brace-enclosed sequence of statements.
{ statement...(optional) }    (1)   
When one statement is expected, but multiple statements need to be executed in sequence (for example, in an if statement or a loop), a compound statement may be used:
50  Using Arduino / Sensors / Re: Aruino for IMAGE PROCESSING on: July 08, 2014, 04:40:21 pm
No, Arduino had no processing power for image processing on both resource and speed.
51  Using Arduino / General Electronics / Re: Protection from cheap power supplies. on: June 28, 2014, 07:47:33 am
DO NOT USE SWITCHING power supplies. There is no transformer in them. That is very dangerous.
That is not true, most SWITCHING power supplies used transformer in them.

Apple iPhone charger teardown: quality in a tiny expensive package
http://www.righto.com/2012/05/apple-iphone-charger-teardown-quality.html

Only some of the cheap power supplies rely on a capacitor to limit current from mains voltage, if you buy one of these cheap power supplies then it will be dangerous.
You can always open up these cheap power supplies to find out yourself, how it wire up.
http://www.righto.com/2012/03/inside-cheap-phone-charger-and-why-you.html
Quote
Conclusions
Stay away from super-cheap AC adapters built by mystery manufacturers. Spend the extra few dollars to get a brand-name AC adapter. It will be safer, produce less interference, and your device's touchscreen will perform better.
52  Using Arduino / General Electronics / Re: Protection from cheap power supplies. on: June 27, 2014, 09:30:54 pm
Used residual-current device (RCD), or residual-current circuit breaker (RCCB) or Earth Leakage Circuit Breaker (ELCB) at your house
53  Using Arduino / General Electronics / Re: push button not working on: June 27, 2014, 08:44:12 pm
A DPDT  (double pole double throw switch) can have a tricky central position. There are several ways to implement the centered position.
Look at the following chart:


Try to use multimeter to test which two pin is Center and Normal Open
54  Using Arduino / Project Guidance / Re: Help starting my sketch on: June 27, 2014, 02:42:16 am

*** I want to water my plants after dusk if the soil is dry.
 
I want my plants to be watered about every two to three days, this will be determined by the soil moisture.

Relay IN pin 2
Light Sensor pin A0

How you determine the soil is dry?
You need sensor like this

Which connected to the analog input.
55  Using Arduino / Project Guidance / Re: Arduino controlled DC-DC boost power supply on: June 24, 2014, 08:00:19 am
http://forum.arduino.cc/index.php?topic=66916.15
56  Using Arduino / Project Guidance / Re: how can i controlling direction of servo motor? on: June 24, 2014, 05:18:49 am
Are you using ESC? you have to find out which value of the val that the motor will change direction.
57  Using Arduino / Project Guidance / Re: conversion of Hex image to JPEG on: June 21, 2014, 10:53:48 am
Just save the file with the extension of .py and double click to run it.

 
58  Using Arduino / Project Guidance / Re: conversion of Hex image to JPEG on: June 21, 2014, 09:56:46 am
oohh thANK YOUUUUU sooo veryy muchh smiley smiley smiley

can u plz snd me the link so that i can download python too? smiley
Send you the link? I had include the link

http://robotic-controls.com/learn/arduino/linksprite-jpeg-camera
59  Using Arduino / Project Guidance / Re: conversion of Hex image to JPEG on: June 21, 2014, 09:30:27 am
Using the Python code from this site to convert your hex image into jpeg.

http://robotic-controls.com/learn/arduino/linksprite-jpeg-camera
60  Using Arduino / General Electronics / Re: 555 timer 12v... 15A !?!?!? on: June 20, 2014, 05:38:55 am
Just a normal NE555 Timer IC, with MAX supply voltage 18V and supply current 15.0mA when no load. but may sink up to 200mA on 15V supply.

Seller may not know what they are selling.

http://www.ti.com/lit/ds/symlink/ne555.pdf
Pages: 1 2 3 [4] 5 6 ... 36