FRIENDz

FAILURE IS THE SIGN OF SUCCESS!!

Connect Transmitter Receiver module with 8051 code

The mikroC PRO for 8051 provides a library for handling Manchester coded signals. The Manchester code is a code in which data and clock signals are combined to form a single self-synchronizing data stream; each encoded bit contains a transition at the midpoint of a bit period, the direction of transition determines whether the bit is 0 or 1; the second half is the true bit value and the first half is the complement of the true bit value .

Notes:
  • The Manchester receive routines are blocking calls (Man_Receive_Init and Man_Synchro). This means that MCU will wait until the task has been performed (e.g. byte is received, synchronization achieved, etc).
  • Manchester code library implements time-based activities, so interrupts need to be disabled when using it.

Connect Keypad with 8051 code

The mikroC PRO for 8051 provides a library for working with 4x4 keypad. The library routines can also be used with 4x1, 4x2, or 4x3 keypad. For connections explanation see schematic at the bottom of this page.
Note: Since sampling lines for 8051 MCUs are activated by logical zero Keypad Library can not be used with hardwares that have protective diodes connected with anode to MCU side, such as mikroElektronika's Keypad extra board HW.Rev v1.20
External dependencies of Keypad Library
The following variable must be defined in all projects using Keypad Library:
Description:
Example :
extern sfr char keypadPort;
Keypad Port.
char keypadPort at P0;
Library Routines
  • Keypad_Init
  • Keypad_Key_Press
  • Keypad_Key_Click

Connect CAN Protocol with 8051 Atmel

The SPI module is available with a number of the 8051 compliant MCUs. The mikroC PRO for 8051 provides a library (driver) for working with mikroElektronika's CANSPI Add-on boards (with MCP2515 or MCP2510) via SPI interface.
The CAN is a very robust protocol that has error detection and signalization, selfchecking and fault confinement. Faulty CAN data and remote frames are re-transmitted automatically, similar to the Ethernet.
Data transfer rates depend on distance. For example, 1 Mbit/s can be achieved at network lengths below 40m while 250 Kbit/s can be achieved at network lengths below 250m. The greater distance the lower maximum bitrate that can be achieved. The lowest bitrate defined by the standard is 200Kbit/s. Cables used are shielded twisted pairs.
CAN supports two message formats:
  • Standard format, with 11 identifier bits and
  • Extended format, with 29 identifier bits
Notes:
  • Consult the CAN standard about CAN bus termination resistance.
  • An effective CANSPI communication speed depends on SPI and certainly is slower than “real” CAN.
  • CANSPI module refers to mikroElektronika's CANSPI Add-on board connected to SPI module of MCU.

Connect ADC with 8051 Code

ADC (Analog to Digital Converter) module is available with a number of MCUs. Library routines are included to provide you comfortable work with the module in single-ended mode.

Library Routines

  • ADCx_Init
  • ADCx_Init_Advanced
  • ADCx_Get_Sample
Notes:
  • Some of the MCUs do not support ADCx_Init_Advanced routine. Please, refer to the appropriate datasheet.
  • ADC routines require you to specify the module you want to use. To select the desired module, simply change the letter x in the prototype for a number from 1 to 3
    Number of ADC modules per MCU differs from chip to chip. Please, read the appropriate datasheet before utilizing this library.

Extend I/O Ports using PIC

The mikroC PRO for PIC provides a library for communication with the Microchip’s Port Expander MCP23S17 via SPI interface. Connections of the PIC compliant MCU and MCP23S17 is given on the schematic at the bottom of this page.
  Important :
  • The library uses the SPI module for communication. User must initialize the appropriate SPI module before using the Port Expander Library.
  • Library does not use Port Expander interrupts.

External dependencies of Port Expander Library

The following variables must be defined in all projects using Port Expander Library: Description : Example :
extern sfr sbit SPExpanderRST; Reset line. sbit SPExpanderRST at RC0_bit;
extern sfr sbit SPExpanderCS; Chip Select line. sbit SPExpanderCS at RC1_bit;
extern sfr sbit SPExpanderRST_Direction; Direction of the Reset pin. sbit SPExpanderRST_Direction at TRISC0_bit;
extern sfr sbit SPExpanderCS_Direction; Direction of the Chip Select pin. sbit SPExpanderCS_Direction at TRISC1_bit;

Connect Memory Card using PIC18F4520 Code

The Multi Media Card (MMC) is a Flash memory card standard. MMC cards are currently available in sizes up to and including 32 GB and are used in cellular phones, digital audio players, digital cameras and PDA’s.
mikroC PRO for PIC provides a library for accessing data on Multi Media Card via SPI communication. This library also supports SD (Secure Digital) and high capacity SDHC (Secure Digital High Capacity) memory cards .

Secure Digital Card

Secure Digital (SD) is a Flash memory card standard, based on the older Multi Media Card (MMC) format.
SD cards are currently available in sizes of up to and including 2 GB, and are used in digital cameras, digital camcorders, handheld computers, media players, mobile phones, GPS receivers, video games and PDAs.

Create Musical Tone using PIC Code

The mikroC PRO for PIC provides a Sound Library to supply users with routines necessary for sound signalization in their applications. Sound generation needs additional hardware, such as piezo-speaker (example of piezo-speaker interface is given on the schematic at the bottom of this page).

Library Routines

  • Sound_Init
  • Sound_Play

Sound_Init

Prototype void Sound_Init(char *snd_port, char snd_pin);
Returns Nothing.
Description Configures the appropriate MCU pin for sound generation.
Parameters :
  • snd_port: sound output port address
  • snd_pin: sound output pin

Connect Ethernet controller with PIC Code

The ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface (SPI). It is designed to serve as an Ethernet network interface for any controller equipped with SPI.
The ENC28J60 meets all of the IEEE 802.3 specifications. It incorporates a number of packet filtering schemes to limit incoming packets. It also provides an internal DMA module for fast data throughput and hardware assisted IP checksum calculations. Communication with the host controller is implemented via two interrupt pins and the SPI, with data rates of up to 10 Mb/s. Two dedicated pins are used for LED link and network activity indication.
This library is designed to simplify handling of the underlying hardware (ENC28J60). It works with any PIC with integrated SPI and more than 4 Kb ROM memory. 38 to 40 MHz clock is recommended to get from 8 to 10 Mhz SPI clock, otherwise PIC should be clocked by ENC28J60 clock output due to its silicon bug in SPI hardware. If you try lower PIC clock speed, there might be board hang or miss some requests.
SPI Ethernet ENC28J60 Library supports:

UART Communication using PIC Code

The UART hardware module is available with a number of PIC compliant MCUs. The mikroC PRO for PIC UART Library provides comfortable work with the Asynchronous (full duplex) mode.
You can easily communicate with other devices via RS-232 protocol (for example with PC, see the figure at the end of the topic – RS-232 HW connection). You need a PIC MCU with hardware integrated UART, for example 16F887. Then, simply use the functions listed below.
  Important :
  • UART library routines require you to specify the module you want to use. To select the desired UART module, simply change the letter x in the routine prototype for a number from 1 to 2.
  • Switching between the UART modules in the UART library is done by the UART_Set_Active function (UART modules have to be previously initialized).
  • Number of UART modules per MCU differs from chip to chip. Please, read the appropriate datasheet before utilizing this library.

Connect USB HID with PIC18F4450 Code

Universal Serial Bus (USB) provides a serial bus standard for connecting a wide variety of devices, including computers, cell phones, game consoles, PDA’s, etc.
USB Library contains HID routines that support HID class devices, and also the generic routines that can be used with vendor specified drivers.

USB HID Class

The HID class consists primarily of devices that are used by humans to control the operation of computer systems. Typical examples of HID class devices include :
  • Keyboards and pointing devices, for example: standard mouse devices, trackballs, and joysticks.
  • Front-panel controls, for example: knobs, switches, buttons, and sliders.
  • Controls that might be found on devices such as telephones, VCR remote controls, games or simulation devices, for example: data gloves, throttles, steering wheels, and rudder pedals.
  • Devices that may not require human interaction but provide data in a similar format to HID class devices, for example, bar-code readers, thermometers, or voltmeters.
Many typical HID class devices include indicators, specialized displays, audio feedback, and force or tactile feedback. Therefore, the HID class definition includes support for various types of output directed to the end user.

Connect Matrix Keypad with PIC Controller Code

The mikroC PRO for PIC provides a library for working with 4x4 keypad. The library routines can also be used with 4x1, 4x2, or 4x3 keypad. For connections explanation see schematic at the bottom of this page.

External dependencies of Keypad Library

The following variable must be defined in all projects using Keypad Library: Description : Example :
extern sfr char keypadPort; Keypad Port. char keypadPort at PORTD;

Library Routines

  • Keypad_Init
  • Keypad_Key_Press
  • Keypad_Key_Click

Connect I²C with PIC

The I²C full master MSSP module is available with a number of PIC MCU models. mikroC PRO for PIC provides library which supports the master I²C mode.

  Important :
  • Some MCUs have multiple I²C modules. In order to use the desired I²C library routine, simply change the number 1 in the prototype with the appropriate module number, i.e. I2C2_Init(100000);

Library Routines

  • I2C1_Init
  • I2C1_Start
  • I2C1_Repeated_Start
  • I2C1_Is_Idle
  • I2C1_Rd
  • I2C1_Wr
  • I2C1_Stop

Connect Flash Card with PIC18F4520

The Compact Flash Library provides routines for accessing data on Compact Flash card (abbr. CF further in text). CF cards are widely used memory elements, commonly used with digital cameras. Great capacity and excellent access time of only a few microseconds make them very attractive for microcontroller applications.
In CF card, data is divided into sectors. One sector usually comprises 512 bytes. Routines for file handling, the Cf_Fat routines, are not performed directly but successively through 512B buffer.
  Important :
  • Routines for file handling can be used only with FAT16 file system.
  • Library functions create and read files from the root directory only.
  • Library functions populate both FAT1 and FAT2 tables when writing to files, but the file data is being read from the FAT1 table only; i.e. there is no recovery if the FAT1 table gets corrupted.
  • If MMC/SD card has Master Boot Record (MBR), the library will work with the first available primary (logical) partition that has non-zero size. If MMC/SD card has Volume Boot Record (i.e. there is only one logical partition and no MBRs), the library works with entire card as a single partition. For more information on MBR, physical and logical drives, primary/secondary partitions and partition tables, please consult other resources, e.g. Wikipedia and similar.
  • Before writing operation, make sure not to overwrite boot or FAT sector as it could make your card on PC or digital camera unreadable. Drive mapping tools, such as Winhex, can be of great assistance.


Connect CAN-SPI with PIC Controller

The SPI module is available with a number of the PIC compliant MCUs. The mikroC PRO for PIC provides a library (driver) for working with mikroElektronika's CANSPI Add-on boards (with MCP2515 or MCP2510) via SPI interface.
The CAN is a very robust protocol that has error detection and signalization, self–checking and fault confinement. Faulty CAN data and remote frames are re-transmitted automatically, similar to the Ethernet.
In the mikroC PRO for PIC, each routine of the CAN library has its own CANSPI counterpart with identical syntax. For more information on Controller Area Network, consult the CAN Library. Note that an effective communication speed depends on SPI and certainly is slower than "real" CAN.
Data transfer rates depend on distance. For example, 1 Mbit/s can be achieved at network lengths below 40m while 250 Kbit/s can be achieved at network lengths below 250m. The greater distance the lower maximum bitrate that can be achieved. The lowest bitrate defined by the standard is 200Kbit/s. Cables used are shielded twisted pairs.
CAN supports two message formats:
  • Standard format, with 11 identifier bits and
  • Extended format, with 29 identifier bits

Connect CAN Protocol with PIC

The mikroC PRO for PIC provides a library (driver) for working with the CAN module.
The CAN is a very robust protocol that has error detection and signalization, self–checking and fault confinement. Faulty CAN data and remote frames are re-transmitted automatically, similar to the Ethernet.
Data transfer rates depends on the distance. For example, 1 Mbit/s can be achieved at network lengths below 40m while 250 Kbit/s can be achieved at network lengths below 250m. The greater distance the lower maximum bitrate that can be achieved. The lowest bitrate defined by the standard is 200Kbit/s. Cables used are shielded twisted pairs.
CAN supports two message formats:
  • Standard format, with 11 identifier bits, and
  • Extended format, with 29 identifier bits
  Important :
  • Consult the CAN standard about CAN bus termination resistance.

Connect ADC with PIC16F877

ADC (Analog to Digital Converter) module is available with a number of PIC MCU modules. ADC is an electronic circuit that converts continuous signals to discrete digital numbers. ADC Library provides you a comfortable work with the module.

Library Routines

  • ADC_Init
  • ADC_Get_Sample
  • ADC_Read

Control LED Light brightness using PWM

CMO module is available with a number of AVR MCUs. mikroC PRO for AVR provides library which simplifies using PWM HW Module.
  Important :
  • AVR MCUs require you to specify the module you want to use. To select the desired PWM, simply change the letter x in the prototype for a number from 1 to 2. Number of UART modules per MCU differs from chip to chip. Please, read the appropriate datasheet before utilizing this library. 
    For the XMEGA family of MCUs change the xn in the routine prototype with C0, C1, D0, D1, E0, E1, F0 or F1 (MCU dependent).
  • For better understanding of PWM module it would be best to start with the example provided in Examples folder of our mikroC PRO for AVR compiler.
  • When you select a MCU, mikroC PRO for AVR automatically loads the correct PWM library (or libraries), which can be verified by looking at the Library Manager.
  • PWM library handles and initializes the PWM module on the given AVR MCU, but it is up to user to set the correct pins as PWM output, this topic will be covered later in this section.
  • mikroC PRO for AVR does not support enhanced PWM modules.

PS/2 Keyboard connect with ATMEGA16

The mikroC PRO for AVR provides a library for communication with the common PS/2 keyboard.
  Important :
  • The library does not utilize interrupts for data retrieval, and requires the oscillator clock to be at least 6MHz.
  • The pins to which a PS/2 keyboard is attached should be connected to the pull-up resistors.
  • Although PS/2 is a two-way communication bus, this library does not provide MCU-to-keyboard communication; e.g. pressing the Caps Lock key will not turn on the Caps Lock LED.

Expand I/O Ports in ATmega16

The mikroC PRO for AVR provides a library for communication with the Microchip’s Port Expander MCP23S17 via SPI interface. Connections of the AVR compliant MCU and MCP23S17 is given on the schematic at the bottom of this page.
  Important :
  • The library uses the SPI module for communication. User must initialize the appropriate SPI module before using the Port Expander Library.
  • Library does not use Port Expander interrupts.

Transmitter and Receiver connect with ATmega16


The mikroC PRO for AVR provides a library for handling Manchester coded signals. The Manchester code is a code in which data and clock signals are combined to form a single self-synchronizing data stream; each encoded bit contains a transition at the midpoint of a bit period, the direction of transition determines whether the bit is 0 or 1;

  Important :
  • The Manchester receive routines are blocking calls (Man_Receive_Init and Man_Synchro). This means that MCU will wait until the task has been performed (e.g. byte is received, synchronization achieved, etc).
  • Manchester code library implements time-based activities, so interrupts need to be disabled when using it.

Connect Memory Card with ATmega128 Code


The Compact Flash Library provides routines for accessing data on Compact Flash card. CF cards are widely used memory elements, commonly used with digital cameras. Great capacity and excellent access time of only a few microseconds make them very attractive for microcontroller applications.
In CF card, data is divided into sectors. One sector usually comprises 512 bytes. Routines for file handling, the Cf_Fat routines, are not performed directly but successively through 512B buffer.

  Important :
  • Routines for file handling can be used only with FAT16 file system.
  • Library functions create and read files from the root directory only.
  • Library functions populate both FAT1 and FAT2 tables when writing to files, but the file data is being read from the FAT1 table only; i.e. there is no recovery if the FAT1 table gets corrupted.
  • If MMC/SD card has Master Boot Record (MBR), the library will work with the first available primary (logical) partition that has non-zero size. If MMC/SD card has Volume Boot Record (i.e. there is only one logical partition and no MBRs), the library works with entire card as a single partition. For more information on MBR, physical and logical drives, primary/secondary partitions and partition tables, please consult other resources, e.g. Wikipedia and similar.
  • Before writing operation, make sure not to overwrite boot or FAT sector as it could make your card on PC or digital camera unreadable. Drive mapping tools, such as Winhex, can be of great assistance.

CAN Protocol connect with ATMEGA16

The SPI module is available with a number of the AVR compliant MCUs. The mikroC PRO for AVR provides a library (driver) for working with mikroElektronika's CANSPI Add-on boards (with MCP2515 or MCP2510) via SPI interface.The CAN is a very robust protocol that has error detection and signalization, self–checking and fault confinement. Faulty CAN data and remote frames are re-transmitted automatically, similar to the Ethernet.

Data transfer rates depend on distance. For example, 1 Mbit/s can be achieved at network lengths below 40m while 250 Kbit/s can be achieved at network lengths below 250m. The greater distance the lower maximum bitrate that can be achieved. The lowest bitrate defined by the standard is 200Kbit/s. Cables used are shielded twisted pairs.
CAN supports two message formats:
  • Standard format, with 11 identifier bits and
  • Extended format, with 29 identifier bits

Connect Sensor with ATMEGA16 Code

ADC (Analog to Digital Converter) module is available with a number of AVR MCUs. Several library routines are included to provide you comfortable work with the module in single-ended mode.

Library Routines

  • ADC_Init
  • ADCx_Init_Advanced
  • ADC_Get_Sample
  • ADC_Read

ADC_Init

Prototype void ADC_Init();
// for XMEGA family of MCUs void ADCx_Init();

Connecting 4*4 Matrix KeyPad with ATMEGA16

The mikroC PRO for AVR provides a library for working with 4x4 keypad. The library routines can also be used with 4x1, 4x2, or 4x3 keypad.

External dependencies of Keypad Library
The following variable must be defined in all projects using Keypad Library: Description : Example :
extern sfr char keypadPort; Keypad Port. char keypadPort at PORTB;
extern sfr char keypadPort_Direction; Direction of the Keypad Port. char keypadPort_Direction at DDRB;

Library Routines

Android Software Free Download

Daily Ab Workout

Daily Ab Workout FREE

Description

Daily Ab Workout FREE is a great 5 to 10 minute daily ab routine for men and women that steps you through ten of the best ab-sculpting exercises. These proven exercises, demonstrated by a certified personal trainer, target all major abdominal muscles. Spending just minutes a day can strengthen your core and tone yourabs.The routine’s simple interface, complete with video and timer, allows you to easily follow along and understand each exercise.
*If you like Daily Ab Workout FREE, check out the full version which features:
• A second and third workout to vary up your routine
• Randomize feature for different daily workouts  Continue reading 

Driving a Unipolar Stepper Motor

     If your stepper requires a higher current than the L293 can provide (600 mA for the L293D), you can use the SN754410 chip that handles up to 1 amp. For current up to 2 amps, you can use the L298 chip.A simple way to connect an L298 to Arduino is to use the SparkFun Ardumoto shield (DEV-09213). This plugs on top of an Arduino board and only requires external connection to the motor windings; the motor power comes from the Arduino Vin pin. In1/2 is controlled by pin 12, and ENA is pin 10. In3/4 is connected to pin 13, and ENB is on pin 11. Make the following changes to the code to use the preceding sketch with Ardumoto:

Controlling the Direction of a Brushed Motor with an H-Bridge

            An H-Bridge can control two brushed motors. Figure 8-10 shows the connections for the L293D H-Bridge IC, you can also use the SN754410 which has the same pin layout.In the sketch in this recipe’s Solution, a single motor is controlled using the IN1 and IN2 pins; the EN pin is permanently HIGH because it is connected to +5V.

Controlling Solenoids and Relays

         The choice of transistor is dependent on the amount of current required to activate the solenoid or relay. The data sheet may specify this in milliamperes (mA) or as the resistance of the coil. To find the current needed by your solenoid or relay, divide the voltage of the coil by its resistance in ohms. For example, a 12V relay with a coil of 185 ohms draws 65 mA: 12 (volts) / 185 (ohms) = 0.065 amps, which is 65 mA. Small transistors such as the 2N2222 are sufficient for solenoids requiring up to a few hundred milliamps. Larger solenoids will require a higher power transistor, like the TIP102/TIP120 or similar. There are many suitable transistor alternatives.The purpose of the diode is to prevent reverse EMF from the coil from damaging the transistor (reverse EMF is a voltage produced when current through a coil is switched off). The polarity of the diode is important; there is a colored band indicating the cathode—this should be connected to the

Controlling Servos from the Serial Port

 Each servo line wire gets connected to a digital pin. All servo grounds are connected to Arduino ground. The servo power lines are connected together, and you may need an external 5V or 6V power source if your servos require more current than the Arduino power supply can provide. An array named myservo is used to hold references for the four servos. A for loop in setup attaches each servo in the array to consecutive pins defined in the servoPins array. If the character received from serial is a digit (the character will be greater than or equal to zero and less than or equal to 9), its value is accumulated in the variable pos. If the character is the letter a, the position is written to the first servo in the array (the servo connected to pin 7). The letters b, c, and d control the subsequent servos. 

Controlling the Speed of Rotation Servos

You can use similar code for continuous rotation and normal servos, but be aware that continuous rotation servos may not stop rotating when writing exactly 90 degrees. Some servos have a small potentiometer you can trim to adjust for this, or you can add or subtract a few degrees to stop the servo. For example, if the left servo stops rotating at 92 degrees, you can change the lines that write to the servos as follows:
myservoLeft.write(angle+TRIM); // declare int TRIM=2; at beginning of sketch.


Continuous rotation servos are a form of gear reduced motor with forward and backward speed adjustment. Control of continuous rotation servos is similar to normal servos. The servo rotates in one direction as the angle is increased from 90 degrees; it rotates in the other direction when the angle is decreased from 90

7-Segment LED Displays: Multiplexing

A matrix is created by passing pin numbers for the data, load, and clock pins. loop uses the write method to turn pixels on; the clar method turns the pixels off. write has three parameters: the first two identify the column and row (x and y) of an LED and the third  parameter (HIGH or LOW) turns the LED on or off.This Solution uses the popular MAX7221 LED driver chip to control four-digit commoncathode displays The MAX7221 provides a simpler solution  because it handles multiplexing and digit decoding in hardware.

Driving a 7-Segment LED Display

The segments to be lit for each numeral are held in the array called numeral. There isone byte per numeral where each bit in the byte represents one of seven segments .The array called segmentPins holds the pins associated with each segment. TheshowDigit function checks that the number ranges from zero to 9, and if valid, looks ateach segment bit and turns on the segment if the bit is set. Apin is set HIGH when turning on a segment on a commoncathode display, and it’s set LOW when turning on a segment on a common anode
display. The code here is for a common anode display, so it inverts the value as follows:

Controlling a Matrix of LEDs: Charlieplexing

The term Charlieplexing comes from Charlie Allen (of Microchip Technology, Inc.), who published the method. The technique is based on the fact that LEDs only turn on when connected the “right way” around (with the anode more positive than the cathode). Here is the table showing the LED number that is lit for the valid combinations of the three pins. L is LOW, H is HIGH, and i is INPUT mode. Setting a pin in INPUT mode effectively disconnects it from the circuit:

Controlling an LED Matrix Using Multiplexing

      The resistor’s value must be chosen to ensure that the maximum current through a pin does not exceed 40 mA. Because the current for up to eight LEDs can flow through each column pin, the maximum current for each LED must be one-eighth of 40 mA, or 5 mA. Each LED in a typical small red matrix has a forward voltage of around 1.8 volts. Calculating the resistor that results in 5 mA with a forward voltage of 1.8 volts
gives a value of 680 ohms. Check your data sheet to find the forward voltage of the matrix you want to use. Each column of the matrix is connected through the series resistor to a digital pin. When the column pin goes low and a row pin goes high, the corresponding LED will light. For all LEDs where the column pin is high or its row pin is low, no current will flow through the LED and it will not light. The for loop scans through each row and column and turns on sequential LEDs until all LEDs are lit. The loop starts with the first column and row and increments the row counter until all LEDs in that row are lit; it then moves to the next column, and so on, lighting another LED with each pass through the loop until all the LEDs are lit. You can control the

Detecting Rotation Using a Gyroscope

Arduino-Detecting Rotation Using a Gyroscope:
         Most low-cost gyroscopes use an analog voltage proportional to rotation rate, although some also  output using I2C. This recipe works with a gyro with an analog output proportional to rotation rate. Figure 6-16 shows an LISY300AL breakout board from SparkFun. Many low-cost gyros, such as the one used here, are 3.3V devices and must not be plugged into the 5V power pin.The Gyro OUT connection is the analog output and is connected to Arduino analog input 0. The PD connection enables the gyro to be switched into low power mode and is connected to analog pin 1 (in this sketch, it is used as a digital output pin). You can connect PD to any digital pin; the pin used here was chosen to keep the wiring neater. If you don’t need to switch the gyro into low-power mode, you can connect the PD line to Gnd.

Reading RFID Tags using Arduino

RFID Connected with Arduino
A tag consists of a start character followed by a 10-digit tag and is terminated by an end character. The sketch waits for a complete tag message to be available and displays the tag if it is valid. The tag is received as ASCII digits (see Recipe 4.4 for more on receiving ASCII digits). You may want to convert this into a number if you want to store or compare the values received. To do this, change the last few lines as follows:
if( Serial.read() == endByte) // check for the correct end character
{
tag[bytesread] = 0; // terminate the string
long tagValue = atol(tag); // convert the ASCII tag to a long integer

Measuring Temperature LM35

Arduino-Measuring Temperature using LM35:
The LM35 temperature sensor produces an analog voltage directly proportional to temperature with an output of 1 millivolt per 0.1°C (10 mV per degree). The sketch converts the analogRead values into millivolts and divides this by 10 to get degrees. The sensor accuracy is around 0.5°C, and in many cases you can use integer math instead of floating point. The following sketch turns on pin 2 when the temperature is above a threshold:
       This recipe displays the temperature in Fahrenheit and Celsius (Centigrade) using the popular LM35

Detecting Vibration

Arduino-Detecting Vibration

           A Piezo sensor, also known as a knock sensor, produces a voltage in response to physical stress. The more it is stressed, the higher the voltage. The Piezo is polarized and the positive side (usually a red wire or a wire marked with a “+”) is connected to the analog input; the negative wire (usually black or marked with a “-”) is connected to ground. A high-value resistor (1 megohm) is connected across the sensor.
The voltage is detected by Arduino analogRead to turn on an LED. The THRESHOLD value determines the level from the sensor that will turn on the LED, and you can decrease or increase this value to
make the sketch more or less sensitive. Piezo sensors can be bought in plastic cases or as bare metal disks

Measuring Distance

Arduino-Measuring Distance using PING:
             Ultrasonic sensors provide a measurement of the time it takes for sound to bounce off an object and return to the sensor. The “ping” sound pulse is generated when the pingPin level goes HIGH for two microseconds. The sensor will then generate a pulse that terminates when the sound returns. The width of the pulse is proportional to the distance the sound traveled and the sketch then uses the pulseIn function to measure that duration. The speed of sound is 340 meters per second, which is 29 microseconds per centimeter. The formula for the distance of the round trip is: RoundTrip = microseconds / 29.So, the formula for the one-way distance in centimeters is: microseconds / 29 / 2.

Detecting Motion using Arduino

Detecting Motion-Integrating Passive Infrared Detectors
             This code is similar to the pushbutton. That’s because the sensor acts like a switch when motion is detected. Different kinds of PIR sensors are available, and you should check the information for the one you have connected. Some sensors, such as the Parallax, have a jumper that determines how the output behaves when motion is detected. In one mode, the output remains HIGH while motion is detected, or it can be set so that the output goes HIGH briefly and then LOW when triggered. The example sketch in this recipe’s Solution will work in either mode. Other sensors may go LOW on detecting motion. If your sensor’s output

Detecting Light using Arduino

AVR Arduino-Detecting Light:
       The circuit for this recipe is the standard way to use any sensor that changes its resistance based on some physical phenomenon. The circuit in will change the voltage on analog pin 0 when the resistance of the LDR changes with varying light levels. A circuit such as this will not give the full range of possible values from the analog input—0 to 1,023—as the voltage will not be swinging from 0 volts to 5 volts. This is because there will always be a voltage drop across each resistance, so the voltage where they meet will never reach the limits of the power supply. When using sensors such as these, it is important to check the actual values

Detecting Movement using ARDUINO

AVR-Detecting Movement:
          The most common tilt sensor is a ball bearing in a box with contacts at one end. When the box is tilted the ball rolls away from the contacts and the connection is broken. When the box is tilted to roll the other way the ball touches the contacts and completes a circuit. Markings, or pin configurations, show which way the sensor should be oriented. Tilt sensors are sensitive to small movements of around 5 to 10 degrees when
oriented with the ball just touching the contacts. If you position the sensor so that the ball bearing is directly above (or below) the contacts, the LED state will only change if it is turned right over. This can be used to tell if something is upright or upside down. To determine if something is being shaken, you need to check

Reading More Than Six Analog Inputs

ARDUINO-Reading  Analog Inputs
               A standard Arduino board has six analog inputs (the Mega has 16) and there may not be enough
analog inputs available for your application. Perhaps you want to adjust eight parameters in your application by turning knobs on eight potentiometers.Use a multiplexer chip to select and connect multiple voltage sources to one analog input. By sequentially selecting from multiple sources, you can read each source in turn. This recipe uses the popular 4051 chip connected to Arduino. Your analog inputs get connected to the 4051 pins marked Ch 0 to Ch 7. Make sure the voltage on the channel input pins is never higher than 5 volts:

Reading a Keypad

ARDUINO-Reading a Keypad:
      Matrix keypads typically consist of Normally Open switches that connect a row with a column when pressed. Each of the four rows is connected to an input pin and each column is connected to an output pin. The setup function sets the pin modes and enables pull-up resistors on the input pins (see the pull-up recipes in the beginning of this chapter). The getkey function sequentially sets the pin for each column LOW and then checks to see if any of the row pins are LOW. Because pull-up resistors are used, the rows will be high (pulled up) unless a switch is closed (closing a switch produces a LOW signal on the input pin). If they are LOW, this indicates that the switch for that row and column is closed. A delay is used to ensure that the

Controlling LEDs using Switches

ARDUINO-Controlling LEDs using Switches:

You want to create and use a group of values (called arrays). The arrays may be a simple list or they could have two or more dimensions. You want to know how to determine the size of the array and how to access the elements in the array.This sketch creates two arrays: an array of integers for pins connected to switches and an array of pins connected to LEDs:

Servo Motor Rotation using AVR

Servo Motor Interfacing with AVR
Servos are positioning motors with a built-in feedback circuit, and it’s this internal circuitry that makes them so simple to use. As positioning motors, they don’t spin
around and around like traditional motors. Instead, they only rotate through 180
degrees or so, and they can move to the desired position to roughly the nearest
degree on command. This makes them ideal for pulling up the landing gear on a
model airplane, or for moving robot arms.

Timers PWM Demo

AVR Timers PWM :
             You might be wondering why we’re only lighting up three LEDs using the hardware PWM, and the sad reason is that the AVR’s dedicated PWM pins are limited to two per timer, for a total of six: four pins at an 8-bit PWM depth, and two at 16 bits. So the software lights up three LEDs in a row with the PWM values you’ve typed, shifting the new value in, the current values over, and the oldest value out.
As with the rest of the timer/counter-based code demos so far, the event loop is quite sparse. It gets a value from the serial port and then shifts the values up a chain, corresponding to the output compare registers of LED1, LED2, and LED3. Note how we don’t need to use any more variables to store the “previous” values

Brute Force PWM

Brute-Force PWM:
    This code is split up into two distinct parts. The function pwmAllPins() takes care of implementing PWM. The remaining code in the event loop increases and decreases a brightness variable. Calling pwmAllPins() with the increasing and decreasing brightness makes the LEDs pulse in and out. In pwmAllPins(), we have a loop over i, which takes exactly 256 steps each time. Inside the i loop, we compare a variable brightness to i and turn on the LEDs if i is smaller. This has the effect of turning on the LEDs at the beginning of each set
of 256 and then turning them off as soon as i reaches the value brightness, so for higher values of brightness the LEDs stay on for a greater percentage of the 256 steps.

AM Radio

AM Radio Using AVR

This code section really gets to show off what timers can do, and we even get to combine a timer with interrupts. Hold on tight! In the radio code, we’ll be using Timer 0 in CTC mode as we did earlier to generate audio in the improved organ code. That is, we have the counter count up to a value that determines its frequency, and then clear the counter and start over at zero.This code section really gets to show off what timers can do, and we even get to combine a timer with interrupts. Hold on tight! In the radio code, we’ll be using Timer 0 in CTC mode as we did earlier to generate audio in the improved organ code. That is, we have the counter count up to a value that determines its frequency, and then clear the counter and start over at zero.simply turn on and off the carrier signal to modulate it, generating the audio on top.

AVR Interfacing with Capacitive Sensor

Capacitive Sensor:

The basic principle behind capacitive touch sensors is the same: timing how long it takes for a capacitor to charge or discharge. When nobody is nearby, the sensor plate itself will have some roughly fixed capacitance of its own, and it will take a given amount of time to charge and discharge at a given voltage. When you come along, your body capacitance couples with the circuit. The resulting capacitor— made up of you and the sensor—has more capacitance than the sensor’s capacitor alone, and so takes longer to charge and discharge. Measuring the change in charge time, allowing for environmental variation and more, lets you determine when the “button” is pressed.

ARM Projects For Engineers 2014

1.EMBEDDED QUIZ MONITORING SYSTEM WITH TEAM PERFORMANCE EVALUATION USING ARM7 TDMI.
2.EMBEDDED BASED RIGGING FREE ELECTRONIC VOTING SYSTEM WITH INSTANT RESULT USING ARM7 TDMI.
3.AUTOMATIC DAM GATE CONTROL SYSTEM WITH CAUTION ALARM USING ARM7 TDMI.
4.PETRO CHEMICAL LEVEL INDICATOR AND CONTROLLER FOR AUTOMATION OF COTTON PURIFICATION
INDUSTRIES USING ARM7 TDMI.
5.ATM SECURITY ALERT SYSTEM USING ARM7 TDMI.
6.TOUCH SCREEEN BASED WIRELESS SMART HOME AUTOMATION USING ARM7 TDMI.
7.PHOTOVOLTAIC POWERED RAILWAY TRACK FAULT INSPECTION SYSTEM WITH REMOTE STATION ALERT USING ADVANCE ZIG BEE COMMUNICATION.
8.WIRELESS MUITIPATTIENT HEALTH MONITORING SYSTEM USING RFID AND GSM WITH ALERT THROUGH SMS.

Embedded System using Arduino

Kinect Hand Tracking and Gesture Recognition using Arduino
RFID Meets Home Automation
GPS Data Logger
Kinect-Driven Drawing Robot
Robot Integration Engineering a GPS Module with the Arduino
Kinect Remote-Controlled Vehicles
Making an Door Alarm System with SMS alert Using the Arduino
Kinect-Controlled Delta Robot

Embedded System-ROBOTICS 2014

1.A Survey of Technologies and Applications for Climbing Robots Locomotion and Adhesion
2. Mechanical Synthesis for Easy and Fast Operation in Climbing and Walking Robots
3. A Wheel-based Stair-climbing Robot with a Hopping Mechanism
4. Motion Control of a Four-wheel-drive Omni-directional Wheelchair with High Step Climbing Capability
5. Stair Climbing Robots and High-grip Crawler
 6. A Climbing-Flying Robot for Power Line Inspection
7. A Fuzzy Control Based Stair-Climbing Service Robot
 8. Evolutionary Multi-Objective Optimization for Biped Walking of Humanoid Robot
9. On Adjustable Stiffness Artificial Tendons in Bipedal Walking Energetics
10. Mathematical Modelling and Simulation of Combined Trajectory Paths of a Seven Link Biped Robot .
11. Bipedal Walking Control based on the Assumption of the Point-contact: Sagittal Motion Control and Stabilization.
12. Simulated Regulator to Synthesize ZMP Manipulation and Foot Location for Autonomous Control of Biped Robots.
13. Nonlinear ¥ Control Applied to Biped Robots.

Robotics Projects using Arduino

ROBOTICS 2014

1.Visual detection of objects in a robotic work area using hand gestures.
2. Hazardous Gas Detecting Method Applied in Coal Mine Detection Robot.
3. An Artificial Landmark Design Based on Mobile Robot Localization and Navigation.
4. A Design of Wireless Intelligent Control System for Service Robots.
5. Line following autonomous car.
6. Development of an Intelligent Guide-Stick for the Blind
7. Accelerometer Controlled R/C Vehicle.
8. Safety-sensor vehicle for a remote controlled vehicle.
9. Design and implementation of low cost intelligent wheelchair.
10. An embedded vision system for robotic fish navigation.
11. Design of embedded design detection and recognition for intelligent vehicle.
12. A Color-Based Target Localization Method and Its Implementation on Embedded Auto-Mobile Robot System.
13. A Low Cost Microcontroller Implementation of Neural Network Based Hurdle Avoidance Controller for a Car.
14. Design and Development Of Human Tracking Robot.
15. Development of robotic sewerage blockage detector controlled by embedded systems.

8051 Projects Free

Free Construction Projects

1. Car Security System With Remote Control
2. A Tutorial On 89C51Development Kit
3. PC Based Programmer For The AT89C51 Microcontroller 
4. DTMF Remote Control System
5. Programmable Logic Controller 
6. Automated Car Parking System
7. Simple 32-Bit Relay Card For PC's Parallel Port
8. Temperature Measurement using Transistor As Sensor
9. Digital Clock With Seconds And Alarm Time Display
10. Programmable Light Effects Generator
11. Door-Opening Alarm With Remote Control

Electronics Projects free 2014

MINI PROJECTS 2014


1. Intelligent Water Pump Controller With Water-Level Display
2. Precison 1 Hz Clock
3. Blue Led Night Lamp With Back-UP
4. Infrared Proximity Detector
5. Computerised Universal Timer
6. Number Guessing Game
7. Water- Level Indicator
8. Ultra- Bright Led Lamp
9. Garage Light And Security Control
10. PWM-Based Speed Control For DC Motors
11. Led Sand-Glass Timer
12. Three Colour Display Using Bicolour Leds
13. Versatile Emergency Light Using Fluorescent Tubes
14. Electonic Security System
15. Clap-Based Switching For Devices
16. Lead-Acid Battery Charger With Voltage Analyser
17. Keypad Control For Multiple Appliances
18. Wireless TV Headphone Circuit
19. Automatic Water Pump Motor Controller
20. Electric Shock Gun
21. Anti-Theft Alarm For Vehicles

Embedded Projects 2014

ARM 7 TDMI Controller

1.Interfacing of graphical LCD to LPC2148 ARM Based 32-bit microcontroller
2. H-Bridge based DC Motor speed & Direction control using PWM using ARM 7 TDMI processor based LPC2148 Controller
3. Advanced mobile phone signal jammer for GSM, CDMA and 3G networks with prescheduled time duration using ARM 7 TDMI processor based LPC2148 Controller
4. Petrochemical Level Indicator and 
controller for automation of Cotton Purification industries using ARM 7 TDMI processor based LPC2148 Controller
5. Implementing character LCD 
Device Driver development on LPC2148 ARM Based 32-bit microcontroller
6. Biometric finger print based bank locker system using ARM 7 TDMI processor based LPC2148 Controller
7. Implementation of Data Encryption Standard on ARM(ARM7TDMI) processor based microcontroller(LPC2148)
8. Implementation of ZigBee based multipoint secured PC 
messaging system ARM 7 TDMI processor based LPC2148 Controller
9. GSM based automatic 
vehicle accident detection with GPS based location identification and messaging system using ARM 7 TDMI processor based LPC2148 Controller

Electronics Projects 2014

Embedded System Projects


1. Access Control System
2. PIC16F84-Based Coded Device Switching System
3. Secured Room Access System
4. RFID-Based Security System
5. Secure Digital Access System using iButton
6. A Remote Controlled 6-Camera CCTV Switcher
7. PIC Microcontroller-Based Electronic Lock
8. Water-Level Controller-Cum-Motor Protector
9. Remotely Programmable RTC-lnterfaced Microcontroller for Multiple Device
10. Remote-Controlled Digital Audio Processor
11. Solar Charger for Dusk-to-Dawn use
12. Automatic Flush System
13. MSP430G2231-Based Temperature Indicator and Controller
14. Sun Tracker With Position Display
15. Presence Sensing Lights Controller
16. Touchscreen Control for Wheelchair
17. RF-Based Multiple Device Control Using Microcontroller
18. GSM-Based Borewell Water Level Monitor