ru

 RadioLocman Forum Discussion: 40 MHz Frequency meter on ATmega16
 Register FAQ Calendar Search Today's Posts Mark Forums Read

 Microcontrollers (MCU) Application and programming of MCUs, Evaluation Kits and Demonstration Boards, Programmers.

05-01-2012, 04:55 AM   #1
Member

Join Date: Jan 2011
Posts: 217
Discussion: 40 MHz Frequency meter on ATmega16

Quote:
 This article shows how to build a small, cheap and simple frequency meter, without any fancy, out of reach components. The simple proposed design can measure frequencies up to 40 Mhz with errors below 1%! This degree of precision will be more than enough to debug most of your analog and digital circuits, and will give you the ability to analyze many aspects that you were unable to see before.
More: 40 MHz Frequency meter on ATmega16

 05-01-2012, 04:55 AM #2 thuybk Junior Member   Join Date: May 2012 Posts: 1 hi. i'm very interested in this topic I found your article so useful And i need your c code for this project. but i can not download the c code file here Please send it to me to email thuybk.tnt@gmail.com Thanks so much!
05-01-2012, 02:37 PM   #3
Member

Join Date: Jan 2011
Posts: 65

Attached Files
 code.zip (2.3 KB, 17 views)

05-11-2012, 12:00 PM   #4
winnoncd
Junior Member

Join Date: May 2012
Posts: 1

Quote:
 SIGNAL(SIG_OVERFLOW2) { //timer 2 overflow: measure frequency counter_0 = TCNT1; //temporarly stock TCNT1 into counter_0 if ((10+TCNT0+(256*T0_ovc)) < (counter_0*16)) // detect if the { // frequency is too high to be if (source < 10){ // sampled source++; } }else{ if (source > 0){ source--; } }
Can you explain to me about the algorithm to select the source of the frquency, especially the variable source. Cause in the code, after initalizing source, it is not modified, so how can we compare the its value with 10. What is the meaning of this comparison?

 05-15-2012, 03:01 PM #5 san1985 Junior Member   Join Date: May 2012 Posts: 1 Dear readers, i am working on a capacitive liquid level sensor.i am provided with a co-axial cylinder copper probe of length 30 cm.this acts as a sensor.This probe is immersed in a cylindrical beaker where the water is kept. The probe(stationery) is attached to a clinging handle .the beaker is placed in a lift.The beaker is filled with water upto 500 ml. when the lift is raised or lowered the capacitance in the probe increases due to water as a di-electric between the two probes.the hardware part has been successfully achieved however i am stuck with the software part. The received frequency variation range are below. I have connected this probe to a frequency oscillator. i have designed the frequency oscillator using a 555 timer in astable mode. at air= 870khz at 0 cm= 858 khz at 1 cm= 829 khz at 2 cm= 798 khz . . . . at 30 cm =435 khz. As the capacitance increases, the frequency decreases. For the 555 timer in astable mode f= 1.44/( R1+2R2)C. now i am findin it difficult to feed this variation of frequency range into the ATmega16 AVR microcontroller. i need to feed this frequency range to the microcontroller and display the level of the water in the LCD. e.g. when the capacitor sensor is in 1cm ,it gives 829kh,when at 2 cm it gives 798khz.what is the thing i must do that will take in all the frequency ranges and display in the LCD. should i use counters or interrupts ?? could anyone please enlighten me for the further approach. I would be most grateful if anyone couls provide me sample codes. any help is deeply accepted. Thank you. reply me soon

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Electronics and ...     Microcontrollers (MCU)     Projects and Advices     Beginners     Electronic Components