Arduino - Smoothing Capacitor for 24Vac (Thermostat)?

 
User avatar
StokerDon
Site Moderator
Posts: 7496
Joined: Mon. Nov. 11, 2013 11:17 am
Location: PA, Southern York County!
Stoker Coal Boiler: Gentleman Janitor GJ-5, Van Wert VA-600, Axeman Anderson130 X3.
Hand Fed Coal Furnace: Harman SF3500 reduced down to 3 grates connected to its own plenum
Coal Size/Type: Rice, Chestnut and whatever will fit through the door on the Harman
Other Heating: Noth'in but COAL! Well, Maybe a little tiny bit of wood

Post by StokerDon » Tue. Dec. 27, 2016 11:42 am

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


 
User avatar
CoalisCoolxWarm
Member
Posts: 2323
Joined: Wed. Jan. 19, 2011 11:41 am
Location: Western PA
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

Post by CoalisCoolxWarm » Tue. Dec. 27, 2016 1: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.

 
titleist1
Member
Posts: 5226
Joined: Wed. Nov. 14, 2007 4:06 pm

Post by titleist1 » Tue. Dec. 27, 2016 1: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.

 
User avatar
StokerDon
Site Moderator
Posts: 7496
Joined: Mon. Nov. 11, 2013 11:17 am
Location: PA, Southern York County!
Stoker Coal Boiler: Gentleman Janitor GJ-5, Van Wert VA-600, Axeman Anderson130 X3.
Hand Fed Coal Furnace: Harman SF3500 reduced down to 3 grates connected to its own plenum
Coal Size/Type: Rice, Chestnut and whatever will fit through the door on the Harman
Other Heating: Noth'in but COAL! Well, Maybe a little tiny bit of wood

Post by StokerDon » Tue. Dec. 27, 2016 5: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

 
User avatar
warminmn
Member
Posts: 8190
Joined: Tue. Feb. 08, 2011 5:59 pm
Location: Land of 11,842 lakes
Hand Fed Coal Stove: Chubby Junior, Riteway 37
Coal Size/Type: nut and stove anthracite, lignite
Other Heating: Wood and wear a wool shirt

Post by warminmn » Tue. Dec. 27, 2016 5: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:

 
User avatar
CoalisCoolxWarm
Member
Posts: 2323
Joined: Wed. Jan. 19, 2011 11:41 am
Location: Western PA
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

Post by CoalisCoolxWarm » Tue. Dec. 27, 2016 9: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.

 
User avatar
CoalisCoolxWarm
Member
Posts: 2323
Joined: Wed. Jan. 19, 2011 11:41 am
Location: Western PA
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

Post by CoalisCoolxWarm » Tue. Dec. 27, 2016 9: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 ;)


 
CapeCoaler
Member
Posts: 6515
Joined: Sun. Feb. 10, 2008 3:48 pm
Location: Cape Cod, MA
Stoker Coal Boiler: want AA130
Hand Fed Coal Stove: DS Machine BS#4, Harman MKII, Hitzer 503,...
Coal Size/Type: Pea/Nut/Stove

Post by CapeCoaler » Tue. Dec. 27, 2016 10: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...

 
User avatar
CoalisCoolxWarm
Member
Posts: 2323
Joined: Wed. Jan. 19, 2011 11:41 am
Location: Western PA
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

Post by CoalisCoolxWarm » Tue. Dec. 27, 2016 11:17 pm

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:

 
User avatar
northernmainecoal
Member
Posts: 555
Joined: Wed. Jan. 22, 2014 8:33 am
Location: Aroostook County, Maine
Stoker Coal Boiler: EFM 520
Hand Fed Coal Stove: Hitzer 30-95
Baseburners & Antiques: Herald Baseheater #6
Coal Size/Type: Rice/Nut/Stove

Post by northernmainecoal » Wed. Dec. 28, 2016 7: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

 
User avatar
CoalisCoolxWarm
Member
Posts: 2323
Joined: Wed. Jan. 19, 2011 11:41 am
Location: Western PA
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

Post by CoalisCoolxWarm » Wed. Dec. 28, 2016 8: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 ;)

 
User avatar
Yanche
Member
Posts: 3026
Joined: Fri. Dec. 23, 2005 12:45 pm
Location: Sykesville, Maryland
Stoker Coal Boiler: Alternate Heating Systems S-130
Coal Size/Type: Anthracite Pea

Post by Yanche » Wed. Dec. 28, 2016 10: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.

 
User avatar
BunkerdCaddis
Member
Posts: 708
Joined: Sun. Jan. 18, 2015 10:26 am
Location: SW Lancaster County
Stoker Coal Boiler: Bairmatic-Van Wert
Hand Fed Coal Boiler: Van Wert VW85H
Hand Fed Coal Stove: Saey Hanover II working when I feel the desire, Waterford 105 out on vacation, Surdiac Gotha hiding somewhere
Coal Size/Type: pea/nut/rice/stove-anthracite, nut/stove bit when I feel the urge
Other Heating: oil fired hydronic

Post by BunkerdCaddis » Thu. Dec. 29, 2016 12:03 pm

Yanche wrote:I'm not sure I completely understand your opto isolator, LED to photo cell, implementation
Aren't they IC chips?

 
User avatar
CoalisCoolxWarm
Member
Posts: 2323
Joined: Wed. Jan. 19, 2011 11:41 am
Location: Western PA
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

Post by CoalisCoolxWarm » Thu. Dec. 29, 2016 1: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.

 
User avatar
CoalisCoolxWarm
Member
Posts: 2323
Joined: Wed. Jan. 19, 2011 11:41 am
Location: Western PA
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

Post by CoalisCoolxWarm » Thu. Dec. 29, 2016 7:39 pm

Okay, my laptop is all soldered up and reassembled. No smoke! LOL.


Post Reply

Return to “Coal Bins, Chimneys, CO Detectors & Thermostats”