AC 120V and 240V monitoring / detection

Discussion in 'General Electronics Chat' started by Sumod, Oct 29, 2008.

  1. Sumod

    Thread Starter New Member

    Oct 29, 2008
    Hi , My project needs to detect whether the AC supply connected is 120V or 240V to the microcontroller with isolation. Please let me know how it can be done.
    Sumod C.
  2. mik3

    Senior Member

    Feb 4, 2008
    Take a 240/9 Volt step down transformer and connect its secondary to a voltage divider and then a peak detector and then to the input of the ADC of the microcontroller. If the input voltage is 240 voltsthe output will be a fraction of the 9 volts due to the voltage divider and the microcontroller will read this from the peak detector. If the input is 120 volts then the output from the peak detector will be half the value when the input was 240. This is true if the 240 and 120 voltages are of the same frequency.
    If you are talking about the 120V 60Hz and 240V 50Hz supplies then use a 50Hz transformer, it will be ok to connect if to a 60Hz supply (it will output a bit less voltage on 60Hz than on 50Hz) but if you use a 60Hz transformer and connect it to a 50Hz supply then the core will saturate and it get hot.
    I addition, If you are talking about the 120V 60Hz and 240V 50Hz supplies you can detect them by using a transformer to step down the voltage to a safe value and then use a zero cross detector to detect when the voltage cross its zero value (remember the main supply varies sinusoidally). Then the microcontroller will measure the time intervals between the zero crossings and calculate the frequency of the supply voltage and thus see if it is 120 (60Hz) or 240 (50Hz).
  3. Bailey45


    Oct 27, 2008
    You could also sense this voltage using two opto isolators. The fist opto would just have a limit resistor to sense any voltage. The second opto would have a limit resistor as well as a resistor in parallel with the opto input. The value of the parallel resistor will determine the on voltage of the opto.