relay expansion help

Expansion modules and attachments
Post Reply
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

relay expansion help

Post by fishflipper »

i just installed a expansion relay box and nothing i plug into it powers on. when i connect it to power and plug the serial cable into the expansion hub, the light on the expansion box lights. any ideas??
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

Try changing the ID.
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

i took the box apart and didn't see the dip switches to do that. shouldn't it power on even if not connected to the controller?
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

i found the switches and changed and it didn't help.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

Try with them all on and also with them all off.
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

still no power. shouldnt it work just plugged into the wall by itself?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

What do you mean work just plugged into the wall?
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

without being connected to the controller.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

If it is not connected to the controller, nothing will turn on.
The controller is the one that tells which ports to turn on.
Run I2Cscanner and send the results:
http://forum.reefangel.com/viewtopic.php?p=18831#p18831
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

i uploaded the code and now the controller is just blinking red
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

keep following the instructions on the link.
send the results on serial monitor
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

this is what happens when i plug the expansion box in directly to the controler. things flash on for a sec then off


I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38
addr: 39 addr: 3A addr: 3B addr: 3C
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D addr: 4E addr: 4F addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

here is the monitor with everything plugged back in


I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38
addr: 39 addr: 3A addr: 3B addr: 3C found!
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48 found!
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D found! addr: 4E addr: 4F found! addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

3C is ID 5
it should be 38.
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

so....what does that mean?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

Your module is set to ID5. You need to set it to ID1.
When you set to ID1, it will be found as 38 instead of 3C.
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

is this better? how do you read this?

I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38
addr: 39 found! addr: 3A addr: 3B addr: 3C
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48 found!
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D found! addr: 4E addr: 4F found! addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80

done
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

Almost. It found 39.
It needs to be 38
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

still not working


I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38 found!
addr: 39 addr: 3A addr: 3B addr: 3C
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48 found!
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D found! addr: 4E addr: 4F found! addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80

done
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

There ya go.
38.
Now, upload your code.
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

here is the code i uploaded and it is still not working.

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
ReefAngel.AddPHExpansion(); // pH Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
ReefAngel.AddHumidityExpansion(); // Humidity Expanion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port6Bit;
ReefAngel.FeedingModePortsE[0] = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port7Bit;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit;
ReefAngel.OverheatShutoffPortsE[0] = 0;
// Ports turned off when Leak is detected
ReefAngel.LeakShutoffPorts = Port8Bit;
ReefAngel.LeakShutoffPortsE[0] = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 835 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port2 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port4 );
ReefAngel.Relay.On( Box1_Port5 );
ReefAngel.Relay.On( Box1_Port6 );
ReefAngel.Relay.On( Box1_Port7 );
ReefAngel.Relay.On( Box1_Port8 );

////// Place additional initialization code below here


////// Place additional initialization code above here
}

void loop()
{
ReefAngel.StandardLights( Port7,13,0,22,30 );
ReefAngel.WaterLevelATO( Port8,25,80,90 );
////// Place your custom code below here

if (ReefAngel.WaterLevel.GetLevel()>0 && ReefAngel.WaterLevel.GetLevel() < 80) ReefAngel.Relay.On(Port8);
if (ReefAngel.WaterLevel.GetLevel() >=85) ReefAngel.Relay.Off(Port8);


////// Place your custom code above here

// This should always be the last line
ReefAngel.Portal( "fishflipper" );
ReefAngel.DDNS( "nickgrill.getmyip.com" ); // Your DDNS is fishflipper-nickgrill.getmyip.com.myreefangel.com
ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

Humm.
Can you swap svga cables with the main box?
If it still doesn't work, can you test the relay box itself as the main box?
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

when connecting the box directly to the controller it does work.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

ugh!!! all this and its seems to be the expansion hub. plugged the relay into my other hub and the lights came on. do the expansion hubs just plug into each other to work, right? the light was on so i thought it was working.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

No, you can only use one hub per system.
The signal won't propagate to the 2nd hub.
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

Oh, really? Any future thoughts of adding it? Can the usb port on the expansion box still be used?

Sent from my SAMSUNG-SM-G900A using Tapatalk
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

Robert, i just want to say thank you for the quick replies and the help on this matter the other night. everything is working great! i do have one more question though.....i know you said only one expansion hub is supported but can the usb port on the expansion module still be used?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

No. It can't.
Did you run out of ports in the hub?
Roberto.
fishflipper
Posts: 103
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

No, not yet. This relay box is on a second tank with a 15 foot usb cable and I only had one so was hoping to not have to run another one to the hub.

Sent from my SAMSUNG-SM-G900A using Tapatalk
Post Reply