PDA

View Full Version : Programming External Switches on Apex Controller


noy
06-28-2013, 03:14 AM
Just thought I'd share how I set up a set of external switches for my APEX system

This is the project box that I configured the switches with:

http://farm3.staticflickr.com/2817/9121231751_8dd6af751b.jpg (http://www.flickr.com/photos/93342758@N02/9121231751/)
IMG_0469 (http://www.flickr.com/photos/93342758@N02/9121231751/)

Its essentially a project box with different switches attached to it.

The red and black switches are plunge switches and I programmed these to be external feed buttons. The red one is for a 15 minute feed cycle and the black one is for a 30 minute water change/maintenance cycle. The advantage of an external button is that sometime I have people feed the fish and its a lot easier having them push a button.

The 3 toggle switches are programmed right now to turn on/off the power to the return pump, skimmer and powerheads. For example if you just want to turn off the skimmer to empty out the collection cup you can do that with a toggle switch. It allows for quick access in cases of emergencies too.

The box is a $8 project box from thesource and switches are a couple of bucks or so. You can get them from any active electronics place.

You will need a drill bit for drilling holes - 5/8" and a dremel to open up the holes a bit.

http://farm6.staticflickr.com/5337/9123452354_f37bc8e403.jpg (http://www.flickr.com/photos/93342758@N02/9123452354/)
IMG_0474 (http://www.flickr.com/photos/93342758@N02/9123452354/)

http://farm3.staticflickr.com/2888/9121229511_4999fcb2bb_n.jpg (http://www.flickr.com/photos/93342758@N02/9121229511/)
IMG_0472 (http://www.flickr.com/photos/93342758@N02/9121229511/)

I used a I/O Breakout box to connect everything but in theory I could have just spliced a mini-DIN 8 pin cable and connected the switches to the APEX directly. Having the breakout box allows me to easily re-configure everything without having to de-solder.

http://farm8.staticflickr.com/7453/9123451828_e248d57c14_z.jpg (http://www.flickr.com/photos/93342758@N02/9123451828/)
IMG_0470 (http://www.flickr.com/photos/93342758@N02/9123451828/)

http://farm6.staticflickr.com/5442/9121229531_a6498b7892_n.jpg (http://www.flickr.com/photos/93342758@N02/9121229531/)
IMG_0471 (http://www.flickr.com/photos/93342758@N02/9121229531/)


Here is the switch box attached to the side of my tank.

http://farm6.staticflickr.com/5524/9153582881_d8cfbcdfaa.jpg (http://www.flickr.com/photos/93342758@N02/9153582881/)
IMG_0477 (http://www.flickr.com/photos/93342758@N02/9153582881/)

As for the coding in APEX
I set up virtual outlets for the different switches
The feed switches have the following code

<V_Feed1>

Set OFF
Defer 015:00 Then OFF
If Switch1 CLOSED Then ON

and in the outlets that need to be turned off if the feed button is on you need the following line

If Outlet V_Feed1 = ON Then OFF

For the toggle switches I have the following

<V_Tgl_1>
Set ON
If Switch3 CLOSED Then ON
If Switch3 OPEN Then OFF

and in the device that the toggle switch turns on/off you need the following line

If Outlet V_Tgl_1 = OFF Then OFF

Right now the toggle switches just turn on/off specific devices but I can think of all kinds things to do with them. Since the hardware is setup all I have to do is change the programming around.