New tank setup with LEDs and microprocessor

cyrusthevirus

New member
After lurking for almost six months I decided to break my silence and begin posting about my plan. Currently I have a 90 gallon filled with air. It has moved 10 feet across the room to make space for my sump/refugium. But the delay has not been the tank or the sump, or convincing my wife that this was okay to do. The delay has been on the design and testing of the circuit.

The circuit I have created uses 8 PWM channels to drive 8 banks of 16 LEDs. There is a real time clock and the LEDs simulate sunrise/sunset. In addition I have a temperature sensor which in addtion to the clock output to a backlite LCD screen. To assist others below are my posts on other sites showing the progress/failure I have made. My solution is not perfect and could always be tweaked, but I think it will work.

Circuits postings:

http://www.microchip.com/forums/searchpro.aspx?author=cyrusthevirus&top=50
http://www.edaboard.com/ftopic358016.html
http://www.electro-tech-online.com/...eas-reviews/95410-led-lcd-circuit-design.html
http://www.electro-tech-online.com/...8-testing-mosfet-circuit-without-blowing.html
http://www.electro-tech-online.com/...v-3-3v-power-supply-lcd-pic-2.html#post769276
http://www.electro-tech-online.com/micro-controllers/95603-pic24-driving-fets-pwm-signals-leds.html
http://www.electro-tech-online.com/micro-controllers/104407-nfet-parallel-power-supply.html
http://www.dutchforce.com/~eforum/index.php?showtopic=27788
http://www.dutchforce.com/~eforum/index.php?showtopic=30791

In addition to having the sunrise/sunset, I can also independently control the brightness of each string.

The next steps in the LED are are to build out the actual strings of lights. They are on order so as they arrive over the next few weeks, I will post pictures of my success.

The tank:
----------------
The tank will drain into a sump located in my basement. The sump is an exact replica of the one listed here:
http://www.melevsreef.com/acrylics/sumps/80/80g_sump.html

I got lucky and was able to obtain a free pump with the ability to push ~22 feet of head.

I will post some pictures of the sump, now that it has been built and appears to hold water.

That is all for now, I will post more as I continue my progress.
 

Attachments

Parts for the sump/refugium

Parts for the sump/refugium

Sorry about the delays in posts and pictures, but for some reason, my posts require approval of a moderator before they can be posted.

To build the refugium, you will need the sizes of 1/2" acrylic:

(4) 48" x 20" (Front, Back, Top and Bottom)
(2) 19" x 20" (Left and Right)
(1) 20" x 15" (Wall of Refugium/Bubble Trap)
(1) 36" x 15" (Wall of Refugium)
(2) 14" x 7" (Bubble Trap)

The best tip I can provide is to make sure you clean all of your edges. I did this with a straight file and chisel. I did not use the pin approach.

I found the company I used by talking to a local distributor, but have used local fabrication shops in the past to get pieces of acrylic.
 
Electronic parts list

Electronic parts list

I am not sure why, but this post required approval from the moderator and never got posted so I am posting it again.

I could not find all of the emails with my oder information, but this list should have everything you need.I bought twice of everything so I could have a prototype and a functioning version.

From MPJA.com:
(8) 58V @ 1A - Item #15814 PS

From DigiKey:
(1) Temp Sensor - Item #LM34DZ-ND
(8) MOSFET N-Channel - Item #IRL520PBF-ND
(1) Silicon Grease - Item #CT40-5-ND
(4) 12VDC Fan - Item #563-1133-ND
(1) 32.768kHz crystal - Item #728-1001-ND
(1) 10k trimpot - Item #T63YB-10K-ND
(5) 10uF capacitor - Item #ECE-A1CKA100
(1) 12ohms 1/4W resistor - Item #CF1/412JRCT-ND
(4) LTC1157 - Item #LTC1157CN8#PBF-ND

From ETGTech.com:
(64) Royal Blue Cree XR-E Item #XREROY-L1-0000-00901

From DealExtreme:
(64) Cree XR-E Q5 - Item #2394

From www.circuitspecialists.com:
(6) Syntax Prototyping Board - Item #PC462905

From Mouser.com:
(1) 22 AWG wire Blue - Item #602-3051/1-100-06
(1) 22 AWG wire White - Item #602-3051/1-100-01
(1) 22 AWG wire Red - Item #602-3051/1-100-03
(1) 22 AWG wire Black - Item #602-3051/1-100-02
(1) 22 AWG wire Green - Item #602-3051/1-100-04
(1) Hantronix LCD - Item #HDM16416L-1-L30S
(1) SchmartBoard - Item #872-202-0011-01
(8) 2W 1.2ohms Resistor - Item#594-5083NW1R200J
(20) Phoenix Contact Terminal - Item#651-1729128
(1) Soldering Station/Iron - Item #578-WLC100
(1) Soldering Tip - Item #578-ST-7
(1) Flux Pen - Item #533-2331
(1) Microchip PIC - Item #579-PIC24128GA110IPF
(1) PICKit 3 Programmer - Item #579-DV164131
(1) 1/4 W 1Kohms resistor - Item #291-10K-RC
(1) Soder-Wick - Item #5878-80-3-5

For Prototyping from Mouser.com:
(1) 12" jumpers - Item #872-920-0019-01
(2) PCI Headers - Item #649-78511-236HLF
(1) Mill-Max Headers - Item #575-205030
(2) SIP Sockets - Item #575-8314305010

Dipmicro.com:
For Prototyping:
(1) LEDs - Item #SET-LED5
(1) Breadboard - Item #ZY-204
(2) Jumper Wires - Item #ZY-800
 
Some photos

Some photos

Here are some photos:

Sump during the building process
IMG_3042.jpg


Sump on stand w/pump
IMG_3051.jpg


Let's fill it with water and see what happens. Oops a small leak. Nothing a little more weld-on can't fix
IMG_3052.jpg


General setup in basement. I need to work out a better system for the pump while I wait to setup the main tank.
IMG_3055.jpg


Here is my wiring mess. I am working on cleaning it up and will have a non-prototype version next.

IMG_3060.jpg
 
Continuing the soldering process. LEDs shipped from ETGTech. Now just waiting to see what happens from Dealextreme. So far I am not impressed.
 
I emailed Dealextreme after a month of waiting and got a reply 2 weeks after informing me that the leds are on their way..I'm still waiting :( Tagging along....
 
It worked

It worked

Got a response from DX. Instead of adding to my order, they cancelled it. Tiffany claims to have solved the problem. Let's see...
 
So I was searching on craigslist and came across someone selling LR. I was not ready for it yet but could not pass on the price. The problem was that I had no where to put the rock. I had a sump, but it had no water in it. I also had a tank, but again, no water. So, it was time to connect the RO/DI unit I purchased and start making water.

24 hours later and my first leak of many, I have a full sump of rock and only spilled about 1/2 gallon on the floor. It was my first water leak I was so excited to get the first one out of the way.

Back to the LEDs. The Royal Blues are due to arrive on Wednesday and I am still waiting for the shipping codes from DX. I have been in contact with them every day, so there is hope.

Well, back to creating the circuit boards I need. I wonder if the smoke from the solder is as bad as they say it is? Sometimes, I feel like Mike Rowe on Dirty Jobs.

I added some pices below. The first pic is my water leak early detection system.

IMG_3122.jpg


Just filled it so the water is a little cloudy.
IMG_3125.jpg


Another shot from above:
IMG_3126.jpg
 
I figured this was due for an update.

After getting the LR, I started to realize that I was going to need to monitor the water. When I began to look into either test kits or digital meters, I realized I could just add these to my LED/temperature controller.

One thing I quickly learned was a pH circuit was easy to find, but a EC or salinity meter would be much more difficult. I have found one and will post the circuit, once I make sure it works.

I have also received the Royall Blue LEDs and DX is supposed to send out part of my Cool White LEDs within the next 2-3 days. I have my fingers crossed.

Here are some updated pics:

Two control circuit boards for 8 banks of LEDs:
IMG_3128.jpg


Microcontroller wires coming from SchmartBoard:
IMG_3156.jpg


One week later, the sump is much cleaner:
IMG_3157.jpg
 
I spent time over the past several days creating circuit boards for a salinity, pH,ORP and any other probe you can think of. The salinity circuit is fed by 12 VAC and the other circuits are fed by 5VDC. They have connections for power, ground and a 0-5VDC for connection to a microprocessor. Just ordered the PCBs today and they should be in within the next week. I ordered a bunch of extras so I could build additional circuits for monitoring other meters other than pH, ORP and salimity or for different tanks. I also just received my Ranco for controlling the temp. I figured I could measure the temp with both the IC and the Ranco, but easily control it with the Ranco.

That is all for now, waiting on the LEDs.
 
cyrusthevirus,

Very interesting.

How are you going to current limit the LED strings & what voltage will you run the strings at?
I learned a lot about using PWM to limit the current in a LED string, and if the string does not have inherent current limiting features ( and you are depending on the software), then there are a few tricks you can use to help protect from runaway SW.

Also "The salinity circuit is fed by 12 VAC and the other circuits are fed by 5VDC".

I would be interested in seeing the circuit diagrams. I have yet to see a ph probe circuit that did NOT need +/- voltages for the op-amp.

Also, which op-amp did you choose? I dont see it in the parts list.

Stu
 
How are you going to current limit the LED strings & what voltage will you run the strings at?
The strings are 16 LEDs long running on 58V and 1A. I am using a 1.2ohms 2W resistor. This limits the current to ~3.6 which draws 750mA.

I learned a lot about using PWM to limit the current in a LED string, and if the string does not have inherent current limiting features ( and you are depending on the software), then there are a few tricks you can use to help protect from runaway SW.

Interesting tell me more.

Also "The salinity circuit is fed by 12 VAC and the other circuits are fed by 5VDC".

I would be interested in seeing the circuit diagrams. I have yet to see a ph probe circuit that did NOT need +/- voltages for the op-amp.

The reason I do not have +/- voltages is becuase I designed them directly in the circuit to make it easier to wire. I am already running an LCD at 5V so supplying several other circuits with 5V would be easier than have to mange multiple +- circuits. The salinity circuit also requires a +- 12V. Once I have it tested and my boards come in, I will post more about the circuit. I want to make sure it works first.

Also, which op-amp did you choose? I dont see it in the parts list.
It is not in the parts list becuase I added them since I started this thread and expanded beyond just the LEDs. I am using the LM356 Op AMP in the pH circuit.



Stu
 
"Interesting tell me more."

Well for one, Since I was driving a IRF510 N-ch MOSFET with 3.3V logic, I used an optocoupler to drive the Gate of the FET directly.
The Input (anode) was driven by a CPU output and the cathode was connected to a CPU input.

If the IO POR default was either both HI or both LO, there was no drive current so the OPTO wouldn't turn on during SW bootup regardless of the default POR state of the IO.

And SW had to drive both signals to get current through the string.

Also, the chip I was using had hardware PWM so if the SW went out to lunch the FET wouldn't get left in a perpetual ON state and the watchdog timer would trip & reset the chip.


"I am using the LM356 Op AMP in the pH circuit."

I am not sure that chip has a high enough input impedance to work on a ph probe.
You need an instrumentation amp with nano or pico-amps of input current to work.

That chip says the input resistance is 50Kohms. I cant get a reading from a ph probe using a quality DMM with many Megaohms of input impedance.

Stu
 
Back
Top