• No results found

3.1.

Starting the Arduino

For testing purpose we need to load the program on Arduino board. The successful loading will be indicated by the on and off on on-board LED on Arduino. We then need to connect external LED using a breadboard. The new circuit will flash the external LED and will show the success of our testing.

For the testing we need a 470 ohm resister (yellow-violet-brown) and a 5mm LED. We will also be needing a breadboard, wire links, an Arduino Uno board and a USB cable.

Now we download the new version of Arduino IDE and install the package. We then download the necessary drivers in the package. Once the installing is done, we open the icon and double click on the Arduino icon.

Fig: 3A: Materials for testing 3.1.1. Testing the Arduino Internal LED testing

We program the Arduino Uno board with a built in program that will flash the in- board LED.

For this plug the Arduino Uno board to the laptop port which you configured the Arduino IDE on. Then start the Arduino IDE. Make sure that the port you have connected the board on is the right one. Then on the top bar menu. Click on file, then examples, then basics, and select the

blink option. A new window will open up and a program will show on the window. Then click on the upload button on the tool bas which is usually shown in red color. The program will upload and the LED on the Arduino board will start blinking.

“Void setup()

Fig below shows the interfacing of the external LED with the Arduino board for testing purposes.

For this we connect the anode of the LED to pin 2 of the board. LED cathode is connected to the resistor of the predetermined value and the other pin of the resistor is connected to the GND of the Arduino Uno.

Fig 3B: external LED with Arduino

Fig 3C: Configuration of the circuit on the bread board.

Now for programing purpose star the Arduino ide and type the program desired.

“Void setup() {

pinMode(2, OUTPUT);

}

Void loop() {

digitalWrite(2, HIGH);

delay(1000);

digitalWrite(2, LOW);

delay(1000);

}”

Now verify the program by clicking on the verify button on the tool bar on the top. Save the program before verifying it. Then upload the program on the Arduino ide. Click on the upload button after verifying it. After the uploading process completes the external LED should start blinking.

3.2.

Interfacing gsm (SIM900a) with Arduino

1. We are using sim900 a module which means that the module supports 900 MHz India and most mobile providers across the globe use 900 MHz band. For other countries

2. United states- 850 MHz (band might be 850 or 1900 MHz) 3. Canada operates mostly on 1900 MHz

4. Different companies manufacture different modules and they all have different mover supply specs. We need to check our module power requirements. We need 12 Volts for our module so we have used 12 v, 1A DC power supply.

Starting your GSM

MODULE-STEP 1: insert the SIM card to module and lock it.

STEP 2: adapter is connected and module is turned ON

Step 3: GSM module takes time to establish connection so wait for at least 1 minute and check the blinking rate of the module.

Step 4: LED blinks evert 3 seconds to show that the module booting process was successful.

Using SIM900 means that the module supports 900mhs band.

Power supply for sim900a

We cannot power the GSM module directly through Arduino uno which is in cable of supply peak currents to the sim900a. The GSM module draws 2A very often. The large storage capacitor on the power supply output will supply the necessary current hence it is not important to build a 2A supply.

Serial port

This GSM module communicates via TTl levels which are limited by its power supply voltage.

We cannot connect Arduino directly to sim900a due to mismatch of voltage. The voltage on these pins is higher than Arduinos 5v voltage. We need a TTL to RS232 convertor to hook up Arduino to the pins on the GSM model.

Connection of SIM 900a to Arduino Uno

For this we connect the +5v pin on Arduino to VCC of the SIM900A. Then GND of Arduino to GND of SIM900a. Then PIN2 (RX) of Arduino to 5VT (which is power port +5v) of SIM900a.

Then finally Pin 3(Tx) of Arduino to 5Vr of SIM900a.

Fig 3D: connecting sim900 to Arduino uno

Fix the Supplied RF antenna to the SMA Antennae connector and tighten it by Rotating the Nut (Never rotate the antennae for tightening).

We cannot connect Arduino directly to the SIM900a module because of mismatch in voltage. We need a TTL to RS232 converter to hook up Arduino to those pins. The SIM900a is connected to Arduino.

Fig 3E: Block diagram representing interfacing between GSM and Arduino.

3.3.

Interfacing GPS to Arduino Uno

We use GY-GPS6MV2 with arduino. It is an electronic device that helps us to the Arduino board in order to get location in the form of latitude and longitude. We use serial ports for the connection. Pins 0 and 1 of the arduino board are used to connect the GPS module with Arduino.

The pin 0 of Arduino is connected to SIO of the gps module. GND AND /RAW of the gps module is connected to the GND of the arduino uno and Vcc of the GPS is connected to 5V of arduino.

Fig 3F: connection Arduino to GPS module

3.4.

Interfacing LCD with Arduino Uno

LCD pins are from 8 to 13 and are connected to the arduino.

Fig 3G: config of LCD to arduino

3.5.

Interfacing of solenoid with Arduino

We connect the solenoid to the digital pin 2 of the Arduino uno board.

Fig 3H: Interfacing of solenoid and arduino

3.6.

Interfacing of magnetic sensor to Arduino

We connect the reed switch to digital pin 2 of Arduino board in the manner given below.

Fig 3I: Interfacing magnetic switch to arduino

Related documents