![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hello all. I'm using PIC 16F916. I want to convert the peak value of a sine wave by the A/D converter. I need help to know how to calculate the the time and how to know the exact peak of the wave. Thank you in advance. | |
| |
| | (permalink) |
| Use a zero-crossing circuit to detect the zero crossing point, then time it until the peak of the sinewave - but you need to know the frequency for this. You could always measure the time between two zero-crossings and half it though. | |
| |
| | (permalink) |
| Thank you Nigel. I didn't thought about zero-crossing. I think that will work. By the way, the frequency is always 50 Hz. Thanks again. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| Dear Nigel. I'm not measuring the main power consumption. I'm building a "current overload protection" for an AC motor. I'm using a current transformer. I put a resistor in parallel with the secondary to have a voltage. I'm measuring that voltage and comparing with a set value. If this voltage (the current of the motor) goes higher then the set value then I will have a signal out to stop the motor. I will put the complete project on-line (because all of you guys are helping me to build it, it belongs to you too...) when I finish it to the end. | |
| |
| | (permalink) | |
| Quote:
Lefty
__________________ Measurement changes behavior | ||
| |
| | (permalink) |
| That's right Leftyretro, but I'm trying to have a very compact circuit because I have more than 1 motor to control and it will be cheaper. It will be more complicated programing the PIC but cheaper for sure. | |
| |
| | (permalink) | |
| Quote:
You normally have to tie one side of the CT's secondary to the PIC's ground refereance, so without rectification I don't see how you are going to deal with negitive voltages that the PIC will see on the negitive swings. Somehow you have to scale down and reference the AC voltage to 2.5VDC so that the total peak to peak AC swing stays in the PIC's 0-5VDC safe measurement range. I still think rectification and filtering is the best way and because this is for measurement not power they can be very small components. Lefty
__________________ Measurement changes behavior | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| High ADC sampling rate PIC, 18F needed? | bananasiong | Micro Controllers | 24 | 28th October 2007 01:13 PM |
| Four PIC with One LCD.. | meera83 | Micro Controllers | 13 | 20th September 2007 07:40 AM |
| Peak Detector and The Surge Problem | alisarhangpour | General Electronics Chat | 7 | 5th December 2006 02:12 PM |
| How to Detect peak value and phase information | jitun2 | General Electronics Chat | 18 | 16th November 2006 06:45 PM |
| 12V pk-to-pk to 220V peak conversion | samcheetah | Electronic Projects Design/Ideas/Reviews | 15 | 22nd July 2005 09:32 AM |