Jump to content
Electronics-Lab.com Community

simple voltage detect - wide range


Recommended Posts

I'm trying to simply detect the presence of a voltage,  either AC or DC,  across a wide range  (5v through 240v).

I attached a picture of my current schematic.  LTV817 opto-isolator gain should be around x10.

However I think I can simplify this design to fewer resistors and relays.


Range A:  1M Resistor
240v / 1M = 0.00024 * 10 = ~2mA
120v / 1M = 0.00012 * 10 = ~1mA

Range B:  100k Resistor
48v / 100k = 0.00048 * 10 = ~5mA
24v / 100k = 0.00024 * 10 = ~2mA
12v / 100k = 0.00012 * 10 = ~1mA
5v / 100k = 0.00005 * 10 = ~500uA


I suppose since the 5v case might only produce half a milliamp,  I should increase the pull-down resistor to 100k and perhaps eliminate the 10uF capacitor altogether.  In the case of AC,  I can have microcontroller detect and ignore zero-crossings so the capacitor might not be needed anyway.


Does this seem reasonable, or my original schematic is best,  or is there an even simpler approach I am not thinking about?

post-40149-14279144318277_thumb.jpg

Link to comment
Share on other sites


An opto-isolator has a range of gain maybe from 2 to 20, not just 10.
Its gain is not steady, it changes with temperature and with age.

Your circuit uses old relays to switch ranges, my DVM doesn't.
Your circuit will instantly burn out its LED when set to a range that is too low, my DVM doesn't.

Your circuit forgets that the transistor charges the output capacitor to the peak voltage of a sine-wave which is 1.414 times higher than the RMS voltage.

On the 5V range the accuracy below 1.4V will be horrible, my multimeter has the rectifier inside the feedback loop of an opamp so it is accurate down to 0.001VAC.

Link to comment
Share on other sites

DVM circuit would be wonderful.

I seem to have found DVM schematics with either a lot more components, expensive ICs, or ones that are based on ICL710x which has an integrated LED segment driver..  far beyond my needs of a simple  on/off.

I figured that by using reed relays with varying resistance, I can achieve the goal with a relatively simple prerequisite 'learn' procedure that involves testing at highest resistance-  if that does not detect the signal then test again at the next lower resistance-  until the signal is detected.. Store that range identifier in EEPROM and the system is now compatible with the source.

Am I on the right path or is your fully-featured DVM cheaper to build?


EDIT:
I'm sorry-  I did fail to specify that although the circuit should have the initial capability to deal with 5v - 240v,  it does not change once the source is identified.

Link to comment
Share on other sites

???  I don't know what you mean by constant current source.

Is it a special component, like a Current Sense resistor?


The 5v - 240v  is generated by a 3rd party device that I don't control, and the voltage level may vary depending on the manufacturer so I cannot predict what it will be.  However, the voltage level on any one particular device will not change.  That's why I say it's acceptable to have a 'learn' procedure to find the appropriate range, then store in EEPROM which relay to always activate from that point forth.


Unless you have a magic trick Hero999, I think the relays & resistors might still be the easy&cheap way out of this.

Link to comment
Share on other sites

In this project, it's OK to draw current from the source.

But in my next project, it's NOT OK to draw any noticable current, so a true DVM would be applicable.  Luckily for that scenario, I can pretty much gaurantee the voltage will be between 5v and 24v DC,  therefore electrical isolation is not as important.  So perhaps I can use a high-impedance input fed through opamp and then into an ADC;  to get a limited range, but true, DVM.



Yet, on this project,  I already know 120VAC will show up often.  And I know that 12VDC is also commonplace  :-\

And I know I can't trust a technician to actually check the 3rd party device schematics (if even available) and use a knob to select the correct range  :'(  The signal doesn't appear unless you're actually operating the device from another room, so it's not trivial either to just check beforehand with a voltmeter.

Link to comment
Share on other sites

It's still not clear what you want to do.

Do you simply want to detect the presence of a voltage or do you want to measure the actual voltage?

Just Google for constant current source if you don't know what it is. I was suggesting building one from transistors to limit the current through the optocoupler's LED to replace the series resistor.

Measuring such a wide range of voltages using an ADC is harder.  To change ranges you need an attenuator or amplifier with a programmable gain. For AC you ideally need a bipolar power supply or a virtual earth. The best way to achieve isolation is probably to use an isolated DC-DC converter to power the measuring circuit which is directly connected to the potentially dangerous voltage and transmit the data digitally via an opto coupler or a pulse isolation transformer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...