Hunter X's Arduino Whole Tank Controller (52K Warning) - Page 3
Planted Tank Forums
Your Tanks Image Hosting *Tank Tracker * Plant Profiles Fish Profiles Planted Tank Guide Photo Gallery Articles

Go Back   The Planted Tank Forum > Specific Aspects of a Planted Tank > DIY


Reply
 
Thread Tools Display Modes
Old 01-06-2014, 06:02 AM   #31
benjaf
Algae Grower
 
benjaf's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2012
Location: Denmark
Posts: 105
Default

Quote:
Btw, I see that your dosing pumps and fan are connected to the 4 channel MOSFET board. Did you consider placing a diode in parallel to each pump/fan to protect your transistors from flyback?
http://en.wikipedia.org/wiki/Flyback_diode
I think Shift's dosing pump project has some of these installed, but it seems like the transistors are pretty beefy though so it might not be necessary at all. Maybe someone here with electrical experience might be able to offer some advice.
Yes, there should be a flyback diode across each of the motors. They are not included in most MOSFET boards, but when driving motors you should always use one to protect the rest of the components.
__________________
benjaf is online now   Reply With Quote
Sponsored Links
Advertisement
 
Old 01-06-2014, 07:38 AM   #32
HunterX
Planted Tank Obsessed
 
HunterX's Avatar
 
PTrader: (22/100%)
Join Date: May 2012
Location: Springfield MO
Posts: 364
Default

Quote:
Originally Posted by benjaf View Post
Yes, there should be a flyback diode across each of the motors. They are not included in most MOSFET boards, but when driving motors you should always use one to protect the rest of the components.
Even though it's OPTO-ISOLATED? There shouldn't be a need for the diode?
HunterX is offline   Reply With Quote
Old 01-06-2014, 12:38 PM   #33
Fluffles
Algae Grower
 
PTrader: (1/100%)
Join Date: Jul 2012
Location: Canada
Posts: 38
Default

From what I understand, the opto-isolation will protect the Arduino side of things so the Arduino will be fine, but there is still a possibility that the opto-isolator or the IRF540 MOSFET might be damaged by flyback current/voltage. Looking at the circuit for this board, I'm not entirely sure how it would react immediately after the MOSFET cuts power to the motor, but having a flyback diode would be the safest way to go. Again, I'm not very experienced with this so there is still the possibility that the MOSFETS this board uses are beefy enough that you won't need any diodes.

I'm more concerned about the fan than the 3 dosing pumps. I think the pumps don't pull much current, but a fan that size probably runs around 12V @ 1A. Immediately after shutting the fan off, you might see very large voltage changes on this side or the circuit.

Last edited by Fluffles; 01-06-2014 at 12:54 PM.. Reason: Add more detail
Fluffles is offline   Reply With Quote
Old 01-06-2014, 12:52 PM   #34
benjaf
Algae Grower
 
benjaf's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2012
Location: Denmark
Posts: 105
Default

While not quite as important, I would still include them to protect the MOSFETs from the voltage spike. However - since the pump motors are not that large and aren't exactly 'freewheeling' when turned off, you may be fine without diodes.
It is simply a good idea to include them any time you drive motors or solenoids unless you know for sure that the reverse voltage will cause no damage.
__________________
benjaf is online now   Reply With Quote
Old 01-06-2014, 12:54 PM   #35
bigd603
Planted Member
 
PTrader: (1/100%)
Join Date: May 2011
Location: Portland, OR
Posts: 265
Default

Quote:
Originally Posted by benjaf View Post
While not quite as important, I would still include them to protect the MOSFETs from the voltage spike. However - since the pump motors are not that large and aren't exactly 'freewheeling' when turned off, you may be fine without diodes.
It is simply a good idea to include them any time you drive motors or solenoids unless you know for sure that the reverse voltage will cause no damage.
Especially considering how cheap diodes are, its definitely well worth the dollar or two to protect your investment.

Sent from my Galaxy Nexus using Tapatalk
bigd603 is offline   Reply With Quote
Old 01-06-2014, 01:12 PM   #36
benjaf
Algae Grower
 
benjaf's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2012
Location: Denmark
Posts: 105
Default

Quote:
Originally Posted by Fluffles View Post
I'm more concerned about the fan than the 3 dosing pumps. I think the pumps don't pull much current, but a fan that size probably runs around 12V @ 1A. Immediately after shutting the fan off, you might see very large voltage changes on this side or the circuit.
Completely forgot about the fan - flyback diodes all around then!

And as bigd points out - they are a LOT cheaper than the 4-channel MOSFET board.
__________________
benjaf is online now   Reply With Quote
Old 01-06-2014, 02:06 PM   #37
HunterX
Planted Tank Obsessed
 
HunterX's Avatar
 
PTrader: (22/100%)
Join Date: May 2012
Location: Springfield MO
Posts: 364
Default

Good input everyone. I looked at the schematic for the board as well. Why the diodes are not included in the design is beyond me. I already have the diodes and will incorporate them into my plans. Thanks everyone!
HunterX is offline   Reply With Quote
Old 01-06-2014, 02:22 PM   #38
pianofish
Wannabe Guru
 
pianofish's Avatar
 
PTrader: (24/100%)
Join Date: Jan 2010
Location: Lafayette, Louisiana
Posts: 1,039
Default

Man, this thread is golden. I've been looking at doing exactly what you are doing with my tank. I've been looking at getting the arduino duemilanove which is the next step up after the mega. I eventually plan on doing an actual LCD display on mine, with options to edit the dosing schedule via toggles and buttons.

But for now, my main goals are basically, auto top off, water changes, DIY LEd ligthing, along with ph probes, and temp probes.

How long did it take you to familiarize yourself with the necessary components?
I'm a sophomore in Elec. Eng, lots of background in coding, but less so with the hardware.

Looking forward to where this thread goes,
Joshua
pianofish is offline   Reply With Quote
Old 01-06-2014, 02:42 PM   #39
HunterX
Planted Tank Obsessed
 
HunterX's Avatar
 
PTrader: (22/100%)
Join Date: May 2012
Location: Springfield MO
Posts: 364
Default

Quote:
Originally Posted by pianofish View Post
Man, this thread is golden. I've been looking at doing exactly what you are doing with my tank. I've been looking at getting the arduino duemilanove which is the next step up after the mega. I eventually plan on doing an actual LCD display on mine, with options to edit the dosing schedule via toggles and buttons.

But for now, my main goals are basically, auto top off, water changes, DIY LEd ligthing, along with ph probes, and temp probes.

How long did it take you to familiarize yourself with the necessary components?
I'm a sophomore in Elec. Eng, lots of background in coding, but less so with the hardware.

Looking forward to where this thread goes,
Joshua
To be honest, with all of the information on the web, it doesn't take long to become familiar with any of the components. I stumbled across most of it while studying other components for my build. I would like to add ph probes as well but I'm slowly running out of inputs/outputs because of the buttons and LEDs. Having the buttons makes the programming much easier. But one solution would be to use a touch screen LCD and build "buttons" within the touch screen programming. I'm not at that level yet. My design does have an LCD display but it is not a touch screen. Itís the 20x4.
Another added benefit is that my code is only 19,000 bytes. So it's relatively small compared to some of the other full tank codes. Granted, I haven't added the LED code yet. I expect it to almost double in size when I do that.
HunterX is offline   Reply With Quote
Old 01-06-2014, 02:49 PM   #40
bigd603
Planted Member
 
PTrader: (1/100%)
Join Date: May 2011
Location: Portland, OR
Posts: 265
Default

Quote:
Originally Posted by pianofish View Post
Man, this thread is golden. I've been looking at doing exactly what you are doing with my tank. I've been looking at getting the arduino duemilanove which is the next step up after the mega. I eventually plan on doing an actual LCD display on mine, with options to edit the dosing schedule via toggles and buttons.

But for now, my main goals are basically, auto top off, water changes, DIY LEd ligthing, along with ph probes, and temp probes.

How long did it take you to familiarize yourself with the necessary components?
I'm a sophomore in Elec. Eng, lots of background in coding, but less so with the hardware.

Looking forward to where this thread goes,
Joshua
Pianofish, if you're not already familiar with it, try googling Jarduino. Its an Arduino aquarium controller that uses a 3.2" LCD touchscreen. It was made for reef tanks, but its a great starting place and allows you to see what's involved in adding the LCD.

Hunter, I didn't say it before but let me go ahead and say great work on this. This thread will really help a lot of us out, even those already experienced with Arduino. Next logical step, get that thing connected to the web. I found a service called Xively ( www.vively.com ) that allows you to easily track and graph pretty much any data point. Super easy to insert the code, they even provide you with the necessary Arduino sketch, then it tracks anything online. I don't believe you can control anything remotely, but you can have the system send you alerts when it gets to certain conditions (temp too high/low, etc). Really neat service and they do it free.

Sent from my Galaxy Nexus using Tapatalk
bigd603 is offline   Reply With Quote
Old 01-06-2014, 05:14 PM   #41
HunterX
Planted Tank Obsessed
 
HunterX's Avatar
 
PTrader: (22/100%)
Join Date: May 2012
Location: Springfield MO
Posts: 364
Default

Quote:
Originally Posted by bigd603 View Post
Pianofish, if you're not already familiar with it, try googling Jarduino. Its an Arduino aquarium controller that uses a 3.2" LCD touchscreen. It was made for reef tanks, but its a great starting place and allows you to see what's involved in adding the LCD.

Hunter, I didn't say it before but let me go ahead and say great work on this. This thread will really help a lot of us out, even those already experienced with Arduino. Next logical step, get that thing connected to the web. I found a service called Xively ( www.vively.com ) that allows you to easily track and graph pretty much any data point. Super easy to insert the code, they even provide you with the necessary Arduino sketch, then it tracks anything online. I don't believe you can control anything remotely, but you can have the system send you alerts when it gets to certain conditions (temp too high/low, etc). Really neat service and they do it free.

Sent from my Galaxy Nexus using Tapatalk
BigD,

I defiantly want to add the ability for the Arduino to report to the NET. My only issue right now is that I don't have an RJ45 internet connection close to my controller and the wifi boards are a bit pricy yet. If the come down some, I will defiantly add that to it.

I'm still going to check out the hosting service you were talking about. It sounds perfect.. Thanks for your input!
HunterX is offline   Reply With Quote
Old 01-06-2014, 05:37 PM   #42
HunterX
Planted Tank Obsessed
 
HunterX's Avatar
 
PTrader: (22/100%)
Join Date: May 2012
Location: Springfield MO
Posts: 364
Default

Quote:
Originally Posted by Fluffles View Post
Wow, this is looking great!
Thanks so much for the parts list. I've had an Arduino Mega controlling my LED lights for about a year now and wanted to expand it to a complete aquarium controller but never knew how to approach this. Your thread has given me a clear path on how to get things started.
I actually ordered most of the components already and it looks like I'll be building a clone of your project. Thanks again!

Btw, I see that your dosing pumps and fan are connected to the 4 channel MOSFET board. Did you consider placing a diode in parallel to each pump/fan to protect your transistors from flyback?
http://en.wikipedia.org/wiki/Flyback_diode
I think Shift's dosing pump project has some of these installed, but it seems like the transistors are pretty beefy though so it might not be necessary at all. Maybe someone here with electrical experience might be able to offer some advice.
As I got pulled into the diode conversation I didn't thank for your kind comment. Thank you!! Please feel free to use any of the design you would like. I only ask in return to post anything you come up with so we all can share and better what we have. Thanks again!

Question? You mentioned you use the MEGA to control your LEDs already? Do you do any fading or just off and on?

Last edited by HunterX; 01-06-2014 at 05:38 PM.. Reason: Hmmm
HunterX is offline   Reply With Quote
Old 01-06-2014, 05:42 PM   #43
pianofish
Wannabe Guru
 
pianofish's Avatar
 
PTrader: (24/100%)
Join Date: Jan 2010
Location: Lafayette, Louisiana
Posts: 1,039
Default

Do any of you use any type of surge protection for your system. Further more, would it be possible to add an uniteruptable power supply to this setup? Set it up so that in the event of a power failure, a power switch with an air pump would oxegenate sump filter material and the tank. I guess you would need a dc to ac converter as well...

I love EE so many possibilities lol.
pianofish is offline   Reply With Quote
Old 01-06-2014, 06:18 PM   #44
benjaf
Algae Grower
 
benjaf's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2012
Location: Denmark
Posts: 105
Default

Hunter
Never added my compliments! It's a beautiful build, really looking forward to see it working. And I can't wait to see your light unit and code. If you want storms and clouds I think reef forums are a good bet - it seems they are more into that stuff I have been too lazy to write that sort of fancy stuff myself!
__________________
benjaf is online now   Reply With Quote
Old 01-06-2014, 07:47 PM   #45
bigd603
Planted Member
 
PTrader: (1/100%)
Join Date: May 2011
Location: Portland, OR
Posts: 265
Default

Quote:
Originally Posted by HunterX View Post
BigD,

I defiantly want to add the ability for the Arduino to report to the NET. My only issue right now is that I don't have an RJ45 internet connection close to my controller and the wifi boards are a bit pricy yet. If the come down some, I will defiantly add that to it.

I'm still going to check out the hosting service you were talking about. It sounds perfect.. Thanks for your input!
Check this out:
http://www.newegg.com/Product/Produc...82E16833704134

Its a tiny WiFi router, smaller than a credit card, that will run in client mode. Basically its a WiFi shield, but its only $25 and it will easily fit into your box. I've seen a lot of people have great success connecting these to their arduinos at a fraction of the cost of a WiFi shield. I'm gonna pick one up in the next couple days and play around with it. I'll let you know what I think.

Sent from my Galaxy Nexus using Tapatalk
bigd603 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:59 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright Planted Tank LLC 2012