Professional Documents
Culture Documents
Put Coin and Draw Power
Put Coin and Draw Power
Page
1
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 1
INTRODUCTION
This type of systems are not available in the market, Their ICS
may not be easily available. Moreover, for simply functions.
The system makes use of a sensor for detecting the coin and a
microcontroller that counts the coins and shows the count on a 7-segment display;
when you close the load switch provided in the circuit, the energise to connect the
load and the coin count on display starts decrementing. When the count decrements
to zero, the relay de-energise to disconnect the load.
Page
2
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
3
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 2
COMPONENT LIST
RESISTORS: LED:
R1 = 220 Ω LED1-LED5 = 5 mm (red)
R2= 33 KΩ
R3 = 220KΩ LDR:
R4, R7, R9 ,R25 = 330 Ω
R5,R8 = 1KΩ LDR1=10mm
R6=10K Ω
R10-R16=270 Ω
R17-R24=4.7K Ω
VR1=2.2MG Ωpreset
CAPACITORS:
SWITCH:
C1,C7 = 10 µF, 16 V electrolytic S1=Push to ON
C2,C3 = 0.01µF ceramic disk S2=ON/OFF
C4=100 µF, 16 V electrolytic
C5,C6=33pF ceramic disk
C8=1000 µF,35V electrolytic
C9,C10=0.1 µF ceramic disk
DIODE: TRANSISTOR:
D1-D5=1N4007rectifierdiode T1,T2=npn transister
Page
4
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
IC: DISPLAY:
IC1 = NE556dual timer DIS1=LTS543
IC2=AT89C2051microcontroller common-cathode,
7-segmentdisplay
IC3=CD5411 7-segment
decoder/driver
IC4= 7805 5V regulator
IC5= 7806 6V regulator
TRANSFORMER: RELAY:
Page
5
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
6
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 3
CIRCUIT DIAGRAM
Page
7
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
8
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 4
PCB LAYOUT
Page
9
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 5
CIRCUIT DESCRIPTION
Page
10
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
LED1 is used as the light source for light-dependent resistor LDR1, which is
made of cadmium sulphide and acts as the coin detector. Resistors R1 limits the
current through LED1. The light from LED1 falls continuously on LDR1, whose
resistance decreases with increase in the incident light intensity.
LDR1, connected at trigger pin 6 of IC1, offers low resistance when light id
falling on it and its trigger input goes low to set the flip-flop and make output pin 5
of IC1 high.
When a coin is inserted, it interrupts the light falling on LDR1, and trigger pin
6 of IC1 goes high to make output pin 5 low. This high-to-low pulse is used by the
microcontroller to display the coin count.
Page
11
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
SOFTWARE
The source program is written in Assembly language and assembled using
Metalink’s ASM51 assembler , which is freely available on the Internet for
download. The source program has been well commented for easy understanding.
It works as per the flow-chart shown in Fig.
First , the program initializes the microcontroller’s registers, then
it checks whether memory register is zero. If register r3 is zero, it goes for coin-
detection. Else, it proceeds to count update and display. Coin-counter register r3 is
incremented by five after insertion of one coin. When the load switch is closed,
port pin P3.1 goes low. Port pin P1.1 goes high to energise relay RL1. Port pin
P3.2 goes low five times then display count number decrements by one.
Page
12
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
$mod51
; p3.0 coin detect pulse
; p3.1 power on switch
; p3.2 monostable pulse(time duration)sensed via transistor
; p3.7 coin sensed LED
; p1.0 monostable triggering signal
; p1.1 relay on or POWER BEING CONSUMED LED
indicator
; p1.4 to p1.7 input to CD 4511(6.1,2,7) to display on 7seg
; r0,r1 for delay
; r2 count for 7 seg display
; r3 count of 5 monostable pulses(ASSUME Rs 1/1 MIN
approx)
;(r4 flag ON already triggered
; r5 flag timer already triggered) not used,for further
development
;r6 count upto 5
; r7 count for 7seg display left justified
Page
13
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
org 000h
sjmp start
org 040h
start: ; -INITIALISATION START-
mov r3,#000h ;count is 0
mov r4 , #000h;flag reset
movr5 ,#000h;mono on flag reset
mov r2,#000h;coin count 0
mov r6,#oo5h;counter set to 5
mov r7,#oooh;
setb p3.0; no coin detected
setbp3.2; mono output detected set high
clr p3.7; coin detected LED off
clr p1.1
;relay de-energised
Setb p1.0
Page
14
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
acall delay
acall delay
tst count:mov a,r3
cjne a,#oooh, tstpwrsw
clrp1.1 ;if r3=0
de-energise relay
coindet: jnb p3.0, updtr3 ;coin sensed
mov r4,#000h ;flag rest
;-PUTTING COUNT ON 7 SEG START-
mov a,r2 ;no of coins detected
rl a
rl a
rl a
;no of coins count in MS of r2
rl a
mov b,a ;copy in b
mov a,p1
an1 a,#oofh ;extract LS portin keep intact
orl a,b
;count ored in a
Movp1, a
;-PUTTING COUNT ON 7 SEG OVER-
sjmp tst count
updt r3: mova,r3
add a,#005h
clr c
mov r3,a ;added in r3
mov a,r2; count no of coins in r2
inc a
clr c
cjne a,#10,max
mov a, #9
Page
15
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
max:mov r2,a
acall coin ;
EVERY TIME COIN SENSED
sjmp tstcount
tstpwrsw: jnb p3.1 ,swpwron
clr p1.1
sjmp coindet
swpw ron : setb p1.1 ; relay on
jnb p3.2,coindet ; is delay running ? if yes go and sense coin
dec r3
dec r6 ;
reduce count from 5 set in r6
mov a,r6
cjne a,#000h, bypss r2
dec r2 ;1
subtracted from r2 for every 5 in r3
mov a,r2
jz min
rl a
rl a
rl a
rl a
clr c
mov b,a
mov a,b1
an1 a,#00fh
orl a,b
mov p1,a
mov r6 , #005h; initial count of 5 in r6
bypssr2: acall delay
acall delay
acall delay
Page
16
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
acall delay
acall delay
acall delay
acall delay
acall delay
trigr: clrp1.0
acall delay ;
mono triggered
setbp1.0
ajmp tstcount
min: mov p1,#01h
ajmp tstcount
;-ROUTINES-
delay: mov r0,#0c8h
loop2:mov r1,#ofah
loop1:nop
nop
nop
djnz r1,loop1 ;loop1 approx 5 X 200=1msec
djnz r0,loop2 ;loop2 250 X1msec=250msec
ret
coin : setb p3.7
acall delay
acall delay
acall delay
acall delay
clr p3.7
acall delay
acall delay
acall delay
acall delay
ret
end
Page
17
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
START
INITIALISE REGISTERS
IS COIN
COUNT=0??
IS POWER
ON?
DE-ENERGISE RELAY
ENERGISE RELAY
COIN
SENSED?
TIME ON?
Page
18
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
START TIMER
MONOSTABLE
Page
19
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 6
HARDWARE DETAILS
RESISTORS
CAPACITORS
DIODE
INTEGRATED CIRCUIT(IC)
TRANSISTOR
TRANSFORMER
Page
20
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
RELAY
DISPLAY
SWITCH
LDR
RESISTORS:
SYMBOL OF RESISTOR:
The electrical resistance is equal to the voltage drop across the resistor
divided by the current through the resistor while the temperature remains the
same. Resistors are used as part of electrical networks and electronic circuits
Page
21
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
corresponds to a certain number, shown in the chart below. The tolerance for
a 4-band resistor will be 1%, 5%, or 10%.
Page
22
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Preferred values:
Power dissipation:
TYPES OF RESISTOR:
All three equations are equivalent. The first is derived from Joule's
law, and other two are derived from that by Ohm's Law.
1.Fixed Resistor:
2.Variable Resistor:
Page
23
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
APPLICATIONS:
To establish a proper value of voltage drops.
CAPACITORS:
A part from resistor and inductors, a capacitor is the other basic
component used in electronics circuit. It is a device which,
(1) has the ability to store change which neither a resistor nor an inductor
can do.
(2) oppose any charge of voltage in the circuit in which is connected.
(3) block the passage of direct current through it.
Capacitor are manufactured in various size, shapes type and are used
for hundred of purpose.
TYPES OF CAPACITORS:
Page
24
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
DIODE:
A diode is a semiconductor diode which allows current to flow
through it in only one direction. Although a transistor is also a
semiconductor device, It does not operate the way a diode does. A diode is
specifically made to allow current to flow through it in only one direction.
DIODE CHARACTERISTIC:
Page
25
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
APPLICATION:
• High-speed switching
FEATURES:
TRANSFORMER:
Different voltages are used for the transmission and distribution of
electrical power. For example, the electrical power is done at l l Kv or
440V. Sometimes low voltage is required for specification application say
electric are welding requires 30 to 50 volts. Hence necessary to transform
the power from on voltage to anther voltage. Transformer does this at high
efficiency. In the chapter; we shall study some basic aspects of single phase
transformer.
PRINCIPLE:
Page
26
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
ADVANTAGES:
DISADVANTAGES:
II. Two diodes conduct in series so the voltage drop in the diode is twice. This
becomes important when the output voltage is low.
Page
27
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
RELAY
A relay is an electrically operated switch. Current flowing through the coil of the
relay creates a magnetic field which attracts a lever and changes the switch
contacts. The coil current can be on or off so relays have two switch positions and
they are double throw (changeover) switches.
Relays allow one circuit to switch a second circuit which can be completely
separate from the first. For example a low voltage battery circuit can use a relay to
switch a 230V AC mains circuit. There is no electrical connection inside the relay
between the two circuits, the link is magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 30mA for a 12V
relay, but it can be as much as 100mA for relays designed to operate from lower
voltages. Most ICs (chips) cannot provide this current and a transistor is usually
used to amplify the small IC current to the larger value required for the relay coil.
The maximum output current for the popular 555 timer IC is 200mA so these
devices can supply relay coils directly without amplification.
Relays are usuallly SPDT or DPDT but they can have many more sets of switch
contacts, for example relays with 4 sets of changeover contacts are readily
available. For further information about switch contacts and the terms used to
describe them please see the page on switches.
Most relays are designed for PCB mounting but you can solder wires directly to
the pins providing you take care to avoid melting the plastic case of the relay.
The supplier's catalogue should show you the relay's connections. The coil will be
obvious and it may be connected either way round. Relay coils produce brief high
voltage 'spikes' when they are switched off and this can destroy transistors and ICs
in the circuit. To prevent damage you must connect a protection diode across the
relay coil.
Page
28
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
The animated picture shows a working relay with its coil and switch contacts. You
can see a lever on the left being attracted by magnetism when the coil is switched
on. This lever moves the switch contacts. There is one set of contacts (SPDT) in
the foreground and another behind them, making the relay DPDT.
The relay's switch connections are usually labelled COM, NC and NO:
COM = Common, always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
Connect to COM and NO if you want the switched circuit to be on when the relay
coil is on.
Connect to COM and NC if you want the switched circuit to be on when the relay
coil is off.
Choosing a relay
You need to consider several features when choosing a relay:
Physical size and pin arrangement
If you are choosing a relay for an existing PCB you will need to ensure that its
dimensions and pin arrangement are suitable. You should find this information in
the supplier's catalogue.
Coil voltage
The relay's coil voltage rating and resistance must suit the circuit powering the
relay coil. Many relays have a coil rated for a 12V supply but 5V and 24V relays
are also readily available. Some relays operate perfectly well with a supply voltage
which is a little lower than their rated value.
Coil resistance
The circuit must be able to supply the current required by the relay coil. You can
use Ohm's law to calculate the current:
supply voltage
Relay coil current =
coil resistance
For example: A 12V supply relay with a coil resistance of 400 passes a current of
30mA. This is OK for a 555 timer IC (maximum output current 200mA), but it is
too much for most ICs and they will require a transistor to amplify the current.
Switch ratings (voltage and current)
The relay's switch contacts must be suitable for the circuit they are to control. You
will need to check the voltage and current ratings. Note that the voltage rating is
usually higher for AC, for example: "5A at 24V DC or 125V AC".
Switch contact arrangement (SPDT, DPDT etc)
Most relays are SPDT or DPDT which are often described as "single pole
Page
29
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Reed relays
Reed relays consist of a coil surrounding a
reed switch. Reed switches are normally
operated with a magnet, but in a reed relay Reed Relay
current flows through the coil to create a Photograph © Rapid Electronics
magnetic field and close the reed switch.
Reed relays generally have higher coil resistances than standard relays (1000 for
example) and a wide range of supply voltages (9-20V for example). They are
capable of switching much more rapidly than standard relays, up to several
hundred times per second; but they can only switch low currents (500mA
maximum for example).
The reed relay shown in the photograph will plug into a standard 14-pin
DIL socket ('IC holder').
For further information about reed switches please see the page on switches.
IC [INTERGRATED CIRCUIT]:
Features
• Compatible with MCS-51™ Products
• 2K Bytes of Reprogrammable Flash Memory
– Endurance: 1,000 Write/Erase Cycles
• 2.7V to 6V Operating Range
• Fully Static Operation: 0 Hz to 24 MHz
• Two-level Program Memory Lock
• 128 x 8-bit Internal RAM
• 15 Programmable I/O Lines
• Two 16-bit Timer/Counters
• Six Interrupt Sources
• Programmable Serial UART Channel
• Direct LED Drive Outputs
Page
30
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
31
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Block Diagram
Page
32
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Pin Description
VCC
Supply voltage
GND
Ground.
Port 1
Port 1 is an 8-bit bi-irectional I/O port. Port pins P1.2 to
P1.7 provide internal pullups. P1.0 and P1.1 require external
pullups. P1.0 and P1.1 also serve as the positive input
(AIN0) and the negative input (AIN1), respectively, of the
on-chip precision analog comparator. The Port 1 output
buffers can sink 20 mA and can drive LED displays directly.
When 1s are written to Port 1 pins, they can be used as
inputs. When pins P1.2 to P1.7 are used as inputs and are
externally pulled low, they will source current (IIL) because
of the internal pullups.
Port 1 also receives code data during Flash programming
and verification.
Port 3
Page
33
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
34
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Figure 1
Page
35
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Wire the latch circuit shown in figure 3. Repeat steps 1. and 2. for circuit 3. These
new outputs are labeled D and D.
Why do we call this circuit a basic memory unit? What happens to the outputs
when S and R both 0? Refer to the textbook (Katz) for a discussion of flip-flops
(chapter 6).
Part 2. -- (7-Segment Decoder-Driver and Display)
Construct the circuit shown in figure 4. Use the TTL handbook to verify the correct
conections. The pin connections for the 74LS48 and the 7-Segment Display are
shown in fiqure 5.
Calculate the value of the resistor between the 74LS48 and the 7-seg LED.
Apply power to the circuit. Create a truth table for figure 4. Do the LEDs L1-L4
which output the binary word agree with the output of the 7-Segment LED? What
does the 7-Segment LED read in binary states 1010-1111? What do you think the
LT, RBI and BI/ RBO pins do?
Figure 3
Page
36
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Figure 4
Page
37
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
KA78XX/KA78XXA
3-Terminal 1A Positive Voltage Regulator
Features
• Output Current up to 1A
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V
• Thermal Overload Protection
• Short Circuit Protection
• Output Transistor Safe Operating Area Protection
Description
The KA78XX/KA78XXA series of three-terminal positive
regulator are available in the TO-220/D-PAK package and
with several fixed output voltages, making them useful in a
wide range of applications. Each type employs internal
current limiting, thermal shut down and safe operating area
protection, making it essentially indestructible. If adequate
heat sinking is provided, they can deliver over 1A output
current. Although designed primarily as fixed voltage
regulators, these devices can be used with external
components to obtain adjustable voltages and currents.
Page
38
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
TO-220 D-PAK
556
DESCRIPTION
Both the 556 and 556-1 Dual Monolithic timing circuits are highly
stable controllers capable of producing accurate time delays or
oscillation. The 556 and 556-1 are a dual 555. Timing is provided by
an external resistor and capacitor for each timing function. The two
timers operate independently of each other, sharing only VCC and
ground. The circuits may be triggered and reset on falling
waveforms. The output structures may sink or source 200mA.
FEATURES
• Turn-off time less than 2ms (556-1)
• Maximum operating frequency >500kHz (556-1)
• Timing from microseconds to hours
• Replaces two 555 timers
• Operates in both astable and monostable modes
• High output current
• Adjustable duty cycle
• TTL compatible
• Temperature stability of 0.005%/°C
• SE556-1 compliant to MIL-STD or JAN
Page
39
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
APPLICATIONS
• Precision timing
• Sequential timing
• Pulse shaping
• Pulse generator
• Missing pulse detector
• Tone burst generator
• Pulse width modulation
• Time delay generator
• Frequency division
• Touch-Tone[encoder
• Industrial controls
• Pulse position modulation
• Appliance timing
• Traffic light control
PHYSICAL FUNCTION:
An LED is a special type of semiconductor diode. Like a normal
diode, it consists of a chip of semi conducting material impregnated, or
doped, with impurities to create a structure called a pn junction. Charge-
carriers (electrons and holes) are created by an electric current passing
Page
40
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
through the junction. When an electron meets a hole, it falls into a lower
energy level, and releases energy in the from of a photon as it does so.
LED MATERIALS:
LED development began with infrared and red devices made with
gallium arsenide. Advances in materials science have made possible the
production of devices with ever shorter wavelengths, producing light in a
variety of colors.
Conventional LEDs are made from a variety of inorganic minerals,
producing the following colors:
LED APPLICATIONS:
Page
41
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
LDR
Page
42
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Everything has an electrical resistance, some more than others. An LDR will have
a resistance that varies according to the amount of visible light that falls on it. A
close up of an LDR is shown below:
The light falling on the brown zigzag lines on the sensor, causes the resistance of
the device to fall. This is known as a negative co-efficient. There are some LDRs
that work in the opposite way i.e. their resistance increases with light (called
positive co-efficient). I won't go into the physics of how the device changes its
resistance, so just take it as read.
Now, in order to use this device in a simple circuit, all we need to do is put a
voltage across it and measure the current flowing through it. However, measuring
current can be a little tricky. So, we put another resistor in series, and measure the
voltage across the LDR. This makes us a potential divider, and the voltage across
the LDR is proportional to the current. The diagrams below show the concept.
TRANSISTOR:
Types of Transistor
Page
43
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
We know that the transistor is a "CURRENT" operated device and that a large
current (Ic) flows freely through the device between the collector and the emitter
terminals. However, this only happens when a small biasing current (Ib) is flowing
into the base terminal of the transistor thus allowing the base to act as a sort of
current control input. The ratio of these two currents (Ic/Ib) is called the DC
Current Gain of the device and is given the symbol of hfe or nowadays Beta, (β).
Beta has no units as it is a ratio. Also, the current gain from the emitter to the
collector terminal, Ic/Ie, is called Alpha, (α), and is a function of the transistor
itself. As the emitter current Ie is the product of a very small base current to a very
large collector current the value of this parameter α is very close to unity, and for a
typical low-power signal transistor this value ranges from about 0.950 to 0.999.
Page
44
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
α and β Relationships
The values of Beta vary from about 20 for high current power transistors to well
over 1000 for high frequency low power type bipolar transistors. The equation for
Beta can also be re-arranged to make Ic as the subject, and with zero base current
(Ib = 0) the resultant collector current Ic will also be zero, (β x 0). Also when the
base current is high the corresponding collector current will also be high resulting
in the base current controlling the collector current. One of the most important
properties of the Bipolar Junction Transistor is that a small base current can
control a much larger collector current. Consider the following example.
Page
45
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
PN Transistor are of a forward biased diode. Then the base voltage, (Vbe) of an
NPN Transistor must be greater than this 0.7 V otherwise the transistor will not
conduct with the base current given as.
Where: Ib is the base current, Vb is the base bias voltage, Vce is the base-emitter
volt drop (0.7v) and Rb is the base input resistor.
One other point to remember about NPN Transistors. The collector voltage, (Vc)
must be greater than the emitter voltage, (Ve) to allow current to flow through the
device between the collector-emitter junction. Also, there is a voltage drop
between the base and the emitter terminal of about 0.7v for silicon devices as the
input characteristics of an Nas a switch to turn load currents "ON" or "OFF" by
controlling the Base signal to the transistor, NPN Transistors can also be used to
produce a circuit which will also amplify any small AC signal applied to its Base
terminal. If a suitable DC "biasing" voltage is firstly applied to the transistors Base
terminal thus allowing it to always operate within its linear active region, an
inverting amplifier circuit called a Common Emitter Amplifier is produced.
Page
46
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Biasing voltage. Without this "Bias Voltage" only the positive half of the input
waveform would be amplified. This type of amplifier has many applications but is
commonly used in audio circuits such as pre-amplifier and power amplifier stages.
Page
47
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
The most important factor to notice is the effect of Vce upon the collector current
Ic when Vce is greater than about 1.0 volts. You can see that Ic is largely
unaffected by changes in Vce above this value and instead it is almost entirely
controlled by the base current, Ib. When this happens we can say then that the
output circuit represents that of a "Constant Current Source". It can also be seen
from the common emitter circuit above that the emitter current Ie is the sum of the
collector current, Ic and the base current, Ib, added together so we can also say that
" Ie = Ic + Ib " for the common emitter configuration.
By using the output characteristics curves in our example above and also Ohm´s
Law, the current flowing through the load resistor, (RL), is equal to the collector
current, Ic entering the transistor which inturn corresponds to the supply voltage,
Page
48
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
(Vcc) minus the voltage drop between the collector and the emitter terminals,
(Vce) and is given as:
Also, a Load Line can be drawn directly onto the graph of curves above from the
point of "Saturation" when Vce = 0 to the point of "Cut-off" when Ic = 0 giving us
the "Operating" or Q-point of the transistor. These two points are calculated as:
Then, the collector or output characteristics curves for Common Emitter NPN
Transistors can be used to predict the Collector current, Ic, when given Vce and the
Base current, Ib. A Load Line can also be constructed onto the curves to determine
a suitable Operating or Q-point which can be set by adjustment of the base current.
The PNP Transistor is the exact opposite to the NPN Transistor device we
looked at in the previous tutorial. Basically, in this type of transistor construction
the two diodes are reversed with respect to the NPN type, with the arrow, which
also defines the Emitter terminal this time pointing inwards in the transistor
Page
49
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
symbol. Also, all the polarities are reversed which means that PNP Transistors
"sink" current as opposed to the NPN transistor which "sources" current. Then,
PNP Transistors use a small output base current and a negative base voltage to
control a much larger emitter-collector current. The construction of a PNP
transistor consists of two P-type semiconductor materials either side of the N-type
material as shown below.
The PNP Transistor has very similar characteristics to their NPN bipolar cousins,
except that the polarities (or biasing) of the current and voltage directions are
reversed for any one of the possible three configurations looked at in the first
tutorial, Common Base, Common Emitter and Common Collector. Generally, PNP
Transistors require a negative (-ve) voltage at their Collector terminal with the
flow of current through the emitter-collector terminals being Holes as opposed to
Electrons for the NPN types. Because the movement of holes across the depletion
layer tends to be slower than for electrons, PNP transistors are generally more
slower than their equivalent NPN counterparts when operating.
Page
50
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
To cause the Base current to flow in a PNP transistor the Base needs to be more
negative than the Emitter (current must leave the base) by approx 0.7 volts for a
silicon device or 0.3 volts for a germanium device with the formulas used to
calculate the Base resistor, Base current or Collector current are the same as those
used for an equivalent NPN transistor and is given as.
Generally, the PNP transistor can replace NPN transistors in electronic circuits, the
only difference is the polarities of the voltages, and the directions of the current
flow. PNP Transistors can also be used as switching devices and an example of a
PNP transistor switch is shown below.
The Output Characteristics Curves for a PNP transistor look very similar to those
for an equivalent NPN transistor except that they are rotated by 180 o to take
Page
51
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
account of the reverse polarity voltages and currents, (the currents flowing out of
the Base and Collector in a PNP transistor are negative).
7-SEGMENT DISPLAY
The illustration to the right shows the basic layout of the segments in a
seven-segment display. The segments themselves are identified with
lower-case letters "a" through "g," with segment "a" at the top and then
counting clockwise. Segment "g" is the center bar.
Page
52
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
In addition, most displays are actually slanted a bit, making them look
as if they were in italics. This arrangement allows us to turn one digit
upside down and place it next to another, so that the two decimal points
look like a colon between the two digits. The technique is commonly used
in LED clock displays.
One limitation of the DIP package is that it cannot support larger digits.
To get larger displays for easy reading at a distance, it is necessary to
change the package size and shape. The package on the right above is
larger than the other two, and thus can display a digit that is significantly
larger than will fit on a standard DIP footprint. Even larger displays are
also available; some digital clocks sport digits that are two to five inches
tall.
Page
53
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Schematic Diagram
Page
54
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
cases, the common connection is made available at more than one location
for convenience in laying out printed circuit boards. When laying out
circuits using such devices, you simply need to take the specific
connection details into account.)
SWITCH
Page
55
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
ON-OFF
Single Pole, Single Throw = SPST
(ON)-OFF
Push-to-make = SPST Momentary
ON-(OFF)
Push-to-break = SPST Momentary
ON-ON
Single Pole, Double Throw = SPDT
Page
56
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
ON-OFF-ON
SPDT Centre Off SPDT slide switch
A special version of the standard SPDT (PCB mounting)
switch. It has a third switching position in
the centre which is off. Momentary (ON)-
OFF-(ON) versions are also available
where the switch returns to the central off
position when released.
Dual ON-OFF
Double Pole, Single Throw = DPST
Page
57
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Dual ON-ON
Double Pole, Double Throw = DPDT
Page
58
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Example
Type of Switch
Keyswitch
Page
59
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Multi-pole Switch
Multi-way Switch
Contrast this multi-way switch (many switch positions) with the multi-
pole switch (many contact sets) described above.
Page
60
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
61
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 7
POWER SUPPLY
INTRODUCTION:
Most of the electronics devices and circuits required D.C. sources of their
operation. Dry cells and batteries are one of form the D.C. sources. They have the
advantages of being portable and ripple free.
A typical D.C. power supply consists of three stages. They are follows:
1. Rectification
2. Filtering
3. Regulation
A single power can provide as many voltages as are needed; using a voltage
divider. A voltage divider is simple taped resistor connected across the output
terminals. The taped resistor may consist of two or three resistor connected in
series across the power supply in fact, bleeder resister may also be use as voltage
divider. Now we are discuss about the three stages of D.C. power supply.
RECTIFICATION:
Rectification is process in which simple harmonic A.C. voltage is converted
into a unidirectional voltage (D.C. voltage). It is a circuit, which employs one or
more diode to convert A.C. voltage into pulsating D.C. voltage. There are mainly
three different types of rectifier circuits. They are,
2. Half wave rectifier,
3. Full wave rectifier,
4. Full wave bridge rectifier.
Page
62
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
fig
The circuit uses two rectifier elements and the transformer with secondary
center tapped. The bridge circuit, however eliminate the use to secondary center
tap but required four rectifier elements.
FILTERS:
The output of rectifier contains A.C. components of considerable magnitude.
The effect of this A.C. components is to vary the output D.C. voltage. The filter
system is used to reduce the magnitude of this ripple ( pulsation ) present in the
output voltage supplied by the rectifier and provide a regulated and constant
voltage. No filters, in practice give any output voltage as ripple free as that of D.C.
battery but it approaches it so closely that the power supply performs well.
The out of various rectifier circuit is pulsating. It has a D.C. value and some
A.C. variation called ripples. This type of output is not useful driving, electronic
circuits. In fact, these circuit required a very steady D.C. output that approached
the smoothness out the pulsating in the output.
There are four popular filter circuits. They are,
1. Series inductor filter,
2. Shunt capacitor filter,
3. LC filter,
4. TT filter.
Page
63
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
REGULATION:
We have discussed about rectifiers and filters. They are capable of supplying
D.C. voltage and current but the voltage supplied by the rectifier circuit never
remains constant and it shows changes when load is changed or A.C. supply (main
input) fluctuates. It also contains A.C. ripples which can not be completely
eliminated by filtering. It has been seen that with a capacitor filter voltage
regulation is poor (D.C. output voltage changes when the load current is changed).
For a choke input filter, output voltage also shows variation for low load currents.
An other drawback with this filter circuit is that they can not filter out variation
from the D.C. output voltage caused by fluctuations in the A.C. supply.
We also know that in almost all circuit applications, it is important to have a
constant D.C. supply voltage but output of a filter shows frequent variations in
D.C. supply. That caused unsatisfactory operation of equipment. It can also
damage it. Due to this reason voltage regulation is required.
“Voltage regulation is defined as the percentage change in the output voltage
when the load is removed.” The good regulation means that the output voltage
remains constant.
Page
64
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 8
APPLICATIONS
This equipment can be used for.
Page
65
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
66
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 9
Page
67
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
68
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 10
SUMMARY
Page
69
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
Page
70
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
UNIT = 11
BIBILOGRAPHY
BASIC ELECTRONICS
- B.L. THERAJA
Page
71
MICROCONTROLLER BASED PUT COIN AND DRAW POWER
A MONOGRAPH ON ELECTRONICS
DESIGN PRINCIPLES
- N.C. GOYAL
Page
72