View Single Post
  #100   Report Post  
Posted to uk.d-i-y
Man at B&Q Man at B&Q is offline
external usenet poster
 
Posts: 3,235
Default OT - Daily Mail Eco ******** - "Big brother to switch off your fridge"

On 1 May, 17:10, whisky-dave wrote:
On Wednesday, May 1, 2013 4:26:14 PM UTC+1, John Williamson wrote:
Why count clock cycles ?


What else do you think a timer in an MPU does?

Add an external circuit to flag zero crossings


of the mains waveform,


why would you need that ?


Because that's how you measure the frequency. You do know that
frequency is the inverse of period, don't you? That, the period can be
measured with the timer peripheral included in virtually every modern
MPU and that such timers work by counting cycles of the MPU clock.

No, I'm beginning to think you don't. I'm beginning to think you don't
have clue.



Good you know it's a sine wave which will change in amplitude as well as fequency which makes zero crossing more difficult and less useful.


A zero crossing is a zero crossing regardless of amplitude. The change
in frequency is what you are measuring.


You send an off signal, same as they do when BBC3 goes off line, I don;t need to send a signal back to the BBC.



Two crossing of what ?


Zero voltage of the supply in this case.


Two during 1 cycle or 1 per cycle ?


It's sufficient to measure the half-period between two zero crossings.

You could average lots of counts but I don't believe there's a need to, a small percentage of mistimes is immaterial in practice. Simply averaging several yes or nos would be trivially easy.
Yes ot no's to what exactly .


Yes, the frequency is too low, no it isn't.


yuo'll have to count it first and that takes time at such low frequencies.


Not long. One second will give you the average over 50 cycles. That's
more than fast enough and accurate enough.

MBQ