# Universal controller



## cgmark (Aug 18, 2010)

I have for a long time been using a heater controller I made for my tanks. It came about after seeing all the problems with aquarium heaters and I still see people complaining about those same issues. What I would like to do is make this controller available to anyone that wants one and to do that I need some help and input.

I am not looking at doing this for profit , I just want to help out fellow fish keepers. I realize there are a few other commercial versions but the difference in what I have is that it was designed with a 'do no harm' approach. I started off by thinking what could go wrong and worked up from that.

The version I currently use has the ability to control up to 3 devices. One of the devices is heater specific and the other 2 devices can be lights, pumps, motors, whatever. The limit is 15A for each device so even really large heater setups will work okay.

The reason for the heater specific device is that it has built into it some important safeguards. The first safety feature is that it monitors the current consumed by the device. For example, if the first device is turned on by the controller and low or no current flow is detected that would indicate something is wrong with the heater. If the switch for the device should fail and the relay become stuck, really really unlikely due to using high quality relays with a 1,000,000 minimum switching lifespan, then the controller knows that too. The temp sensor used is accurate to .5 degree. The temp sensor I recommend to be in an opposite side of the tank away from the heater, that allows for much better temp regulation. Another issue I addressed is what happens if the sensor comes out of the water, then it would be measuring room temp. The sensor used also has detection for when it is out of the water in case you were moving things around and somehow let the wire slip out of the tank.

The controller has a graphical LCD display for temps, lighting times, and a full clock and calendar for programmable control of events during the day.

Now the reason for my posting, how to best get this to as many people as possible in the easiest way possible and for not much cost. 
Parts cost for what I have now is about $65 . There are places corners can be cut and still have a lot of the features intact. Changing the graphical LCD to a text only LCD would shave off about $15 . Relays could be changed out for lower quality, but I don't like doing that and the savings is only about $5 . I think with careful shopping for parts it could be as low as about $40 and that would be like the controller I have now.

The next issue is how to get it to people that can use it. The problem I face is I am one person and have to make the controller . I am willing to donate my time to get some of these made but if it becomes too much I can't do it all, takes about 8 hours to make one. I realize not everyone has soldering and electronics skills so trying to figure out how to solve that issue without having to farm out production and all the cost associated.

One thing I forgot to mention is that the reason I call it a universal controller is that the heart of the controller uses a very fast modern embedded processor. The processor capacity so far is only at about 10% and it has interfaces to the outside world that only require 3 wires. You could expand it in the future to control feeders, power heads, generate waves, refill the tank when water level drops, and do it all as small modules that you just add on later. You could even make it connect to wifi if you wanted and show all the stats on a web page, it is that powerful .

I really want to see more people using this and need the input from others to make it happen.


----------



## S14Swap240sx (Jan 3, 2011)

Sounds like you are describing a reef keeper light.. at nearly 60 in parts, and 8 hours in labor, and 120 dollars for a RKL..

I mean what *** seen in the past was piggy back fuel controllers and full standalone fuel systems for cars, sold un-assembled with detailed instructions for a fraction of the cost of prebuilt units.

Possibly something worth considering? Sell partially assembled. Save your self some time and let the DIY'ers have their fun with it.

After really looking into it tho, the whole heater control market is flooded, with outstanding units at great prices.. Not everything is amazing, but a good bunch are. I would highly consider having some sort of PC Integration aswell as wifi capabilities, stardard.. at a cost similar to a standard RKL to really make an impression and get users demoing the product.


----------



## Rhinox (Sep 10, 2009)

Assuming that A) you want to see other people using this, and B) you're not interested in profit are both honest statements, then I think what I would be most interested in seeing first before I would even think about using one or buying a unit from you would be a detailed guide showing all the parts you used, how you put it together and program it, with pics, and maybe a video as well showing everything the device could do. I'd want to know what exactly it is I'm buying, and how I could put it together myself (this is the DIY forum afterall). Probably, if I wanted to buy a premade unit, I'd buy one from a company with warranties, customer support, etc.

Also, using this site to sell complete units even if not for profit may break site rules anyways.


----------



## cgmark (Aug 18, 2010)

S14Swap240sx said:


> Sounds like you are describing a reef keeper light.. at nearly 60 in parts, and 8 hours in labor, and 120 dollars for a RKL..


What I currently use is about equivalent to the RKE basic, a $249 item, ouch they got quite a markup on that.



> I mean what I've seen in the past was piggy back fuel controllers and full standalone fuel systems for cars, sold un-assembled with detailed instructions for a fraction of the cost of prebuilt units.
> 
> Possibly something worth considering? Sell partially assembled. Save your self some time and let the DIY'ers have their fun with it.


I thought of doing it that way but when you start to buy things partially assembled you start racking up cost. About the best I can come up with would be some of the modular boards that have most of the basics compete. Doing it that way though , the lowest thing I can find that will work is about $40. That gives it a really nice full color touch screen and the only thing the user would have to add is a board for the relays and power interfaces, a much simpler board to put together.



> After really looking into it tho, the whole heater control market is flooded, with outstanding units at great prices.. Not everything is amazing, but a good bunch are. I would highly consider having some sort of PC Integration aswell as wifi capabilities, stardard.. at a cost similar to a standard RKL to really make an impression and get users demoing the product.


This is not about a commercial product being sold for people to just plug and play , I could have gone that route but decided it isn't what I want for this , I want it to be a more community involved project and will be releasing it all under the open hardware license so others can improve on it as time goes by.

Things like wifi are mainly just cost related. The wifi modules themselves are about $40 and that is really all that is needed to add that support beside writing the code.


----------



## cgmark (Aug 18, 2010)

Rhinox said:


> Assuming that A) you want to see other people using this, and B) you're not interested in profit are both honest statements, then I think what I would be most interested in seeing first before I would even think about using one or buying a unit from you would be a detailed guide showing all the parts you used, how you put it together and program it, with pics, and maybe a video as well showing everything the device could do. I'd want to know what exactly it is I'm buying, and how I could put it together myself (this is the DIY forum afterall). Probably, if I wanted to buy a premade unit, I'd buy one from a company with warranties, customer support, etc.
> 
> Also, using this site to sell complete units even if not for profit may break site rules anyways.


This is NOT, I repeat NOT about selling a product to people. The hardware is going to be released under the open hardware license. Meaning anyone can make changes, as long as they contribute those changes and give credit to the people involved. I want this to be a fish keepers community type project, where even if you don't have electronics experience, you might have a good idea and that idea will be open for everyone to see who contributed it and credit given to them. I just didn't want to go through the work of taking photos, setting up a website with code, etc unless there was sufficient interest, I have other projects I also work on as a hobby and can use the time for them .

The main obstacle is how to get a working unit into peoples hands the easiest way possible. This is not going to be a commercial unit, where you get it in a box, with manuals, a case, and everything plug and play, that isn't where I am coming from. This is much more DIY where you will have to come up with your own case , your own cords to connect everything and figure out your own mounting, etc. The protoype is basically just circuit boards with parts .

For the curious, this would probably be the best choice for the main controller board. My software would work and it has most of the basics ready. All that would be needed is a daughter type board that connected to it. I have never ordered from China off ebay, so not sure about the times for shipping, seems to vary a lot. Programming could be done via the sdcard or the USB connection, I currently use something called a serial bootloader, but that requires serial ports and most pc dont have them anymore so would require buying an adapter cable. USB would be best I guess.
http://www.ebay.com/itm/STM32F103VET6-A ... 824wt_1163


----------



## S14Swap240sx (Jan 3, 2011)

well, id love to see progress, and sure hope this thread doesnt get locked.

i find that there will not be much demand tho.. this is really complex, and when it comes to having no manual, text support, or any of that stuff, most people will just be turned off from the whole thing. If you can put some stuff together and info on how to build, load software, and what kinda connections are needed id be up to giving it a shot, but once prices start to tower over 100 dollars, regardless if they are for profits or not, i will begin to consider other units


----------



## Mr.Dempsey (Jan 4, 2012)

My heater works just fine pluged into the wall lol


----------



## cgmark (Aug 18, 2010)

S14Swap240sx said:


> well, id love to see progress, and sure hope this thread doesnt get locked.
> 
> i find that there will not be much demand tho.. this is really complex, and when it comes to having no manual, text support, or any of that stuff, most people will just be turned off from the whole thing. If you can put some stuff together and info on how to build, load software, and what kinda connections are needed id be up to giving it a shot, but once prices start to tower over 100 dollars, regardless if they are for profits or not, i will begin to consider other units


I realize it will not be something for most people but I am hoping that even those who decide not to actually make the device but may still have ideas that are useful. Price is a HUGE factor for me. I don't have much disposable income, I don't even want it to reach the $60 price in parts that is why I keep trying to think of ways that will keep it cheap.

If people are interested , a controller for just a heater without the current measuring stuff and stripped to the bare minimum of just 1 device controlled could be done for probably $20-25 and would require nothing more than being able to plug in items and crimp together some wires. 
I just though that the difference in functionality between spending $25 and $50-60 was worth it.

I think the biggest challenge will be finding parts that are just plug together vs something having to be custom made.

There are a bunch of ways to cut costs, and I think a lot of them are not that difficult but I have a lot of experience in electronics so what may seem easy to me may seem difficult to someone else. 
For example the temperature sensor. The part used is only $2 . It has 3 pins, 1- 5volts dc, 2 - data out, 3-ground. A user simply has to attach a wire to each pin and waterproof the connection. Waterproofing is really easy because they make waterproof heat shrink which has a hot melt glue inside that seals it perfectly. I don't know if what I just described is too complicated for some, but the savings here is about $10 from buying a ready made cable.


----------



## cgmark (Aug 18, 2010)

Mr.Dempsey said:


> My heater works just fine pluged into the wall lol


Until the thermostat sticks and you come home to 90F water.


----------



## Rhinox (Sep 10, 2009)

Well I guess your original post sound like you were going to build and distribute working devices to people for cost which is why I mentioned it might be breaking site rules even if its not commercial and not for profit. They'd probably want you to use the trading post for that, like all the other equipment people sell. If thats not really the case, then this thread is probably fine.

This kinda stuff really interests me and seems like something I'd like to do, but I wouldn't just want a completed device handed to me, even if still had to mount it, build a case, find wires, etc. I'm not knowledgable enough to know how to do it without a guide or minimal guidance though. What I was suggesting was instead of trying to distribute working units, it may be easier to distribute plans or a guide online for people to follow to build their own from scratch. I think I've heard you mention your controller around the site before and I've always been hoping you'd post more details about how you built it and what all it does.


----------



## cgmark (Aug 18, 2010)

Rhinox said:


> What I was suggesting was instead of trying to distribute working units, it may be easier to distribute plans or a guide online for people to follow to build their own from scratch. I think I've heard you mention your controller around the site before and I've always been hoping you'd post more details about how you built it and what all it does.


This is why I posted. I would like other people to be able to benefit from it but trying to overcome the obstacle of how to go about that is what I am trying to figure out. This happens quite a bit in the electronics hobbyist market. People come up with an idea and make the project open to the public, the main hurdle usually is how to get it simple enough that anyone can build it and not lock yourself into having to provide or sell something. A good example is arduino. Arduino was started by a group of artists and electronics enthusiasts that wanted to give those without much electronics skill the ability to make use of the technology. The main page for that is here:
http://arduino.cc/

Arduino took the approach of making a board containing the main processor and then additional boards called shields would stack on top of it by just plugging in. It works quite well but the problem starts to become that the stacking platform doesn't work for everything and price of the shields is often way more than component cost.

I can post schematics but not everyone can build from schematics or would want to so I think finding something like the arduino, lower cost someone could use as the starting point would be a good option.

Here is a very simple display I used, newer one is more graphics, charting etc.









The relays, power supplies, outputs.


----------



## Mr.Dempsey (Jan 4, 2012)

cgmark said:


> Mr.Dempsey said:
> 
> 
> > My heater works just fine pluged into the wall lol
> ...


Thats why i run 2 150s if one fails i would notice before it cooks my fish :thumb:


----------



## malady (Nov 20, 2011)

sounds good
If you can keep the cost down I would be interested


----------



## fmueller (Jan 11, 2004)

cgmark said:


> a controller for just a heater without the current measuring stuff and stripped to the bare minimum of just 1 device controlled could be done for probably $20-25 and would require nothing more than being able to plug in items and crimp together some wires.


If you can make a super reliable heater controller available for $25 or less, I think you could have a market. Heaters fail all the time, and are one of the top problem items in this hobby. In almost all cases it's the built in controller that gives up the ghost. The advantage has to be die-hard reliability, meaning the thing has to work in 99.99% of cases for 10 years plus without a hitch. I am not sure how easy it would be to achieve that type of reliability with a home made product. Your competition would be something like a Ranco ETC-111000. They have the reliability, but run about $50 plus.

Any extra functionality is just fluff in my opinion. I run the lights on my 240G with a Home Depot timer that was well under $5. It's been running for 7 years without any trouble, and I am confident it will run another 7 years. What else is there to control in a fish tank? And if I really decide to change the lighting period or the temp - I haven't done so in 7 years for that tank - I can open the cabinet and find the controller. Wireless capability is not required.

Don't get me wrong, I can see how somebody who is really into electronics might find it fun to built the device you are proposing, but that's not necessarily for fish nuts, but for electronic nuts who also happen to keep fish


----------



## cgmark (Aug 18, 2010)

fmueller said:


> If you can make a super reliable heater controller available for $25 or less, I think you could have a market. Heaters fail all the time, and are one of the top problem items in this hobby. In almost all cases it's the built in controller that gives up the ghost. The advantage has to be die-hard reliability, meaning the thing has to work in 99.99% of cases for 10 years plus without a hitch. I am not sure how easy it would be to achieve that type of reliability with a home made product. Your competition would be something like a Ranco ETC-111000. They have the reliability, but run about $50 plus.
> 
> Any extra functionality is just fluff in my opinion.


Reliability isn't a problem , the biggest issue I have right now is figuring out how to make it something people can get all the stuff for without having to manufacture things myself or without them having to be knowledgeable about electronics to build something themselves other than some very basic skills.

Parts wise the cost of such a controller is far less than $25, it is the assembling that becomes the problem . Something that has been overlooked when I was describing the setup is that it has the possibility to control not just 1 heater, but really as many heaters as you want on as many tanks as you want. The scaling cost for each tank you add is about $5, you just need another sensor and another relay, so people with multiple tanks would only need to run a 4 conductor wire to each tank and can locate the controller itself anywhere. The wire doesn't need to be anything special, one of those 50ft phone extension cables that sell for $3 will work fine.

The reason for the extra functionality was mainly targeted at people with more than 1 tank wanting the ability to easily control those tanks without having to manually set each one.

I want to make the point again that this is not about bringing a commercial product to market but something for the DIY crowd that is willing to learn a little and do most of the work themselves.

I added up what it would cost in parts to make a controller like the Ranco unit with everything but the board and case and would have a 2 digit LED display for the temp and two buttons for up and down temps.

pic18f24j10 - $2.50
omron relay - $1.25
2n3904 - $.10
1n4004 - $.04
10K x 3 - $.20
molex connectors - $1
tactile switches - $1
2 - 7 segment led - $2
DS1822 sensor - $4.50
misc wire - $1
Heat shrink - $1
power supply - $2
------------------------------
$16.59


----------



## mpowers (Apr 8, 2011)

I like it the idea and always enjoy trying and learning something new. I think your price point of 65 is good as well for all the functionality of the widget. Let me know how I could help..


----------



## Rhinox (Sep 10, 2009)

cgmark said:


> I added up what it would cost in parts to make a controller like the Ranco unit with everything but the board and case and would have a 2 digit LED display for the temp and two buttons for up and down temps.
> 
> pic18f24j10 - $2.50
> omron relay - $1.25
> ...


See, now all I need is info on where I can buy that stuff, a guide for putting it all together, and a guide for programming the thing to do what its supposed to do, and I would happily piece it together and give it a try.

Like other DIY threads, the spraybar thread for example. "Here's a list of parts. I connected A to B, and C to D, and then did this and this and this and here's the pics of me doing all this this and here's the finished product in operation see how cool it is now don't you want to build one too?" Thats the kind of info us DIYers want to see, and then we can decide what we think we can and can't do.


----------



## pikayooperdave (Jul 10, 2009)

Rhinox said:


> cgmark said:
> 
> 
> > I added up what it would cost in parts to make a controller like the Ranco unit with everything but the board and case and would have a 2 digit LED display for the temp and two buttons for up and down temps.
> ...


...and this is exactly the type of info that the OP has neglected to provide in this thread. He has given lots of teasers, but no direction on how to build the thing. His claim is that he wants to share information among other hobbyists. He hasn't shared any meat and potatoes. Regardless of what he has said, it seems to me like he wants to make money from this. That's fine, I don't blame him other than for the deception.


----------



## cgmark (Aug 18, 2010)

pikayooperdave said:


> ...and this is exactly the type of info that the OP has neglected to provide in this thread. He has given lots of teasers, but no direction on how to build the thing. His claim is that he wants to share information among other hobbyists. He hasn't shared any meat and potatoes. Regardless of what he has said, it seems to me like he wants to make money from this. That's fine, I don't blame him other than for the deception.


What would you like me to share ? A couple things you need to understand.

The biggest issue I am having is how to make this something hobbyists can do . If you go out and buy all the parts on pre-made boards and use some sort of quick wire connection to put it together you are going to spend over $200. The programmer for putting code on the chips is another $60. The compiler software is over $500.

I can write the code and put it up for download so that removes the compiler problem but it doesn't remove the programming problem. The chips from the factory are blank, they will not do anything without someone first putting on some starter code. Code exist that would allow users to upgrade the software with USB but you first have to get the code onto the chip, it is a chicken and egg type thing.

The next cost is the board itself. You can buy pre-built modules and plug them together but in doing that you start racking up cost quickly. The only way to do it and keep cost down is to buy the parts and place them on a custom circuit board. The issue with that is that custom made boards are not cheap to have made unless they are bought in quantity. You can make them yourself which is what I do, but the materials to get started with that are about $100 and the quality of the boards is far less than the PCB services and the cost per board is higher.

The next problem is how to get all the parts soldered to the board, soldering them isn't a difficult task but it is still something else for the user to do .

What I have been doing lately is searching with distributors for a pre-made board that has enough of what we need but not stuff we don't . There are lots of them on the market and that is probably going to be the way to do things.

If I wanted to make it something I sell, I could do that tomorrow and I wouldn't be on forums talking about it. I worked for GE consumer electronics division for years and have worked on tons of electronics for them and know how to get a product to market, I just don't want to do this project that way. The reasons are I became disabled and am on low income now. I like keeping fish as hobby but was appalled at the cost of a lot of the equipment when there was no justification for it costing what it does, especially the inflated prices for marine related stuff. I get annoyed when I see something costing so much that contains so little. I can write the code and help with instructions but what I don't want to get into is me having to personally make or sell anything. So it comes down to figuring out the easiest path, I can list parts and post schematics all day long but the people that can use it are going to be very few, whereas if I can find some way to make it something people can buy the parts for and assemble without too much trouble it can be something a lot more people can use.

If there is questions , ask them , I can't know what everyone wants to know and the whole reason I posted was to get feedback .


----------



## tim_s (Nov 27, 2011)

Hi cgmark,

First I just want to say thank you, I think what you created is great and the idea of giving back to the community here is great and commendable.

I do however agree that a lot of products already exist and have a much smaller learning curve but this is a good find for those who prefer to customize their setups. Some like canister filters I prefer sumps if the job fits: I prefer to have control and customization.

I enjoy the process, being in schooling - I did electronics.


----------



## cgmark (Aug 18, 2010)

Thanks for all the input from everyone. I have found what I think is the perfect candidate for a board that can be used for the project and is low cost enough for just about everyone. It doesn't have a full graphical display, but has enough of a display to get across what is going on like temps or time control settings and still retains the ability to be expandable in the future if people want to do that.

The board is an ARM processor board from ST Electronics. The model number is STM32L-Discovery. In the USA it retails for $12. On the board is an ARM processor, 6 digit alphanumeric display , 4 buttons that are touch activated or can be used as a slider, usb connector, coin cell battery holder on the back side to retain settings and time.

This board will fit the project well because it has many interface pins to make it expandable. The board comes ready to use from the factory so can be programmed easily by anyone without extra tools, just need a usb cable and software.

Here is how someone will build the project and things you will need.

STM32L board
temp sensor
wire and heat shrink tubing that has glue inside - sold as waterproof heat shrink
USB cable 
Power supply that can power a usb device through the cable - something like an old phone charger or power supply that has the usb port for powering devices. You can get them cheap off ebay, less than $5.
Relay board - discussed more below.

Starting with the temp sensor. There are 3 ways this can be done. The first way is with a thermistor. Thermistors are cheap, about $1 each. They have 2 connection points. Each wire then connects directly to the board. Thermistors are great because they are so cheap but they d o have a downside and that is each one is a little bit different . Thermistors work by changing resistance with temperature, as temp rises the resistance changes , the amount it changes varies from each thermistor so in order to use it you have to calibrate the measuring device by placing the thermistor in a liquid of known temp and measuring the resistance. This can all be handled in software but would mean that each user would have to get some water and measure the temp with a thermometer and then input that into the board to set the temp calibration. It really doesn't change over time much so this is a one time deal.

Thermistors require 2 wires for each temp you want to monitor. The second option is using zener diodes that change with temperature. Same general process as the thermistor for calibrating it.

The last way is with a digital temp sensor. The DS1822 is a popular one and versions can measure within .5C accurately. They require 2 or 3 wires and require no calibration. Connect your 3 wires and you are ready to use. They also have the benefit of being able to share the same wire. For example if you wanted to control 2 different temperatures you would have 3 wires coming back to the board and all your extra sensors can attach to those same 3 wires, it is like a party line where up to 256 devices can be on the same 3 wires. The biggest downside of these sensors is cost. They average around $5 each.

I am preferring to go with the DS1822 but want to hear input from others.

Power supply
The power for the board comes from the USB connector. This needs to be powered at all times for the board to work. If you have something that can provide +5V , an old router power adapter, whatever, it just needs to provide +5V at about 500ma, more amps will hurt nothing so if it is 5V at 1A or 5V at 2A that is fine too. There are places on the board where you can attach power wires so if you don't have a USB connection type supply that is where you can attach whatever supply you have.

Relay Board
This is probably the most important board next to the controller board. Relays are mechanical switches with a magnet on one side and contacts on the other. Whenever the controller sends power to the relay, it will turn on or off your device. The device can be a heater or lights or a pump.

Relays come in lots of types. There are 2 main ones on the market now. Solid state is one type and has the advantage of nothing mechanical moving. The downside of these devices is they are much more costly and they also generate heat themselves depending on the load attached. So while they are good at switching something like a 50W heater ,when you start using something like a 200W + heater or a lot of lights they become a lot more costly and generate a lot more heat .

The other type is the mechanical. Mechanical relays downside is they make a click sound when they open and close. Some people find that annoying, I like it because it lets me know everything is working and isn't that loud to start with. The contacts on the relay that do the switching of the powered load are rated in current carrying capacity of Amps. A typical USA home outlet is rated for 15A and a 200W heater is about 1.5A . When choosing a relay look for ones that are rated at double what you expect to control. That ensures the lifespan of the contacts will be a long one. A good relay rated for something like 10A controlling a 5A load will last about 1-2 million clicks. That is more than 10 on off cycles per hour for 10+ years.

Mechanical relays do not generate much heat at all and are not very expensive so they are my choice but I want to hear from others.

Relay boards are for sale everywhere. What you want is a relay board that says it has AVR/PIC/ARduino inputs or TTL. Generally these are +5v inputs . Make sure the relays used are what you need for the loads you want to control. You will also need to power the relay board, so if you can find one that does +5V relays and not the usual +12v relays that is even better. Otherwise you will need a second wall adapter rated for +12V at about 500ma. Again old router supplies, just abut anything will work.

Board with 2 relays:
http://www.amazon.com/SainSmart-2-Chann ... B0057OC6D8

4 relays
http://www.amazon.com/SainSmart-4-Chann ... pd_sim_t_1

Remember you will need 1 relay for each device, heater, light, etc. 
devices can be combined on one relay as long as you stay under the current rating for the relay. So you can plug in 4 lights to one relay as long as the total power doesn't exceed the rating.

Connecting devices:
The easiest way I have found to connect devices to the relays is to buy some cheap extension cords. On the cord cut one wire, leaving the other wire intact. The ends of the cut wire are what will connect to the relay. You plug in the cord like normal then plug each device into the extension cord. Relay closes completing the circuit and your device powers on or off.

What I need now for the next step is for people to check that they can get the ST board where they live. ST is a huge company and has distributors around the world so I don't think it will be a problem, but I want to check before we commit to this specific board.

Distributors:
http://www.mouser.com/
http://www.digikey.com/
http://www.farnell.com/

Search for 
STM32L-Discovery

Also need to know what sensors people prefer or any other questions.

Once you have all the stuff the process is basically. I will upload code. You download the code, run a piece of software on your pc and it will upload the new software to the board through USB. After that all you have to do is use the buttons on the board to set functions.

The sensors will connect to the ST board, read the temps and control the relays on the relay board. There will also be a clock/calendar on the device so it can control devices based on that for lighting times, feeding times, anything that can plug into an extension cord. When we complete the basic heater and timer items then we can discuss getting into other features like a better display or even wifi if people want that sort of thing. Other options are Ph monitoring, water level control, water leak alarms, etc. Really nothing stopping improving off the basic setup so we can build on it without having to change to something new.

This should be doable for under $30.


----------



## tin man (Dec 26, 2011)

I would be very interested in this technology. Most of this hobby for me is diy . I have built my own sump my own tanks and I central filter about 500 gallons of water now I have a plan to use a zone off my boiler to heat the tanks the only thing I was not confident about was the controller. opcorn:


----------



## mpowers (Apr 8, 2011)

DS1822 would be my choice of the three you gave. Although maybe it's a programming issue (I'm not a programmer or electronics person) the Thermistor could have an x=y value. Ie the change in resistance represent a change in temp for as long as all else is constant. Realistically we're talking little difference in monies so the DS would be my choice.

I would say the more relays the better, even if you don't use them all now, you/someone may in the future.


----------



## cgmark (Aug 18, 2010)

mpowers said:


> DS1822 would be my choice of the three you gave. Although maybe it's a programming issue (I'm not a programmer or electronics person) the Thermistor could have an x=y value. Ie the change in resistance represent a change in temp for as long as all else is constant. Realistically we're talking little difference in monies so the DS would be my choice.
> 
> I would say the more relays the better, even if you don't use them all now, you/someone may in the future.


I think the DS1822 will be the way to do it, easiest for the user and like you said cost isn't much more. Programming for the part is pretty simple , 3 wires to connect GND, 3.3V, DATA. For those worried about a potential short inside the tank of the 3.3V , don't be concerned. If the heat shrink were to fail and it were to contact the water the current used is around 10ma, that is about 200 times smaller than that of a AA battery. The sensor also has CRC checking where the control board can tell if the data has been corrupted due to wiring or a short and let the user know.

I have ordered one of the ST controller boards and should have it next week so I can make sure it has everything needed and will not be a problem for users with little electronics experience. It looks like this is going to be doable with just some very simple soldering skills. If users can join two wires together and solder them together they should be all set.

There really is no limitation on the number of relays other than program space to store the status of the relay , either on or off, and that can handle 50 of them with no problem. The only other obstacle is the controller board has to have enough ports to control those relays and the ST board has enough easily for 8 relays and 8 sensors without adding anything else. Once you use up the ports that are on the controller board you have to add an i/o expander chip. These sell for about $3 and takes 3 ports from the controller board and adds another 16 ports. These expander chips can be chained together so that you get

Controller board 3 ports --> expander chip ->16 ports - 3 ports for next chip = 13 ports ---> expander chip , etc

So each expander chip adds another 13 ports for relays or sensors. You are limited to 256 expander chips so 256 x 13 = a mix of over 3000 relays and sensors


----------



## cgmark (Aug 18, 2010)

Short update. 
The ST boards are what we will use. They are exactly what is needed so if you want to do the project and have the spare cash go ahead and order one from somewhere. I got mine from mouser electronics. They cost $12 .

To get started here is the basic parts you will need:

ST Discovery board that has the LCD $12
http://www.mouser.com/stmicrostm32ldiscovery/

Relay board with at least 2 relays $9 ( 1 relay for each device controlled)
http://www.amazon.com/SainSmart-2-Chann ... B0057OC6D8

DS18b20+ temp sensor $5 ( you need 1 for each temp you want to control)
http://www.mouser.com/ProductDetail/Max ... VYI39eg%3d

Power supply , 5VDC at least 500ma , $6
http://www.amazon.com/Premium-External- ... 683&sr=8-1

Total cost to get started , $32 + whatever shipping.

In addition to the above you will need some cable that has 3 wires inside. It will not be carrying much current so really small stuff is fine. Phone extension cables work well, just make sure it has more than 2 wires inside, some don't to save cost.

If you want to save some cash you can get free samples of the DS18B22+ sensor from maxim-ic. You can get 4 of them shipped for free in the USA, not sure about other countries. Go to their site and click the samples link:
https://shop.maxim-ic.com/storefront/se ... SearchLoad

You will have to register with the site to place a sample order, the email used cannot be from a gmail, yahoo, or other free email site. They do this to prevent people from making multiple accounts and ordering lots of free stuff. After you register type DS18B20+ into the sample box and make sure you have the TO92 type selected on the results, click sample and it will add it to the cart, then checkout and you are all set. They will mail them to you saving you about $10-$20.

I'll post some pics later today showing the basic functions we have so far.


----------



## liquid134 (Feb 22, 2010)

*** had similar ideas but using an arduino. (being that *** had a freeduino for a long time with no dedicated purpose). cant wait to see your progress.


----------



## cgmark (Aug 18, 2010)

Just an update to let everyone know the reason for no pictures yet, the sensors I needed from maxim haven't arrived yet, not sure what is going on with the order, as soon as I get them will post the pictures and some tutorials on how to start setting things up.


----------



## Rhinox (Sep 10, 2009)

Hey just checkin in. Thanks for tracking down links for all the components. I think I might give it a go. Just wanted to confirm that this 4-channel relay would work:
http://www.amazon.com/SainSmart-4-Chann ... 50-2717512

Seein' as its an extra 2 relays for only $5 more I thought it'd be worth it. I'd probably ultimately end up using this as the temp controller for a 500g tank I intend to build in the next year or so, so having 4 relays would allow me to connect up to 4 smaller heaters, yes?

For the "small cable with at least 3 wires" - I have a bunch of cat5 cable lying around, that should work, right?


----------



## cgmark (Aug 18, 2010)

Rhinox said:


> Hey just checkin in. Thanks for tracking down links for all the components. I think I might give it a go. Just wanted to confirm that this 4-channel relay would work:
> http://www.amazon.com/SainSmart-4-Chann ... 50-2717512
> 
> Seein' as its an extra 2 relays for only $5 more I thought it'd be worth it. I'd probably ultimately end up using this as the temp controller for a 500g tank I intend to build in the next year or so, so having 4 relays would allow me to connect up to 4 smaller heaters, yes?


Yep, that relay will work fine. You can put small or large heaters , size just depends on the relay capacity. The ones on that board are 10A rating so no more than 1200W per relay, way more than a tank needs I know, but that just means the relays will outlive us probably.



> For the "small cable with at least 3 wires" - I have a bunch of cat5 cable lying around, that should work, right?


That will work, make sure it is copper wire inside it , some of the cat5 cable is steel wire with copper coating and it is really bad stuff to make connections with as it doesn't twist together or solder well.

One correction I need to make is the part number of the sensors. I accidentally used two different ones above DS18b20+ and ds18b22 , the two parts are basically the same except the DS18b20+ has a better accuracy of .5C while the ds18b22 is 2.0C . No other difference in the parts and either will work but the software will identify which is being used and the accuracy will only be as great as the sensor used. 2 degrees isn't much difference but if you want the best accuracy get the ds18b20+ .


----------

