Arduino - Smoothing capacitor for 24vac (thermostat)?

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: StokerDon On: Tue Dec 27, 2016 12:42 pm

CoalisCoolxWarm wrote:But about 8 times out of 100 it will flip-flop on the Arduino side. Yes, I've debounced the digital input, which does make it better, but it's my thermostat detector and I want it 100%, not turning on a zone for 1 sec as it cycles through the loop :shock:

Obviously I have chosen the optoisolator IC instead of rectifying and then dividing the voltage and I'd like to stay with this method...

The problem is, this is alternating current you are trying to detect with a digital circuit. Those LEDs in the optoisolator are flashing on and off 60 times per second no matter how much you smooth the AC. I recommend rectifying the AC. This is the only way to guarantee a HI level at the microcontroller input.

I applaud your efforts on this front! A few years ago I asked the forum if anyone had done this and no one responded.

I would leave the old aquastat in place for a backup. The Arduino is a versatile little device but reliability is not its strong point. It is meant to do circuit development so you can iron out your final circuit.

Good luck,

-Don
StokerDon
 
Stoker Coal Boiler: BairMatic BMC-500 with Van Wert VA400 Stoker, Gentleman Janitor GJ-671/EFM S-15 stoker, Van Wert VA-600
Hand Fed Coal Furnace: Harman SF3500
Coal Size/Type: Rice and Chestnut
Other Heating: Noth'in but COAL! Well, Maybe a little tiny bit of wood


Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CoalisCoolxWarm On: Tue Dec 27, 2016 2:34 pm

Great comments and questions!

Yes, this is the foundation for my daughter's STEM project/Independent Study. But that doesn't mean it can't be practical and useful, too ;)

The main purpose of designing the Tstat detector in this manner is so it can all be wired in parallel, 100% independent of the existing controls.

It will be running and triggering a bank of relays for each zone, boiler component, etc. But initially they will not be connected to anything, just trigger and light an LED, while recording everything for analysis.

It should be able to replace a triple aquastat's functions, but not sure if we will replace it with the Arduino or not. There may be a new port drilled into our boiler in the future, LOL.

We also have another, old manual stoker from the early 80's that may get setup in a test environment. Chain and sprocket drive auger. Always had trouble back then with it going out or pushing the fire off the bed.

Our approach uses the premise that we WILL use it to monitor and then control our entire system. As you know this requires a high level of care and reliability, then an evaluation before making it live. That process in itself is a good skill to teach.

From my side, I would ask that any and all of you feel free to engage and comment, but remember that my teenage daughter will start being involved in these Arduino threads. Please don't bring any of the political stuff into them, we can debate our positions over there ;)

The end goal is to bring a product to market- either an entire system or certain components. Whether they will be practical or actually be produced remains to be seen, but part of the exercise is to take her through the design, R&D, Q&A, pitching to "investors," marketing, production, etc. Real or virtual, she will benefit.

It would be really cool if she ends up with a real product, but that's not part of the requirement.

At least that's the plan....

I just wish I had more expertise in some areas so I could have told her, "Put a 1uF capacitor here to smooth the signal," and been confident in that solution.

So if there's an interest, I will get her started on documenting her journey, and have her write some posts? As we all know, posting on a forum is a tricky bit. She won't be posting in the political forums, LOL.
CoalisCoolxWarm
 
Stoker Coal Boiler: Keystoker KA-6
Hand Fed Coal Furnace: old Sears rebuilt, bituminous- offline as of winter 2014
Coal Size/Type: Anthracite Buckwheat
Other Heating: Oil Boiler

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: titleist1 On: Tue Dec 27, 2016 2:50 pm

I think its a great project. She should end up with a good understanding of a home heating system which is very practical and will always be useful....unless she moves to FL in which case she can apply what she learns to an AC system!

CoalisCoolxWarm wrote:I just wish I had more expertise in some areas so I could have told her, "Put a 1uF capacitor here to smooth the signal," and been confident in that solution.


Its good that she needs to research and experiment a little rather than get an easy answer from you, its what i call 'learning to learn' which can be applied to any life experience. Most of the time i won't give my kid or other kids i happen to work with on stuff the answer but will say where it can be found.....They think its a teaching method but half the time its because i can't remember!! :shh:

Have her document it...it'll be interesting to read and help document the work.
titleist1
 
Hot Air Coal Stoker Stove: Harman Mag Stoker (old style) one in basement, one in workshop
Hand Fed Coal Stove: Harman Mark III on standby for long power outages
Coal Size/Type: Rice/Anthracite; Nut/Anthracite

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: StokerDon On: Tue Dec 27, 2016 6:27 pm

So, Where are you connecting to the thermostat? If you are just looking across the 2 wires that go to the thermostat, you will see 24 VAC only when the T-stat is open (Not calling for heat). When it closes (heat call) there will be a short, 0.0 VAC.

Which Arduino are you using and do you have a schematic of the circuit?

-Don
StokerDon
 
Stoker Coal Boiler: BairMatic BMC-500 with Van Wert VA400 Stoker, Gentleman Janitor GJ-671/EFM S-15 stoker, Van Wert VA-600
Hand Fed Coal Furnace: Harman SF3500
Coal Size/Type: Rice and Chestnut
Other Heating: Noth'in but COAL! Well, Maybe a little tiny bit of wood

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: warminmn On: Tue Dec 27, 2016 6:45 pm

Your losing me on most of this, but may I suggest calling mouser or digikey as to the voltage size of capacitor and type of diode they may recommend. You may have to old school think them with 1960's technology. And use heat sink resistors and plenty of fuses or breakers, but you probably already know that. other than that, as Schultz used to say, I know nothing :lol:
warminmn
 
Hand Fed Coal Stove: Chubby Junior, Efel Nestor Martin, Frankenstove
Coal Size/Type: nut and stove anthracite. Soft coal
Other Heating: wood

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CoalisCoolxWarm On: Tue Dec 27, 2016 10:52 pm

Thanks for the feedback and encouragement, fellas!

My daughter is excited to get moving on this...as am I ;)

warminmn- I talked to Mouser when spec'ing parts. Nice enough, but the glazing was audible. Could be my fault, though. I'm ordering from another place now at much better pricing but with minimums. They are very good prices, but support is...not what they are about either.

I've designed some pretty big stuff in years past, but always had someone else to work out the electrical component level. Guess this is payback, LOL.

Don- I'm setup to connect a single pair of wires to anywhere in the thermostat circuit. I've tested at the zone controller and directly piggy-backed to the posts inside a thermostat. I'm not too concerned about the HIGH/LOW reversals in the circuit yet. The IC already results in an inversion, but the pullup resistors will likely reverse that. Whatever circuit I end up with, I use a system variable to define Tstat open or closed as high or low, so I'll set the definitions based on the final circuit.

It might all change in the end product anyways when we test for initial system condition and failure defaults. In other words, make sure relays default to off on startup, systems power down to zero state when there is a system failure (ie power failure), recovery state (when electronics keep power but power outage), stuff like that. I don't even want to think about that part yet...LOL.

Our test setup just has 24vac input, through a pair of resistors into an IC, then a digital pin and GND pin to the matching legs on the IC, with pullup resistors enabled on the ATMega2560. We ran out of memory quite quickly on the Uno.

The full build (on a separate board, one tech worked out and then added at a time) has I2C LCD, 16 relay board, I2C RTC and lots of code. When we had this sensing problem, we moved it to a separate board to simplify the testing and output to narrow down the problems.
CoalisCoolxWarm
 
Stoker Coal Boiler: Keystoker KA-6
Hand Fed Coal Furnace: old Sears rebuilt, bituminous- offline as of winter 2014
Coal Size/Type: Anthracite Buckwheat
Other Heating: Oil Boiler

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CoalisCoolxWarm On: Tue Dec 27, 2016 10:54 pm

BTW, I am used to using "i" vs "we" when talking about projects, being used to shielding my daughter from any type of public discussions. So if I do that, it's probably a factor of trying to concentrate on the content vs the pronouns ;)
CoalisCoolxWarm
 
Stoker Coal Boiler: Keystoker KA-6
Hand Fed Coal Furnace: old Sears rebuilt, bituminous- offline as of winter 2014
Coal Size/Type: Anthracite Buckwheat
Other Heating: Oil Boiler

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CapeCoaler On: Tue Dec 27, 2016 11:21 pm

Bravo...
Its good that she needs to research and experiment a little rather than get an easy answer from you, its what i call 'learning to learn' which can be applied to any life experience. Most of the time i won't give my kid or other kids i happen to work with on stuff the answer but will say where it can be found

No matter what you need to learn...
you always must have the ability to learn...
It is a process..
A skill...
That will reward you your entire life...
And sadly is not really taught well if at all in a regular school...
Looking back at my younger years...
It was those who taught me the R&D and how to ferret things out...
That gave me lifelong skills that were applicable to most any thing...
Those who let me off easy and gave me the answers with little or no work...
Did the greatest disservice to me...
My grandfather would go with me and let me play in the stream behind their house...
I would have to figure things out and he was pleased when I succeeded...
But would also smile and encourage me to try again...
when I failed...
Never giving me the answer but pointing me in the general direction...
Because he knew it was not really a failure at all...
But a chance to analyze and try again from a different perspective...
He was a civil engineer and CEO of a dredging company that worked on small projects...
Kennedy Airport, Suez Canal, Aswan Dam...
CapeCoaler
 
Stoker Coal Boiler: want AA130
Hand Fed Coal Stove: DS Machine BS#4, Harman MKII, Hitzer 503,...
Coal Size/Type: Pea/Nut/Stove


Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CoalisCoolxWarm On: Wed Dec 28, 2016 12:17 am

Sounds like coal people are also those who value education and learning, not simply repeating memorization.

Good. There is hope for this next generation after all :up: :clap:
CoalisCoolxWarm
 
Stoker Coal Boiler: Keystoker KA-6
Hand Fed Coal Furnace: old Sears rebuilt, bituminous- offline as of winter 2014
Coal Size/Type: Anthracite Buckwheat
Other Heating: Oil Boiler

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: northernmainecoal On: Wed Dec 28, 2016 8:51 am

While 99% of this is Greek to me, I do find it interesting. I am wondering though is this something a Raspberry Pi could be used to accomplish through coding instead of designing a circuit? might be a dumb question...idk
northernmainecoal
 
Stoker Coal Boiler: EFM 520
Hand Fed Coal Stove: Hitzer 30-95
Baseburners & Antiques: Herald Baseheater #6
Coal Size/Type: Rice/Nut/Stove

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CoalisCoolxWarm On: Wed Dec 28, 2016 9:17 am

northernmainecoal wrote:While 99% of this is Greek to me, I do find it interesting. I am wondering though is this something a Raspberry Pi could be used to accomplish through coding instead of designing a circuit? might be a dumb question...idk


The RPi will likely be the "logger" and interface, but each has its own strengths.

The RPi is a full operating system. It loads, shuts down, writes temporary files...gets corrupted if not shutdown gracefully, etc.

The Arduino is an appliance. It runs from ROM, almost no booting delays, and is designed to run continuously.

We have both and have decided to use the Arduino for the electronic controls part, but most likely the RPi for the friendly web style interface and connection.

In other words, the Arduino is more of a "do-er" and the RPi a "thinker"

They do overlap in capabilities and although you can user either, this is the strategy we're planning...for now ;)
CoalisCoolxWarm
 
Stoker Coal Boiler: Keystoker KA-6
Hand Fed Coal Furnace: old Sears rebuilt, bituminous- offline as of winter 2014
Coal Size/Type: Anthracite Buckwheat
Other Heating: Oil Boiler

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: Yanche On: Wed Dec 28, 2016 11:22 pm

I'm not sure I completely understand your opto isolator, LED to photo cell, implementation but if they are discrete devices you can integrate (smooth out) glitches optically. Use a clear lucite rod to couple the LED to the photo diode. The smoothing you get can be controlled by the frosting, i.e., lack of optical clarity on the ends of the lucite rod.
Yanche
 
Stoker Coal Boiler: Alternate Heating Systems S-130
Coal Size/Type: Anthracite Pea

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: BunkerdCaddis On: Thu Dec 29, 2016 1:03 pm

Yanche wrote:I'm not sure I completely understand your opto isolator, LED to photo cell, implementation


Aren't they IC chips?
BunkerdCaddis
 
Hand Fed Coal Boiler: New Yorker WC-90 or more likely a Van Wert VW85H [to be installed (soon, very soon)(well not as soon as I had anticipated]
Hand Fed Coal Stove: Waterford 105 pulling duty, Saey Hanover II getting dressed for the party
Coal Size/Type: pea/nut
Other Heating: oil fired hydronic

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CoalisCoolxWarm On: Thu Dec 29, 2016 2:23 pm

Yes, IC chip. I was describing the function diagram.

FYI, the scope shows the input side is converted to a square wave, but none of it crossed the pair of resistors back to the supply. We tested with 12vac.

Because of that surprise, and tearing down the kaa2, ran out of time last night. I didn't even get my computer put back together. Very , very tiny soldering... I need some finer tips, lol

I'll be getting it back online today. Been only on my tiny phone, so haven't posted much.
CoalisCoolxWarm
 
Stoker Coal Boiler: Keystoker KA-6
Hand Fed Coal Furnace: old Sears rebuilt, bituminous- offline as of winter 2014
Coal Size/Type: Anthracite Buckwheat
Other Heating: Oil Boiler

Re: Arduino - Smoothing capacitor for 24vac (thermostat)?

PostBy: CoalisCoolxWarm On: Thu Dec 29, 2016 8:39 pm

Okay, my laptop is all soldered up and reassembled. No smoke! LOL.
CoalisCoolxWarm
 
Stoker Coal Boiler: Keystoker KA-6
Hand Fed Coal Furnace: old Sears rebuilt, bituminous- offline as of winter 2014
Coal Size/Type: Anthracite Buckwheat
Other Heating: Oil Boiler