+ Reply to Thread
Page 1 of 2
1 2 Last
Results 1 to 15 of 23

Thread: low cost sensing low voltage AC

  1. #1
    justDIY Good justDIY Good
    Join Date
    Mar 2005
    Location
    Michigan, USA
    Posts
    1,725

    Default low cost sensing low voltage AC

    I'm trying to design a monitor circuit for my folks steam boiler furnace. For whatever reason, when the weather changes, the boiler demands water and then the internal valve gets stuck on... the boiler eventually overfills, filling the steam registers and it's a BIG MESS

    so I'm going to throw a microcontroller and a liquid flow sensor at the problem.

    The uC will monitor the thermostat circuit - when the thermo requests heat, the uC will switch on an external valve and monitor the water flow. When the boiler is operating normally, it doesn't need water but every few days, but the internal safety system needs to see water pressure, otherwise the boiler won't fire. The thermostat circuit is 24vac.

    So what I need to do is detect when the thermostat circuit is closed, and pass that information to a uC, which will open a valve, monitoring the water flow, and shut down the valve if it flows for more than a few seconds.

    How do I read 24vac with a 5vdc microcontroller?

    I don't think there is much current involved in the thermostat circuit, as far as I can tell, a relay in the thermostat closes the circuit when it calls for heat, and that in turn completes a circuit for the gas valve ... a steam pressure sensor and a water pressure sensor are in series with that circuit and are normally closed except when their values are out of bounds (steam pressure too high, water pressure too low).. as far as I can tell, there are no "electronics" in the furnace, its from the mid 1900's.
    If you don't have a planet, what good are gold bars?

    want to contact me directly? gmail gordonthree
    check out my project website: http://projects.dimension-x.net
    Favorite numbers:
    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  2. #2
    mramos1 Excellent mramos1 Excellent mramos1 Excellent mramos1 Excellent
    Join Date
    Sep 2005
    Location
    Boynton Beach, Florida USA
    Posts
    2,259

    Default

    You will need to a bridge rectifier and a voltage divider. Not too bad. Convert the AC to DC and drop it so you can read it on the microcontroller.

  3. #3
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,791

    Lightbulb

    Quote Originally Posted by justDIY
    So what I need to do is detect when the thermostat circuit is closed, and pass that information to a uC, which will open a valve, monitoring the water flow, and shut down the valve if it flows for more than a few seconds.

    How do I read 24vac with a 5vdc microcontroller?
    Just rectify it, add a smoothing capacitor, then a series resistor to feed the PIC I/O pin - make sure the pin you use has protection diodes, most do!. Calculate the resistor to give a suitable current using ohms law, you only need a mA or so - or even less (so, 36 v = 36kohm for 1mA). You will also need a resistor across the smoothing capacitor, to discharge it when switched off, the small current through the limiting resistor won't be enough.


    its from the mid 1900's.
    You mean like 1905?
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  4. #4
    mramos1 Excellent mramos1 Excellent mramos1 Excellent mramos1 Excellent
    Join Date
    Sep 2005
    Location
    Boynton Beach, Florida USA
    Posts
    2,259

    Default

    Sorry, did not mention the caps to smooth out the AC.. Was assumed when one talks microcontrollers they knew that. Thanks Nigel.

    Also, years from now the mid 1900's will be 1950.

  5. #5
    Tarsil Newbie
    Join Date
    Jul 2006
    Location
    Timisoara, Romania
    Posts
    290

    Question

    BTW...can u use a voltage divider and the ADC from a cheap uC like 12F683 working at 20MHz?
    If is too complicated.....most of the times is the wrong way.

  6. #6
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,791

    Default

    Quote Originally Posted by Tarsil
    BTW...can u use a voltage divider and the ADC from a cheap uC like 12F683 working at 20MHz?
    Yes, the speed makes no difference - you also don't need a voltage divider, just a single resistor in conjunction with the protection diodes - although a divider won't do any harm.

    But why would you want to use an ADC?, all you're looking for is ON or OFF.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  7. #7
    Tarsil Newbie
    Join Date
    Jul 2006
    Location
    Timisoara, Romania
    Posts
    290

    Default

    Quote Originally Posted by Nigel Goodwin
    Yes, the speed makes no difference - you also don't need a voltage divider, just a single resistor in conjunction with the protection diodes - although a divider won't do any harm.

    But why would you want to use an ADC?, all you're looking for is ON or OFF.
    Wel if the speed doesn't mater u can use a uC at 8MHz (not with external clock like in my orig idea) and 1or2 resistors. Simpler circuit then rectifier, smoothing cap etc.
    If is too complicated.....most of the times is the wrong way.

  8. #8
    mramos1 Excellent mramos1 Excellent mramos1 Excellent mramos1 Excellent
    Join Date
    Sep 2005
    Location
    Boynton Beach, Florida USA
    Posts
    2,259

    Default

    Tarsil. Use the f683 at 31Khz with the internal OSC. Use a serial resistor. It will save parts and and draw less current. No ADC required.

  9. #9
    justDIY Good justDIY Good
    Join Date
    Mar 2005
    Location
    Michigan, USA
    Posts
    1,725

    Default

    thanks for the know-how mramos and Nigel ... I'll toss something on a breadboard and test it out tomorrow.

    would a half wave rect suffice, combined with the smoothing cap? I'm not lookin for ultrapure DC here, and like you all said, there's minimal current involved here, even a small cap should hold up during the crossing?

    the uC i'm thinking about using will either be a 16F 628a or a 630, depending on how many I've got of either left in storage... I know they have internal protection diodes on the digital inputs, would an external pair help or hurt, as extra insurance?
    If you don't have a planet, what good are gold bars?

    want to contact me directly? gmail gordonthree
    check out my project website: http://projects.dimension-x.net
    Favorite numbers:
    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

  10. #10
    kamdy Newbie
    Join Date
    Mar 2006
    Location
    Baghdad Iraq
    Posts
    52

    Default

    Hi
    I think it is better to use an AC opto isoltator to detect when the thermostat circuit is closed. You only need a series resistor to limit the current in the photo diode and a load resistor for the photo transistor . The following web address is a datasheet of TLP620 which i have used to read AC signal and convert them to 5V
    http://www.alldatasheet.com/datashee...BA/TLP620.html
    Last edited by kamdy; 5th November 2006 at 07:12 AM.

  11. #11
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,791

    Default

    Quote Originally Posted by justDIY
    would a half wave rect suffice, combined with the smoothing cap? I'm not lookin for ultrapure DC here, and like you all said, there's minimal current involved here, even a small cap should hold up during the crossing?
    Should be fine!


    the uC i'm thinking about using will either be a 16F 628a or a 630, depending on how many I've got of either left in storage... I know they have internal protection diodes on the digital inputs, would an external pair help or hurt, as extra insurance?
    Won't help, but it won't hurt either.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  12. #12
    Tarsil Newbie
    Join Date
    Jul 2006
    Location
    Timisoara, Romania
    Posts
    290

    Default

    Use a 12F683..is much cheaper.
    If is too complicated.....most of the times is the wrong way.

  13. #13
    Tarsil Newbie
    Join Date
    Jul 2006
    Location
    Timisoara, Romania
    Posts
    290

    Question

    Quote Originally Posted by mramos1
    Tarsil. Use the f683 at 31Khz with the internal OSC. Use a serial resistor. It will save parts and and draw less current. No ADC required.
    No adc required?...I'l use the comp or just a usual digital imput? In that case i can use a puny PIC like 12F629.
    If is too complicated.....most of the times is the wrong way.

  14. #14
    justDIY Good justDIY Good
    Join Date
    Mar 2005
    Location
    Michigan, USA
    Posts
    1,725

    Default

    Quote Originally Posted by kamdy
    I think it is better to use an AC opto isoltator to detect when the thermostat circuit is closed. You only need a series resistor to limit the current in the photo diode and a load resistor for the photo transistor .
    interesting ... it looks like a DC opto, but with an extra LED along for the ride. I imagine a DC opto would work as well, just add a reverse diode externally, to protect the led from reverse voltage... except the led is going to be pulsing with the zero crossing event, so I'd need to rectify and add a smoothing cap and etc.

    I'll try both the straight in and dc opto methods ... I haven't seen any double-diode isolators for sale in my available surplus shops, so I'll use a single with an external diode.

    thanks all!
    If you don't have a planet, what good are gold bars?

    want to contact me directly? gmail gordonthree
    check out my project website: http://projects.dimension-x.net
    Favorite numbers:
    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

  15. #15
    Rolf Good Rolf Good Rolf Good
    Join Date
    Jun 2006
    Location
    E. Tennessee, USA
    Posts
    652

    Default DIY Opto Isolator...........

    Quote Originally Posted by kamdy
    Hi
    I think it is better to use an AC opto isoltator to detect when the thermostat circuit is closed. You only need a series resistor to limit the current in the photo diode and a load resistor for the photo transistor . The following web address is a datasheet of TLP620 which i have used to read AC signal and convert them to 5V
    http://www.alldatasheet.com/datashee...BA/TLP620.html
    Here is one I made some time ago. Just grind (file) the end of a LED flat and glue on a Cadmium Sulfite photo cell. Data Sheet is not available at this time. ;-)
    http://www.pbase.com/sinoline/rf_remote_iii

+ Reply to Thread
Page 1 of 2
1 2 Last

Similar Threads

  1. Voltage
    By ElectroMaster in forum Electronic Theory
    Replies: 44
    Latest: 8th August 2007, 05:35 PM
  2. I am not getting ripple voltage at the output
    By dar2525 in forum General Electronics Chat
    Replies: 3
    Latest: 14th July 2005, 02:21 PM
  3. voltage regulation by temp
    By theboss in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 30th May 2004, 07:30 PM
  4. convertion of acvoltage to high dcvoltage
    By panchumarthy in forum Electronic Projects Design/Ideas/Reviews
    Replies: 8
    Latest: 12th December 2003, 01:36 PM

Tags for this Thread