Skip to main content

Posts

Showing posts from September, 2011

To find the largest no. using classes

#include<iostream> using namespace std;       class set       { int m,n;       public:              void input(void);              void display(void);              int largest(void);              };              int set::largest(void)              { if(m>=n)              return(m);              else              return(n);              }              void set::input(void)              { cout<<"Input values of m and n:"<<"\n";              cin>>m>>n;              }              void set::display(void)              { cout<<"largest value="<<largest()<<"\n";              }              int main()              {                  set A;                  A.input();                  A.display();                  return 0;                  }

Find Grtr no. using C++

#include<iostream>
using namespace std;
      class set
      { int m,n;
            public:
                 void input(void);
                 void display(void);
             int largest(void);
                };
             int set::largest(void)
                 { if(m>=n)
                   return(m);
                    else
                    return(n);
                        }
             void set::input(void)
                 { cout<<"Input values of m and n:"<<"\n";
                     cin>>m>>n;
                   }
             void set::display(void)
                { cout<<"largest value="<<largest()<<"\n";
                          }
             int main()
                {
                    set A;
                   A.input();
                   A.display();

                   return 0;
                      }

Signal filter

What is a filter?
A filter is a device that passes electric signals at certain frequencies or frequency ranges while preventing the passage of others. — Webster. Filter circuits are used in a wide variety of applications. In the field of telecommunication, band-pass filters are used in the audio frequency range (0 kHz to 20 kHz) for modems and speech processing. High-frequency band-pass filters (several hundred MHz) are used for channel selection in telephone central offices. Data acquisition systems usually require anti-aliasing low-pass filters as well as low-pass noise filters in their preceding sig- nal conditioning stages. System power supplies often use band-rejection filters to sup- press the 60-Hz line frequency and high frequency transients. In addition, there are filters that do not filter any frequencies of a complex input signal, but just add a linear phase shift to each frequency component, thus contributing to a constant time delay. These are called all-pass …

Dual power supply

Many times need of electronic enginner to have a simple, dual power supply for a project. Existing powersupplies may be too big either in power output or physical size. Just a simple Dual Power Supply is required.For most non-critical applications the best and simplest choice for a voltage regulator is the 3-terminal type.The 3 terminals are input, ground and output.
The 78xx & 79xx series can provide up to 1A load current and it have onchip circuitry to prevent damage in the event of over heating or excessive current. That is, the chip simply shuts down rather than blowing out. These regulators are inexpensive, easy to use, and they make it practical to design a system with many PCBs in which an unregulated supply is brought in and regulation is done locally on each circuit board.
This Dual Power Supply project provides a dual power supply. With the appropriate choice of transformer and 3-terminal voltageregulator pairs you can easily build a small power supply delivering up to on…

Car stereo amplifier

Introduction To 18W Car Stereo Amplifier Project This car stereo amplifier project is a class AB audio power amplifier using the Hitachi HA13118 module. It not only can be used in car application but also in any portable or home amplifier system. It is easy to construct and has a minimum of external components. The module has a high power output from a low voltage supply using the bridge tied load method, and a high gain of 55dB. This project will be especially useful in applications where the input signal is a low level, without requiring the use of a separate pre-amplifier. This IC module has a built in surge protection circuit, thermal shut down circuit, ground fault protection circuit and power supply fault protection circuit making it extremely reliable. The Specifications of this project are: D.C. Input : 8 - 18V at 1-2 A
Power output : 18W maximum, 4 ohm load, 18V DC supply
S/N ratio : > 70 dB
THD : < 0.2% @ 1W
Freq. Response : ~ 30 Hz…

CONNECT ROBOT TO PC

MICROCONTROLLER UART TUTORIAL
What is the UART? The UART, or Universal Asynchronous Receiver / Transmitter, is a feature of your microcontroller useful for communicating serial data (text, numbers, etc.) to your PC. The device changes incoming parallel information (within the microcontroller/PC) to serial data which can be sent on a communication line. Adding UART functionality is extremely useful for robotics. With the UART, you can add an LCD, bootloading, bluetooth wireless, make a datalogger, debug code, test sensors, and much more! Understanding the UART could be complicated, so I filtered out the useless information and present to you only the useful need-to-know details in an easy to understand way . . . The first half of this tutorial will explain what the UART is, while the second half will give you instructions on how to add UART functionality to your  robot. What is RS232, EIA-232, TTL, serial, and USB? These are the different standards/protocols used from transmitting dat…

Theory of radio

One of the more fascinating applications of electricity is in the generation of invisible ripples of energy called radio waves. The limited scope of this lesson on alternating current does not permit full exploration of the concept, some of the basic principles will be covered.
With Oersted's accidental discovery of electromagnetism, it was realized that electricity and magnetism were related to each other. When an electric current was passed through a conductor, a magnetic field was generated perpendicular to the axis of flow. Likewise, if a conductor was exposed to a change in magnetic flux perpendicular to the conductor, a voltage was produced along the length of that conductor. So far, scientists knew that electricity and magnetism always seemed to affect each other at right angles. However, a major discovery lay hidden just beneath this seemingly simple concept of related perpendicularity, and its unveiling was one of the pivotal moments in modern science.
This breakthrough in …