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

Display or not...

That is where I am torn. I flunder back and forth between embedded solutions and PC based solutions and with a hybrid solution in between . I am still leaning toward individual autonoums controllers for dosing, lighting, top-off, all reporting to the PC based solution for logging and/or user initiated updates or overrides. The idea of a single "life support" controller is not something I have ever been comfortable with.

The alure of the netduino is the event driven .NET foundation and the ease of allowing it to communicate via TCP/IP to the host controller.

I've toyed with the idea of a PC based solution more and more after you started running ideas around here ;)

I keep coming back to the following realizations:
  • My return pump is on a 'normally on' relay, i feel better knowing that with the controller off the pump runs
  • ATO function is based on a normally closed relay, has a few fall backs and is pulling from a limited volume
  • if the heat was out, my T4 return pump will likely keep things mostly alive
  • the LED's default to off with resistors inline on the PWM lines

Controller off = dark, cooling tank with return flow still flowing.

I did solve my LCD + LED issues by putting the LED power supply not on a relay. I'll try a loop and adding a ground to the power supply, see if I can isolate it enough to stop behaving badly. I'd rather have the LED power supply in an 'always off' relay vs counting on the resistors onboard to sink the PWM pins.

As for the display- I added it primarily because I wanted to play with one and an i2c based one seemed ideal (it's functioned well). I also figured if I added it to see the basic current status I wouldn't feel the need to setup a webserver on the Netdunio (headache for me, I prefer not to) and could focus on generating web requests that had the payload data vs responding to requests. This simplified things a bunch, frankly. If I do anything I'll probably create a windows desktop program that does 2 way communication on a low level to get status and command changes. I can get 'commanded' changes from a webserver on a timed basis within the response of a webrequest without the added overhead of running a web server, so If I really wanted to turn off the skimmer remotely for instance, I could.
 
I neglected to add that part of my solution is monitoring RMS current/power on all 18 output channels of my system. That with the multiple temperature probe points and complex 6 channel doser have driven me toward wanting a well layed out realtime GUI.
 
Yea you've certainly dove deeper down the rabbit hole than I have. What are you using to monitor current? I'm looking for something I can read my *dunio for total system power usage across a couple circuits as well as monitoring if my furnace is on so I can shut off my exhaust fan to avoid a possible backdraft issue.
 
Also, for those keeping score at home, the whole controller currently looks like this:




Full development system shot:

 
Yea you've certainly dove deeper down the rabbit hole than I have. What are you using to monitor current? I'm looking for something I can read my *dunio for total system power usage across a couple circuits as well as monitoring if my furnace is on so I can shut off my exhaust fan to avoid a possible backdraft issue.


That is another rabbit hole in itself. I have several working protypes using a few different solutions but have not settled on a final solution yet.
 
So I etched a PCB (maybe 14" long) to hold all 18 channels. The photos do not show the connectors attached yet.

The board will sit in my NEMA enclosure between the breakers and DIN terminals. I have tested it a bit, and the crosstalk (at this point) is not an issue between channels. However, the final results will depend on my chosen measurment solution.

Note the PADS on the bottom for SMT burden resistors. I have not put them in place yet :)


ct-board-front.jpg


ct-board-back.jpg


CR Magnetics and Triad (if I remember) come from the same India supplier (TALEMA). All of the models are the same, regardless of the model number. In other words they all have the same number of turns and package size and only differ in the silkscreening on the package... The data sheets differ, but only in the sense that the graphs show the results when differnet burdens are used.
 
CTs are straight forward as is the general concept of reading them. If you do it "raw" you need to do all of the sampling (considering zero crossing) for both voltage and current in the MCU. This is not hard, but once you consider filtering for anomalies, the timing and the number of channels, it is a PITA.

The next best option is to use some OPAMP and RC circuit filtering off board to do the averaging and less sampling and math on the MCU. This gets kind whacky too.

The better, cleaner option is to use one of any number of integrated circuits that will either do all of the work and feed the MCU the data (kinda spendy per channel) or do the heavy lifting of RMS averaging and output a proportion current or voltage (a little less spendy).

The later is the route I am likely going to take, though I do not have the datasheet or breadboard laying around to tell you the chip I am using. I think I settled on one of the Allegro chips :)
 
Seems to be a bit more complex than I really want, but who knows. Will have to address the furnace question eventually, as I don't want to be venting humid air when the furnace kicks in and cause a backdraft and poison myself with carbon monoxide.
 
Just sensing the presence of current is easy enough... it is measuring it that complicates matters. There are dozens of cheap current sense devices (a few bucks) that could be used to determine when the blower motor is running.
 
Just sensing the presence of current is easy enough... it is measuring it that complicates matters. There are dozens of cheap current sense devices (a few bucks) that could be used to determine when the blower motor is running.

Oh thank goodness. I started reading threads about having a dedicated arduino to do the math on those things and.... I suddenly lost interest. I think I can probably sense what's going on based on the thermostat wiring, as well. Figuring out how much power the tank is drawing is another project for another day.
 
back from the honey moon. Need to revise my ATO setup, though what didn't work will be different on the big tank. Also need more heat power with the top off and AC in the house on (cooling via evap is crazy) thought I had a heater go bad on me. Have heat completely handled by the controller at this point, with the heater set 2 degrees higher (81) than the controller is configured for safety.

Time to get my shift registers hooked up, and start working on an enclosure for the controller.
 
New heater in the tank, temp stable! Woohoo! The temp logging paid off big time while diagnosing this one, as I could see it dip at night easily. I really need to get my shift registers done and cabling made so I can use all 8 outlets switched though. I'll also convert my heater outlets to normally off, since I'm using heating tubes without temp settings. I'd rather the temp slowly drift down than skyrocket to the 90's.
 
Latest Download

Latest Download

Also, wanted to provide latest source that is being ran live besides removing the auth bits for logging, for obvious reasons. Source is attached.
 

Attachments

Added a webserver to the device, currently outputs status type stuff. Not sure which direction I'd like to go- I do know I want history graphs and what not because I'm nerdy like that and I don't want this device to make those/keep the records etc. So pulling that into another webserver is going to have to happen. It's just if I want to have one web site (reefin.net for instance) be a proxy to my device, what it knows/logs on it's own is there + pulls some info in real time... not sure yet. Was a bit reluctant to add a webserver but this one is pretty light weight and ignores most of the complications of handling things it won't have to.
 
Here is where I am data pulling wise via webserver to XML:

HTML:
<status>
     <temp>78.462500000000006</temp>
     <memory>96600</memory>
     <heating>True</heating>
     <ato>
          <status>False</status>
          <lastRun>06/25/2013 21:29:27</lastRun>
     </ato>
     <lights>
          <phase>Dusk</phase>
          <light1>
               <ch1>11</ch1>
               <ch2>78</ch2>
               <ch3>117</ch3>
               <ch4>78</ch4>
               <ch5>11</ch5>
         </light1>
     </lights>
</status>
 
Its so amazing for me as a non-understand-electrical person.

I really want to make it by my own, but i still confuse.

anywaay, its really a good work. :thumbsup:
 
Back
Top