Go Down

Topic: Arduino/Ethernet Shield HVAC System Monitor (Read 3 times) previous topic - next topic

sr4435

I am having an issue with my code for an automation system.  The goal of the project is to monitor the heating and air conditioning system, send emails if there are problems with it, log the data with ThingSpeak.com (or similar) and communicate with the thermostat to make changes as needed.  This system will be installed at several locations that are not nearby so the system needs to be reliable as I cant drive to each site to reset the arduino every day.

My hardware is the Uno, Ethernet Shield (v6 I think. It has the Uno "infinity" logo on it.  No mention of it on the hardware page), and a sparkfun proto shield.  I am using a MAX485 chip to convert the serial pins to RS485 for communication with the thermostat I have.  I have a shift register with 8 led's acting as a display.  I also use a couple analog temp sensors and a few relays/switches for monitoring.

I have written my own code for monitoring the HVAC system and communicating with the thermostat.  The sketch works fine on its own.
I have modified example code from thingspeak to upload my data.  It also works fine on its own.
However when I combine the code into one sketch, the system hangs or constantly restarts whenever it reaches a certain point in the code (any time it tries to upload to thingspeak).

I do not have any pins that are conflicting. I have made sure that my wiring does not use pins 4, 10, 11, 12 or 13. 

I have attached the sketch as it was too big to insert as code here.

Just by copy/pasting the thingspeak functions and required variables out of the code and into a new sketch, it uploads properly to thingspeak.  So I know the code works.  Same for the rest of the code, if I remove the thingspeak functions, the sketch works perfectly

Any help in finding a solution would be great.

Thanks
Steven

bubulindo

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

wildbill


maybe you're exhausting your memory?

This. You have a large number of strings in the combined application - consider moving them to progmem.

sr4435

Thanks for your replys.

The compliled sketch size is only about half of the availabe. 14950 bytes to be exact.

I only count 3 String variables.  Is this what you are refering to?  Or are you talking about all the text in the Serial.print's?

vinhtvu2

Which Thermostat are you using that you're communicating to the Arduino with??


I'm doing the same thing as you, except, with no thermostat.

My arduino is acting as the thermostat, using 2 analog temperature sensor, it reads in the average temp, display it on an LCD with a couple buttons so I can change the set temp.

A relay is used to control the HVAC. I measured the power on the AC control line, it's 30V AC to turn on the AC, FAN, or HEAT. Ofcourse the FAN has to be on first, then either of the other two. I used three relays to do this, and I always make sure the fan goes on about a minute before the AC or HEAT turns on, then stay on an extra minute after HEAT or AC shuts off. Also a 5 minute between the AC turning on/ and turning on again... apparently this was one of the feature on my old thermostat so I re-implemented it just to be safe.

In order to communicate with the internet and control, I used a PHP script, so if there's an issue, it emails to my Gmail using phpmailer script.
Besides that, I can control it directly through the web using HTML...

I'm moving away from PHP, so I can use Android App and remove my home server computer from the equation for less failure point. So I'm trying to serve the whole web page on the Arduino. I'll let you know how that work out.

Go Up