EcoRenovator  

Go Back   EcoRenovator > Improvements > Appliances & Gadgets
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Display Modes
Old 04-06-11, 08:58 AM   #11
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

Still doing a little refining on the circuit. I added a pull down resistor as I had some issues with my SSR activating when it shouldn't. I also added a supression diode in case you're actually using a relay versus SSR. Here is the updated schematic.


Attached Thumbnails
Click image for larger version

Name:	schematic.jpg
Views:	4006
Size:	26.4 KB
ID:	1409  
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 04-14-11, 01:37 PM   #12
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
Default Source Code?

Quote:
Originally Posted by Daox View Post
Still doing a little refining on the circuit. I added a pull down resistor as I had some issues with my SSR activating when it shouldn't. I also added a supression diode in case you're actually using a relay versus SSR. Here is the updated schematic.
This looks great. Good that you are addressing both SSR and electro-mechanical relays, as they each have their own advantages, no arcing and longer life for the SSR, higher efficiency and lower cost for the electro-mechanical.

I was looking at your 'attic heat' thread, and it looks like you have the code working.

Will you be posting the source code for your differential controller here?

I am asking because there is a modified form of the differential controller, such as you have here that incorporates change/time. This type is used for controlling radiant slabs. With this type of controller, indoor temperature is monitored as well as outdoor, and when a change in outdoor temp exceeds a certain rate of change, the heat to the slab is increased or decreased, thus minimizing the 'time-lag' that usually accompanies a thermal mass. So, in a way it is a PID controller.

Am I explaining this in a clear way?

Regards,

-AC_Hacker
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...

Last edited by AC_Hacker; 04-14-11 at 01:40 PM..
AC_Hacker is offline   Reply With Quote
Old 04-14-11, 03:04 PM   #13
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

Yep, I gotcha. As I mentioned earlier, I was thinking of adding an outdoor sensor.

I will definitely post code once I have everything working.
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 04-17-11, 12:19 PM   #14
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

So, I think its finally ready to go. I made some final tweaks and everything appears to be working perfectly. I had to add a capacitor to the signal line on the kitchen sensor because I was getting noise on the line. I pulled a 10uF capacitor off some circuit board I had laying around and it seems to work great. It wouldn't hurt to put one on the attic temp sensor too, but it didn't jump around much at all, so I just left it. Also, I've removed the 10K pull down resistor on my setup. It seems to be working fine without it.

Anyway, here is the new schematic.




Here is the code. I added another check in the program. If the kitchen temperature gets up to 80F/27C, the relay will turn off and stay off. Also, if you uncomment the serial parts of the code, you can very easily log the temperatures.

Code:
/* Thermal Differential Controller

  The program monitors two temperature sensors and
  activates a relay when one sensor is warmer than
  the other.
*/

int SsensorPin = 4;  // the pin to input attic temperature
int TsensorPin = 5;  // the pin to input kitchen temperature
int RelayPin = 2;  // the pin to operate the relay
int ledPin = 13;  // led pin (verify fan on condition)

int Ssensor = 0;  // variable to store the value of the attic temperature
int SensorDiff = 0;  // variable to store the Ssensor value plus differential (Diff)
int Tsensor = 0;  // variable to store the value of the kitchen temperature
int Diff = 3.0;  // temperature difference that must exist between attic and kitchen before relay enables (degrees C)


void setup() {
  pinMode(SsensorPin, INPUT);
  pinMode(TsensorPin, INPUT);
  pinMode(RelayPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  
  // Serial.begin(9600);
  
  digitalWrite(RelayPin, LOW);
  
}

void loop() {
  
  // read sensor inputs and assign to variables
  Ssensor = analogRead(SsensorPin) / 2;
  Tsensor = analogRead(TsensorPin) / 2;
  
  // add temperature difference to Ssensor value
  SensorDiff = Ssensor - Diff;

  // send temperature signals back to computer
  /*
  Serial.print(Ssensor);
  Serial.print(", ");
  Serial.print(Tsensor);
  Serial.print(", ");
  Serial.println(SensorDiff);
  delay(1000);
  */

  // if attic is warmer than kitchen sensor, enable relay
  if (SensorDiff > Tsensor  && Tsensor < 27) {
      digitalWrite(RelayPin, HIGH);
      digitalWrite(ledPin, HIGH);
      delay(1000);
    }
  
  // if attic sensor is cooler than kitchen sensor, disable relay
  if (Ssensor < Tsensor || Tsensor > 27 ) {
    digitalWrite(RelayPin, LOW);
    digitalWrite(ledPin, LOW);
    delay(1000);
  }
}
Attached Thumbnails
Click image for larger version

Name:	schematic.jpg
Views:	2823
Size:	28.9 KB
ID:	1416  
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Daox; 04-17-11 at 12:21 PM..
Daox is offline   Reply With Quote
The Following User Says Thank You to Daox For This Useful Post:
AC_Hacker (04-17-11)
Old 04-21-11, 08:58 AM   #15
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

I suppose its time to make a parts list in case anyone would like to replicate the controller (easily). I'll work on that soon and post it up.

I just got my break out board that'll allow me to datalog with the RBBB (really bare bones board) arduino since it has no onboard USB converter. The code is already there, its just commented out, so no real changes will be needed except setting up a delay so it only datalogs every 5 minutes or so.

I'm also thinking an LCD display would be really nice, add a few buttons and you can cycle through data, manually set the differential temperature, even turn the unit on and off all from a 'control panel'. Unfortunately, I've never used an LCD before. But, it'll be another learning experience.
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Daox; 04-21-11 at 09:05 AM..
Daox is offline   Reply With Quote
Old 04-21-11, 10:46 AM   #16
strider3700
Master EcoRenovator
 
Join Date: Dec 2008
Location: Vancouver Island BC
Posts: 745
Thanks: 23
Thanked 37 Times in 30 Posts
Default

do some research on the LCD's and get one that only uses a few pins. The one that came in my package seems easy enough to use but it takes 10 or 12 pins if I remember correctly. there are others out there that need closer to 4.

I ordered a kit with my ardunio mega with the intention of doing similar. A remote display with a button to cycle through some of the data. It's sitting there waiting for me to have some time.
strider3700 is offline   Reply With Quote
Old 04-21-11, 10:58 AM   #17
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

I have the book Practical Arduino which is a collection of arduino projects and it steps through the design and explains everything. In it is a DIY water meter tutorial with a LCD and a couple buttons for resetting the display. I'll have to re-read that, but I'm pretty sure there are 3 ways to wire the LCDs up. One method uses tons of pins, 12 wires sounds about right, the other uses 8 or so, and the last uses 5 or 6 I think. I'll look it up and report back.

Thankfully, this project doesn't require many pins, so if I did need 10 pins it wouldn't be a problem.
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 04-22-11, 12:43 PM   #18
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

Here is a quick parts list of what you'll need. I've linked to a few places where I've bought things from before.
  • Arduino - your choice in what one to use, there are many
  • 5V power supply (cell phone charger) - probably have one of these laying around
  • AC solid state relay - can use other forms of relay, solid state relays just work well/easy with the Arduino and doesn't require the diode in the schematic
  • (2) LM35 Temperature sensors
  • 10uF capacitor - could probably get away with a smaller capacitor and probably a bit larger one too, easy to salvage out of any old electronics.
  • telephone wire - make sure to get enough to put both temperature sensors where you need them


The total for these items comes to ~$40 plus shipping which shouldn't be too bad. It can definitely be done cheaper if you go with a cheaper arduino or find parts to use.
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Daox; 04-22-11 at 12:46 PM..
Daox is offline   Reply With Quote
Old 04-22-11, 04:51 PM   #19
skyl4rk
Helper EcoRenovator
 
Join Date: Sep 2010
Posts: 66
Thanks: 3
Thanked 6 Times in 4 Posts
Default

Looks good, this system should be usable on any solar heated box of air.
skyl4rk is offline   Reply With Quote
Old 02-10-12, 04:29 PM   #20
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

I think its time for an upgrade here. The current version of the thermal differential controller has been working great for over a year in my attic. However, I am planning on putting together a solar hot water setup this spring and I'll need another controller for it. I'd like to enhance the current functionality and add some additional features.

New features:
1) LCD display
2) adjustable on/off temperature differential via the LCD display (instead of having to edit the program)
3) maximum tank temperature adjustment via the LCD
4) control a heat dump load for if the tank and panels get too warm to prevent coolant degredation


I've already started programming the LCD display and interface for adjusting the temperature differentials and max temperature. I just need to figure out how I want to deal with the heat dump load.

__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Reply


Tags
arduino, controller, differential, thermal

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Ad Management by RedTyger
Inactive Reminders By Icora Web Design