How to use a PLC to control your fish tank.

ian_m

Global Moderator
Staff member
Joined
25 Jan 2012
Messages
5,165
Location
Eastleigh
Reading it again my head hurts!! :crazy::crazy::crazy:
Glad you still like it. :D. 100% reliable switching is one of the main features I designed it for and 100% reliable switching is what I got. :clap:.

Shame no one sells a Logo!8 in a box with 4 mains sockets on the outside and a single mains lead in. Then you wouldn't have to faff around wiring the PLC, just plug in you devices, apply power...job done. Oh add a PLC control programme, but just 4 on/off timer would be basic start.

After much searching the Internet, I didn't really find anyone else who had done PLC control fully. Many many people started projects like this, but then they got too complicated by adding LCD control displays, full control from mobile phone etc as well as people who clearly started something like this but never published anything beyond the beginnings of the project.

Googling "plc control of aquarium" get my article as first hit (seeing this is my first ever google found item, this is nice), followed many other PLC projects written up that are never finished. Even my pictures are in the Google images.

Even more interesting there are many university write ups (PDFs) where people were awarded degrees and even PHD's for their PLC controlled aquariums....and many of them were only proposals about how they would do it, they didn't actually build anything. :wideyed:

Anyway the next big PLC thing on UKAPS is Zeus and his monster tank. He is planning on using a much bigger setup than mine, as he has the cupboard space, and is aiming to control is Kessils with it as well, ramping them up and down. :)
 

Zeus.

Member
Joined
1 Oct 2016
Messages
3,105
Location
Yorkshire,UK
Reading it again my head hurts!! :crazy::crazy::crazy:
Its not that bad but takes some time to get your head round it, Ians a massive help as he has done all the ground work, its basically a copy and paste with a few modifications here and there

Anyway the next big PLC thing on UKAPS is Zeus and his monster tank. He is planning on using a much bigger setup than mine, as he has the cupboard space, and is aiming to control is Kessils with it as well, ramping them up and down.
Should be here later this week, after many 'pm's with Ian I'm confident it will be a great way to control the whole tank.

Even more interesting there are many university write ups (PDFs) where people were awarded degrees and even PHD's for their PLC controlled aquariums....and many of them were only proposals about how they would do it, they didn't actually build anything. :wideyed:
Dr Zeus :pompus: :lol:
 

LondonDragon

Administrator
Staff member
Joined
21 Feb 2008
Messages
10,833
Location
London
Even more interesting there are many university write ups (PDFs) where people were awarded degrees and even PHD's for their PLC controlled aquariums....and many of them were only proposals about how they would do it, they didn't actually build anything. :wideyed:
Time to copy and paste and submit mine! see if I can get that PHD :p
 

ian_m

Global Moderator
Staff member
Joined
25 Jan 2012
Messages
5,165
Location
Eastleigh
I don't think there is a standard Siemens Logo PWM module. However there are 0-10V analogue output modules, as used by Zeus to control intensity and spectrum of his Kessils, that could be connected to an industry standard 0-10V control input of a PWM module.

Searching ebay finds plenty of PWM modules for both motors and LEDs. I assume you want to PWM tank LEDs ?
 

zozo

Member
Joined
16 Apr 2015
Messages
7,304
Location
Netherlands
Yes that was my first thought, controlling led intensity, but it could also be used as you say for motor speed, so it can controll some DC pumps as well.
I'm not sure, but i thought the 0-10 volt control input is standard a PWM signal. If i'm correctly it's the frequency that matter for regular LED and LED driver dimming it should be 20 (k)hertz or something. But yet i'm not fully in to all specifics.
 

ian_m

Global Moderator
Staff member
Joined
25 Jan 2012
Messages
5,165
Location
Eastleigh
PWM frequency could be anything, hopefully above 20kHz so no chance if audio breakthrough... The 0-10V signal varies the width of the pulses from 0% to 100%, which when averaged by the eye and LED appears to be 0% brightness to 100%.

You can get nice DIN mounted PWM controllers so you can mount along with your PLC all on a handy mounting rail.

There are of course some very nice T5 ballasts that accept 0-10V to dim T5 tubes if you want to go that way.
 

zozo

Member
Joined
16 Apr 2015
Messages
7,304
Location
Netherlands
No no, i'm a LED guy and that PLC stuff is realy intersting toy.. Just was thinking it would be awsome if it had such a feature build in or could be upgraded with it. In a way i thought it would be obvious in this era Siemens implemented it already on the newest generation plc's. But still just asking..

Thanks. :)
 

Zeus.

Member
Joined
1 Oct 2016
Messages
3,105
Location
Yorkshire,UK
Suppose my kessil have the PWM built-in and the duel 0-10V inputs are used to control the spectrum/intensity. Makes sense.

Sent from Mountolympus via neural interface
 

zozo

Member
Joined
16 Apr 2015
Messages
7,304
Location
Netherlands
All led drivers today are dimmed with PWM, even the ones which are dimmed with the constant current driver on the analog 0-10 volt port. At least the universal meanwell led drivers 0-10 volt dim port is PWM.. Only the voltage range can differ from one driver to another.. I have a few led drivers requiring 0-6volt pwm signal. They use the PT4115 driver chip..
 

ian_m

Global Moderator
Staff member
Joined
25 Jan 2012
Messages
5,165
Location
Eastleigh
Zozo what you waiting for ?. Siemens plc available from a variety of sources, see my article or ask Zeus.

Play with the demo version of Soft Comfort plc development system on generating 0-10V output based on a time, ask Zeus as that is what he doing with kessils.

Done....
 

zozo

Member
Joined
16 Apr 2015
Messages
7,304
Location
Netherlands
At the moment i got a wallet made from onion skins, when i open it tears run through my eyes.. So i'm actualy waiting for christmas or another lucky break.:rolleyes: Usualy waiting for the last one always worked for me.. Forcing luck on your way is about equivalent to having patience.. :)

No seriously, i'm actualy not sure if i ever want to use all features it has.. Till know i'm rather satisfied with my ¼ high tech and manual input. :) I'm just into small tanks i do not want to go bigger then 100 litres..
 
Last edited:

ian_m

Global Moderator
Staff member
Joined
25 Jan 2012
Messages
5,165
Location
Eastleigh
You can of course just treat the PLC (basic one with display and 4 outputs) to be a 4 way timer...lights, CO2, dosing and air pump for instance.

Unfortunately due to fall in pound and Siemens being German in €, the PLC starter kit is now about £175. But you do get a 100% reliable 4 output timer that can/could be accessed from the web.
 

Zeus.

Member
Joined
1 Oct 2016
Messages
3,105
Location
Yorkshire,UK
PLC isn't cheap it's a real luxury IMO but very nice esp if you like the playing with the logic off the software. Can fully understand why folk may not won't to take the PLC route.
Mines coming along very nice, with Ian's guidance/knowledge. Just waiting to finalise temp control and maybe intergrated PAR meter into the PLC too.
Boys and their toys

Plan to post when done

Sent from Mountolympus via neural interface
 

zozo

Member
Joined
16 Apr 2015
Messages
7,304
Location
Netherlands
I see them a lot offered second hand, some around the €75,- i guess with some bargening even cheaper.. But i'm reluctant to order without seeing it work first. If i ever find anything close enough to home i definitively go have a look and a chat.. :)
 

ian_m

Global Moderator
Staff member
Joined
25 Jan 2012
Messages
5,165
Location
Eastleigh
Seen loads of plc's for sale on ebay, was looking for ages before buying new Logo 8 from Siemens.

Main ebay issues were, non ethernet programmable so need to buy a lead (£70), no real time clock, no display and biggest issue was no development software, would have to by dev software starting at £100's.

So the Logo 8 works out a real plc bargain, display, real time clock, no special programming lead required and development software only £40.
 

zozo

Member
Joined
16 Apr 2015
Messages
7,304
Location
Netherlands
Also found quite a lot arduino projects for fishtanks.
https://www.arduino.cc/
Seen people making Ph controllers, fert controllers, Temp controllers, name it you can make it it can controll it. All with those diy circiut boards. Completely opensource.. Did out of interest some electronics in my teens, but choose an other direction later.. Still have the basics, but it will be a challange, i'm a bit out off practice.. But definitively is intresting stuff to play with. Dunno if it is any cheaper in the end.
 

ian_m

Global Moderator
Staff member
Joined
25 Jan 2012
Messages
5,165
Location
Eastleigh
Dunno if it is any cheaper in the end.
See my PLC article, why me as an electronic engineer who designs and builds and programmes PIC/STM32/Arduino stuff every day as a job, steered very well clear of all this DIY & open source stuff.

Not sure any of the PIC/STM32/Arduino stuff would work out cheaper, by the time you have added all the necessary power supplies, cases, real time clocks, relay boards, custom driver software etc. Might be interesting as a learning project for someone who has not done this type of stuff before, but achieving reliability (hardware and software) and ease of use is hard, expensive and time consuming.

I would have used something like Rexx controls PLC software, to do proper PLC programming, but is also £40 per license as well as the monster learning curve required to support the I/O boards. I found no open source PLC development systems that were any good.

In the end, closed source, commercial, costing real pennies, industrial quality (ie Siemens) with its professional PLC development system wins hands down and is a no brainer choice.

Here it is still running 6692 hours later...100% switching reliability. Oops 17 days 1 hour since last water change, as it is still in "holiday mode"...
upload_2017-4-23_10-0-14.png
 
Top