Wednesday, 30 March 2016

Encoder and Decoder Demonstration

Encoder and Decoder Circuit using (M145026 & M145027)

Encoder and Decoder Demonstration
As the digital Ic M145026 encoder equivalence is HT12E and Ic M145027 decoder equivalence is HT12D
Which are easy to be found in market with a cheap price and they are 12 bits encoders and decoders Ic's(HT12E/D)
But "Do not forget to put a resistor on positive pin of led on encoder side a 330 Ohm is enough

A simple GSM security using laser diode with alarm and camera system


Circuit
 
SIM900 Arduino Compatible GSM modem
A camera system it shall capture the a image of the intruder and save it to its own memory-card
The SMS will be sent to the owner if the alarm has triggere

Codes
-----------------------------------------------------------------------------------------------------
int inputpin = 13;
int indicators = 12;

void setup()
{
  delay(2000); //Delay to start Serial
Serial.begin(9600);
pinMode(inputpin, INPUT);
 pinMode(indicators, OUTPUT);
delay(5000); //Delay to activate Network from a GSM
}

void loop() {
int inputpin = digitalRead(13);
if (inputpin==HIGH)
{
  digitalWrite(indicators, HIGH);
  SendMessage();
  } 
else
  {
    digitalWrite(indicators, LOW);
  }
}

void SendMessage()
{
  Serial.println("AT");
 delay(1000);
Serial.println("AT+CMGF=1");
delay(1000);
Serial.println("AT+CMGS=\"0788636145\"\r");
delay(1000);
Serial.println("EMERGENCY, INTRUDER!!");
delay(100);
Serial.println((char)26);// ASCII code of CTRL+Z
}
---------------------------------------------------------------------------------------------------------

Traffic Lights with Count Down

The Traffic count down demonstration using Arduino Mega 2560
Due to its many number of pins then it is easy to implement
---------------------------------------------------------------------------------------------------
Codes
void setup() {
  pinMode(0, OUTPUT);pinMode(1, OUTPUT);pinMode(2, OUTPUT);pinMode(3, OUTPUT);pinMode(4, OUTPUT);pinMode(5, OUTPUT);pinMode(6, OUTPUT);pinMode(7, OUTPUT);pinMode(8, OUTPUT);pinMode(9, OUTPUT);pinMode(10, OUTPUT);pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);pinMode(13, OUTPUT);pinMode(14, OUTPUT);pinMode(15, OUTPUT);pinMode(16, OUTPUT);pinMode(17, OUTPUT);pinMode(18, OUTPUT);pinMode(19, OUTPUT);
  pinMode(20, OUTPUT);pinMode(21, OUTPUT);pinMode(22, OUTPUT);pinMode(23, OUTPUT);pinMode(24, OUTPUT);pinMode(25, OUTPUT);pinMode(26, OUTPUT);pinMode(27, OUTPUT);
  pinMode(28, OUTPUT);pinMode(29, OUTPUT);pinMode(30, OUTPUT);pinMode(31, OUTPUT);
}
void loop() {
  digitalWrite(19, LOW);digitalWrite(35, LOW);digitalWrite(43, LOW);digitalWrite(27, LOW); //TO TURN SEGMENTS TRAFFIC
  delay(10);
  digitalWrite(20, LOW);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, LOW);digitalWrite(24, LOW);digitalWrite(25, LOW);digitalWrite(26, HIGH); //0 SET
  digitalWrite(7, LOW);digitalWrite(10, LOW);
  digitalWrite(1, LOW);digitalWrite(4, LOW);
  digitalWrite(0, HIGH);digitalWrite(3, HIGH);
  digitalWrite(8, HIGH);digitalWrite(11, HIGH);
  digitalWrite(28, HIGH);
  digitalWrite(31, HIGH);
  count_1();   //+DELAY
  digitalWrite(28, LOW);
  digitalWrite(31, LOW);
  //delay(5000);
  digitalWrite(19, HIGH);digitalWrite(27, HIGH);digitalWrite(35, HIGH);digitalWrite(43, HIGH);  //TO TURN SEGMENTS TRAFFIC
  delay(10);
  digitalWrite(0, LOW);digitalWrite(3, LOW);
  digitalWrite(8, LOW);digitalWrite(11, LOW);
  digitalWrite(7, HIGH);digitalWrite(10, HIGH);
  digitalWrite(1, HIGH);digitalWrite(4, HIGH);
  delay(1000);
  digitalWrite(19, LOW);digitalWrite(35, LOW);digitalWrite(43, LOW);digitalWrite(27, LOW);  //TO TURN SEGMENTS TRAFFIC
  delay(10);
  digitalWrite(7, LOW);digitalWrite(10, LOW);
  digitalWrite(1, LOW);digitalWrite(4, LOW);
  digitalWrite(6, HIGH);digitalWrite(9, HIGH);
  digitalWrite(2, HIGH);digitalWrite(5, HIGH);
  digitalWrite(29, HIGH);
  digitalWrite(30, HIGH);
  count_2();  //+DELAY
  digitalWrite(29, LOW);
  digitalWrite(30, LOW);
  digitalWrite(19, HIGH);digitalWrite(27, HIGH);digitalWrite(35, HIGH);digitalWrite(43, HIGH);  //TO TURN SEGMENTS TRAFFIC
  delay(10);
  digitalWrite(2, LOW);digitalWrite(5, LOW);
  digitalWrite(6, LOW);digitalWrite(9, LOW);
  digitalWrite(7, HIGH);digitalWrite(10, HIGH);
  digitalWrite(1, HIGH);digitalWrite(4, HIGH);
  delay(1000);
  }
  // COUNT DOWN FUNCTIONS C_1 & C_2
  void count_1(){
  digitalWrite(12, LOW);digitalWrite(13, LOW);digitalWrite(14, LOW);digitalWrite(15, LOW);digitalWrite(16, HIGH);digitalWrite(17, LOW);digitalWrite(18, LOW);delay(500);
  digitalWrite(12, LOW);digitalWrite(13, LOW);digitalWrite(14, LOW);digitalWrite(15, LOW);digitalWrite(16, LOW);digitalWrite(17, LOW);digitalWrite(18, LOW);delay(500);
  digitalWrite(12, LOW);digitalWrite(13, LOW);digitalWrite(14, LOW);digitalWrite(15, HIGH);digitalWrite(16, HIGH);digitalWrite(17, HIGH);digitalWrite(18, HIGH);delay(500);
  digitalWrite(12, LOW);digitalWrite(13, HIGH);digitalWrite(14, LOW);digitalWrite(15, LOW);digitalWrite(16, LOW);digitalWrite(17, LOW);digitalWrite(18, LOW);delay(500);
  digitalWrite(12, LOW);digitalWrite(13, HIGH);digitalWrite(14, LOW);digitalWrite(15, LOW);digitalWrite(16, HIGH);digitalWrite(17, LOW);digitalWrite(18, LOW);delay(500);
  digitalWrite(12, HIGH);digitalWrite(13, LOW);digitalWrite(14, LOW);digitalWrite(15, HIGH);digitalWrite(16, HIGH);digitalWrite(17, LOW);digitalWrite(18, LOW);delay(500);
  digitalWrite(12, LOW);digitalWrite(13, LOW);digitalWrite(14, LOW);digitalWrite(15, LOW);digitalWrite(16, HIGH);digitalWrite(17, HIGH);digitalWrite(18, LOW);delay(500);
  digitalWrite(12, LOW);digitalWrite(13, LOW);digitalWrite(14, HIGH);digitalWrite(15, LOW);digitalWrite(16, LOW);digitalWrite(17, HIGH);digitalWrite(18, LOW);delay(500);
  digitalWrite(12, HIGH);digitalWrite(13, LOW);digitalWrite(14, LOW);digitalWrite(15, HIGH);digitalWrite(16, HIGH);digitalWrite(17, HIGH);digitalWrite(18, HIGH);delay(500);
  digitalWrite(12, LOW);digitalWrite(13, LOW);digitalWrite(14, LOW);digitalWrite(15, LOW);digitalWrite(16, LOW);digitalWrite(17, LOW);digitalWrite(18, HIGH);delay(500);
  }
  void count_2(){
  digitalWrite(20, LOW);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, LOW);digitalWrite(24, HIGH);digitalWrite(25, LOW);digitalWrite(26, LOW);delay(500);
  digitalWrite(20, LOW);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, LOW);digitalWrite(24, LOW);digitalWrite(25, LOW);digitalWrite(26, LOW);delay(500);
  digitalWrite(20, LOW);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, HIGH);digitalWrite(24, HIGH);digitalWrite(25, HIGH);digitalWrite(26, HIGH);delay(500);
  digitalWrite(20, LOW);digitalWrite(21, HIGH);digitalWrite(22, LOW);digitalWrite(23, LOW);digitalWrite(24, LOW);digitalWrite(25, LOW);digitalWrite(26, LOW);delay(500);
  digitalWrite(20, LOW);digitalWrite(21, HIGH);digitalWrite(22, LOW);digitalWrite(23, LOW);digitalWrite(24, HIGH);digitalWrite(25, LOW);digitalWrite(26, LOW);delay(500);
  digitalWrite(20, HIGH);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, HIGH);digitalWrite(24, HIGH);digitalWrite(25, LOW);digitalWrite(26, LOW);delay(500);
  digitalWrite(20, LOW);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, LOW);digitalWrite(24, HIGH);digitalWrite(25, HIGH);digitalWrite(26, LOW);delay(500);
  digitalWrite(20, LOW);digitalWrite(21, LOW);digitalWrite(22, HIGH);digitalWrite(23, LOW);digitalWrite(24, LOW);digitalWrite(25, HIGH);digitalWrite(26, LOW);delay(500);
  digitalWrite(20, HIGH);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, HIGH);digitalWrite(24, HIGH);digitalWrite(25, HIGH);digitalWrite(26, HIGH);delay(500);
  digitalWrite(20, LOW);digitalWrite(21, LOW);digitalWrite(22, LOW);digitalWrite(23, LOW);digitalWrite(24, LOW);digitalWrite(25, LOW);digitalWrite(26, HIGH);delay(500);
  }
------------------------------------------------------------------------------------------------

Saturday, 23 November 2013

The capacitor codes

This capacitor code will enable you to read all other capacitors even if are not listed here

Friday, 18 October 2013