Applications of microcontroller


Published on


Published in: Education, Business, Technology
  • try this
    Are you sure you want to  Yes  No
    Your message goes here
  • Good Day
    Can you please help me on how to design a system for voting electronically using atmega32, LCD, seven SEGMENT DISPLAY IN ASSEMBLY LANGUAGE.

    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Applications of microcontroller

  1. 1. Information Technology Information technology (IT) is a branch of engineering dealing with the use of computers and telecommunications equipment to store, retrieve, transmit and manipulate data. The Information Technology Association of America has defined IT as "the study, design, development, application, implementation, support or management of computer-based information systems". The term is commonly used as a synonym for computers and computer networks, but it also encompasses other information distribution technologies such as television and telephones. APPLICATIONS OF MICROCONTROLLER Microcontroller-Based Solar Charger As the sources of conventional energy deplete day by day, resorting to alternative sources of energy like solar and wind energy has become need of the hour. Solar-powered lighting systems are already available in rural as well as urban areas. These include solar lanterns, solar home lighting systems, solar streetlights, solar garden lights and solar power packs. All of them consist of four components: solar photovoltaic module, rechargeable battery, solar charge controller and load. In the solar-powered lighting system, the solar charge controller plays an important role as the system’s overall success depends mainly on it. It is considered as an indispensable link between the solar panel, battery and load. Main Feautures The microcontroller-based solar charge controller described here has the following features: 1. Automatic dusk-to-dawn operation of the load. 2. Built-in digital voltmeter (0V-20V range) 3. Parallel- or shunt-type regulation 4. Overcharge protection 5. System status display on LCD 6. Deep-discharge protection 7. Low battery lock
  2. 2. 8. Charging current changes to ‘pulsed’ at full charge 9. Low current consumption 10. Highly efficient design based on microcontroller 11. Suitable for 10-40W solar panels for 10A load Circuit Diagram
  3. 3. Circuit Description Basically, there are two methods of controlling the charging current: series regulation and parallel (shunt) regulation. A series regulator is inserted between the solar panel and the battery. The series type of regulation ‘wastes’ a lot of energy while charging the battery as the control circuitry is always active and series regulator requires the input voltage to be 3-4 volts higher than the output voltage. The current and voltage output of a solar panel is governed by the angle of incidence of light, which keeps varying. Parallel regulation is preferred in solar field. In parallel regulation, the control circuitry allows the charging current (even in mA) to flow into the battery and stop charging once the battery is fully charged. At this stage, the charging current is wasted by converting into heat (current is passed through low-value, high-wattage resistor); this part of the regulation dissipates a lot of heat. In this project, we have used parallel regulation technique but instead of wasting the charging current as heat, we have made it pulsed and applied to the battery to keep the battery topped-up. After power-on, the microcontroller reads the battery voltage with the help of the ADC and displays the values on the LCD. It monitors the input signal from the dusk-to-dawn sensor and activates the load or charging relay RL1 accordingly. The digital voltmeter works up to 20V. As Vref of the ADC is connected to VCC (5V), the input voltage to the ADC cannot exceed +5V. A potential divider is used at pin 2 of the ADC (IC2) using resistors R5, R6 and R7 to scale down the voltage from 0V-20V to 0V-05V. The ADC output is multiplied four times and displayed on the LCD as battery voltage. When the solar panel voltage is present, the dusk-to-dawn sensor provides a signal to the microcontroller, which then displays ‘charging’ message on the LCD. During charging, the battery voltage is continuously monitored. When the voltage reaches 14.0V, the microcontroller interrupts the charging current by energising the relay, which is connected to MOSFET BS170 (T2), and starts a 5-minute timer. During this stage, the LCD shows “battery full.” After five minutes, the relay reconnects the panel to the battery. This way, the charging current is pulsed at the intervals of five minutes and the cycle repeats until the panel voltage is present. When the panel voltage falls below the zener diode (ZD1) voltage of the dusk-to-dawn sensor, the microcontroller senses this and activates the load by switching on MOSFET T3 via optocoupler IC3 and “load on” message is displayed. In this mode, the microcontroller monitors for low battery. When the battery voltage drops below 10 volts, the microcontroller turns off the load by switching off MOSFET T3 and “battery low—load off” message is displayed.
  4. 4. Normally, when the load is switched off, the battery voltage tends to rise back and the load oscillates between ‘on’ and ‘off’ states. To avoid this, the microcontroller employs a hysteresis control by entering into a ‘lock’ mode during low-battery state and comes out of the lock mode when the dusk-to dawn sensor receives the panel voltage (the next morning). During lock mode, the microcontroller keeps converting the ADC value and displays the battery voltage on the LCD. Wireless Equipment Control Using AT89C51 here is a microcontroller based wireless equipment controller that can switch on or switch off up to four devices at a desired time interval set by the user in the transmitter. The devices can be controlled remotely from a distance of up to 30 metres from the transmitter. In the transmitter, an LCD module is used to show the device numbers and preset control time for the devices (00 to 99 seconds). Concepts of wireless RF communication and automation with AT89C51 microcontroller are used here. Pros The system is small, simple, cost-effective and good for wireless control of home appliances or industrial instrumentation. Block Diagram of Transmitter Section
  5. 5. Transmiter Section Four pushbutton switches (S1 through S4) are used as inputs to select the devices and set the time-out in the transmitter section. These are designated as up, down, enter and run keys, respectively. The time-out data is transferred over the RF wireless link to the receiver section. The 8-bit AT89C51 microcontroller is the main controlling part of the transmitter section. It is connected to the LCD module, input switches and encoder IC (HT12E). The device control program is stored in the memory of the microcontroller to control the devices as per the time-out settings done through input switches S1 through S4. A two-line, 16-character LCD module shows the status of the main program that is running inside the microcontroller. The HT12E is an 18- pin DIP package encoder IC that encodes 4-bit data and sends it to TRX-434 RF transmitter module. The TRX-434 RF transmitter module uses a digital modulation technique called amplitude-shift keying (ASK) or on-off keying. In this technique, whenever logic ‘1’ is to be sent, it is modulated with carrier signal (434MHz). This modulated signal is then transmitted through the antenna. Block Diagram of Reciever Section
  6. 6. Reciever Section The 12V DC supply, used along with a 5V regulator, can be provided by a 12V battery or power adaptor. The RX-434 radio receiver module receives the ASK signal from TRX-434. The HT12D decoder demodulates the received address and data bits. IC CD4519 is a quadruple two- input multiplexer that selects the appropriate data bits to control the devices. The ULN 2003 relay driver consists of seven npn Darlington pairs that feature high- voltage outputs with common-cathode clamp diodes for switching the inductive loads. The collector-current rating of a single Darlington pair is 500 mA. Secured Room Access System Security is a prime concern in our day-to-day life. And access control system forms a vital link in a security chain. The microcontroller-based digital lock presented here is an access control system that allows only authorised persons to access a restricted area. When someone tries to enter the restricted area by entering invalid passwords continuously, the system locks itself and can be unlocked only by the master user. The system comprises a small electronic unit with a numeric keypad, which is fixed outside the entry door to control a solenoid-operated lock. When an authorised person enters a predetermined number (password) via the keypad, the relay energises for a limited time to unlock the solenoid-operated lock, so door can be pushed/pulled open. At the end of the preset delay, the relay de-energises and the door gets locked again. A prompt message is displayed on the LCD module. Circuit Diagram
  7. 7. Circuit Description The system uses a compact circuitry built around AVR microcontroller ATmega8535. The ATmega8535 is a low power CMOS 8-bit microcontroller based on the AVR-enhanced RISC architecture. It provides the following features: 8 kB of in-system programmable Flash memory with read-while-write capabilities, 512-byte EEPROM, 512-byte SRAM, 32 general purpose I/O lines, 32 general-purpose working registers, three flexible timer/counters with compare modes, and internal and external interrupts. The built-in power-on-reset circuitry of the microcontroller eliminates the need for external power- on-reset circuit. Switch S3 is used to reset the system, which is accessible only to the master user. Port D (PD0 through PD7) is interfaced with the numeric keypad. Port C is interfaced with a 16x2 line LCD. Four pins (PC4 through PC7) of Port C are used as data lines for the LCD module and three lines (PC0 through PC2) are used for controlling the LCD. Pin 40 (PAO) of port A is connected to the relay driver circuit through optocoupler MCT2E (IC3) and transistor T1. When port pin PA0 goes high, the internal transistor of IC3 drives transistor T1 into saturation and relay RL1 energises. As the solenoid valve is connected through normally- closed (N/C) contact of the relay, the solenoid coil de-energises and the gate is locked. An 8MHz crystal is used with two 22pF capacitors for providing clock. Preset VR1 is used
  8. 8. to adjust the contrast of the LCD. The 230V, 50Hz AC mains is stepped down by transformer X1 to deliver a secondary output of 9V, 500 mA. The transformer output is rectified by a full-wave bridge rectifier comprising diodes D1 through D4, filtered by capacitor C1 and regulated by IC 7806 (IC1). Use adequate heat-sink for 7806 as the solenoid draws a high current. LED1 glows when power is ‘on’ and resistor R6 acts as the current limiter. A 16-key numeric keypad for password entry is connected to the microcontroller. The keypad is also used for password change and application of master password when required. To economise the use of I/O pins, we have used here only eight pins for scanning and sensing 16 keys. The keypad is arranged in a 4x4 matrix. There are four scan lines/pins, which are set in output mode, and four sense keys, which are used as input lines to the microcontroller. At a small time interval, the microcontroller sets one of the four scan lines as low and the other three scan lines as high. Then it checks for the status of sense lines one by one at the intersection of a specific scan line and sense line to find out if any key has been pressed. Similarly, after a small time interval, the next scan line is made low and remaining three scan lines are taken high, and again all three sense lines are checked for low level. This way the microcontroller checks which of the 16 keys is pressed. Due to the high speed of the microcontroller, the status of different keys is checked in less than 100 ms and a key press is detected and identified. As the keys are pressed manually by the user, this delay of 100 ms is not noticeable. The net result is that you save on I/O pins of the microcontroller by sacrificing almost nothing. When a person wants to enter the room, he enters the 6-digit password, say ‘123456.’ If the password matches successfully, the gate is unlocked for 15 seconds. If you want to change the user password (123456) and enter the master password ‘291279,’ the system will ask you to change the user password. On successfully entering the password, pin A0 of port A becomes high for 15 seconds, because of which transistor T1 starts conducting through the emitter of the optocoupler and the relay energises. The connection between the solenoid lock and the power supply is broken and the door is unlocked for 15 seconds. Microcontroller-Based Ring Tone Player Mobile phone ring tones sound like real audio recordings. It’s not because of the way the melodies are composed, but the protocol behind playing the melody. The ring tone text transfer language (RTTTL) is behind those wonderful lullabies and songs you have on your mobile phone.
  9. 9. Basically, a ring tone is the sound made by a mobile phone to indicate an incoming call or text message. Here we present a microcontroller-based ring tone generator. Circuit Diagram Circuit Description At the heart of the circuit is microcontroller AT89C51. It is a low-power, high- performance, 8-bit microcontroller with 4kB Flash programmable and erasable read-only memory. It has 128 bytes of RAM, 32 input/output (I/O) lines, two 16-bit timers/counters, a five-vector two-level interrupt architecture, on-chip oscillator and clock circuitry. The 11.0592MHz crystal provides the basic clock frequency to the microcontroller. Port pin P2.0 of the microcontroller provides the ringtone melody signal for speaker LS1. Transistor BC337 is used for amplification. The power-‘on’ reset signal for the microcontroller is generated by the combination of capacitor C3 and resistor R2. Switch S1 provides manual reset to the microcontroller. The 230V AC mains is stepped down by transformer X1 to deliver the secondary output of 9V, 500 mA. The transformer output is rectified by a full-wave bridge rectifier comprising diodes D1 through D4, filtered by capacitor C1 and regulate by IC 7805 (IC2). Capacitor C2 bypasses the ripples present in the regulated power supply. LED1 acts as the power-‘on’ indicator and resistor R1 limits the current through LED1.
  10. 10. Software The program plays “happy birthday to you” in RTTTL ring tone format using the microcontroller AT89C51. The source program, written in Assembly language and assembled using assembler ASM51, is self-explanatory and easy to understand. Initialise timer 0 and timer 1 as 16-bit timers with predetermined value. When you start timer 0, the data pointer register is loaded with memory address labeled as ‘SONG.’ After playing the current note, the control jumps to the next note and it starts playing. This process continues until the end of music data is reached. Thereafter, it starts playing the music from the beginning. Nokia RTTTL ringtones can be downloaded from the following websites: 1. 2. 3. 4. RTTL ringtones can also be tested on the computer, the software for which can be downloaded from the link ‘’