You are on page 1of 13

The microcontroller Projects

1.Electronic Time Clock


This application note from Microchip Technology uses an 18 pin PIC16C54
microcontroller as its core in the display
and settings of a simple 4 digits electronic
clock. The four 7 segment displays are connected in a multiplexing method and each
segment is sequentially by controlling the Common Cathode of each 7 segment.

The common cathodes are connected to 4 pins of PORTA of the microcontroller. When
the pin in PORTA is LOW, the transistor connected to it will turn ON and that particular
7 segment is turn ON. PortB will activate the segments of that particular 7 segment that
has been chosen. By multiplexing the selection of the 7 segment sequentially, an equal
brightness of all the 7 segments display will be achieved.

Multiplexing has the advantage in that it helps to reduce the number of ports needed to
connect to the 7 segments. It also keep the cost of a device low as fewer parts are needed.
The setback is that the display may not be as bright as if it is driven directly without
multiplexing.

Visit website for more projects


The microcontroller Projects

The 3 switches are also connected to PORTB. They are pulled down to logic "0" by using
a 10k ohm resistors. Inputs of the switches are detected as logic "1" by the MCU by
connecting a pull up resistor to the VDD. Pressing SW1 changes the seconds setting,
SW2 the minutes setting and SW3 the hour setting. The full schematic and source code
listing can be obtained from Microchip website.

Visit website for more projects


The microcontroller Projects

2.Robotic car using 8951 Microcontroller


Robotic Car is a miniature prototype car powered by batteries whose various
movements can be control either manually or automatically, or the combination of both.
Here the command is given through keyboard; it would have been better if we used IR
remote control or something of that kind rather than using keyboard for commanding.
However, by realizing the complexities we have made simple using keyboard.

Block diagram of the project:

Some photographs of this model:

Visit website for more projects


The microcontroller Projects

Robotic car model

Robotic car model

Project Description:

Keyboard section:

Visit website for more projects


The microcontroller Projects

There are six switches in this section. They are

1. Turn left.
2. Turn right.
3. Stop.
4. About turn.
5. Park left.
6. Park right.

Circuit diagram of keyboard is shown bellow.

Keyboard circuit of the Robotic car

Car section:

There are many sub sections in this section. They are

Motor:

We are using a 5V dc motor to drive the vehicle. The speed of the vehicle and its strength
is controlled by the proper use of pulley. The rear wheel of the vehicle is connected to
this motor through a pulley. This motor is meant for moving the vehicle both in forward
and backward direction. Microcontroller (8051) controls the forward and backward
movement of the vehicle in the following manner:

Visit website for more projects


The microcontroller Projects

Circuit diagram of Motor connection

Here in the above circuit, T1, T2, T3, T4 are the NPN power transistor (2N3055). A0,
A1, A2, A3 are the signals coming from the micro controller. With the specific
combination of A0, A1, A2, A3 we can change the direction of rotation of motor as
follows:

Case I: When A0=high; A3=high; & A1=low; A2=low


The motor rotates in clockwise direction

Case II: When A0=low; A3=low; & A1=high; A2=high


The motor rotates in anti-clockwise direction

Case III: When A0=low; A3=low; A1=low; A2=low


The motor stops the rotation.

Robotic car using 8951 Microcontroller

Stepper Motor:

A 5V dc Stepper motor is fixed at the front wheel lever directly. It enables the vehicle to
rotate left or right through any angle. The electrical pulses generated from the micro
controller directly control the movement of the stepper motor.

A stepper motor is an electromagnetic device that translates electrical pulses into


mechanical movement.

Visit website for more projects


The microcontroller Projects

Circuit diagram of stepper motor interfacing is shown bellow. First 4 pins port 2 is
connected to motor. Power transistors must be connected to drive the motor.

Interfacing stepper motor to 8951

Transmitter and Receiver:

We are fitting three IR sensors along with the transmitter at the front of the vehicle in
such an angle that the sensor will detect the signal only if certain obstacle is placed at the
front of the vehicle at a distance of around 3 inches. This range of detection can be
further adjusted by adjusting the amplitude of transmitter or by adjusting the angle of
alignment between the transmitter and the sensor. All these sensors work independently
and can sense the obstacle that comes at the front of the vehicle through different position
independently. Thus with these three sensors, we are able to cover the entire frontal view
of the vehicle at a distance of 3 inches. The circuit diagram of the transmitter and the
receiver are given below:

Transmitter:

Transmitter circuit is used to transmit the IR rays. The IR LED emit infrared light switch
is put on in the transmitting unit. To generate IR signal 555 IC based astable
multivibrator is used. Infrared LED is driven through transistor BC 177.

Visit website for more projects


The microcontroller Projects

Circuit diagram of IR Transmitter

Receiver:

The receiving unit consists of a sensor and its associated circuitry, which detects IR
pulses transmitted by IR-LED. As a result the monostable is triggered and a short pulse is
applied to port 2.5 of 8951. Circuit diagram is shown below. Do the same circuit two
more times and connect it into 6 and 7 of port 2.

Circuit diagram of IR Receiver

Working:

Manual mode:

In manual mode, the vehicle can be commanded through a wireless microphone to

Visit website for more projects


The microcontroller Projects

1. Turn left.
2. Turn right.
3. Stop.
4. About turn.
5. Park left.
6. Park right.

1. Turn left:

On getting the command of turn left, the vehicle turns towards left with 30 degree and
after 3sec; it comes back to the original position. The degree in which the vehicle rotates,
and the timing of coming back to the original position can be further adjusted based on
our desired.

2. Turn right:

Right turn is same as that of left turn except for the fact that on getting command it turns
towards right. All the modifications those are valid for the left turn is also true in this
case.

3. Stop:

Once the vehicle gets the command for “stop” it remains in the idle state. There after its
control is hand over to the beginning state.

4. About turn:

In about turn, the vehicle turns backward in two steps same as we did in our normal car.
In first step the vehicle move only 90 degree and repeat the same in second step.

5. Park left:

On getting the command to park left, the vehicle parks on the left side of the road in a
single step.

6. Park right:

Park right is same as that of park left, but here in this case, it parks towards the right side
of the road.

You can also add two modes to the present design using two more switches. They are

Auto Mode:

In auto mode, the vehicle can be programmed to move at a particular place and park
there. While moving, if any obstacle comes at the front of the vehicle, it will deviate its

Visit website for more projects


The microcontroller Projects

path automatically and come to the original path. The place where the vehicle is desired
to move is the choice of the user; it can be either straight or bent path.

In our model, we have put three sensors at the front of the vehicle, so it is up to the user
that, by what angle the vehicle should deviate. Further, it can be programmed on which
side it should deviate, either left or right based on our desired. To alert the user that the
vehicle is deviating an obstacle, a musical sound system is fitted in the vehicle, so that
whenever it is deviating any obstacle, it will also play a music simultaneously.

Hybrid Mode:

It is the combination of both auto and manual mode. Here the vehicle can be commanded
to move, to turn left or right. Further, while moving, if any obstacle comes on its path, it
will deviate and come to its original path after deviating. However, if so happen that
before coming to the original path, the sensor detects another obstacle; it will halt the
movement of the vehicle, and play an alarm music as long as the obstacle is detected. The
moment second obstacle is removed; the vehicle will continue its earlier execution.

3.Water level indicator cum controller


The present concept implements controlling of pump which pumps water from the
sump (underground tank) to the overhead tank, using 8951 microcontroller.

The control panel, i.e. the main control unit of the system which consists of the primary
control switches, pump indicator, siren and level indicators. The visual example of how
switches And the indicators can be placed as shown the figure below.

Visit website for more projects


The microcontroller Projects

Front view of the model

In the figure shown above there are total of nine LEDs, four of which indicates the water
level in the tank, another four indicates the water level in the sump and one LED
indicates whether the pump is ON/OFF. It also consists of three switches.

1. Switch 1 is the main power switch which is used to activate the system.
2. Switch 2 is used to select whether to operate the pump in AUTO or MANUAL
mode.
3. Switch 3 comes to picture only when the system is operated in MANUAL mode.
It controls the direct activation of the pump.

Description :

This system is built around an 8951 microcontroller and the circuit diagram is as given
below.

Visit website for more projects


The microcontroller Projects

Circuit diagram of Water level indicator cum controller

As you can see in the above diagram, port 0 is exclusively used as an input port which
takes the information regarding the water level in the sump as well as in the overhead
tank.

Port 1 is used as output port which is connected to the indicator that indicates the water
level in both the tanks.

Port 2 is used as in/out port, it takes the input from switch 2 and switch 3 and gives the
output which is connected to pump indicator, siren and the relay which controls the
switching of the pump.

Visit website for more projects


The microcontroller Projects

Working of the system:

There are two modes of working for the system

1. Manual mode
2. Auto mode

Which is controlled by switch 2 (refer control panel diagram)

Manual mode:

When the system is active and in manual mode, it only indicates the water levels in the
tanks and it doesn’t control any working of the pump. To activate the pump in manual
mode switch 3 is used.

In this mode the operator should manually control the working of the pump. As in case if
the tank is full, operator should switch of the pump which is not the case when compared
to auto mode.

Auto mode:

When the system is active and in auto mode, it only indicates the water levels in the tanks
and it controls the working of the pump.

Visit website for more projects

You might also like