top of page

Search Results

81 items found for ""

  • Interfacing of Touch Sensor with Arduino Uno. | TechKnowSkola

    Back Interfacing of Touch Sensor with Arduino Uno. What is a Touch Sensor? This device uses your body as part of the circuit. When you touch the sensor pad, the capacitance of the circuit is changed and is detected. That detected change in capacitance results in the output changing states. Material Required: Material Quantity Arduino Uno 1 Touch Sensor 1 Jumper cables 4 Pinout Diagram: Pin of Touch sensor: 1. GND. 2. VCC. 3. SIG Circuit Diagram: Connect the Touch Sensor with Arduino as follows: GND pin of Touch sensor to GND of Arduino VCC pin of Touch Sensor to 5V of Arduino SIG pin of Touch Sensor to digital pin 2 of Arduino. Tested Programming Code: #define ctsPin 2 int ledPin = 13; // pin for the LED void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); pinMode(ctsPin, INPUT); } void loop() { int ctsValue = digitalRead(ctsPin); if (ctsValue==HIGH) { digitalWrite(ledPin, HIGH); Serial.println("TOUCHED"); } else{ digitalWrite(ledPin,LOW); Serial.println("not touched"); } delay(500); } Precautions: Double check the connections before powering on the circuit. Don’t use loose jumper cables. Check whether proper board is selected from Arduino IDE. Ensure proper placement of Touch Sensor for correct working. Conclusion: Once your sketch is running, you have to see the Touch Sensor working by seeing the Serial monitor whenever it is being touched. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of RFID Module with Arduino Uno. | TechKnowSkola

    Back Interfacing of RFID Module with Arduino Uno. What is RFID? Radio-Frequency Identification ( RFID ) is the use of radio waves to read and capture information stored on a tag attached to an object. A tag can be read from up to several feet away and does not need to be within direct line-of-sight of the reader to be tracked. Material Required: Material Quantity Arduino Uno 1 Rfid module 1 Jumper cables 8 Pinout Diagram: Circuit Diagram: Connect the RFID module with Arduino as follows: GND pin of RFID module to GND of Arduino VCC pin of RFID module to 5V of Arduino SDA pin of RFID module to digital pin 10 of Arduino SCK pin of RFID module to digital pin 13 of Arduino. MOSI pin of RFID module to digital pin 11 of Arduino. MISO pin of RFID module to digital pin 12 of Arduino. RST pin of RFID module to digital pin 9 of Arduino. IRQ pin of RFID module is not connected Download RFID Library We need to download the library for RFID. Go to sketch >> include library >> window open >> go to search bar and type <> you see a link >> click on that link and install. Tested Programming Code: #include #include #define RST_PIN 9 #define SS_PIN 10 MFRC522 rfid(SS_PIN, RST_PIN); MFRC522::MIFARE_Key key; void setup() { Serial.begin(9600); SPI.begin(); rfid.PCD_Init(); } void loop() { if( ! rfid.PICC_IsNewCardPresent()||! rfid.PICC_ReadCardSerial()) { return; } MFRC522::PICC_TypepiccType = rfid.PICC_GetType(rfid.uid.sak); String sd = ""; for (byte i = 0; i < 4; i++) { sd += (rfid.uid.uidByte[i] < 0x10 ? "0" : "") + String(rfid.uid.uidByte[i], HEX) + (i!=3 ? ":" : ""); } sd.toUpperCase(); Serial.print("Tap card key: "); Serial.println(sd); rfid.PICC_HaltA (); rfid.PCD_StopCrypto1 (); } Precautions: Double check the connections before powering on the circuit. Don’t use loose jumper cables. Check whether proper board is selected from Arduino IDE. Ensure proper placement of RFID module Sensor for correct working. Conclusion: Once your sketch is running, you have open serial monitor and then put your RFID tag on RFID module. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • 4*4 Keypad Interfacing with Arduino UNO. | TechKnowSkola

    Back 4*4 Keypad Interfacing with Arduino UNO. What is a 4*4 Keypad? In embedded devices one of the essential parts is Keypad is used to interact with embedded devices, Keypad is an input device that is used to give the command to the devices, from the calculator to the computer input is given through the keypad. 4×4 Matrix Keypad and how the Arduino Keypad Interface works. A Keypad is an input device that is used to enter passwords, dial a number, browse through the menu and even control robots. Material Required: Material Quantity Arduino Uno 1 4*4 Keypad 1 Jumper cables 8 Pinout Diagram: If you have a keypad look for one below. The below diagram is enough for knowing pin configuration. Circuit Diagram: Follow the given pin order for wiring the circuit. As shown in the left diagram. Start from left to right. Keypad Pin 1 (R4) –> Arduino Pin 2 Keypad Pin 2 (R3) –> Arduino Pin 3 Keypad Pin 3 (R2) –> Arduino Pin 4 Keypad Pin 5 (C4) –> Arduino Pin 6 Keypad Pin 6 (C3) –> Arduino Pin 7 Keypad Pin 7 (C2) –> Arduino Pin 8 Keypad Pin 8 (C1) –> Arduino Pin 9 Tested Programming Code: /* ##### 4x4 Membrane Keypad Arduino Interfacing #####Arduino and Keypad Connection Keypad Pin => Arduino Pin 1 => Digital Pin 2 2 => Digital Pin 3 3 => Digital Pin 4 4 => Digital Pin 5 5 => Digital Pin 6 6 => Digital Pin 7 7 => Digital Pin 8 8 => Digital Pin 9* #include const byte ROWS = 4; //four rows const byte COLS = 4; //four columns // Define the Keymap char hexaKeys[ROWS][COLS] = { {'1','2','3','A'}, {'4','5','6','B'}, {'7','8','9','C'}, {'*','0','#','D'} }; byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the Rows of the keypad pin 8, 7, 6, 5 respectively byte colPins[COLS] = {5, 4, 3, 2}; //connect to the Columns of the keypad pin 4, 3, 2, 1 respectively //initialize an instance of class NewKeypad Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); void setup (){ Serial.begin(9600); } void loop (){ char customKey = customKeypad.getKey(); if (customKey){ Serial.println(customKey); // Send the pressed key value to the arduino serial monitor } } Checking Values on Serial Monitor: After successfully uploading the Program to the Arduino Board, You can check the input given through the keypad on the Serial monitor. Precautions: 1. Double-check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether the proper board is selected from Arduino IDE. 4. Ensure proper placement of sensor for correct working. 5. Connect the Wiper pin of the potentiometer correctly. 6. Don’t lose hope if Keypad does not run properly for the first time, try again Conclusion: You can successfully display inputs given in the keypad on the Serial Monitor in the simplest way using Arduino. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Displaying a text message on LCD Display using 16X2 Segment Display with Arduino. | TechKnowSkola

    Back Displaying a text message on LCD Display using 16X2 Segment Display with Arduino. What is a LCD Display ? A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated optical device that uses the light-modulating properties of liquid crystals. LCDs are available to display arbitrary images or fixed images with low information content, which can be displayed or hidden, such as preset words, digits. Material Required: Material Quantity Arduino Uno 1 16X2 Segment Display 1 Jumper cables 20 10 k Potentiometer 1 Pinout Diagram: It has 16 pins and the first one from left to right is the Ground pin. The second pin is the VCC which we connect the 5 volts pin on the Arduino Board. Next is the Vo pin on which we can attach a potentiometer for controlling the contrastof the display. Next, The RS pin or register select pin is used for selecting whether we will send commands or data to the LCD. For example if the RS pin is set on low state or zero volts, then we are sending commands to the LCD like: set the cursor to a specific location, clear the display, turn off the display and so on. And when RS pin is set on High state or 5 volts we are sendingdata or characters to the LCD. After all we don’t have to worry much about how the LCD works, as the Liquid Crystal Library takes care for almost everything. From the Arduino’s official website you can find and see the functions of the library which enable easy use of the LCD. We can use the Library in 4 or 8 bit mode. In this tutorial we will use it in 4 bit mode, or we will just use 4 of the 8 data pins. Circuit Diagram: We will use just 6 digital input pins from the Arduino Board. The LCD’s registers from D4 to D7 will be connected to Arduino’s digital pins from 4 to 7. The Enable pin will be connected to pin number 2 and the RS pin will be connected to pin number 1. The R/W pin will be connected to Ground and the Vo pin will be connected to the potentiometer. Tested Programming Code: First thing we need to do is it insert the Liquid Crystal Library. We can do that like this: Sketch > Include Library > Liquid Crystal. Then we have to create an LC object. The parameters of this object should be the numbers of the Digital Input pins of the Arduino Board respectively to the LCD’s pins as follow: (RS, Enable, D4, D5, D6, D7). In the setup we have to initialize the interface to the LCD and specify the dimensions of the display using thebegin() function. In the loop we write our main program. Using the print() function we print on the LCD. The setCursor()function is used for setting the location at which subsequent text written to the LCD will be displayed. The blink() function is used for displaying a blinking cursor and the noBlink() function for turning off. The cursor() function is used for displaying underscore cursor and the noCursor() function for turning off. Using the clear() function we can clear the LCD screen. // include the library code: #include // initialize the library by associating any needed LCD interface pin // with the arduino pin number it is connected to const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis() / 1000); Precautions: 1. Double check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether proper board is selected from Arduino IDE. 4. Ensure proper placement of sensor for correct working. 5. Connect the Wiper pin of potentiometer correctly. 6. Don’t lose hope if LCD does not runs properly for the first time, try again. Conclusion: You can successfully measure display data on a LCD in simplest way using Arduino. Many forms of data can be displayed on this display, whether it can be a data from sensor or a anything else . Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of 4 Digit Segment Display with Arduino Uno. | TechKnowSkola

    Back Interfacing of 4 Digit Segment Display with Arduino Uno. What is a 4 digit segment display? A seven-segment display ( SSD ), or seven-segment indicator , is a form of an electronic display device for displaying decimal numerals that is an alternative to the more complex dot matrix displays. Seven-segment displays are widely used in digital clocks, electronic meters, basic calculators, and other electronic devices that display numerical information. Material Required: Material Quantity Arduino Uno 1 4-digit segment display 1 Jumper cables 4 Pin of 4-digit segment display: 1. GND. 2. VCC. 3. DIO. 4. CLK. Circuit Diagram: Connect the 4 Digit Segment Display with Arduino as follows: GND pin of 4 Digit Segment Display to GND of Arduino VCC pin of 4 Digit Segment Display to 5V of Arduino DIO pin of 4 Digit Segment Display to digital pin 2 of Arduino CLK pin of 4 Digit Segment Display to digital pin 3 of Arduino Library Required You have to download the library for Arduino of 4 Digit Segment Display The link is given below: https://github.com/avishorp/TM1637 Tested Programming Code: #include //Set the CLK pin connection to the display const int CLK = 3 ; //Set the DIO pin connection to the display const int DIO = 2 ; int numCounter = 0 ; //set up the 4-Digit Display. TM1637Display display ( CLK, DIO ) ; void setup () { //set the diplay to maximum brightness display. setBrightness ( 0x0a ) ; } void loop () { //Iterate numCounter for ( numCounter = 0 ; numCounter < 1000 ; numCounter++ ) { //Display the numCounter value; display. showNumberDec ( numCounter ) ; delay ( 1000 ) ; } } Precautions: 1. Double-check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether the proper board is selected from Arduino IDE. 4. Ensure proper placement of 4-digit segment display for correct working. Conclusion: Once your sketch is running, you have to see the 4-digit segment display. It starts display. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing Colour Sensor with Arduino (TCS3200) | TechKnowSkola

    Back Interfacing Colour Sensor with Arduino (TCS3200) What is a Color Sensor? A colour sensor can determine different colours. They will utilize a means of emitting light and then look at the reflected light to determine an object’s colour. This will give the machine the actual colour of that object. These sensors are in use in quite a few different applications today. You can find them in quality control systems, packaging systems, and more. Specifications: · Power: 2.7V to 5.5V · Size: 28.4 x 28.4mm (1.12 x 1.12″) · Interface: digital TTL · High-resolution conversion of light intensity to frequency · Programmable colour and full-scale output frequency · Communicates directly to the microcontroller Material Required: Material Quantity Arduino Uno 1 Colour Sensor 1 Jumper cables 10 Pinout Diagram: Working: The TCS230 senses colour light with the help of an 8 x 8 array of photodiodes. Then using a Current-to-Frequency Converter the readings from the photodiodes are converted into a square wave with a frequency directly proportional to the light intensity. Finally, using the Arduino Board we can read the square wave output and get the results for the colour. If we take a closer look at the sensor we can see how it detects various colours. The photodiodes have three different colour filters. Sixteen of them have red filters, another 16 have green filters, another 16 have blue filters and the other 16 photodiodes are clear with no filters. Every 16 photodiodes are connected in parallel, so using the two control pins S2 and S3 we can select which of them will be read. So for example, if we want to detect red colour, we can just use the 16 red filtered photodiodes by setting the two pins to a low logic level according to the table. The sensor has two more control pins, S0 and S1 which are used for scaling the output frequency. The frequency can be scaled to three different preset values of 100 %, 20 % or 2%. This frequency-scaling function allows the output of the sensor to be optimized for various frequency counters or microcontrollers. Circuit Diagram: Tested Programming Code: First, we need to define the pins to which the sensor is connected and define a variable for reading the frequency. In the setup section, we need to define the four control pins as outputs and the sensor output as an Arduino input. Here we also need to set the frequency scaling, for this example, I will set it to 20%, and start the serial communication for displaying the results in the Serial Monitor. In the loop section, we will start with reading the red filtered photodiodes. For that purpose, we will set the two control pins S2 and S3 to low logic level. Then using the “pulseIn()” function we will read the output frequency and put it into the variable “frequency”. Using the Serial.print() function we will print the result on the serial monitor. The same procedure goes for the two other colours, we just need to adjust the control pins for the appropriate colour. Code: #define S0 4 #define S1 5 #define S2 6 #define S3 7 #define sensorOut 8 int frequency = 0; void setup() { pinMode(S0, OUTPUT); pinMode(S1, OUTPUT); pinMode(S2, OUTPUT); pinMode(S3, OUTPUT); pinMode(sensorOut, INPUT); digitalWrite(S0,HIGH); digitalWrite(S1,LOW); Serial.begin(9600);} void loop() { digitalWrite(S2,LOW); digitalWrite(S3,LOW); frequency = pulseIn(sensorOut, LOW); Serial.print("R= ");//printing name Serial.print(frequency);//printing RED color frequency Serial.print(" "); delay(100); digitalWrite(S2,HIGH); digitalWrite(S3,HIGH); frequency = pulseIn(sensorOut, LOW); Serial.print("G= "); Serial.print(frequency);Serial.print(" "); delay(100); digitalWrite(S2,LOW); digitalWrite(S3,HIGH);frequency pulseIn(sensorOut, LOW); Serial.print("B= ");//printing name Serial.print(frequency);//printing RED color frequency Serial.println(" "); delay(100); } Precautions: 1. Double-check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether the proper board is selected from Arduino IDE. 4. Ensure proper placement of sensor for correct working. 5. Try it with different colours and see the change in values. Conclusion: You can successfully identify different colours using this sensor and can be deployed for many other purposes like item sorting, Rubiks cube solving etc. Output: Situation Screenshot: Serial Monitor (Ctrl+Shift+M) BLUE : GREEN : RED Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • 500 | TechKnowSkola

    Time Out This page isn’t available right now. But we’re working on a fix, ASAP. Try again soon. Go Back

  • Projects (All) | TechKnowSkola

    PROJECTS 8×8 LED Matrix MAX7219 Tutorial with Scrolling Text & Android Control via Bluetooth ​ Read More Interfacing GPS with Arduino (Neo-6M-001) In this tutorial we will learn how to use a GPS Module with Arduino. Neo 6M (Ublox NEO6MV2) is a I2C compliant GPS module. This post discusses details on wiring Ublox Neo 6M with Arduino or an USB to Serial/TTL adapter, basic interactions with module using serial communication, using u -center GUI in visualizations, as well as using TinyGPS library to extract fine grained results from the module output. Read More Analog Joystick Interfacing with Arduino UNO. In this tutorial we will learn how to interface an Analog Joystick with the Arduino Uno and checking the values on the Serial Monitor. Read More Interfacing of MQ2 (gas) sensor with Arduino Uno. In this tutorial we will learn how to interface a MQ2 (gas) Sensor with the Arduino Uno Read More Interfacing of LDR Sensor Module with Arduino Uno. In this tutorial we will learn how to interface a LDR sensor Module with the Arduino Uno. Read More Interfacing of RFID Module with Arduino Uno. In this tutorial we will learn how to interface a RFID module with the Arduino Uno. Read More Measuring Distance using Ultrasonic Sensor with Arduino In this project we will learn the basics of how to measure distance using an ultrasonic sensor with an Arduino, which further can be used for controlling other parameters of a robot or many other applications. Read More Measuring Humidity and temperature using DHT11 sensor with Arduino. In this tutorial, we will learn how to use a DHT (DHT11 version) Temperature and Humidity Sensor. It’s accurate enough for most projects that need to keep track of humidity and temperature readings. We will be using a Library specifically designed for these sensors that will make our code short and easy to write. Read More 4*4 Keypad Interfacing with Arduino UNO. In this tutorial, we will learn how to interface a 4*4 Keypad with the Arduino Uno and check the values on the Serial Monitor. Read More Interfacing of Touch Sensor with Arduino Uno. In this tutorial, we will learn how to interface a Touch Sensor with the Arduino Uno. Read More Interfacing of Pulse Rate Sensor with Arduino Uno. In this tutorial we will learn how to interface a Pulse Rate Sensor with the Arduino Uno. Read More Finding an obstacle using IR Sensor with Arduino In this project we will learn the basics of how to find for an obstacle using an Infrared sensor with an Arduino, which further can be used for controlling other parameters of a robot and many other applications too. Read More Interfacing of Force Pressure Sensor with Arduino Uno. In this tutorial we will learn how to interface a Force Pressure Sensor with the Arduino Uno. Read More Displaying a text message on LCD Display using 16X2 Segment Display with Arduino. : In this tutorial we will learn how to interface a 16×2 LCD (liquid crystal display) with the Arduino Uno. Read More Interfacing of Metal Touch Sensor with Arduino. In this tutorial we will learn how to interface a Metal Touch Sensor with the Arduino Read More Interfacing with MQ-3 Alcohol Sensor Module ​ Read More Interfacing of 28BYJ Stepper Driver with Arduino. In this tutorial we will learn how to interface a Flex Sensor with the Arduino Uno. Read More Interfacing of Buzzer with Arduino Uno. In this tutorial, we will learn how to interface a Buzzer with the Arduino Uno. Read More Interfacing of 4 Digit Segment Display with Arduino Uno. In this tutorial, we will learn how to interface a 4-digit segment display with the Arduino Uno. Read More Interfacing 2 Channel Relay Module with Arduino and control High Voltage AC (current). In this tutorial, we will learn how to interface a 2 channel relay module with the Arduino Uno. Read More Measuring water flow rate and calculating quantity using Flow Sensor with Arduino. In this tutorial, we will learn how to use a water flow sensor with Arduino. We will use the serial monitor for printing the water flow rate in liters per hour and the total of liters flowing since starting. So, let's get started! Read More Interfacing of GSM 800 L Modules with Arduino. In this tutorial we will learn how to interface GSM 800L Module with the Arduino Uno. Read More Bluetooth Controlled Car Using Arduino Uno. This project shows how you can build a car which can be controlled by your Smartphone using an android application via Bluetooth. Read More Interfacing of Laser Diode with Arduino Uno. In this tutorial we will learn how to interface a Laser Diode with the Arduino Uno. Read More Interfacing of Temperature Sensor (LM35) with Arduino Uno. In this tutorial we will learn how to interface a Temperature Sensor with the Arduino Uno. Read More Motion Detection using PIR Sensor with Arduino In this Arduino Tutorial we will learn how a PIR Sensor works and how to use it with the Arduino Board for detecting motion. Read More Interfacing of Sound sensor with Arduino Uno. In this tutorial we will learn how to interface a Sound Sensor with the Arduino Uno. Read More Interfacing Colour Sensor with Arduino (TCS3200) : In this tutorial, we will learn how to use a colour sensor with Arduino. We will use the serial monitor for printing the colour values. So let's get started! This sensor is used for detecting primary colours (red, green and blue, or RGB)—colours that are physically available in LEDs in one package; for example, common cathode or common-cathode RGB LED. We can display primary colours and also generate specific colours by modifying the Arduino code. Read More Character Displaying using 8X8 LED Matrix MAX7219 with Arduino Uno In this Arduino project we will learn how to control 8×8 LED Matrix using the MAX7219 driver and the Arduino board. Read More Measuring soil moisture using Soil Moisture Sensor with Arduino (Y-38) In this tutorial, we will learn how to read soil moisture data using Analog Soil Moisture Sensor on the Arduino Platform. We are reading data from Analog Moisture Sensor, so we will get readings in the range 0 to 1023. Lesser the value means lesser the moisture in the soil. Read More Interfacing of Rain Drop Sensor with Arduino Uno. In this tutorial we will learn how to interface a Rain Drop Sensor with the Arduino Uno. Read More

  • 500 | TechKnowSkola

    Time Out This page isn’t available right now. But we’re working on a fix, ASAP. Try again soon. Go Back

  • Projects

    PROJECTS 8×8 LED Matrix MAX7219 Tutorial with Scrolling Text & Android Control via Bluetooth ​ Read More Interfacing GPS with Arduino (Neo-6M-001) In this tutorial we will learn how to use a GPS Module with Arduino. Neo 6M (Ublox NEO6MV2) is a I2C compliant GPS module. This post discusses details on wiring Ublox Neo 6M with Arduino or an USB to Serial/TTL adapter, basic interactions with module using serial communication, using u -center GUI in visualizations, as well as using TinyGPS library to extract fine grained results from the module output. Read More Analog Joystick Interfacing with Arduino UNO. In this tutorial we will learn how to interface an Analog Joystick with the Arduino Uno and checking the values on the Serial Monitor. Read More Interfacing of MQ2 (gas) sensor with Arduino Uno. In this tutorial we will learn how to interface a MQ2 (gas) Sensor with the Arduino Uno Read More Interfacing of LDR Sensor Module with Arduino Uno. In this tutorial we will learn how to interface a LDR sensor Module with the Arduino Uno. Read More Interfacing of RFID Module with Arduino Uno. In this tutorial we will learn how to interface a RFID module with the Arduino Uno. Read More Measuring Distance using Ultrasonic Sensor with Arduino In this project we will learn the basics of how to measure distance using an ultrasonic sensor with an Arduino, which further can be used for controlling other parameters of a robot or many other applications. Read More Measuring Humidity and temperature using DHT11 sensor with Arduino. In this tutorial, we will learn how to use a DHT (DHT11 version) Temperature and Humidity Sensor. It’s accurate enough for most projects that need to keep track of humidity and temperature readings. We will be using a Library specifically designed for these sensors that will make our code short and easy to write. Read More 4*4 Keypad Interfacing with Arduino UNO. In this tutorial, we will learn how to interface a 4*4 Keypad with the Arduino Uno and check the values on the Serial Monitor. Read More Interfacing of Touch Sensor with Arduino Uno. In this tutorial, we will learn how to interface a Touch Sensor with the Arduino Uno. Read More Interfacing of Pulse Rate Sensor with Arduino Uno. In this tutorial we will learn how to interface a Pulse Rate Sensor with the Arduino Uno. Read More Finding an obstacle using IR Sensor with Arduino In this project we will learn the basics of how to find for an obstacle using an Infrared sensor with an Arduino, which further can be used for controlling other parameters of a robot and many other applications too. Read More Interfacing of Force Pressure Sensor with Arduino Uno. In this tutorial we will learn how to interface a Force Pressure Sensor with the Arduino Uno. Read More Displaying a text message on LCD Display using 16X2 Segment Display with Arduino. : In this tutorial we will learn how to interface a 16×2 LCD (liquid crystal display) with the Arduino Uno. Read More Interfacing of Metal Touch Sensor with Arduino. In this tutorial we will learn how to interface a Metal Touch Sensor with the Arduino Read More Interfacing with MQ-3 Alcohol Sensor Module ​ Read More Interfacing of 28BYJ Stepper Driver with Arduino. In this tutorial we will learn how to interface a Flex Sensor with the Arduino Uno. Read More Interfacing of Buzzer with Arduino Uno. In this tutorial, we will learn how to interface a Buzzer with the Arduino Uno. Read More Interfacing of 4 Digit Segment Display with Arduino Uno. In this tutorial, we will learn how to interface a 4-digit segment display with the Arduino Uno. Read More Interfacing 2 Channel Relay Module with Arduino and control High Voltage AC (current). In this tutorial, we will learn how to interface a 2 channel relay module with the Arduino Uno. Read More Measuring water flow rate and calculating quantity using Flow Sensor with Arduino. In this tutorial, we will learn how to use a water flow sensor with Arduino. We will use the serial monitor for printing the water flow rate in liters per hour and the total of liters flowing since starting. So, let's get started! Read More Interfacing of GSM 800 L Modules with Arduino. In this tutorial we will learn how to interface GSM 800L Module with the Arduino Uno. Read More Bluetooth Controlled Car Using Arduino Uno. This project shows how you can build a car which can be controlled by your Smartphone using an android application via Bluetooth. Read More Interfacing of Laser Diode with Arduino Uno. In this tutorial we will learn how to interface a Laser Diode with the Arduino Uno. Read More Interfacing of Temperature Sensor (LM35) with Arduino Uno. In this tutorial we will learn how to interface a Temperature Sensor with the Arduino Uno. Read More Motion Detection using PIR Sensor with Arduino In this Arduino Tutorial we will learn how a PIR Sensor works and how to use it with the Arduino Board for detecting motion. Read More Interfacing of Sound sensor with Arduino Uno. In this tutorial we will learn how to interface a Sound Sensor with the Arduino Uno. Read More Interfacing Colour Sensor with Arduino (TCS3200) : In this tutorial, we will learn how to use a colour sensor with Arduino. We will use the serial monitor for printing the colour values. So let's get started! This sensor is used for detecting primary colours (red, green and blue, or RGB)—colours that are physically available in LEDs in one package; for example, common cathode or common-cathode RGB LED. We can display primary colours and also generate specific colours by modifying the Arduino code. Read More Character Displaying using 8X8 LED Matrix MAX7219 with Arduino Uno In this Arduino project we will learn how to control 8×8 LED Matrix using the MAX7219 driver and the Arduino board. Read More Measuring soil moisture using Soil Moisture Sensor with Arduino (Y-38) In this tutorial, we will learn how to read soil moisture data using Analog Soil Moisture Sensor on the Arduino Platform. We are reading data from Analog Moisture Sensor, so we will get readings in the range 0 to 1023. Lesser the value means lesser the moisture in the soil. Read More Interfacing of Rain Drop Sensor with Arduino Uno. In this tutorial we will learn how to interface a Rain Drop Sensor with the Arduino Uno. Read More

  • Bluetooth Controlled Car Using Arduino Uno.

    Back Bluetooth Controlled Car Using Arduino Uno. Material Required: Material Quantity Arduino Uno 1 12V DC Motor /BO motor 2 Jumper cables 15 HC-05 Bluetooth Module 1 Breadboard 1 Breadboard 1 This tutorial will teach you how to create your own Bluetooth controlled car. So let’s get started. This will be a Bluetooth controlled car so for this project we will be using HC-05 Bluetooth module to receive the controlling data packets. We will also need an android app which will be sending the controlling data packets to the Bluetooth module. We will use a third party application ( https://play.google.com/store/apps/details?id=com.broxcode.arduinobluetoothfree&hl=en to download) for this purpose. Let's build the hardware (Body of the car) The car which we are building for this project will be a dual motor car. Two 12 v 200 rpm DC or BO motors. You can use a readymade chassis. Circuit Now let us build the circuit. CODE : Here we will use the direction of rotation of motors to control the direction of the car. Forward - Both motors move in forward direction. Backward - Both motors move in backward direction. Left - Left motor moves backwards and right motor moves forward. Right - Left motor moves forwards and right motor moves backward. Stop - Both motors stop Tested Programming Code: #include AF_DCMotor motor1(1); //motor1 is the left motor AF_DCMotor motor2(2); //motor2 is the right motor int val; void setup() { Serial.begin(9600); motor1.setSpeed(255); //motor speed is set motor2.setSpeed(255); Stop(); } void loop() { bt=Serial.read(); if(val=='1') //when the bluetooth module recieves 1 the car moves forward { forward(); } if(val=='2') //when the bluetooth module recieves 2 the car moves backward { backward(); } if(val=='3') //when the bluetooth module recieves 3 the car moves left { left(); } if(val=='4') //when the bluetooth module recieves 4 the car moves right { right(); } if(val=='5') //when the bluetooth module recieves 5 the car stops { Stop(); } } void forward() { motor1.run(FORWARD); motor2.run(FORWARD); } void backward() { motor1.run(BACKWARD); motor2.run(BACKWARD); } void left() { motor1.run(BACKWARD); motor2.run(FORWARD); } void right() { motor1.run(FORWARD); motor2.run(BACKWARD); } void Stop() { motor1.run(RELEASE); motor2.run(RELEASE); } Precautions: 1. Double check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether proper board is selected from Arduino IDE. 4. Ensure proper placement of Bluetooth and Motor driver for correct working. 5. Don’t lose hope if it does not run properly for the first time, try again. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of Pulse Rate Sensor with Arduino Uno.

    Back Interfacing of Pulse Rate Sensor with Arduino Uno. What is a Pulse Rate Sensor? The pulse sensor we are going to use is a plug and play heart rate sensor. This sensor is quite easy to use and operate. Place your finger on top of the sensor and it will sense the heartbeat by measuring the change in light from the expansion of capillary blood vessels. The pulse sensor module has a light which helps in measuring the pulse rate. When we place the finger on the pulse sensor, the light reflected will change based on the volume of blood inside the capillary blood vessels. Material Required: Material Quantity Arduino Uno 1 Pulse Rate Sensor 1 Jumper cables 6 LED 1 Pinout Diagram: Circuit Diagram: Connect the pulse sensor with Arduino as follows: GND pin of pulse sensor to GND of Arduino VCC of pulse sensor to 5V of Arduino A0 of pulse sensor to A0 of Arduino After that, connect the LED to pin 13 and GND of Arduino as shown in the figure below. Tested Programming Code: int PulseSensorPurplePin = 0; int LED13 = 13; int Signal; int Threshold = 550; void setup() { pinMode(LED13,OUTPUT); Serial.begin(9600); } void loop() { Signal = analogRead(PulseSensorPurplePin); Serial.println(Signal); if(Signal > Threshold){ digitalWrite(LED13,HIGH); } else { digitalWrite(LED13,LOW); } delay(10); } Precautions: Double check the connections before powering on the circuit. Don’t use loose jumper cables. Check whether proper board is selected from Arduino IDE. Ensure proper placement of pulse rate Sensor for correct working. Don’t lose hope if pulse rate Sensor does not run properly for the first time, try again. Conclusion: Once your sketch is running, you have to open your serial monitor. There you can see the Pulse Rate (BPM) on the sensor. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing Colour Sensor with Arduino (TCS3200)

    Back Interfacing Colour Sensor with Arduino (TCS3200) What is a Color Sensor? A colour sensor can determine different colours. They will utilize a means of emitting light and then look at the reflected light to determine an object’s colour. This will give the machine the actual colour of that object. These sensors are in use in quite a few different applications today. You can find them in quality control systems, packaging systems, and more. Specifications: · Power: 2.7V to 5.5V · Size: 28.4 x 28.4mm (1.12 x 1.12″) · Interface: digital TTL · High-resolution conversion of light intensity to frequency · Programmable colour and full-scale output frequency · Communicates directly to the microcontroller Material Required: Material Quantity Arduino Uno 1 Colour Sensor 1 Jumper cables 10 Pinout Diagram: Working: The TCS230 senses colour light with the help of an 8 x 8 array of photodiodes. Then using a Current-to-Frequency Converter the readings from the photodiodes are converted into a square wave with a frequency directly proportional to the light intensity. Finally, using the Arduino Board we can read the square wave output and get the results for the colour. If we take a closer look at the sensor we can see how it detects various colours. The photodiodes have three different colour filters. Sixteen of them have red filters, another 16 have green filters, another 16 have blue filters and the other 16 photodiodes are clear with no filters. Every 16 photodiodes are connected in parallel, so using the two control pins S2 and S3 we can select which of them will be read. So for example, if we want to detect red colour, we can just use the 16 red filtered photodiodes by setting the two pins to a low logic level according to the table. The sensor has two more control pins, S0 and S1 which are used for scaling the output frequency. The frequency can be scaled to three different preset values of 100 %, 20 % or 2%. This frequency-scaling function allows the output of the sensor to be optimized for various frequency counters or microcontrollers. Circuit Diagram: Tested Programming Code: First, we need to define the pins to which the sensor is connected and define a variable for reading the frequency. In the setup section, we need to define the four control pins as outputs and the sensor output as an Arduino input. Here we also need to set the frequency scaling, for this example, I will set it to 20%, and start the serial communication for displaying the results in the Serial Monitor. In the loop section, we will start with reading the red filtered photodiodes. For that purpose, we will set the two control pins S2 and S3 to low logic level. Then using the “pulseIn()” function we will read the output frequency and put it into the variable “frequency”. Using the Serial.print() function we will print the result on the serial monitor. The same procedure goes for the two other colours, we just need to adjust the control pins for the appropriate colour. Code: #define S0 4 #define S1 5 #define S2 6 #define S3 7 #define sensorOut 8 int frequency = 0; void setup() { pinMode(S0, OUTPUT); pinMode(S1, OUTPUT); pinMode(S2, OUTPUT); pinMode(S3, OUTPUT); pinMode(sensorOut, INPUT); digitalWrite(S0,HIGH); digitalWrite(S1,LOW); Serial.begin(9600);} void loop() { digitalWrite(S2,LOW); digitalWrite(S3,LOW); frequency = pulseIn(sensorOut, LOW); Serial.print("R= ");//printing name Serial.print(frequency);//printing RED color frequency Serial.print(" "); delay(100); digitalWrite(S2,HIGH); digitalWrite(S3,HIGH); frequency = pulseIn(sensorOut, LOW); Serial.print("G= "); Serial.print(frequency);Serial.print(" "); delay(100); digitalWrite(S2,LOW); digitalWrite(S3,HIGH);frequency pulseIn(sensorOut, LOW); Serial.print("B= ");//printing name Serial.print(frequency);//printing RED color frequency Serial.println(" "); delay(100); } Precautions: 1. Double-check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether the proper board is selected from Arduino IDE. 4. Ensure proper placement of sensor for correct working. 5. Try it with different colours and see the change in values. Conclusion: You can successfully identify different colours using this sensor and can be deployed for many other purposes like item sorting, Rubiks cube solving etc. Output: Situation Screenshot: Serial Monitor (Ctrl+Shift+M) BLUE : GREEN : RED Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing GPS with Arduino (Neo-6M-001)

    Back Interfacing GPS with Arduino (Neo-6M-001) What is a GPS Module? Every single location in the entire globe can be specified in terms of geographical coordinates. The geographical coordinate is a system which specifies any given location on the earth surface as latitude and longitude. There are devices which can read the geographical coordinates of a place with the help of the signals received from a number of satellites orbiting the earth. The system of satellites which helps in the positioning of a place is called Global Positioning System (GPS). The devices which can read the geographical coordinates of a place with the help of at least four GPS satellites are called GPS Receiver or simply GPS module. Specifications: • Build in 18X18mm GPS antenna • Anti-jamming technology • 5Hz position update rate • Operating temperature range: -40 TO 85°C • UART TTL socket • EEprom to store settings Material Required: Material Quantity Arduino Uno 1 GPS Module 1 Jumper cables 4 Working: GPS satellites circle the Earth twice a day in a precise orbit. Each satellite transmits a unique signal and orbital parameters that allow GPS devices to decode and compute the precise location of the satellite. GPS receivers use this information and trilateration to calculate a user's exact location. Essentially, the GPS receiver measures the distance to each satellite by the amount of time it takes to receive a transmitted signal. With distance measurements from a few more satellites, the receiver can determine a user's position and display it. To calculate your 2-D position (latitude and longitude) and track movement, a GPS receiver must be locked on to the signal of at least 3 satellites. With 4 or more satellites in view, the receiver can determine your 3-D position (latitude, longitude and altitude). Generally, a GPS receiver will track 8 or more satellites, but that depends on the time of day and where you are on the earth. Once your position has been determined, the GPS unit can calculate other information, such as: Speed Bearing Track Trip dist istance to destination Download and install required libraries for GPS to work in Arduino IDE (i) SoftwareSerial library (ii) TinyGPS library Click on the highlighted link to download the Library. Circuit Diagram: Connection of Arduino UNO and GPS module : Connect the four pins from UBLOX to an Arduino as follows: Ublox - Arduino GND - GND TX - Digital pin (D3) RX - Digital pin (D4) Vcc - 5Vdc Here, I suggest you to use external power supply to power the GPS module because minimum power requirement for GPS module to work is 3.3 V and Arduino is not capable of providing that much voltage. Tested Programming Code: #include #include SoftwareSerial mySerial(3,4); TinyGPS gps; void gpsdump(TinyGPS &gps); void printFloat(double f, int digits = 2); void setup() { // Oploen serial communications and wait for port to open: Serial.begin(9600); // set the data rate for the SoftwareSerial port mySerial.begin(9600); delay(1000); Serial.println("uBlox Neo 6M"); Serial.print("Testing TinyGPS library v. "); Serial.println(TinyGPS::library_version()); Serial.println("by Mikal Hart"); Serial.println(); Serial.print("Sizeof(gpsobject) = "); Serial.println(sizeof(TinyGPS)); Serial.println(); } void loop() // run over and over { bool newdata = false; unsigned long start = millis(); // Every 5 seconds we print an update while (millis() - start < 5000) { if (mySerial.available()) { char c = mySerial.read(); //Serial.print(c); // uncomment to see raw GPS data if (gps.encode(c)) { newdata = true; break; // uncomment to print new data immediately! } } } if (newdata) { Serial.println("Acquired Data"); Serial.println("-------------"); gpsdump(gps); Serial.println("-------------"); Serial.println(); } } void gpsdump(TinyGPS &gps) { long lat, lon; float flat, flon; unsigned long age, date, time, chars; int year; byte month, day, hour, minute, second, hundredths; unsigned short sentences, failed; gps.get_position(&lat, &lon, &age); Serial.print("Lat/Long(10^-5 deg): "); Serial.print(lat); Serial.print(", "); Serial.print(lon); Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms."); // On Arduino, GPS characters may be lost during lengthy Serial.print() // On Teensy, Serial prints to USB, which has large output buffering and // runs very fast, so it's not necessary to worry about missing 4800 // baud GPS characters. gps.f_get_position(&flat, &flon, &age); Serial.print("Lat/Long(float): "); printFloat(flat, 5); Serial.print(", "); printFloat(flon, 5); Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms."); gps.get_datetime(&date, &time, &age); Serial.print("Date(ddmmyy): "); Serial.print(date); Serial.print(" Time(hhmmsscc): "); Serial.print(time); Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms."); gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &age); Serial.print("Date: "); Serial.print(static_cast(month)); Serial.print("/"); Serial.print(static_cast(day)); Serial.print("/"); Serial.print(year); Serial.print(" Time: "); Serial.print(static_cast(hour+8)); Serial.print(":"); //Serial.print("UTC +08:00 Malaysia"); Serial.print(static_cast(minute)); Serial.print(":"); Serial.print(static_cast(second)); Serial.print("."); Serial.print(static_cast(hundredths)); Serial.print(" UTC +08:00 Malaysia"); Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms."); Serial.print("Alt(cm): "); Serial.print(gps.altitude()); Serial.print(" Course(10^-2 deg): "); Serial.print(gps.course()); Serial.print(" Speed(10^-2 knots): "); Serial.println(gps.speed()); Serial.print("Alt(float): "); printFloat(gps.f_altitude()); Serial.print(" Course(float): "); printFloat(gps.f_course()); Serial.println(); Serial.print("Speed(knots): "); printFloat(gps.f_speed_knots()); Serial.print(" (mph): "); printFloat(gps.f_speed_mph()); Serial.print(" (mps): "); printFloat(gps.f_speed_mps()); Serial.print(" (kmph): "); printFloat(gps.f_speed_kmph()); Serial.println(); gps.stats(&chars, &sentences, &failed); Serial.print("Stats: characters: "); Serial.print(chars); Serial.print(" sentences: "); Serial.print(sentences); Serial.print(" failed checksum: "); Serial.println(failed); } void printFloat(double number, int digits) { // Handle negative numbers if (number < 0.0) { Serial.print('-'); number = -number; } // Round correctly so that print(1.999, 2) prints as "2.00" double rounding = 0.5; for (uint8_t i=0; i 0) Serial.print("."); // Extract digits from the remainder one at a time while (digits-- > 0) { remainder *= 10.0; int toPrint = int(remainder); Serial.print(toPrint); remainder -= toPrint; }} Precautions: 1. Double check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether proper board is selected from Arduino IDE. 4. Ensure proper placement of sensor for correct working.. Conclusion: You can successfully measure the flow rate and quantity of the water flowing through a pipe through a cross sectional area. This sensor can be deployed in many ways like water level automation system, water meter etc. Output: After you have successfully uploaded your source code, open your serial monitor. Serial monitor will display the data that your gps required. If you didn’t get anything, make sure your connection is correct and try it outside or near the window where it is easy to get the signal. Signal may not reach inside a building. Situation Screenshot: Serial Monitor (Ctrl+Shift+M) Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of 28BYJ Stepper Driver with Arduino.

    Back Interfacing of 28BYJ Stepper Driver with Arduino. What is so special about steppers? A stepper motor can move in accurate, fixed angle increments known as steps. For practical purposes, a stepper motor is a bit like a servo: you can tell it to move to a pre-defined position and can count on getting fairly consistent results with multiple repetitions. Servos though, are usually limited to a 0-180 degree range, while a stepper motor can rotate continuously, similar to a regular DC motor. The advantage of steppers over DC motors is that you can achieve much higher precision and control over the movement. The downside of using steppers is that they are a bit more complex to control than servos and DC motors . The 28BYJ-48 Stepper Motor Datasheet The 28BYJ-48 is a small, cheap, 5 volt geared stepping motors. These stepping motors are apparently widely used to control things like automated blinds, A/C units and are mass produced. Due to the gear reduction ratio of *approximately* 64:1 it offers decent torque for its size at speeds of about 15 rotations per minute (RPM). With some software “trickery” to accelerate gradually and a higher voltage power source (I tested them with 12 volts DC) I was able to get about 25+ RPM. These little steppers can be purchased together with a small breakout board for the Arduino compatible ULN2003 stepper motor driver for less than $5. Quite a bargain, compared to the price of a geared DC motor, a DC motor controller and a wheel encoder! The low cost and small size makes the 28BYJ-48 an ideal option for small robotic applications, and an excellent introduction to stepper motor control with Arduino. Here are the detailed specs of the 28BYJ-48 stepper motor. Motor Type Unipolar stepper motor Connection Type 5 Wire Connection (to the motor controller) Voltage 5-12 Volts DC Frequency 100 Hz Step mode Half-step mode recommended(8 step control signal sequence) Half-step mode: 8 step control signal sequence (recommended) 5.625 degrees per step / 64 steps per one revolution of the internal motor shaft Full Step mode: 4 step control signal Step angle sequence 11.25 degrees per step / 32 steps per one revolution of the internal motor shaft Manufacturer specifies 64:1 . Some patient and diligent people on the Arduino forums have disassembled the gear train of these little motors and determined that the exact gear ratio is in fact 63.68395:1 . My observations confirm their findings. These means that in the recommended half-step mode we will have:64 steps per motor rotation x 63.684 gear ratio = Gear ratio 4076 steps per full revolution (approximately). Wiring to the ULN2003 controller A (Blue), B (Pink), C (Yellow), D (Orange), E (Red, Mid- Point) Weight 30g Material Required: Material Quantity Arduino Uno 1 Stepper Driver 1 Jumper cables 6 Stepper Motor 1 Pinout Diagram: The motor has 4 coils of wire that are powered in a sequence to make the magnetic motor shaft spin. When using the full-step method, 2 of the 4 coils are powered at each step. The default stepper library that comes pre-installed with the Arduino IDE uses this method. The 28BYH-48 datasheet specifies that the preferred method for driving this stepper is using the half-step method, where we first power coil 1 only, then coil 1 and 2 together, then coil 2 only and so on…With 4 coils, this means 8 different signals, like in the table below. Circuit Diagram: Wiring the ULN2003 stepper motor driver to Arduino Uno : The ULN2003 stepper motor driver board allows you to easily control the 28BYJ-48 stepper motor from a microcontroller, like the Arduino Uno. One side of the board side has a 5 wire socket where the cable from the stepper motor hooks up and 4 LEDs to indicate which coil is currently powered. The motor cable only goes in one way, which always helps. On the side you have a motor on / off jumper (keep it on to enable power to the stepper). The two pins below the 4 resistors, is where you provide power to the stepper. Note that powering the stepper from the 5 V rail of the Arduino is not recommended. A separate 5-12 V 1 Amp power supply or battery pack should be used, as the motor may drain more current than the microcontroller can handle and could potentially damage it. In the middle of the board we have the ULN2003 chip. At the bottom are the 4 control inputs that should be connected to four Arduino digital pins . Hooking it up to the Arduino Connect the ULN2003 driver IN1, IN2, IN3 and IN4 to digital pin 3, 4, 5 and 6 respectively on the Arduino Uno. Connect the positive lead from a decent 5-12V battery pack to the “+” pin of the ULN2003 driver and the ground to the “-” pin. Make sure that the “on/off” jumper next to the “-” pin is on. If you power the Arduino from a different battery pack, connect the grounds together. Arduino stepper code and the AccelStepper library The default stepper library that comes pre-installed with the Arduino IDE supports the full-step method only and has limited features. It does not run the 28BYJ-48 motors very efficiently and getting two of them running at the same time for a differential drive robot is a bit more difficult. I came across example sketch by 4tronix that used the half-step method with no additional libraries. Their code worked well and I was able to modify it, so that I can run two steppers at the same time. Still, I was only able to get my stepper motor spinning fairly slow and it was getting quite warm, for some reason. Additionally, that sample code uses delays for the steps and that will cause some issues when we start adding more complex functions in the loop and hook up various sensors. Then I came across the AccelStepper library. It runs the 28BYJ-48 steppers very efficiently (they never go as hot as with the other options I tried) and also supports acceleration (which allows the stepper to get to a higher speed). The library uses non blocking code for the steps and has quite a few other nice features. After some messing around with the documentation and the examples I got everything up and running. Below is the code that will slowly accelerate the 28BYJ-48 in one direction, then decelerate to a stop and accelerate in the opposite direction. Naturally, make sure you download and install the AccelStepper library first! #include #define HALFSTEP 8 // Motor pin definitions #define motorPin1 3 // IN1 on the ULN2003 driver 1 #define motorPin2 4 // IN2 on the ULN2003 driver 1 #define motorPin3 5 // IN3 on the ULN2003 driver 1 #define motorPin4 6 // IN4 on the ULN2003 driver 1 // Initialize with pin sequence IN1-IN3-IN2-IN4 for using the AccelStepper with 28BYJ-48 AccelStepper stepper1 ( HALFSTEP , motorPin1 , motorPin3 , motorPin2 , motorPin4 ); void setup () { stepper1 . setMaxSpeed ( 1000.0 ); stepper1 . setAcceleration ( 100.0 ); stepper1 . setSpeed ( 200 ); stepper1 . moveTo ( 20000 ); } //--(end setup )--- void loop () { //Change direction when the stepper reaches the target position if ( stepper1 . distanceToGo () == 0 ) { stepper1 . moveTo (- stepper1 . currentPosition ()); } stepper1 . run (); } The code above will not push this motor to its limit. You can experiment with the acceleration and speed settings to see what is the best you can squeeze out. Note that for nigher speeds, you will likely need a higher voltage DC source. If you got your stepper running, here is the code that the StepperBot from the video above is running. You will need to adjust the speed, as well variables based on your base and wheel sizes, if you want to have your bot moving in a square path. #include #define HALFSTEP 8 // motor pins #define motorPin1 3 // IN1 on the ULN2003 driver 1 #define motorPin2 4 // IN2 on the ULN2003 driver 1 #define motorPin3 5 // IN3 on the ULN2003 driver 1 #define motorPin4 6 // IN4 on the ULN2003 driver 1 #define motorPin5 8 // IN1 on the ULN2003 driver 2 #define motorPin6 9 // IN2 on the ULN2003 driver 2 #define motorPin7 10 // IN3 on the ULN2003 driver 2 #define motorPin8 11 // IN4 on the ULN2003 driver 2 // Initialize with pin sequence IN1-IN3-IN2-IN4 for using the AccelStepper with 28BYJ-48 AccelStepper stepper1 ( HALFSTEP , motorPin1 , motorPin3 , motorPin2 , motorPin4 ); AccelStepper stepper2 ( HALFSTEP , motorPin5 , motorPin7 , motorPin6 , motorPin8 ); // variables int turnSteps = 2100 ; // number of steps for a 90 degree turn int lineSteps = - 6600 ; //number of steps to drive straight int stepperSpeed = 1000 ; //speed of the stepper (steps per second) int steps1 = 0 ; // keep track of the step count for motor 1 int steps2 = 0 ; // keep track of the step count for motor 2 boolean turn1 = false ; //keep track if we are turning or going straight next boolean turn2 = false ; //keep track if we are turning or going straight next void setup () { delay ( 3000 ); //sime time to put the robot down after swithing it on stepper1 . setMaxSpeed ( 2000.0 ); stepper1 . move ( 1 ); // I found this necessary stepper1 . setSpeed ( stepperSpeed ); stepper2 . setMaxSpeed ( 2000.0 ); stepper2 . move (- 1 ); // I found this necessary stepper2 . setSpeed ( stepperSpeed ); } void loop () { if ( steps1 == 0 ) { int target = 0 ; if ( turn1 == true ) { target = turnSteps ; } else { target = lineSteps ; } stepper1 . move ( target ); stepper1 . setSpeed ( stepperSpeed ); turn1 = ! turn1 ; } if ( steps2 == 0 ) { int target = 0 ; if ( turn2 == true ) { target = turnSteps ; } else { target = - lineSteps ; } stepper2 . move ( target ); stepper2 . setSpeed ( stepperSpeed ); turn2 = ! turn2 ; } steps1 = stepper1 . distanceToGo (); steps2 = stepper2 . distanceToGo (); stepper1 . runSpeedToPosition (); stepper2 . runSpeedToPosition (); } Tested Programming Code: #define IN1 3 #define IN2 4 #define IN3 5 #define IN4 6 int Steps = 4096; //4096 or 768 int cstep = 0; void setup() { Serial.begin(9600); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); } void loop() { for(int x=0;x

  • Measuring Humidity and temperature using DHT11 sensor with Arduino.

    Back Measuring Humidity and temperature using DHT11 sensor with Arduino. What is a Digital Humidity Temperature Sensor? DHT11 is a Humidity and Temperature Sensor, which generates calibrated digital output. DHT11 can be interface with any microcontroller like Arduino, Raspberry Pi, etc. and get instantaneous results. DHT11 is a low-cost humidity and temperature sensor which provides high reliability and long-term stability. Material Required: Material Quantity Arduino Uno 1 DHT11 Sensor 1 Jumper cables 3 Pinout Diagram: Working: Ok now let’s see how these sensors work. They consist of a humidity sensing component, an NTC temperature sensor (or thermistor) and an IC on the back side of the sensor. For measuring humidity they use the humidity sensing component which has two electrodes with moisture holding substrate between them. So as the humidity changes, the conductivity of the substrate changes or the resistance between these electrodes changes. This change in resistance is measured and processed by the IC which makes it ready to be read by a microcontroller. On the other hand, for measuring temperature these sensors use an NTC temperature sensor or a thermistor. A thermistor is a variable resistor that changes its resistance with the temperature change. These sensors are made by sintering semiconductive materials such as ceramics or polymers to provide larger changes in the resistance with just small temperature changes. The term “NTC” means “Negative Temperature Coefficient”, which means that the resistance decreases with an increase in the temperature. Circuit Diagram: The DHTxx sensors have four pins, VCC, GND, data pin and a not connected pin which has no usage. A pull-up resistor from 5K to 10K Ohms is required to keep the data line high and to enable the communication between the sensor and the Arduino Board. There are some versions of these sensors that come with a breakout board with a built-in pull-up resistor and they have just 3 pins. The DHTXX sensors have their single wire protocol used for transferring the data. This protocol requires precise timing and the timing diagrams for getting the data from the sensors can be found in the datasheets of the sensors. However, we don’t have to worry much about these timing diagrams because we will use the DHT library which takes care of everything. Tested Programming Code: First, we need to include the DHT library which can be found from the Arduino official website or can be downloaded from the following link https://github.com/adidax/dht11 then define the PIN to which our sensor is connected and create a DHT object. In the setup section, we need to initiate the serial communication because we will use the serial monitor to print the results. Using the read22() function we will read the data from the sensor and put the values of the temperature and the humidity into the t and h variables. If you use the DHT11 sensor you will need to you the read11() function. In the end, we will print the temperature and the humidity values on the serial monitor. #include "DHT.h" #define DHTPIN 2 DHT dht(DHTPIN, DHTTYPE); void setup() { Serial.begin(9600); Serial.println("DHTxx test!"); dht.begin(); } void loop() { measurements. delay(2000); float h = dht.readHumidity(); float t = dht.readTemperature(); float f =dht.readTemperature(true); if (isnan(h) || isnan(t) || isnan(f)) { Serial.println("Failed to read from DHT sensor!"); return; } float hi = dht.computeHeatIndex(f, h); Serial.print("Humidity: "); Serial.print(h); Serial.print(" %\t"); Serial.print("Temperature: "); Serial.print(t); Serial.print(" *C "); Serial.print(f); Serial.print(" *F\t"); Serial.print("Heat index: "); Serial.print(hi); Serial.println(" *F"); } After we will upload this code to the Arduino board, the temperature and humidity results from the sensor can be seen on the Serial monitor. Precautions: Double-check the connections before powering on the circuit. Don’t use loose jumper cables. Check whether the proper board is selected from Arduino IDE. Ensure proper placement of sensor for correct working. Don’t put the sensor in any fluid or water, this is meant for taking ambient readings only. Conclusion: You can successfully measure temperature and humidity using the DHT11 sensor. Many more other applications can be made and triggered using the DHT11 sensor. Output: Situation Screenshot: Serial Monitor (Ctrl+Shift+M) Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of Metal Touch Sensor with Arduino.

    Back Interfacing of Metal Touch Sensor with Arduino. What is a Metal Touch Sensor? A metal touch sensor is a type of switch that only operates when it's touched by a charged body. It has a high-frequency transistor which can conduct electricity when receiving electromagnetic signals. The sensor has 3 main components on its circuit board. First, the sensor unit at the front of the module which measures the area physically and sends an analog signal to the second unit, the amplifier. The amplifier amplifies the signal, according to the resistant value of the potentiometer, and sends the signal to the analog output of the module. The third component is a comparator which switches the digital out and the LED if the signal falls under a specific value. In this experiment, touch the base electrode of a transistor with fingers to make it conduct electricity, for human body itself is a kind of conductor and an antenna that can receive electromagnetic waves in the air. These electromagnetic wave signals collected by human body are amplified by the transistor and processed by the comparator on the module to output steady signals. You can control the sensitivity by adjusting the potentiometer. Please notice: The signal will be inverted; that means that if you measure a high value, it is shown as a low voltage value at the analog output. Technical data / Short description Outputs a signal if the metal pike of the Sensor was touched. You can adjust the sensitivity of the sensor with the controller. Digital Out: At the moment of contact detection, a signal will be outputted. Analog Out: Direct measuring value of the sensor unit. LED1: Shows that the sensor is supplied with voltage LED2: Shows that the sensor detects a magnetic field Material Required: Material Quantity Arduino Uno 1 Metal Touch Sensor 1 Jumper cables 4 Pinout Diagram: This sensor doesn't show absolute values (like exact temperature in °C or magnetic field strength in mT). It is a relative measurement: you define an extreme value to a given normal environment situation and a signal will be send if the measurement exceeds the extreme value. Tested Programming Code: // Declaration and initialization of the input pin int Analog_Eingang = A0; int Digital_Eingang = 3; void setup () { pinMode (Analog_Eingang, INPUT); pinMode (Digital_Eingang, INPUT); Serial.begin (9600); } // The program reads the current value of the input pins // and outputs it via serial out void loop () { float Analog; int Digital; // Current value will be read and converted to the voltage Analog = analogRead (Analog_Eingang) * (5.0 / 1023.0); Digital = digitalRead (Digital_Eingang); // and outputted here Serial.print ("Analog voltage value:"); Serial.print (Analog, 4); Serial.print ("V, "); Serial.print ("Extreme value:"); if(Digital==1) { Serial.println (" reached"); } Else { Serial.println (" not reached yet"); } Serial.println ("----------------------------------------------------------------"); delay (200); } Precautions: 1. Double check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether proper board is selected from Arduino IDE. 4. Ensure proper placement of sensor for correct working. 5. Don’t lose hope if Sensor does not run properly for the first time, try again. Conclusion: You can successfully interface metal touch sensor and check for different conductivity values and can use it to detect different bodies when they come in contact. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of Temperature Sensor (LM35) with Arduino Uno.

    Back Interfacing of Temperature Sensor (LM35) with Arduino Uno. What is a Temperature Sensor? LM35 is a precision temperature sensor with its output proportional to the temperature (in C). With LM35, temperature can be measured more accurately than with a thermistor. It also possess low self heating and does not cause more than 0.1 C temperature rise in still air. The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV in response to ambient temperature; its scale factor is 0.01V/ C. Material Required: Material Quantity Arduino Uno 1 Temperature Sensor(LM35) 1 Jumper cables 4 Pinout Diagram: Circuit Diagram: Parameter Value VCC 5 V DC from your Arduino Ground GND from your Arduino Out Connect to Analog Pin A0 Tested Programming Code: float tempC; int reading; int tempPin = 0; void setup() { analogReference(INTERNAL); Serial.begin(9600); } void loop() { reading = analogRead(tempPin); tempC = reading / 9.31; Serial.print("Temprature= "); Serial.print(tempC); Serial.print("*C"); Serial.println(); delay(1000); } Precautions: 1. Double check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether proper board is selected from Arduino IDE. 4. Ensure proper placement of Temperature Sensor for correct working. 5. Don’t lose hope if Temperature Sensor does not run properly for the first time, try again. Conclusion: Once your sketch is running, you have to open your serial monitor. There you can see the Temperature of the surroundings. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of LDR Sensor Module with Arduino Uno.

    Back Interfacing of LDR Sensor Module with Arduino Uno. What is a LDR Sensor Module ? LDR sensor module is used to detect the intensity of light. It is associated with both analog output pin and digital output pin labelled as AO and DO respectively on the board. When there is light, the resistance of LDR will become low according to the intensity of light. The greater the intensity of light, the lower the resistance of LDR. The sensor has a potentiometer knob that can be adjusted to change the sensitivity of LDR towards light. Material Required: Material Quantity Arduino Uno 1 LDR Sensor Module 1 Jumper cables 4 Pinout Diagram: Circuit Diagram: Parameter Value VCC 5 V DC from your Arduino Ground GND from your Arduino A0 Connect to Analog Pin A0 Tested Programming Code: int sensorPin = A0; // select the input pin for LDR int sensorValue = 0; // variable to store the value coming from the sensor void setup() { Serial.begin(9600); //sets serial port for communication } void loop() { sensorValue = analogRead(sensorPin); // read the value from the sensor Serial.println(sensorValue); //prints the values coming from the sensor on the screen delay(100); } Precautions: 1. Double check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether proper board is selected from Arduino IDE. 4. Ensure proper placement of LDR Sensor Module for correct working. 5. Don’t lose hope if LDR Sensor Module does not run properly for the first time, try again. Conclusion: Once your sketch is running, you have to open your serial monitor to check the readings. Reference URL GET IN TOUCH We'd love to hear from you Contact Us

  • Interfacing of Buzzer with Arduino Uno.

    Back Interfacing of Buzzer with Arduino Uno. What is a Buzzer? Buzzers are used for making beep alarms and tones. They can be used in alarm systems, for keypad feedback, or some games. Lightweight, simple construction and low price make it usable in various applications like car/truck reversing indicators, computers, call bells etc. Material Required: Material Quantity Arduino Uno 1 Buzzer 1 Jumper cables 5 Resistor 1(100 ohms) Pinout Diagram: Circuit Diagram: The Connections are pretty simple: Connect the Supply wire (RED) of the buzzer to the Digital Pin 9 of the Arduino through a 100-ohm resistor. Connect the Ground wire (BLACK) of the buzzer to any Ground Pin on the Arduino. Tested Programming Code: This code is to generate an alarm type of sound. The tone is an Arduino Library to produce a square wave of the specified frequency (and 50% duty cycle) on any Arduino pin. const int buzzerPin = 9; void setup() { Serial.begin(8600); pinMode(buzzerPin, OUTPUT); void loop() { tone(buzzerPin, 50); delay(50); noTone(buzzerPin); delay(100); } } Precautions: 1. Double-check the connections before powering on the circuit. 2. Don’t use loose jumper cables. 3. Check whether the proper board is selected from Arduino IDE. 4. Ensure proper placement of Buzzer for correct working. 5. Don’t lose hope if Buzzer does not run properly for the first time, try again. Conclusion: You can Use Buzzer as an Alarm and many Other Alerting Devices . Reference URL GET IN TOUCH We'd love to hear from you Contact Us

bottom of page