My DIY Netduino Controller and Multi-channel Multi-chip LED Cannons

Any thoughts on how to be alerted if your controller ON to one of the heater relays has failed, so the heater is not working on it internal thermostat only? Maybe not a big deal with multiple heaters, but I always like to know if something is not working. Thanks,---Rick... ps looking forward to pics. of your enclosure.

Hey Rick - if you fail down to the heater thermostat (meaning, the relay is stuck so the heater ALWAYS gets power) you should be able to notice two things:

  • Temp is above my desired range
  • I haven't cycled on the heater in X hours

Those two items suggest a relay failure, though they do not safeguard against a controller failure that leaves the relay on (I experienced this first hand).

I don't currently have code to evaluate those two possibilities (both are pretty easy) but will soon, along with code that tracks the amount of time each heater is on, to alert to replace after some number of "on" hours along with multiple heater support (use every other one to even out load).
 
My controller will not indicate cycled times in x hours. It is just on/off at set temp. But it will give notice if temp. is above desired range. I forgot that. One more thing, how did you hook your relay to the power strip?...did you mount the relay on the strip?... how did you route the the wires from the relay to break the high voltage side to the plug? Thanks,---Rick
 
Last edited:
If you're using a Jarduino it'd be a pretty easy addition to show the last time the heater programatically turned "on" though unless you had an established benchmark (during this time of year, based on my equipment heat add plus ambient temp it should cycle every X hours) it would be hard to find that useful.
 
Tonight's progress:
  • Added uptime to the XML status (can be seen on reefin.net!)[/*]
  • Checking to see if SD Card is present and if so, launching SD thread (not saving anything to it, so the thread start is commented out still but it's the start of an intelligent SD card use, I think..)[/*]
  • Added a folder for "ProjectObjects"[/*]
  • Started Xively Integration[/*]
  • Added a class: Heater (see details below)[/*]
Heater Class-
I've always enjoyed the simplicity of this project's code but it was time to abstract a few things. First and foremost, I will want to be able to control multiple heaters and do some intelligent things (if it's VERY cold, turn them both on, alternate between the two, detect if one is possibly not heating, etc) and in order to do that I need to abstract the heating system a little further than just an output port. *The heater class is designed to be consumed by a "heaters" class which can take in N number of heaters, and allows you to tell it to heat the tank, and keeps track of the 'advanced' bits.

A "Heater" consists of:
  • output port (_relay) to control the heater on/off[/*]
  • dateTime (_onTime) to dictate when it was last turned on[/*]
  • bool _suspect to note the heater is suspect of being non-functioning[/*]
  • timespan totalTime to keep track of the total time this heater has ran [[currently volatile]][/*]
  • bool heating to note if the heater is currently heating[/*]
  • one constructor which takes an outputPort and sets the heating status based on what that port is currently doing[/*]
  • Heat() which turns the heater on, sets the _onTime and returns[/*]
  • TurnOff() which turns off the heater, calculates how long it's been on this run and adds it to the total time and returns[/*]

Not using the Heater class as I haven't had time to write the Heaters class yet.
 
minor side distraction, got Xively working and logging temp every 15 seconds. Lots of work to do on the helper class for that yet, but so far it's nice being able to hand off the data to someone else.
 
Not yet- some programming on the controller side but it's been up for over two months without a restart, running my biocube. I picked up a Jaebo Wp-25 pump and cable, as there will be 2 WP40's on the big tank, so I want to be able to control them.

Work has really kept me busy, frankly but I have some pieces for the enclosure and am trying to make time to tie up some loose ends here and get the big tank installed.

I've got a windows "store" app (windows 8 metro style) half written that keeps tabs on the tank (shows tiles with temp etc) and can adjust things on the controller.

still plenty to do but life has really gotten in the way- especially now that it "works" - it's tough to sit down and tear in.

On the upshot, this LED is growing SPS wonderfully, with a jedi mind trick monti, some bali stuff, and a few others looking really good.

Sorry for the not-that-exciting update, but hopefully soon I'll find time to really get it moving again.
 
oh, and I looked at/implemented Xively only to realize it really can't do what I want (as a small developer) so I'm still planning to write an open source PHP based data logger/tracker and control panel, which will be a decent undertaking.
 
Been wrestling hard with what I want to do to contain this mess, and with the 180 getting closer to completion, and with the relay board connection failing yesterday leaving the heat off for a couple hours (no harm no foul) I figured it was time to figure it out. I was looking hard at the project boxes I had gotten and realized the real solution might be on the floor in the furnace room.

I had sitting there, an old UPS that was defunct (not a battery but rather the logic portion). The case is decent sized (12 inches by 18 inches probably) and has 8 outlets on the back (oh hey, I have an 8 place relay board!) with an Ethernet jack, and two RJ11 jacks, and lots of flat plastic to put jacks on, with a bonus fan for cooling!

I'm going to gut it and see if it could work out as well as I thought, I would be stoked to get this thing all boxed up so it stops flaking due to hardware connections.
 
Okay, so the insides of the UPS:





There is an area for where the batteries were, and an area with the controls, will gut the controls area later, looks like this might work pretty well. The outlets are all strung together, so I'll have to snip, solder and glue them in so they don't move, but it apppears workable, which is great. I am going to add a second power cord so that I can power the controller and 5v power supply from a different outlet (and breaker) than the 120v source for the relayed driven outlets.
 
So besides buttoning it into a container, I'm also working on a good way to control the sucker without using hardware buttons. I'll eventually have a web front end but for now the controller provides xml status and lets me override the lights and turn on feed mode through simple query strings. As such, a nice little desktop program that shows me some information seemed like a good disctraction while I am battling this viral infection.

I got and parsed the XML into some objects, and then started updating labels on a simple windows form. Curiosity suggested I check out the "Chart" item, and it turns out that is pretty easy to use as well. What I have now is super crude but working. It gets fresh XML data every 3 seconds (not sure on frequency) and adds a new point to the temp chart each time it gets it (so it starts out empty). Once it hits 100 points it starts removing the first one each time so it stays at 100. I'll probably bump this to a higher number later. The chart auto-scales and keeps moving so it's kind of nifty. I'll add the rest of the stats and control to override the lights and make it look decent.

04.02.2014-16.05.png


(Ignore the "Refresh" button, it all happens automatically)
 
Last edited:
It gets fresh XML data every 3 seconds (not sure on frequency) and adds a new point to the temp chart each time it gets it (so it starts out empty). Once it hits 100 points it starts removing the first one each time so it stays at 100. I'll probably bump this to a higher number later. The chart auto-scales and keeps moving so it's kind of nifty. I'll add the rest of the stats and control to override the lights and make it look decent.

From this a gather you get 100 data points 3 seconds apart or 300 seconds of data on the chart. That means you know what happened in the last 5 minutes. But if something crashed it could have gone bad in the middle of the night and you waking 4 or 6 hours later would not have a record of it. But if your data points were taken every 5 minutes the 100 data points would cover 500 minutes or 8.3 hours. At 15 minutes you would have a 24 hour picture.

Looking at temperature if the heater stuck on you may get a temp rise of a degree every 15 minutes unless your realy using excessive wattage to heat your system. If the heater failed to heat then the temperature drop is usually even slower than that dependent upon room temperature.

Is it possibly to take the samples that are recorded at a longer spacing?
 
From this a gather you get 100 data points 3 seconds apart or 300 seconds of data on the chart. That means you know what happened in the last 5 minutes. But if something crashed it could have gone bad in the middle of the night and you waking 4 or 6 hours later would not have a record of it. But if your data points were taken every 5 minutes the 100 data points would cover 500 minutes or 8.3 hours. At 15 minutes you would have a 24 hour picture.

Looking at temperature if the heater stuck on you may get a temp rise of a degree every 15 minutes unless your realy using excessive wattage to heat your system. If the heater failed to heat then the temperature drop is usually even slower than that dependent upon room temperature.

Is it possibly to take the samples that are recorded at a longer spacing?

So, first and foremost- your implying that this is useless for long term monitoring as is, and that is 100% correct and understood. This is mainly made as a quick look at what's going on with the tank (it'll run as a windows service and alert me when it's over/under temp and display the temp in the task tray). It lets me see what's going on, fire feed mode, override the lights, and do those sorts of tasks without opening the web front end.

I'm doing this because I'm still waffling on how I'm going to store historical data (as you're pointing out, at least a few days to be worth while, probably years since I'm a nerd). I do have this setup now plotting 2000 points (little over an hour and a half) for fun. I could get tricky and have the program start to average 2 or three nodes and replace them with the average, but this program only collects as long as the program is on (it doesn't load any historical data).

it's only useful since I spend 8+ hours a day in front of a computer working. This way I can see what's going on without being near the controller LCD. It's as much as anything, a proof of concept and an excuse to learn a new windows forms control or two.

Today's task: get the controller packaged in the case. This will mean letting the tank run controller-less for a while- one of the downsides to having a thriving test bed tank.
 
Data storage is also where i ran out of steam on my project. I don't know how to operate a database (nor have one installed on my BB, but thats a minor issue) and don't really think having text/json files for temp data is all that smart. Other things get in the way of trying to figure that stuff out too...
 
You could just write to a cloud service like carriots or xively from any device. I recently started logging data to carriots from arduino, then displayed it with ducksboard.
 
Back
Top