Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Frequency meter doubts

Status
Not open for further replies.

shaz

Member level 4
Joined
Mar 9, 2005
Messages
70
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,288
Activity points
1,994
cd4050 スレッショルド

hi,
recently I found this frequency measurement circuit in a magzine. It measures
frequencies upto 250kHz. Actually the author hasn't given the technical details of the circuit. my doubts are:-

1. what type of frequency can this circuit measure, i.e. can it measure sine wave?

2. as i feel after reading (from few details which are given in), the magzine the
resolution is 1 Hz, how can i incerease the resolution to 0.1 Hz or 0.01 Hz?

3. what's the role of T1, D5, and N1?

i think i've asked many questions,
 

rod_vdb

Newbie level 4
Joined
Jan 16, 2006
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,348
D5 Protects the input to N1 from going below 0v
N1 is some type of buffer to condition the signal for the input to the uC
T1 is a transistor which amplifies the input signal
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
637
Reputation
1,272
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,178
I don't see how that input circuit can work without any DC bias on T1. Also, D5 looks useless. Maybe the circuit is misdrawn.

N1 is a CD4050. It's being used as a poor-man's comparator to convert whatever input waveform to a square wave.

The counter's resolution is determined by whatever program is running inside the microcontroller. If you show us the code, maybe someone can suggest improvements.
 

shaz

Member level 4
Joined
Mar 9, 2005
Messages
70
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,288
Activity points
1,994
Hi echo, why do u call it "poor man's comparator" ? actually what i'm trying to do is to measure Ac supply frequency at 0.1 or 0.01 resolution? i.e input is sinwave? what method can i use?

Added after 1 hours 4 minutes:

this picture shows the simulation results for the same circuit,
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
637
Reputation
1,272
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,178
Oh, it's a 230VAC input! By luck the circuit will sort-of work, for a while, but you are driving the base-emitter junction into reverse breakdown, which can damage the transistor. You need to connect diode D1 from base-to-emitter instead of from collector-to-emitter.

The CD4050 is a CMOS hex buffer. It's not designed to be used as comparator, but it sort-of behaves like one, and you get six of them for little money. The input threshold voltage is unpredictable, but it will sharpen-up a high-amplitude signal like the pulses coming from Q1.
 

    shaz

    Points: 2
    Helpful Answer Positive Rating

shaz

Member level 4
Joined
Mar 9, 2005
Messages
70
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,288
Activity points
1,994
so should i use op-amp instead of cd4050?
how can i use a op-amp for this project please guide me. i want to thank you sincerely.
 

artem

Advanced Member level 4
Joined
May 22, 2003
Messages
1,350
Helped
126
Reputation
252
Reaction score
32
Trophy points
1,328
Location
Turkey
Activity points
13,450
shaz , even if you wont break the B-E junction of transistor - you will run into problem with c1 being charged up to (Vin positive - 0.6 V) and if somehow one of the positive half of the input frequency will have little bit less voltage than previous one it will lead to one half period missed from detection. What you need is zero crossing detector . Search forum and net - there are a lot of examples .
Even one 100 kOm resistor and diode in backward direction connected in parallel to Q1's B E junction will improve your case . Using Schmidth trigger for U1A will also make a circuit better.
 

Davood Amerion

Advanced Member level 2
Joined
Mar 1, 2005
Messages
584
Helped
116
Reputation
232
Reaction score
24
Trophy points
1,298
Location
Persia
Activity points
6,345
In this schematic i think D5 missplaced.
Catode of D5 must connect to Base of T1.

For increasing resolution by 10 (0.1Hz), you must increase sampleling period by 10 too.
 

Epegic

Member level 5
Joined
Mar 29, 2002
Messages
84
Helped
24
Reputation
46
Reaction score
19
Trophy points
1,288
Activity points
595
The maximum frequency is determined by oscillator clock :
clock/12/2 for standard 8051. Upper limit will be 500kHz with 12MHz clock.
This figure is for square wave of 50% duty cycle. For narrow pulses the maximum input frequency should be lower, estimate by the formula:
clock/12/2/n, where n is the ratio of mark/space or space/mark whichever the greater.

Resolution can be exchange for measuring time, just change the program. Minimum gate time should be longer than 2 seconds for 0.01Hz in 50Hz. It is a bit too long for frequency meter in general.

Alternatively, if you just want to monitor AC line frequency, you can use the input signal as gate time, count the oscillator clock with timer0/1. It takes just 0.02 seconds to complete one measurement. Resolution is a lot better than 0.01Hz. This is the prefer way to measure low frequency.
 

masud58

Full Member level 2
Joined
May 19, 2002
Messages
129
Helped
13
Reputation
26
Reaction score
9
Trophy points
1,308
Location
Dhaka, Bangladesh
Activity points
780
for that purpose u must use pic 16fxx , transformer less , one capacitor resistor need.
 

osmandigital

Newbie level 2
Joined
Mar 6, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
hi man
i think that T1 is atransistor act as aswitch so it will convert the sine wave to square wave, and D5 used to clip the negative part from the sine wave signal
and the ic (N1) for ampificate the signal.
to increase the resolution by increasing the sampling frequency which require change the crystal by another large one if it can not call me

thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top