Brusque, I would run the signal through an op amp configured as differential amplifier as the CMR (common mode rejection) characteristics of the differential amplifier will attenuate noise and any signal common to both inputs of the op amp. As for signal harmonics, it's not possible that the harmonic of a signal would be at the same amplitude as the primary signal. Following the differential amplifier with a PLL (phase locked loop) will assure a fix on the primary signal and a rejection of the secondary harmonics. The frequency of the primary signal can shift and the PLL will follow. If two primary signals are present of similar amplitudes, then the PLL will lock onto the perceived strongest signal. Good luck. Sincerely, Ned Seith Nedtronics 59 3rd Street Gilroy, CA 95020 (408) 842-0858 G O T G A R L I C ? GILROY GARLIC FESTIVAL 2001 ! >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> At 08:44 PM 7/25/01 -0300, you wrote: >Hello, > > I'm making an RMS voltage measurement with the PIC at one of my >circuits. > > Now, how can I get a precise result if I don't know the frequency and >format of the waveform going to the PIC A/D? > > I mean, if the wave is very clean, like a pure sinusoidal, I could try >to sample it between two zero-crossings and I will have a very precise >value. But what about if it does have some loud harmonics? For example, if >it's a sine with 100Hz plus a sine with 187Hz, both mixed and with the same >intensity, the zero-crossings will be all over the place so I can't sample >between two zero-crossing because the values will be meaningless. > > Any ideas? > > Thanks, > > Brusque > >----------------------------------- >Edson Brusque >Research and Development >C.I.Tronics Lighting Designers Ltda >(47) 323-2138 / (47) 9993-6453 >Blumenau - SC - Brazil >www.citronics.com.br >----------------------------------- > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads