RA+ and expansion Hub malfunctioning !

Basic / Standard Reef Angel hardware
Post Reply
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

RA+ and expansion Hub malfunctioning !

Post by lmolenmaker »

Hi Guys,

This morning I woke up to a warm morning. I noticed that my fans were not on. I checked the alert on the controller and I noticed the following:

• Date was set to 03/19/43
• Bus lock on
• Ato timeout (due to waterlevel reading 0)

After a quick search on the forum, I figured out that it has something to do with the USB hub.
There are two expansions connected to the hub at the moment:

• PWM Dimming Expansion Module
• Waterlevel Expansion

I disconnected the cables and plugged in the PWM, no problems here.

Then I plugged in the Waterlevel, now the Controller gives the Bus lock alert. (I took out the PWM cable beforehand)

So something is wrong with the Waterlevel expansion, so I thought. I connected the Waterlevel cable directly to the relay box and all is working fine. So now I think something is wrong with the expansion hub.

Can somebody help me out here and explain why there is a bus lock?

Also when I try to connect the data cable to my laptop for uploading, more often than not, my computer says that it cannot recognise the USB device, which makes it very hard to upload things. Any help with this is also much appreciated.

Thanks in advance,

Leslie

Code: Select all

#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 <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.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    ReefAngel.AddWaterLevelExpansion();  // Water Level Expansion Module
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 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( 500 );

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;
    
 //   ReefAngel.DCPump.ActinicChannel=Sync; // Now you're pump will be affected by the portal settings.
 
      ReefAngel.UseFlexiblePhCalibration();    // Calibration for ph4 and ph7 via controller


    // Ports that are always on/off
    
      ReefAngel.Relay.Off(Port5);

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

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

void loop()
{
    ReefAngel.StandardFan( Port1,250,255 );
    ReefAngel.StandardLights( Port2,9,0,23,00 );
    //ReefAngel.StandardLights( Port3,10,30,22,30 );
    ReefAngel.StandardLights( Port4,19,0,19,1 );
    ReefAngel.StandardHeater( Port7,245,250 );
    ReefAngel.DCPump.UseMemory = false;
    //ReefAngel.DCPump.SetMode( ShortPulse,90,165 );
    //ReefAngel.DCPump.DaylightChannel = None;
    //ReefAngel.DCPump.ActinicChannel = Sync;
    ////// Place your custom code below here
    
   // ReefAngel.DCPump.UseMemory=true;                 // Use whatever is in the portal
    
    ////////
    
   
      if (millis() > 1000)                                      // After 1 second
  {
    if ( (hour() >=18) && (hour() <20) )
      ReefAngel.Relay.Off(Port5);                               // Freshwater ATO off between 18.00 and 20.00, port 5
    else
      ReefAngel.WaterLevelATO(Port5,30,95,99);                  // else min level 95% and max level 99%, timeout 30 sec                    
    
    /////////
    
    if ( (hour() >=18) && (hour() <19) )
      ReefAngel.WaterLevelATO(Port6,4000,96,99);                // Saltwater ATO on when below 96%, max level 99%, timeout 4000 sec. Port 6 between 18.00 and 19.00
    else
      ReefAngel.Relay.Off(Port6);                               // otherwise port 6 off                    
  
    //////////  
    
      ReefAngel.CustomVar[1]=ReefAngel.Relay.Status(Port1);    //  Fan on email trigger
      ReefAngel.CustomVar[4]=ReefAngel.Relay.Status(Port4);    // Alk on email trigger
      ReefAngel.CustomVar[5]=ReefAngel.Relay.Status(Port5);    // Freshwater on email trigger
      ReefAngel.CustomVar[7]=255;
   
   ///////////
   
       if ( hour()>=10 && hour()<22)
   {
       ReefAngel.PWM.SetDaylight( PWMParabola(10,0,22,0,0,35,0) );
       ReefAngel.PWM.SetActinic( PWMParabola(10,0,22,0,12,50,0) );
   }
           
     else
    {  
       ReefAngel.PWM.SetActinic( PWMSlope(9,0,23,0,0,12,60,0) );
       ReefAngel.PWM.SetDaylight(0);
    }      
       
       ///////////  
   
      
   if ( (hour() >=10) && (hour() <23) )
    
    {
      if ( (hour() >=10) && (hour() <12) )
    
      ReefAngel.DCPump.SetMode( ShortPulse,90,50);              // shortpulse 90% 50 millisec, 10 - 12
      ReefAngel.DCPump.ExpansionChannel[0] = Sync;
      
      
 
    if ( (hour() >=12) && (hour() <13) )
   
            ReefAngel.DCPump.SetMode( Constant,90,200);          //  Constant 90%, 12 - 13
            ReefAngel.DCPump.ExpansionChannel[0] = Sync;
       
       
    
    
    if ( (hour() >=13) && (hour() <16) )
    
        
            ReefAngel.DCPump.SetMode( ShortPulse,90,50);              // shortpulse 90%, 50 millisec, 13 - 16
            ReefAngel.DCPump.ExpansionChannel[0] = Sync;
      
        
 
    if ( (hour() >=16) && (hour() <17) )
   
            ReefAngel.DCPump.SetMode( Constant,90,200);          //  Constant 90%, 16 - 17
            ReefAngel.DCPump.ExpansionChannel[0] = Sync;
       
       
   
    if ( (hour() >=17) && (hour() <20) )
    
            ReefAngel.DCPump.SetMode( ShortPulse,100,50);                // shortpulse 100%, 50 millisec, 17 - 20
            ReefAngel.DCPump.ExpansionChannel[0] = Sync;
      
        
 
    if ( (hour() >=20) && (hour() <21) )
   
            ReefAngel.DCPump.SetMode( Constant,90,200);          //  Constant 90%, 20 - 21
            ReefAngel.DCPump.ExpansionChannel[0] = Sync;
            
        
 
    if ( (hour() >=21) && (hour() <23) )
   
            ReefAngel.DCPump.SetMode( ShortPulse,100,200);          //  Shortpulse 100%, 200 millisec, 21 - 23
            ReefAngel.DCPump.ExpansionChannel[0] = Sync;
       
    }
     
            else   
    
            ReefAngel.DCPump.SetMode( Constant,70,150);          // otherwise Shortpulse, 70%, 150 millisec
            ReefAngel.DCPump.ExpansionChannel[0] = Sync;
            
    
      
 }  
     
    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "lmolenmaker" );
    ReefAngel.ShowInterface();
}

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

Re: RA+ and expansion Hub malfunctioning !

Post by rimai »

Does this happen on different ports of the hub too?
Roberto.
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

Re: RA+ and expansion Hub malfunctioning !

Post by lmolenmaker »

Hi Roberto,

Yes, I tried different ports on the hub as well. I also switched the usb cables between the pwm and waterlevel and expansion hub as well with no luck.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA+ and expansion Hub malfunctioning !

Post by rimai »

Let me try to understand better.
Does it work correctly when you have this connected:
1. Only hub
2. Hub and WL
3. Hub and dimming
4. Hub, dimming and WL
Roberto.
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

Re: RA+ and expansion Hub malfunctioning !

Post by lmolenmaker »

1. RA is working correctly
2. Waterlevel Not working
3. PWM working
4. Waterlevel not working, PWM working

So it seems the combination WL and Hub is NOT working.

Combination WL and relaybox is working correctly.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA+ and expansion Hub malfunctioning !

Post by rimai »

That's weird, how it works by itself but not with the hub :?
I'm assuming it was working and it stopped??
Send me a PM and we RMA this module.
Roberto.
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

Re: RA+ and expansion Hub malfunctioning !

Post by lmolenmaker »

Roberto,

Did you receive the PM (i am not sure if I did it correctly, first time i used PM), message stays in "outbox" folder, not in "sent messages" folder.

Leslie
lmolenmaker
Posts: 59
Joined: Tue Nov 12, 2013 5:58 am

Re: RA+ and expansion Hub malfunctioning !

Post by lmolenmaker »

Roberto,

Do you also have a solution or suggestion for the second part of the problem? (see first post)

Sometimes my laptop doesn't recognise the USB device.

I look forward hearing from you.

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

Re: RA+ and expansion Hub malfunctioning !

Post by rimai »

Is it plugged in properly?
Did you try a different USB port?
What does it do when you plug the cable?
Does this happen on different computers?
Roberto.
Post Reply