Expansion relay trouble

Expansion modules and attachments
Post Reply
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Expansion relay trouble

Post by rimai »

I think you just found a bug with this sine mode.
It works fine with constant.
Roberto.
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Expansion relay trouble

Post by joshlawless »

Missing string entry from the ReefAngel_1.5_LCD?

Code: Select all

	String PUMP_MODES[] = {"Constant","Lagoon","ReefCrest","Short Pulse","Long Pulse","Nutrient Trans.","Tidal Swell","Feeding","","Night","Custom"};
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Expansion relay trouble

Post by rimai »

You got it :)
Roberto.
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Expansion relay trouble

Post by joshlawless »

So, as I start with the Wizard code, and monitor my 60W lamp for misbehavior (debugging an intermittent problem is a huge pain -- wish I had one of these power outage alarms to plug into the relay expansion box), I notice one line missing from my code that's in the Wizard code. Not sure how it got dropped from my code (which was based on wizard code).

Is this line:

Code: Select all

    ReefAngel.AddStandardMenu();  // Add Standard Menu
important / causing problems because it's missing?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Expansion relay trouble

Post by binder »

rimai wrote:I think you just found a bug with this sine mode.
It works fine with constant.
i have fixed those issues with the libraries (or at least i think i fixed these..it has been a little while since i did) they are in a pull request on github. i have not merged them though...i was waiting for you to double check before committing the merge.


Sent from my iPad mini
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Expansion relay trouble

Post by joshlawless »

joshlawless wrote:I hooked up a 60W lamp to one of the outlets on my expansion box last night, and uploaded some basic wizard code that just used the always-on functions to give power to what I needed. About twenty minutes in, the lamp flicked off and on. I didn't have time to re-run the test with the relay expansion module hooked directly to the first relay box (bypassing the expansion hub), but I will try to do so tonight.

It looks like some of my other modules occasionally lose their connections to the bus, too. Today I left the tank running with simplified lighting code (no forced updates, just the CRC to push only changed values to the 16 channel board). Around 10:30, the lights were off, and required a power cycle to the system to get them back on (because the controller wouldn't push an update to the lights without a change in value, power cycling just the expansion board wouldn't do the trick).

Checking my web chart, I see that some of my other modules are occasionally misbehaving:
Image

The salinity probe, when unplugged, returns a value of 6.0. The ORP probe returns a value of 0, hence the missing data point from the chart. The water level probe similarly returns a value of 0, and is absent from its chart, too. So when I check my portal values, occasionally I'll see correct values for Temps 1-3 and pH (plugged into the head unit), but missing data from the expansion module probes (WL, SAL and ORP).

Do you think this might be connected to the behavior of the expansion relay box?

Roberto, I haven't had a chance to directly connect my expansion relay module to the main relay box, yet, but I note that the behavior of many of the modules connected to the expansion hub is problematic simultaneously (the ORP, salinity, and water level probes all stop reporting accurate values at the same time, and all come back online together). Do you think that it might be a bad expansion hub?
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Expansion relay trouble

Post by joshlawless »

While the behavior of the relay box doesn't seem like it can be explained by the expansion hub (unplugging the expansion hub doesn't toggle the states of the relays), the behavior of the other modules (probes) sure can be. It seems as if the mini-usb plug on the expansion hub is loose inside the project box -- gently wiggling the usb plug there causes the light on the hub to briefly flicker off (and the probe values to all drop to 0).

Still wondering what could cause the expansion relay box behavior, but I've been watching it for a while with my test code, and it's only ever caused the attached lamp to flicker once.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Expansion relay trouble

Post by rimai »

I think they are all related and it does sound like the hub. If wiggling messes with the LED, you may be right.
Let's RMA that. Send me PM.
Roberto.
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Expansion relay trouble

Post by joshlawless »

joshlawless wrote:So, as I start with the Wizard code, and monitor my 60W lamp for misbehavior (debugging an intermittent problem is a huge pain -- wish I had one of these power outage alarms to plug into the relay expansion box), I notice one line missing from my code that's in the Wizard code. Not sure how it got dropped from my code (which was based on wizard code).

Is this line:

Code: Select all

    ReefAngel.AddStandardMenu();  // Add Standard Menu
important / causing problems because it's missing?
Any thoughts on this one? I can't find where in the libraries this function does ... anything. Did I miss something?

I used grep on my library folders, and only turned up

Code: Select all

	void inline AddStandardMenu() {};
in the ReefAngel.h file. Also its inclusion in the keywords.txt file. Is this function doing anything?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Expansion relay trouble

Post by rimai »

That function is to enable the standard menu feature.
You can see all the features you can enable in the file \Arduino\update\feature.txt
Our version of the Arduino IDE searches for keywords and enables a #define in the code if that particular keyword is found.
Roberto.
Post Reply