View Single Post
  #92   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, 16:04, whisky-dave wrote:


a) xtal control the cpu clock, an xtal with no oven is more than accurate enough to read 50Hz +/- 0.1%.


XTAL DO NOT READ FREQUENCIES and niether do CPUs.


You need to take some time out and get a clue. The Xtal drives the MPU
clock at a known frequency. The MPU then measures the time different
between zero crossings. Some simple math is all that is required.


The average watch cyrstal is 32.768 KHz, which is how they divide down to 1Hz
2 ^22 .


And? MPUs generally run a lot faster than this except when in low
power mode. A typical modern PIC can use two different crystals for
low power and full on. The former typically being a watch crystal, the
latter 8MHZ, say, maybe with a 4x PLL.


b) count a divided version of the clock from one mains zero crossing to the next. Problem solved.


That's not the way to do it, you don;t need zerop crossing wither until you decide to switch something even then zero crossing has nothing to do with it.


Measuring zero crossings is how you measure frequency.

The slight frequency spread of the xtals prevents all appliances going off at the same time.


That's not really relible, XTALS have a very high accuracy when made, but temperature and series as well as parellel capacitance play a part.


And? What sort of accuracy do you think you need to detect the mains
going awry?


So you're proposing that appliances have 2 way communications,


No they don;t need two way communication, any more than your TV does.


So thay can be instructed when to tirn on/off.


I'm struggling to see how enabling 2 way comms and playing with MACs is cheaper than a divider in the chip.


What do you mean by a divider in the chip, which chip are you refering to ?


The clock divider in the MPU. Or, more simply, a counter that counts
cycles of the MPUs clcok between mains zero crossongs.


Its not hard at all, just time the number of clock cycles between 2 successive crossings.


Two crossing of what ?


Oh FFS! MAINS ZERO CROSSINGS.

MBQ