Ooooopss.....values of R1 was wong sorted (ascending), these are the correct values: R1 (Ohm) Freq.(Hz) PIC TMR0 15000 745 94 10000 1092 135 4700 2220 274 2700 3500 438 1000 7360 923 Sorry! Marco ----- Original Message ----- From: "Marco Genovesi" To: Sent: Thursday, April 03, 2003 2:15 PM Subject: [EE]: OP-AMP squarewave oscillator problems Hi all, I'm experimenting in this simple circuit on the bredboard (from the LM358 Datasheet, see below). Main idea was to build an inexpensive sensor to check water conductivity, simply with the substitution of R1 with two electrodes and subsequently to measure the output frequency with TMR0 ( PIC 16F84 / 16F628 ). I imagined to obtain, with differents values of R1 (and a fixed value of C1) a linear variation of frequency, at least within an 1Khz - 20Khz interval but....the values don't seems very good ! In the doubt, I have tested another similar circuit (but with a LM393 comparator): the absolute values are partially differents but proportionals with these results. Well, I'm not an electronic expert and probably I'm forgetting something...but what?? Is it correct this operation? For reference, these are the values recorded with the multimeter and PIC TMR0: ( C = 47nF, ceramic) - Supply = ~ 5.2V R1 (Ohm) Freq.(Hz) PIC TMR0 1000 745 94 2700 1092 135 4700 2220 274 10000 3500 438 15000 7360 923 R1 (probe) _____ +---|_____|---------+ C 47nF | | || | |\ - | ____ ____ +-----||-------| \ 1/2 LM358 | | | | | | || | \_____ _____|__ Vo __| |___| |__ GND | +----| / | --- | | / | | |/ + | _____ | _____ | V+ ---|_____|---+---|_____|---------+ | R2 100K --. R4 100K | | | | | | R3 100K -- | GND | --+-- Any help will be appreciated regards Marco -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics