Shop OBEX P1 Docs P2 Docs Learn Events
Detecting 24 volts — Parallax Forums

Detecting 24 volts

JerryBJerryB Posts: 10
edited 2004-11-26 20:47 in BASIC Stamp
Hi all,
Ive just had·a propane furnace installed and I want to estimate when the propane tank is near empty by measuring the amount of furnace run time.· One method I thought might work is to detect the 24 volts ac used to activate the gas valve. How can I detect the 24vac with my bs2?

Jerry

Comments

  • KenMKenM Posts: 657
    edited 2004-11-25 05:41
    There are many different ways to interface the 24 VAC to a signal the stamp can understand.

    One method would be to connect the 24 VAC to a full wave bridge rectifier, and connect a large electrolytic capacitor on the output of the bridge recitifier.

    This will give you about 23 volts DC. The 23 volts DC·could then be used as the input to a 7805 voltage regulator, and the 7805 regulator has its normal caps on the input and output side. Lastly, put some load on the regulator output, like 4.9 k ohms or so.

    Now when the 24 vac is present, the 7805 regulator will output 5 volts, and when there·is no 24 VAC the 7805 output will be 0 volts, two values the stamp can easily deal with.

    A second thought is to feed the 23 volts DC into an opto isolator, and the transistor side of the opto to the stamp input pin with a pull-up resistor.
  • Dave PatonDave Paton Posts: 285
    edited 2004-11-25 06:05
    Mmm...if it's a full wave bridge, you'll end up with 1.414*Vac-1.4V, or about 32VDC with no load on the line, since a normally sized bulk capacitor will keep the output voltage around the peak of each rectified wave.

    As for a solution, if it were me, I'd go with the optoisolator. Cheap, easy, three parts, no worries. You could probably fit the whole thing in a film can if you wire carefully.

    -dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    This is not a sig. This is a duck. Quack.
  • JerryBJerryB Posts: 10
    edited 2004-11-25 14:12
    Thanks Dave and Ken,
    I like the optoisolator route. Simple things appeal to me. Is this optoisolator something Radioshack would carry? If not maybe from jameco. Would you have a part No?
    Jerry
  • Alan BradfordAlan Bradford Posts: 172
    edited 2004-11-25 15:02
    Hi,

    The optoisolator route is the easiesy way to go. A good old 4N25 type shoulod do you nicely. Everyone sells them (Although I do not know if they are stocked at 'The Shack')

    Use a 1.1k to 1.5k series reaistor on the input side of the opto and you will be able to sense the on and off cycles to the solenoid. Put a diode reversed across the input pins of the opto to bypass any spikes the solenoid may have when turning off. A 1N4007 or any high PIV diode will work.

    You will also need a pull up resistor on the stamp input pin. I usually use a 100k resistor.

    Good Luck.

    Alan Bradford

    Plasma Technologies

    smhair.gif
  • JerryBJerryB Posts: 10
    edited 2004-11-25 15:06
    After a google search looks like I could use a PS2505-2. I assume I would tie the 24vac to the input thru an appropriate resistor and treat the output as a switch closure.
  • JerryBJerryB Posts: 10
    edited 2004-11-25 15:09
    Allan,
    I'll take a look today, if I can find anyone open, for a 4N25. Thanks for the help.

    Jerry
  • KenMKenM Posts: 657
    edited 2004-11-25 15:45
    Dave is correct.....my bad on the 23 volts....
    Dave Paton said...
    Mmm...if it's a full wave bridge, you'll end up with 1.414*Vac-1.4V, or about 32VDC with no load on the line, since a normally sized bulk capacitor will keep the output voltage around the peak of each rectified wave.

    As for a solution, if it were me, I'd go with the optoisolator. Cheap, easy, three parts, no worries. You could probably fit the whole thing in a film can if you wire carefully.

    -dave

  • Larry~Larry~ Posts: 242
    edited 2004-11-25 16:23
    This is something you can try today with parts on hand

    http://www.aaroncake.net/circuits/supply5.htm

    And yes there will be a lot of people saying not to do it
    but you are working with 24 volts not 120 / 240 for which
    it will work also.
  • Larry~Larry~ Posts: 242
    edited 2004-11-25 16:25
    One more thing before starting with the electronics on a propane furnace
    CHECK FOR LEAKS FIRST
  • BeanBean Posts: 8,129
    edited 2004-11-25 16:27
    I would just use a resistor voltage divider then a single diode and cap.

    If you run 23VAC thru a 5.6K resistor then a 1K across that will give you about 3.5 VAC then thru a diode(3.5*1.415-0.7) and cap you should get about 4.25V.
    ··················· 5.6K······914 DIODE
    AC In
    \/\/\/\
    |>
    To Stamp Pin (input)
    ······························ |········· |························ |
    ····························· \·········· |························ \
    ····························· /········
    ·· 1UF CAP···· /··· 4.7K
    ··························1K \·········/---\···················· \
    ······························/·········· |························ /
    ······························ |········ ·|························ |
    AC In
    Stamp GND
    Bean.

    Post Edited (Bean) : 11/25/2004 4:33:40 PM GMT
  • Larry~Larry~ Posts: 242
    edited 2004-11-25 16:29
    http://www.aaroncake.net/circuits/supply5.htm


    I guess all of this could be done at the thermostat inside the house

    Larry Gaminde
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-11-25 16:48
    I would probably use an Opto-Isolator...A simple resistor would limit the current to the LED, and the output would be TTL compatible.· Not to mention isolation from high voltage.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • ionion Posts: 101
    edited 2004-11-26 04:42
    Maybe it will be a better ideea to just use a miniature 24VDC coil relay. It will completly isolate the furnace line from any outside interference, it will not put the 24VDC power supply on short if anything goes wrong, and you can use the 5VDC from the stamp feeded back through the normal open contacts of the relay. Furnance ON = Relay ON = 5VDC input to stamp.
    This is my safety 100% proof taught.
    Ion
  • JerryBJerryB Posts: 10
    edited 2004-11-26 12:48
    Thanks for all the good suggestions...
    The furnace is a 2 stage unit with 4 dampers and 3 thermostats and a control box. I'll be getting my signal from the control box. The installer showed me the terminals I could use to pick up the signal for each stage (24vac). I couldn't get an opto-isolator yesterday(closed) but I'll check on it today. If not then I'll try the voltage divider circuit on a breadboard to see how it works.

    Bean, how do I select the resistors for the divider? Could I use higher value resistors as long as the ratio is approx the same, ie 10k and a 2k?

    The installer will be back on monday to fire up the furnace and tweak the system and I plan on having my circuit and display ready then.

    The propane tank is a 100# unit and I think I will get about 35 +/- hours of run time from it.

    Jerry
  • Alan BradfordAlan Bradford Posts: 172
    edited 2004-11-26 14:23
    Hi,

    The voltage divider method has its drawbacks.· You are trying to reference an AC voltage to a regulated 5 volt DC circuit. It is easy to get ground loop problems. This can cause erratic operation of the Stamp and possible damage to the circuit.

    Isolation is the safest way to avoid the problems. The relay method will work as well as the optoisolator. Radio Shack does sell 24 VDC relays. If you put a diode in series with the coil it will work on AC just fine. (THis is how they make AC relays, they hide a diode in the coil.)

    Anotherr problem with viltage dividers is if one resistor opens or you have a bad connection, not only will the circuit not work, but you will put the full 24 VAC on the input pin of the stamp and damage it. (Been there, done that, and got the T-Shirt).

    I use voltage dividers for sensing 100-500 VDC in my products, and it takes lots of filtering and attention to components and construction to avoid problems.

    Good Luck,
    Alan Bradford
    Plasma Technoloogies


    ·
  • Harry StonerHarry Stoner Posts: 54
    edited 2004-11-26 20:47
    If you want to be really simple about this, use a step up transformer to 120V and connect an old analog clock that has a date on it. Set it for 12AM Sunday and by 11AM Monday (as shown on the clock) your tank will be empty.

    Harry
Sign In or Register to comment.