HPK taruh disini
Simulation is a modeling
system before making
the actual system. Simulation is the only way that can be done
to look at the problem and solve. the problem if
the system is in fact very sensitive. Real
system requires a good controller, one of
the most widely used is the microcontroller.
Simulation will try to present this time is simulated
for Frequency Meter.
The frequency in meaning
is the number of vibrations or waves within 1 second, said the
wave if it consists of a valley and hills.
Frequency has the unit "Hertz", according to the name of the inventor and the measuring instrument named as "Frequency Meter". Frequency to
be measured this time is the
electrical frequency.
Frequency Meter |
Instrument measuring electrical
quantities are usually combined in one tool that is
a multimeter. In addition to being
more practical nominal
money needed to have
this tool is also
much cheaper. Quantity that can be measured by
a multimeter them include voltage, current, resistance, and capacitance. Some
multimeters also add frequency measurement function,
but the price will
be far more expensive.
Multimeter |
Make a frequency
meter is not so difficult,
the following is a simulation of the system
frequency meter to
be made:
- Hardware &
Software Design :
Simulaton Design |
Coding (Software Design) |
Components used:
1. Counter
2. ATMEGA 32
3. LCD
4. Led
5. Push Butoon
ATMEGA 32 is an 8-bit microprocessor system
based on RISC (Reduced
Instruction Set Computing) at a maximum speed of
16 MHz. The
counter will count the number of pulses in a specific time interval
that can be set by
the programmer μC. The calculation is based on
changing conditions TTL voltage levels,
namely Falling and
Rising Edge. ATMEGA
32 has two counters
through danPB1 PB0
pin. PB0 pin
is connected to the counter 0 and PB1 with counter
1. Counter 0
8-bit accommodated by a register, ie TCNT0. Meanwhile,
a 16-bit counter 1
yangditampung by two
registers, namely TCNT1L and TCNT1H.
TCNT1L accommodate 8 bithasil first
calculation, whereas TCNT1H accommodate 8 bits
selanjutnya.Tipe calculation results
of the second data registers are unsigned
character with hexadecimal
format. So as to obtain the results of the
calculation counter 1, the value must be
combined with TCNT1L TCNT1H which is then
converted to decimal.
Working Principle :
Frequency meter will calculate the number of pulses in an electrical signal every five seconds. Counter
0 8-bit, this
means that TCNT0 is only able to accommodate (28-1) = 255 pulses. So that the frequency meter
are made to reach the widest possible frequency, the authors enable overflow
interrupt. Variables are placeholders for the marker count the number
of interrupt events. Timer conversion formula
01 can be used
to get the number of totalpulsa, namely:
While the frequency can be obtained
from the following formula:
The stability of counter 0 is similar ADC 2
(Analog to Digital Converter = Converter Analog to
Digital), ie ± 1-2 LSB (Least
Significant Bit). This is evidence
of the limitations of 8-bit microprocessor system.
Frequency calculation results in μC and PC (Personal
Computer) shows exactly the same result
at a frequency of 0.2-540 Hz (with a one second
delay time). However, inconsistencies began to appear in the calculation
of frequency> 5 kHz.