Replace AC latching relay with Mosfet

Discussion in 'Embedded Systems and Microcontrollers' started by igeorge, Dec 13, 2013.

  1. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    I want to replace the latching relays in a thermostat with mosfet
    I found on the web a sugestion, but i am not sure if it is OK
    At the furnace it is a 24VAC transformer
    One wire come to the thermostat and return by closing the contact in one of the 3 relay
    I am not sure if it is correct to connect the CPU ground with the wire coming from the thermostat
    Please help
     
  2. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    The original thermostat circuit is not referenced to ground.
    It is an isolated circuit unless accidentally grounded.

    The only connection to original wiring is thru bridge as shown.
     
  3. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    I agree, but how i can turn the mosfet on from PIC ?
    Any suggestion ?
    Using optocoupler is not a solution due to very large internal led current 20 mA. Will kill my battery in days.
    Dedicated mosfet drivers are too expensive and no room left on the board
    The whole budget for thermostat is 20 dollars, which include the hardware, lcd and pcb
    Can i connect the ground of mosfets to the ground of cpu ?
    If yes, how i can protect the cpu side ?
     
  4. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    How about a latching circuit with a MOC3023 (triac out) in stead of the bridge?

    High pulse latches on.
    Low pulse latches off.
    Updated per your requirements.

    Needs a few ma. But for a short duty cycle.

    ps.
    Are you sure you need "protection" on ground?
    How about a high impedance ground connection?
     
  5. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    High value resistor maybe?:confused:
     
  6. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    Thank you Inwo for update
    As you can see, analog it is a virgin territory for me
    First i try to explain that the whole circuit, without the driving part is 2-3 µA.
    mA it is a huge consumption. The system run on 3XAA batteries which needs to last at least a year. Then, when the main is gone, it is kept alive by a cr2032, which must last for at least 2 month ( assuming that is nobody around to see the LCD blank and the battery icon on).
    On cr2032 , the system is in deep sleep and update itself 4 times per hours in the winter ( to keep the house warm and prevent the pipes freezing)
    In the summer, it just stay in sleep, waiting for battery to be replaced.
    As i was told, with mosfet is almost no consumption - but i am not sure as i do not know the.
    Do you have a hand drawing with a proposed solution ?
    Thanks
     
  7. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Actually I like your idea.:)

    I can't see a problem with a common ground can you?

    Seems if you are concerned. Connect the driver thru the 10k as shown, and the grd thru a 10k also.

    The .1 cap across the input as shown should be a good start. In another thread a protective zener from gate to ground was suggested.

    If we keep this thread current someone who knows a lot more than I will opine.
     
  8. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    In fact is not my idea.
    I did search and read so much lately, and i cannot remember were i saw it first time
    All i did is to implement it instead of each relay
    I hope too, that someone which is a guru on analog can help me
     
  9. cravenhaven

    Member

    Nov 17, 2011
    34
    2
    If you used another bridge from the 24VAC just to power the micro (filtered and conditioned to 5/3V) then forget the battery. It would be a very small power requirement.
     
  10. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    Thanks cravenheaven, but this is not possible.
    I am looking to make a commercial product which does not require user rewiring the house.
    Just use the existing wiring and replace an old thermostat
    Sorry but i cannot use your suggestion even is excellent
     
  11. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    That makes so much sense. Although:
    Design may have to be universal. Not all thermostats have the "C" terminal brought to the wall.

    What OP is showing as "C" is really "red". The transformer phase, returned to the furnace, to power relays. The other phase, common to the relays is not allways available.

    Op should let us know what requirements are cut in stone.

    Anyone see a problem with a common ground (common)?
    Seems fine to me.
    And of course with the above suggestion it will be "common ground" unless a 24vac transformer is in the picture.
     
  12. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    inwo, you are right
    here is a most common 4 wire system diagram
     
  13. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,791
    1,103
    You should be able to draw a small current via the FET drain terminals without activating the loads that would normally be switched by the thermostats. That current can charge a cap to provide a supply voltage for your electronics. A diode OR arrangement would enable a back-up battery to take over only in the event of mains failure.
    I don't see a problem with a common ground either, if the transformer provides mains isolation.

    Edit: If you want a battery-power-only circuit, bear in mind that when a load is switched on its FET will require a gate charge current pulse twice per mains cycle; which could add up to a significant current drain.

    Edit: Scrub that edit.
     
    Last edited: Dec 14, 2013
  14. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    Hi Alec,
    On your post you developed 2 scenarios.
    The first , is stealing the power from the wire going to drain . do you have a link, drawing or a hand sketch how to do it ?
    The second you said about gate using power while fet is on
    I was under the impression that this current is in the range of micro or nano Amps. Am i wrong in my assumptions ?
    Maybe fet is not the right solutions and i have to go back to relays, which will kill the project due to cost.
    Let's resume why i want to make a thermostat. Everybody make them
    Even more advanced with WIFI and web enabled control from office or from Iphone. They are better than mine. The only advantage for mine is the cost. I use only 1 microprocessor , LCD, and few components around (r and c). My goal is to make it under 20 dollars my cost and lower if i manufacture it in China in mass production (maybe 10 to 13 dollars)
    At this price i can try to sell it to home builder companies which can install it in new homes. Mine has through the software all the features of the top of the lines thermostat, but at a fraction of cost.
    But i cannot ask the home builder to change in his project wiring, because they have standard approved drawing and any change will require new approval, time and cost. So i have to make it universal for standard or most common 4 wires system
     
  15. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Do you have extra io available?

    Getting back to my latching idea.
    Output-1=off
    Output-2=on
    etc.

    No I don't have a drawing. Only idea.
    Latch is only thing not drawing current from supply.

    Alec_t may be able to estimate fet gate current for you. I'm no fet guy! :(
    Seems the right device could be really low.

    If it is. Use common ground and you're in.:)

    Here is lowest isolated fet driver I could find. http://cds.linear.com/docs/en/datasheet/1177f.pdf

    Still a half ma. though.

    On another thought:
    Somewhere I have a drawing for a flip-flop scr latch. If it could stay latched thru full cycle of ac......................................
     
  16. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    Hi inwo,
    the chip looks good, but i have to contact linear Monday for a replacement
    It is obsolete, and nobody sell it
     
  17. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,791
    1,103
    Forget having to charge/discharge the FET gate capacitance twice per cycle: I didn't have my thinking cap on straight :rolleyes:.
    What voltage does the FET have to switch/withstand? Finding a FET with a high voltage rating and low Rds_on may be difficult and/or expensive (more expensive than a latching relay).
     
    Last edited: Dec 14, 2013
  18. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    The max voltage for north America is 110 VAC at 2 amps
    The existing relays contacts are rated at 2 amps
     
  19. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,791
    1,103
    110VAC has a peak voltage of approx 155V, so IMO you'd need a FET rated for >> 200V. You'd also have to allow for spikes/surges on the mains which could exceed that, so spike suppression components would have to be added. Relays look to be the cheaper option :).
     
  20. igeorge

    Thread Starter Active Member

    Jul 2, 2010
    34
    0
    Thank you Alec, but latching relays are 6-7 dollar a piece, i need 3, so 18 dollars is out of my budget
     
Loading...