Results 1 to 10 of 10

Thread: monitor 24VAC furnace control line using LTV-814 AC opto-isolator

  1. #1
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    1,891

    Default monitor 24VAC furnace control line using LTV-814 AC opto-isolator

    I'm using an LTV-814 AC opto-isolator chip to monitor a 24VAC furnace control line. Here is the schematic.
    Code:
    24VAC ---------o o--------5V
    xformer--10K---o o--1K--o--------08M2  count 1,1000,w6
                   LTV-     |         |
                   814     10K       LCD (T9600_16)
                            |
                            0V
    I'm running the 08M2 at 16mHz in order to be able to have the 9600 baud rate needed for the LCD.

    I have a couple of questions.

    1. The count that I'm getting is 30. Is that really the count for 250 milliseconds because I'm running at 16mHz instead of 4? (As I understand it, the LTV-814 conducts (above the threshhold) on both the positive and negative half-cycles, so the count per second would be 120.)

    2. Is there an easy way with hardware to make this give a reading of "1" until the circuit is no longer conducting? (But what's easier than software--"count 1,1000,w6" as opposed to "if pin1 = 1 then"?)

  2. #2
    Senior Member
    Join Date
    Jan 1970
    Location
    Florida -- USA
    Posts
    328

    Default

    Are you trying to find the duty cycle or ?

  3. #3
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    1,891

    Default

    This circuit was just a test rig to see what I would see when the circuit was conducting. My intention is to use it to monitor whether and which zones in a 3-zone boiler heating system were on and when.

    On/off (closed circuit/open circuit) is all I want to detect. And that is working. I was just wondering about 1) why my count was 30, and 2) what it would take to give me just a 1/0, on/off signal at the picaxe pin.

  4. #4
    Senior Member
    Join Date
    Jan 1970
    Location
    Florida -- USA
    Posts
    328

    Default

    On the 5v side add a 10K series resistor. Between that resistor and the opto make a connection to your Picaxe.

    On the other output of the opto ... get rid of everything and put it to ground common to the Picaxe.

    When the opto turn on it will pull the Picaxe line low ... is that what you're looking for?


    Also, Most of the furnace zone valves have an auxiliary contact already present that will work.
    Last edited by RexLan; 01-03-2013 at 19:50.

  5. #5
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    1,891

    Default

    If I understand what you are saying, it seems to me that that would only invert the signals I am getting now--my count would still be 30 because the connection to 0V would still toggle twice for each cycle of my 60-cycle AC signal (over 250ms in my "count" command because of the 16mHz frequency). It would still be toggling 120 times a second, so that an "if pin1 = 1" would not reliably discriminate between it being off and conducting AC.

    >Most of the furnace zone valves have an auxiliary contact already present that will work.

    Are you speaking of the line which turns the pump on? I assumed it was also AC, and 24V--but I don't really know anything about that.

  6. #6
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    19,769

    Default

    Quote Originally Posted by lbenson View Post
    1. The count that I'm getting is 30. Is that really the count for 250 milliseconds because I'm running at 16mHz instead of 4?
    Perhaps post your code so we can understand what you have. If the count would count for 250ms at 4MHz it will be counting for just 62.5ms at 16MHz. You should be seeing a much lower count than 30 for 50Hz input.

  7. #7
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    1,891

    Default

    Here is my code:
    Code:
    ' 08Count counts input from ltv-814 AC opto isolator
    #picaxe 08M2
    
    symbol LCDpin = 2
    symbol CountPin = 1
    
    symbol rate = T9600_16
    
    symbol loopCnt = b11
    
    setfreq m16
    high LCDpin      ' required per PHA
    pause 5000  ' required per PHA
    
    main:
      do
        count CountPin, 1000, w6
        sertxd(#w6," ")
        serout LCDpin,rate,(#w6," ")
        pause 2000
        inc loopCnt
        if loopCnt > 15 then
          loopCnt = 0
          serout LCDpin,rate,("?x01?y1?f") ' clear and reset serial LCD to line 1, col 1
          sertxd("| ")
        endif 
      loop
    My count time is 1000 (at 16mHz, so I'm thinking 250ms--is that right?). In North America, we have 60Hz AC. The LTV-814 conducts on both the up and down halves of the cycle, but turns off around the zero-crossing points. So it makes sense to me that I have 60 cycles times 2 for 120 half-cycles per second, but at 16mHz with a count-time of 1000 I'm only getting a quarter of a second, or 120/4 = 30, and I +am+ seeing a repeated count of 30. I was looking for confirmation that I was calculating correctly.

    My second question was whether by adding a capacitor or capacitor and resistor, I could smooth out the cycles on the DC side so that I would just get a "1" for as long as the circuit was conducting AC, and a "0" when it ceased to conduct.

    I wanted the LCD display (hence the 16mHz to get a 9600 baud rate on the 08M2) because it wasn't convenient to take my laptop down to the basement where I had access to the 24VAC transformer and lines to the thermostat.
    Last edited by lbenson; 01-03-2013 at 20:57.

  8. #8
    Senior Member
    Join Date
    Jun 2008
    Location
    Texas
    Posts
    786

    Default

    That device has a CTR between 20 and 300%.......wow. It s quite wide.

    Assuming you were unlucky and the unit you got is on the lower end, it means that the current feeding the LED pair has to be 5 times as large as the current being sourced out from the transistor.

    Also...get rid of the 1k resistor. you don't require it, and it is creating a voltage divider to the Picaxe's input. The 10k pulldown is all you need.

    Do you have access to a scope? What do the pulses at the Picaxe's pin 2 look like?
    "Will design analog circuitry for Beer."

  9. #9
    Senior Member
    Join Date
    Jan 1970
    Location
    Colorado USA
    Posts
    2,180

    Default

    Yes use a capacitor - the signal dips to zero as the AC input goes below 2 volts or so on the isolator... the isolator load R should go to V+ I think though I'm not familiar with that particular part.

  10. #10
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    1,891

    Default

    OK, I lugged my laptop and Womai's DPscope to the basement and set up on a board on a stack of summer tires near the furnace. The scope is on the output of the LTV-814, picaxe pin 1.

    It is set up at 5ms per division. The screen shows 20 divisions, so 100ms. There are 12 cycles, which is what I would expect for 60 cycle AC with the LTV-814 conducting on each half-cycle with a break at (near) the zero-crossing points.



    The ripples peak at about 4 volts (the picaxe is powered with 3 AAs).

    Here it is again with a 10uF capacitor on picaxe pin1. The peaks are still around 4V, but sharper, and the valleys are above 2.5V compared to near 0V without the capacitor.



    So the circuit (as shown in post 1) is working as expected, counting at a rate of 120 positive transitions per second (both halves of a 60Hz AC cycle).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •