Temp sensor problems
Temp sensor problems
Roberto:
Having an issue with the temp sensor set-up. When added to the board they do not show up on the display. only one can be read at a time. if I reboot, the unit freezes, display is black until I unplug one of them and then it returns to life. Will only operate with one sensor
Also noted that even when just using one sensor, no matter what socket I plug it in, it only displays on T1
Here is my ReefFeatures.h
#ifndef __REEFANGEL_FEATURES_H__
#define __REEFANGEL_FEATURES_H__
#define WavemakerSetup
#define ATOSetup
#define MetalHalideSetup
#define wifi
#define StandardLightSetup
#define DirectTempSensor
#define DisplayLEDPWM
#endif // __REEFANGEL_FEATURES_H__
main.cpp
#include <WProgram.h>
//#include <wsupport.h>
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>
void setup()
{
ReefAngel.Init(); //Initialize controller
// Ports that are always on
ReefAngel.Relay.On(Port8);
ReefAngel.LCD.SetContrast(30); // Set contrast to 60
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
ReefAngel.Wavemaker1(Port4);
ReefAngel.Wavemaker2(Port5);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
int main(void)
{
init();
setup();
for (;;)
{
loop();
}
return 0;
}
Having an issue with the temp sensor set-up. When added to the board they do not show up on the display. only one can be read at a time. if I reboot, the unit freezes, display is black until I unplug one of them and then it returns to life. Will only operate with one sensor
Also noted that even when just using one sensor, no matter what socket I plug it in, it only displays on T1
Here is my ReefFeatures.h
#ifndef __REEFANGEL_FEATURES_H__
#define __REEFANGEL_FEATURES_H__
#define WavemakerSetup
#define ATOSetup
#define MetalHalideSetup
#define wifi
#define StandardLightSetup
#define DirectTempSensor
#define DisplayLEDPWM
#endif // __REEFANGEL_FEATURES_H__
main.cpp
#include <WProgram.h>
//#include <wsupport.h>
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>
void setup()
{
ReefAngel.Init(); //Initialize controller
// Ports that are always on
ReefAngel.Relay.On(Port8);
ReefAngel.LCD.SetContrast(30); // Set contrast to 60
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
ReefAngel.Wavemaker1(Port4);
ReefAngel.Wavemaker2(Port5);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
int main(void)
{
init();
setup();
for (;;)
{
loop();
}
return 0;
}
-=Bryan=-
Re: Temp sensor problems
It will always be T1 no matter which port.
It's a digital sensor and will be assigned T1, T2 and T3 according to the laser incribed address it was assigned at manufacturing following their order of release. Each sensor has a unique address.
But, the way you are describing, it seems you have a bad probe.
Do you get readings from both of sensors if they are plugged individually?
It's a digital sensor and will be assigned T1, T2 and T3 according to the laser incribed address it was assigned at manufacturing following their order of release. Each sensor has a unique address.
But, the way you are describing, it seems you have a bad probe.
Do you get readings from both of sensors if they are plugged individually?
Roberto.
Re: Temp sensor problems
Roberto:
Probes are fine, each one plugged in individually and they work (have to reboot though), plug in two and reboot the screen goes black, pull out a sensor and the screen jumps to life and everything is fine. ??
Probes are fine, each one plugged in individually and they work (have to reboot though), plug in two and reboot the screen goes black, pull out a sensor and the screen jumps to life and everything is fine. ??
-=Bryan=-
Re: Temp sensor problems
Are you extending the cable?
4k7 should be good enough.
I used even 10K before with no problems.
But in your case, it seems not to be the case.
Would you be able to change it to a smaller one?
Any value above 1K should be good.
4k7 should be good enough.
I used even 10K before with no problems.
But in your case, it seems not to be the case.
Would you be able to change it to a smaller one?
Any value above 1K should be good.
Roberto.
Re: Temp sensor problems
Hi Roberto:
Cable not extended, tried 2K and no luck same thing, wonder if it is a code issue. Do you have a default PDE that I should use to test.
Cable not extended, tried 2K and no luck same thing, wonder if it is a code issue. Do you have a default PDE that I should use to test.
-=Bryan=-
Re: Temp sensor problems
Very weird.
I wonder if it has anything to do with the libraries on AVR Studio.
Try loading up this hex file.
It's compiled with avr-gcc through Arduino IDE.
I wonder if it has anything to do with the libraries on AVR Studio.
Try loading up this hex file.
It's compiled with avr-gcc through Arduino IDE.
- Attachments
-
- LibraryTest.zip
- (19.55 KiB) Downloaded 495 times
Roberto.
Re: Temp sensor problems
Hi Roberto:
Afraid you may be right <sigh>. Do you mind posting the sketch you used. I think I might know what the problem is in AVRStudio, but want to make sure I have the right sketch code first.
Afraid you may be right <sigh>. Do you mind posting the sketch you used. I think I might know what the problem is in AVRStudio, but want to make sure I have the right sketch code first.
-=Bryan=-
Re: Temp sensor problems
I actually used the standard libraries, but here is the sketch.
- Attachments
-
- LibraryTest.pde
- (2.18 KiB) Downloaded 421 times
Roberto.
Re: Temp sensor problems
I think it might be one of the compiler optimization flags I am using in AVRStudio that could be causing the problem. They both use AVR-GCC so can't see why it would not work other than my addition of additional flags.
-=Bryan=-
Re: Temp sensor problems
Yup, that was what it was, one of the optimization flags I was using, just not sure which one though, will be a process of elimination. Used the standard flags that Arduino uses and it worked, albeit a larger hex size.
-=Bryan=-