Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

SW12 on/off based on battery voltage?


ChrisO Aug 9, 2018 06:37 PM

We are running a CR1000 off a solar panel with a marine battery. We have an instrument hooked up to the SW12 that sometimes draws more power than the solar panel can keep up with so we want to be able to (1) turn off SW12 as soon as battery voltage drops below a specified minimum threshold (e.g. 10.2 V) and then (2) turn back on when battery voltage recovers to the point where it does not drop below a specfied upper threshold for at 24-hour period (e.g. minimum stays above 11.2 V for an entire day).

From our previous effort, we found that the condition for turning the SW12 back on needs to be based on some longer-term minimum value (daily, not instantaneous). The solar controller will effectively push through fairly high voltage (>12 V) when the SW12 is off and the sun is out, but when a battery has been depleted, the total power from the panel isn't enough to keep up with the instrument's use. So as soon as the instrument is turned back on, it immediately drops down below the critical threshold, resulting in the program turning the SW12 on and off every-other cycle.  

Part 1 seems pretty straightforward using the SW12() command. I'm having trouble with Part 2. It seems like I could set up one table for our main data (15-minute recording interval, 60-second scan intervals) and a second table with a daily interval that records minimum battery voltage for the previous 24-hour period every night at midnight. Thus, after I call the daily table, I would expect that i could use an "if" statment to turn SW12 back on if the 24-hour minimum voltage is above the upper threshold. Any thoughts on if this would work and how to code it? Do I need to make the 24-hour minimum voltage a public variable?

Any help on this is most appreciated!

And, yes, we are also looking into improving out power supply situation.

Thanks!


AMK Aug 9, 2018 11:37 PM

ChrisO Aug 10, 2018 03:37 PM

Excellent, this is very helpful.

A follow-up question from based on the comments in the linked blog post: is there an easy way to find out what field names are automatically generated? For example, in the "Daily" data table, will the minimum() function always just append the variable with "_Min"? Is there a way to lookup a list of field names, without actually having to run the program and look at the output files?

Thanks again!


JDavis Aug 10, 2018 07:29 PM

In the CRBasic Editor, there is a Show Tables item found in the Tools menu.


PPeters Aug 14, 2018 08:52 PM

Just adding a concept that we use on a Radio repeater site that has a mix of Solar array and backup Diesel generator.

We use a current shunt on the solar feed to work out a daily power budget then condition the run time of the generator based on the amount of solar for the day.

This could match with what you are doing as you will then only switch the sensor back on once the battery has been charged enough. We keep a running total of amps from a 5 sec scan, crude but effective for this situation

unfortunately the code is an old edlog 10x version or I would post but can send if interested

Log in or register to post/reply in the forum.