• CES
  • AMARTS
  • Electronic Kid
  • Useful-news
  • Forum
  • Fellowship
  • E-Library
  • All
gravatar

EEE, ECE & IE Project Updates

EEE, ECE & IE Project Updates

Link to Electronics Hub

Ding Dong Sound Generator Circuit

Posted: 19 Jun 2014 01:01 AM PDT

Nowadays, door bells are very common in every house. We daily observe different types of door bells are available in the market and they produce different types of music depending on their functionality. One can design their own door bell using simple electronic components. This article explains a simple circuit that produces "ding dong" sound using 555 timer.

Ding Dong Bell Sound Generator Circuit Principle:

This circuit mainly consists of two 555 timer ICs. First timer IC is operated in astable mode and the frequency of the second is modulated by the first timer. For that, output pin of first IC is connected to the 5th pin of second IC. The first timer IC is operated at a frequency of 1Hz.

Astable mode is a free running mode of the 555 timer IC. The 555 timer IC can be operated at required frequency by tuning the RC circuit. In astable mode, no external triggering is required. This has no stable state.

Ding Dong Bell Sound Generator Circuit Diagram: 

Ding Dong Sound Generator Circuit Diagram

Circuit Diagram of Ding Dong Sound Generator

Circuit Components:

  • Two 555 timer ICs – U1 and U2.
  • Two Variable resistors – RV1 and RV2
  • 4 Capacitors – C1, C2, C3 and C4.
  • 2 Resistors – R1and R2

Ding Dong Bell Sound Generator Circuit Design:

The circuit consists of two 555 timer ICs arranged as shown in the circuit diagram. The first timer IC is connected in astable mode to produce pulse of frequency 1Hz. The 4th and 8th pins are shorted and connected to the resistor of 2.2K whose other end is connected to the pin of the timer IC. Sixth and seventh pins are connected to the variable resistor. Sixth and second pins are shorted and connected to the ground of 9v through a capacitor of 47uf. Fifth pin is connected to the ground through a capacitor of 0.01uf. First pin of the IC is connected to the ground.

Related Post: Automatic Doorbell Ringing Circuit with Object Detection.

The output pin of the first IC is connected to the control pin i.e. Fifth pin of the second IC. The second IC is also operated in astable mode again. 4th and 8th pins are shorted and connected to resistor of 2.2 k ohms whose other end is connected to the seventh pin of the IC. A variable resistor 100K is connected between sixth and seventh pins of the IC. Sixth pin and second pin are shorted and connected to the ground through a capacitor of 0.1uf. First pin is directly connected to the   ground of 9v.Output pin of the IC is connected to the speaker through a capacitor of 1uf.

How Ding Dong Sound Generator Circuit works?

  • Initially power the circuit.
  • The  "Ding Dong " sound can be heard from the speaker.
  • When the power is on the circuit is operated in the astable mode.
  • As the voltage is applied to the timer, the capacitor starts charging through the resistors R1 and R2.
  • When it reaches 2/3 of VCC, it is detected by the sixth pin and seventh pin is connected to the ground.
  • Thus capacitor starts discharging, through the RV1 resistor.
  • When voltage of 1/3 VCC is detected it again starts charging, thus this process continuously produces the pulse of frequency 1Hz.
  • This is applied to the second  timer through its control pin.
  • Thus the frequency of the second timer is modulated and is applied to the speaker through a capacitor.
  • The external RC circuit decides the time delay with which the waveform should be produced.
  • Hence one can hear the "ding dong" sound produced.

Ding Dong Bell Sound Generator Circuit Applications:

  • The circuit can be used as a door bell by connecting the supply to a switch.
  • With some modifications it can be used to produce different sounds.

Ding Dong Bell Circuit Limitations:

  • As the applied voltage is 9V, it cannot produce more sound.

The post Ding Dong Sound Generator Circuit appeared first on Electronics Hub.

PWM Based DC Motor Speed Control using Microcontroller

Posted: 18 Jun 2014 11:36 PM PDT

In many applications, it is important to control the speed of DC motor where precision and protection are essence. Here we will use a technique called PWM (pulse width modulation) to control the speed of DC motor.

We can achieve speed control of DC motor using mechanical or electrical techniques but they require large size hardware to implement but Microcontroller based system provides easy way to control the speed of DC motor.

Earlier, we have already seen how to control the speed of DC motor using PWM without Microcontroller. Here we do the same experiment by using a microcontroller.

For that purpose, here we will use ATmega8 controller to produce PWM wave. By varying the width of this PWM wave, we can control the speed of DC motor. In ATmega8 controller, timer1 and timer2 have PWM mode. In this article we will see how to control the speed of DC motor using timer2 PWM mode.

PWM Based DC Motor Speed Control using Microcontroller Circuit Principle:

The heart of this project is ATmega8 controller. These controllers consist of 2 PWM modes. Now we will see   how to generate PWM wave using timer2 PWM mode.

Before writing the program to the PWM mode we need to know the register description of all the registers that are used for PWM mode.

TCCR2 (Timer Counter Control Register):

TCCR2

In Timer 2, we have different modes like CTC mode, normal mode, phase correct PWM mode, Fast PWM mode, etc. Among all of these modes, we have to select Fast PWM mode.

Timer 2 Modes

From the above figure, it is clear that

For Fast PWM mode,

            WGM21=1    WGM20=1

To select PWM mode

TCCR2 |= (1<<WGM21)| (1<<WGM20);

Again in PWM mode we have two modes one INVERTING and other is NON – INVERTING.

  • To select non-inverting mode,
    • COM21=1     COM20=0
    • TCCR2 |= (1<<COM21);
  • To select inverting mode,
    • COM21=1,    COM20=1
    • TCCR2 |= (1<<COM21)| (1<<COM20);

After that we have to select prescaler value.

            CS22        CS21       CS20                Description

               0              0               0                    No clock source

               0              0               1                      clk/1

              0              1                0                      clk/8

              0              1                1                      clk/32

              1              0               0                      clk/64

              1              0               1                      clk/128

              1              1               0                      clk/256

              1              1               0                      clk/1024

  •  To set the prescaler to 8,

CS22=0     CS21=1       CS20=0
TCCR2|= (1<<CS21);

OCR2 (Output Compare Register):

            OCR2 register contains an 8 bit value that is continuously compared with counter value.

PWM Program:

            void pwm ( )

            {

            OCR2=128;

            TCCR2 |= (1 << COM21);             // set none-inverting mode

            TCCR2 |= (1 << WGM21) | (1 << WGM20)   // set fast PWM Mode

            TCCR2 |= (1 << CS21);      // set prescaler to 8 and starts PWM

            }

The above program runs the DC motor which is connected to PB3 with half speed.

If you want to vary the speed vary the OCR2 register value.

Circuit Diagram of PWM Based DC Motor Speed Control using Microcontroller:

PWM based DC Motor Speed Control using Microcontroller

PWM based DC Motor Speed Control using Microcontroller Circuit Diagram

Circuit Components:

  • Atmega8 PCB board
  • Atmega8 controller
  • DC motor
  • Serial cable
  • 12V battery or adaptor
  • Connecting wires

PWM based DC Motor Speed Control using Microcontroller Circuit Design:

The circuit consists of one Atmega8 controller, 2 pull down configuration switches and one DC motor.

Generally we can interface switch to the micro controller in two configurations, one pull up configuration and other is pull down configuration.

Pull up configuration: In pull up configuration initially microcontroller pin is pulled to LOGIC 1. When button is pressed microcontroller pin receives LOGIC 0

Pull down configuration: In pull down configuration initially microcontroller pin pulled to LOGIC 0. When button is pressed controller pin receives LOGIC 1.

In our circuit we are using pull down configuration so we need to check for logic 1 in order to know weather the button  is pressed or not.

DC Motor: motor has two terminals. We have to connect one of the motor terminal to the controller pin and other to the ground.

In this project motor runs with full speed when button sw1 is pressed and motor runs with half speed when sw2 button is pressed.

How to Operate PWM based DC Motor Speed Control Circuit using Microcontroller?

  1. Connect 12V battery or adaptor to the development board.
  2. Switch on the supply.
  3. Keep the programming switch in prgm mode.
  4. Burn hex file to the atmega8 controller with the help of serial cable.
  5. Now switch off the supply.
  6. Connect PC0, PC1 pins of controller to the switches.
  7. Connect PB3 pin to the DC motor.
  8.  Now switch on the supply and press switch sw1 and observe motor. It runs with full speed.
  9. If you press switch sw2 motor runs with half speed.
  10.  Switch off the supply.

PWM Based DC Motor Speed Control System Advantages:

  • Using this PWM method, we can save the power.

PWM Based DC Motor Speed Control System Applications:

  • Used in industries to control the speed of motors.
  • Used in shopping malls.
  • We can use this concept to control the light intensity.

The post PWM Based DC Motor Speed Control using Microcontroller appeared first on Electronics Hub.