Skip to main content
replaced http://electronics.stackexchange.com/ with https://electronics.stackexchange.com/
Source Link

First, be careful when you're dealing with mains.

Please refer to thisthis question for why breadboards and mains power don't mix (the question relates to 120V, 230V is worse).

As far as measuring the difference between 110V and 230V, there are a few methods. For safety, all methods should be properly isolated when dealing with mains power.

  1. Use an ADC and a resistor divider. In a micro, just keep track of the most recent peak voltage - since you know the ratio, you can tell if you're plugged in to 110 or 230V.
  2. Use a transformer to knock the voltage down to something you can actually read on an ADC. Combine this with a resistor divider, and you have an isolated, relatively safe way to measure the voltage.
  3. You can also combine (2) with some kind of fixed voltage reference and a comparator. If your reference is somewhere between what 110v and 230v yields on the output of your transformer, then you will get a logic high if the input is 230v, and a logic low if it is 110v.

Seriously though - be careful with mains power. Always keep everything isolated, and be very careful what you touch.

First, be careful when you're dealing with mains.

Please refer to this question for why breadboards and mains power don't mix (the question relates to 120V, 230V is worse).

As far as measuring the difference between 110V and 230V, there are a few methods. For safety, all methods should be properly isolated when dealing with mains power.

  1. Use an ADC and a resistor divider. In a micro, just keep track of the most recent peak voltage - since you know the ratio, you can tell if you're plugged in to 110 or 230V.
  2. Use a transformer to knock the voltage down to something you can actually read on an ADC. Combine this with a resistor divider, and you have an isolated, relatively safe way to measure the voltage.
  3. You can also combine (2) with some kind of fixed voltage reference and a comparator. If your reference is somewhere between what 110v and 230v yields on the output of your transformer, then you will get a logic high if the input is 230v, and a logic low if it is 110v.

Seriously though - be careful with mains power. Always keep everything isolated, and be very careful what you touch.

First, be careful when you're dealing with mains.

Please refer to this question for why breadboards and mains power don't mix (the question relates to 120V, 230V is worse).

As far as measuring the difference between 110V and 230V, there are a few methods. For safety, all methods should be properly isolated when dealing with mains power.

  1. Use an ADC and a resistor divider. In a micro, just keep track of the most recent peak voltage - since you know the ratio, you can tell if you're plugged in to 110 or 230V.
  2. Use a transformer to knock the voltage down to something you can actually read on an ADC. Combine this with a resistor divider, and you have an isolated, relatively safe way to measure the voltage.
  3. You can also combine (2) with some kind of fixed voltage reference and a comparator. If your reference is somewhere between what 110v and 230v yields on the output of your transformer, then you will get a logic high if the input is 230v, and a logic low if it is 110v.

Seriously though - be careful with mains power. Always keep everything isolated, and be very careful what you touch.

Source Link
Ken
  • 123
  • 7

First, be careful when you're dealing with mains.

Please refer to this question for why breadboards and mains power don't mix (the question relates to 120V, 230V is worse).

As far as measuring the difference between 110V and 230V, there are a few methods. For safety, all methods should be properly isolated when dealing with mains power.

  1. Use an ADC and a resistor divider. In a micro, just keep track of the most recent peak voltage - since you know the ratio, you can tell if you're plugged in to 110 or 230V.
  2. Use a transformer to knock the voltage down to something you can actually read on an ADC. Combine this with a resistor divider, and you have an isolated, relatively safe way to measure the voltage.
  3. You can also combine (2) with some kind of fixed voltage reference and a comparator. If your reference is somewhere between what 110v and 230v yields on the output of your transformer, then you will get a logic high if the input is 230v, and a logic low if it is 110v.

Seriously though - be careful with mains power. Always keep everything isolated, and be very careful what you touch.