Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sensing circuit for AC vs DC voltage

  1. Jul 1, 2013 #1
    Hi All,
    I am looking for a sensing circuit, which can sense voltage signal between AC (85-265Vac) and DC (20-28VDC). Any idea how to design this circuit?

    Here is the main project: -

    looking for power supply circuit with Single Input terminal for AC as well as DC voltages.
    I would like to design power supply circuit which can take AC and DC voltage and for that I am looking for "some sensing circuit", which can differentiate AC and DC. Once it sense voltage signal, it passes that to secondary side and behaves according that. In other words, a circuit which can decide itself whether it's AC or DC input signal and pass that to the secondary side.
    Fyi: -I am looking for 24Vdc output from it.

    Thank you for your time,
  2. jcsd
  3. Jul 1, 2013 #2
    There are a few ways to do this, you are not too clear about the output. 24V to do what? Analog signal, then how does this identify AC vs DC. etc. And for the AC - are you referring to ONLY 50/60 Hz - or something else.
  4. Jul 1, 2013 #3
    Basically, I am talking about AC "Mains" which is coming from WALL. 85-265Vac, 50/60Hz and regular DC 20-28Vdc.

    These are the input specifications of power supply and output specification is only 24Vdc from this power supply.
    It is regular power supply that is: - AC to DC conversion. This 24Vdc runs one of the meters. (flow meter.)

    Thank you for response.
  5. Jul 2, 2013 #4


    User Avatar

    Staff: Mentor

    When the input is mains AC, do you require your power supply to present transformer isolation? (If not, please explain why not?)
  6. Jul 2, 2013 #5
    Yes Transformer isolation is required for AC power.
  7. Jul 2, 2013 #6
    Based on your second post -

    How much power do you need? Basically this a power supply with universal input. You can actually do this without sensing the input. A basic rectifier does not care about AC or DC and you get DC out (but the V will depend on the input)- then a buck or boost circuit to make a uniform DC bus - if you need isolation from the mains, a high frequency DC / DC converter will do the trick.

    If this is a product development you should really write a formal spec, if this is a one-off build, you may be able to cobble this together in components. The DC Buck Boost may need to be custom.

    Is this for a single application ? I do not understand how you can be connecting to a power feed ( AC or DC ) and not know the type of power - it is generally against code. It will be cheaper / easier / safer to buy two power supplies.
    Last edited: Jul 2, 2013
  8. Jul 2, 2013 #7
    Hi Windadct,
    I wanted to tell you brief idea behind this effort/design. Here is the official specifications for current "separate" AC and DC power supply.

    Input Power: -
    AC: 85 Vac to 265 Vac, 50 Hz to 60 Hz
    DC: 24 Vdc ± 20%

    Power Consumption: -
    AC: 85 to 265V = 13.1W
    DC: 24V = 9.6W, 13.2W

    Now, I would like to keep everything same except one common (universal) input. Be honest, currently I am using XP-Power modules for both power supplies. I want to make my own design.

    I hope this post explains in detail.
    Thank you,
  9. Jul 2, 2013 #8


    User Avatar
    Science Advisor
    Gold Member

    its still not totally clear what you are trying to do
    since you are not giving us all the info, so we can give you a better answer

    I'm going to guess here....

    you have a mains operated PSU with a 24V DC output
    If the mains fails you want to switch the 24V DC output over to another source of 24VDC
    say a pair of 12V batteries in series etc

    you cannot put mains and DC on the same input. there will have to be separate inputs with switching between

    a UPS style system ??

  10. Jul 3, 2013 #9
    Hi Dave,
    You misunderstood my explanation. I am not looking alternate option if my mains fails.

    As I have mentioned in my previous post, I am looking for design of P.S. circuit which has only "one input" and that should take any incoming power, AC or DC.

    I am still confused as many people have already told me I could design "Single Input" power supply but you are saying that I cannot design the same. Why?
    I agreed with you that there should be some switching or sensing circuit to differentiate AC and DC. But many folks have already told me, no sensing or switching circuit is required.

    I am totally confused at this point. (Because I am getting inputs from both the sides, positive and negative.)

    Thanks for looking into my post,
  11. Jul 3, 2013 #10


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I see major issues with your concept. Your 2 inputs will not have common connections. The AC should be using an off the shelf AC cord. The DC will be a pair of wires, could be bare wires, banana plug, spades, or a myriad of other options. So it is not at all clear how you will create a single connection that will serve both. It really makes much more sense to just have AC input and DC, then your internal circuitry becomes trivial.

    Why are you so attracted to this impractical input scheme?
  12. Jul 3, 2013 #11
    I just wanted to try this universal input scheme. I am also feeling why should I do this but as an engineer, I want to try out this option. I want to make sure that, is there a way to do this design or not??
  13. Jul 3, 2013 #12


    User Avatar

    Staff: Mentor

    If you pass the input through a full-wave rectifier and then into a capacitive filter with light loading, then the voltage across that capacitor will be indicative of your input. It will be DC, and around 24V when the input is 24V DC, and DC of approximately the peak of any AC input. That could form the basis of your 'detector', though I'd like to see an AC detector also, to accommodate attempts to operate off 110V DC, for example.

    As Integral points out, a device to be powered from a mains socket should have a standard mains plug, and a device to be powered by something else should not do so using a mains-type plug. But I believe I have seen an auto transformer where the output terminals demanded spade connectors, so I suppose the black box at the basis of your thought experiment could be given input connectors like that (but with something safer than screw terminals for the spade connectors) if you were planning this as a demonstration powered via an autotranformer so you could show the wide range of voltages, then that could be one way.

    You will still need internally, a relay to switch between a subcircuit powered by DC and one using the AC because your mains-powered circuit requires transformer isolation. If you powered that subcircuit from the mains via an isolating transformer (NOT an auto transformer), then this would afford the transformer isolation I encouraged earlier. The power levels you are considering are low, relatively speaking, so a suitable transformer will be affordable. A step-down transformer would allow you to share the regulator sub circuit.

    Edited to emphasise that the DC input cannot be directed to a transformer winding. Make sure there is an onboard fuse for protection.
    Last edited: Jul 3, 2013
  14. Jul 3, 2013 #13


    User Avatar
    Science Advisor
    Gold Member

    This has some serious safety issues - not least for the poor low voltage circuit that may get a full mains hit. All this for no reason other than because you 'could' actually design something to do it. If you have two sources then why can't you use two separate inputs?
    If you are getting a supply from George, down the road, and he could be sending you 24V or any old mains voltage AC down the wire then perhaps you should go elsewhere for your supply. If the supplies are under your control then just two inputs and a switch, to default to whichever one you favour.

    I always worry when people suggest random schemes for mains powering their houses from solar sources or whatever. Domestic power, to date, has been kept fairly pukkah because the established practice has developed over the years and it's nearly always been done by 'professionals' with standard equipment and under the control of the power companies.
    In the UK, few people are interested in just generating their own mains voltage supply. The feed-in tariff has been very attractive and that has demanded high standards of type approval and professional installation.
    I would say that any that is designed on the basis of a few opinions gleaned on even such a well informed forum as PF would be potentially unsafe. I hate to think how your insurance company would treat a claim for damage or death caused by a home-brewed electrical power scheme. Read the small print!
  15. Jul 3, 2013 #14


    User Avatar
    Science Advisor
    Gold Member

    no not a misunderstanding... as I said, just a guess based on the lack of information.

    and I can only repeat what others have said before and after my comment ... what you are trying to do is very dangerous.

    what folks? where ? can they actually show you a circuit for a design that will work that way ?
    if so... I'm sure the folks here at PF would love to see it to see if it was practical and more importantly ... safe
    we don't work on hearsay, give us links to the recommendations they are giving you

  16. Jul 5, 2013 #15
    Hi Dave,
    As I said, few folks told me that there is no sensing circuit is required and for that please see post #6.
    I am not here to prove anything. I am only looking for engineering solution/help.


  17. Jul 5, 2013 #16


    User Avatar
    Science Advisor
    Gold Member

    To get a proper engineering solution, the precise situation needs to be defined. Of course an 'intelligent enough' device can cope with pretty much anything but that may not be the best way forward. Unless you have absolutely no option not to have a single input, there is no point in further discussing how to solve that problem. Once you have two inputs, the solution becomes proper engineering, imo.
  18. Jul 5, 2013 #17
    Hi sophiecentaur,
    I respect your post. I should stop discussing at this point as I am not moving in proper direction.

    Thank you All for spending time for my post.

  19. Jul 5, 2013 #18


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Sophie' said it all. Perfect last post.

    Thread Closed.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Sensing circuit for AC vs DC voltage
  1. AC vs. DC simulation (Replies: 2)

  2. AC vs DC (Replies: 10)

  3. AC vs DC (Replies: 12)

  4. DC Vs AC parameters (Replies: 6)