Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

low cost sensing low voltage AC

Status
Not open for further replies.

justDIY

Active Member
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.
 

mramos1

Active Member
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.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
justDIY said:
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? :D
 

mramos1

Active Member
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.
 

Tarsil

New Member
BTW...can u use a voltage divider and the ADC from a cheap uC like 12F683 working at 20MHz?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Tarsil said:
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.
 

Tarsil

New Member
Nigel Goodwin said:
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.
 

mramos1

Active Member
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.
 

justDIY

Active Member
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?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
justDIY said:
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.
 

Tarsil

New Member
mramos1 said:
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:D.
 

justDIY

Active Member
kamdy said:
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!
 

Rolf

Member
DIY Opto Isolator...........

kamdy said:
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
https://www.alldatasheet.com/datasheet-pdf/pdf/32445/TOSHIBA/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. ;-)
https://www.pbase.com/sinoline/rf_remote_iii
 

alternety

New Member
May I suggest that you ought to get the boiller serviced by a competent professional instead of what you are trying. It is broken. Other things may be broken. These things have a serious potential to do bad things to the house and people in them if they malfunction.
 

Hero999

Banned
I wouldn't call it a solid state relay sisnce it can't switch any real power. An optoisolator would be a better name for this.
 

philba

New Member
alternety said:
May I suggest that you ought to get the boiller serviced by a competent professional instead of what you are trying. It is broken. Other things may be broken. These things have a serious potential to do bad things to the house and people in them if they malfunction.

This is very good advice in general but reality often interposes itself. I have a very cranky boiler/radiator system and have found the limiting issue is finding competent service people. My boiler is all of 5 years old and 3 different high-end outfits were all basically clueless, bordering on dangerous (one bypassed a ventilation safety switch). In several instances they did downright incompetent things - like cut off a pressure sensor so it would fit in the pipe and didn't even program the controller at all. I have been forced to become an expert on my system (Viessman - a very high-end system) because of this. They are very good and prompt at billing, though.

If the system is designed to emit a warning, then it's good. If you are doing homebrew control, I'd say don't do it.

The AC opto is a good solution because it isolates the digital section. You will basically get a 120 hz (or 100 hz) zero crossing pulse train. I wouldn't bother rectifying the voltage - just take the ac into the opto (with appropriate resistor). In the micro use the ZC pulse as a interrupt, set an AC_GOOD flag and reset a timer for something longer than the pulse period. The timer interrupt clears the AC_GOOD flag. If the AC goes away, the flag gets cleared. When there is AC, the flag never gets cleared. Timer interrupt can be used as the "AC Off" event. Minimal components. H11AA is a good choice. It costs around $.50 from Mouser.
 

alternety

New Member
Finding a competent person is indeed hard. Try heatinghelp.com. They have a list of contractors that are probably way better than a random yellow pages selection. There seems to be a bunch of steam people there.

If someone shows up and says your dilithium crystals are shot; look elsewhere.
 

justDIY

Active Member
replacing the heating plant isn't my call, it is not my house - I have forced air with its own set of problems.

getting someone in to repair this unit would cost more than replacing the unit - it should have been done a decade ago or more, but like I said, not my call

I tried the search on that website, set to maximum scan range, and no results came back. I'm sure there are towns more isolated in the greater 48 than my town, but this area does pretty good at staying isolated.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top