A Fishkeeping forum. FishKeepingBanter.com

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » FishKeepingBanter.com forum » rec.aquaria » Tech
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

Aquarium Lighting



 
 
Thread Tools Display Modes
  #11  
Old June 17th 04, 07:58 AM
Matt Davis
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

On Wed, 16 Jun 2004 06:47:31 +0000, The Outcaste wrote:

snip

Thanks for the links. I've been looking at the wrong manufacturers. Now
it's just a matter of deciding on a model and finding somebody who might
sell me one with minimal fuss. That last part is always trouble when it
comes to uncommon lighting hardware. It's like buying a used car...

I'd thought about a micro controller, but haven't looked into the cost
of one, especially the cost of the hardware to program one.


The tiny PIC microcontrollers start at less than $2 a pop. More
substantial models can run more like $8, but those would be overkill. My
guess is that something in the 16xxxxx series would have enough pins to
drive a DAC, take one or more inputs (maybe a potentiometer for
controlling the speed of sunrise/sunset, for example), and have plenty of
spare cycle time to do whatever else you might like for about $4. You can
find information on the whole line at http://www.microchip.com

As for programming hardware, I use a Warp-13 from Newfound Electronics as
it plugs nicely into the MPLab IDE provided by MicroChip. You can also
use it to program a number of different ROM chips. About $100 (you can
get cheaper programmers, but this is an excellent all-around product).
Once you get used to the microcontroller thing, you spend a lot less time
thinking about digital logic. The first thought that pops into your head
is, "I can do that with a $3 microcontroller and a few lines of C code."

I'm also considering using one of my old 486 PC's to do the job. As
they can be picked up for $5-$10, this might be a low cost option.
It's also work as the power supply for the DAC circuit.


I'm still trying to figure out the power supply part. A lot of
microcontrollers can deal with a wide range of supply voltages these days,
but I don't want to have to run more wires than I have to. I seem to
remember some ballasts coming with low voltage DC supply lines for
sensors. It's one possibility, anyway.

I have one that has 3 printer ports, so I could set it up as a print
server as well as to control two sets of aquarium lights, each with
their own program; wouldn't even need a keyboard, mouse, or monitor,
just a network card and then access it via VNC or PC anywhere.

Load it with DOS and write a QBasic program, or load Win95/98 and use
Visual Basic. Just have to spend a day or two to learn enough Visual
Basic to write the program to control the printer ports. Use 1 bit for
on/off, leaving 7 bits to control 128 different light levels. Could
even use the 2nd printer port to control water valves, and simulate
mid-day T-storms, even annual variations.


This sounds like a job for Linux! Or a microcontroller with a cheap
wireless transciever (probably about $20 for the whole package). And
blue LEDs for moonlight... But now I'm getting ahead of myself. Getting
light without smoke, fire, or that horrible **POP** is step one.

One other advantage to the dimming ballast is getting longer tube
life. Rather than changing the bulbs every 6 months as is sometimes
recommended, simply add in one more tube than you need, say 5 instead
of 4, and set your max intensity at 80%. As the tubes age, you
gradually increase the intensity to make up for the drop in intensity
as they age. This way you can use them for their full life span of 1-3
years; though with the newer T8 and T5 tubes (at least for CW, WW,
full Daylight tubes. Not sure if this applies to the specialty bulbs
for plants though), it seems they hold their intensity throughout
their life span, after an initial drop in the 1st 100 hours, so this
may not be very useful.


I hadn't thought of it from that angle. It's an interesting side benefit.
I think that this would be well worth playing with. After getting a
workable design, these would be pretty easy to make. If I get to that
point, I'll let everybody know.

Thanks for your help.

-Matt
  #12  
Old June 17th 04, 07:26 PM
Ian Smith
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

On Wed, 16 Jun 2004, Matt Davis wrote:

As for programming hardware, I use a Warp-13 from Newfound Electronics as
it plugs nicely into the MPLab IDE provided by MicroChip.


Drifting off-topic somewhat, but I'll second teh vote for the Warp-13
- it's what I use, and it works nicely.

On topic, it's a PIC that monitors and switches my tank heating (I
have three heaters and a particular sequence I want them to swicth in
, for various reasons). Although they have a useful current drive
it's obviously not uop to heating purposes, so the PIC drives a
transistor drives a mains relay.

regards, Ian SMith
--
|\ /| no .sig
|o o|
|/ \|
  #13  
Old June 18th 04, 09:51 AM
david
external usenet poster
 
Posts: n/a
Default Aquarium Lighting


"Ian Smith" wrote in message
...
On Wed, 16 Jun 2004, Matt Davis wrote:

As for programming hardware, I use a Warp-13 from Newfound Electronics

as
it plugs nicely into the MPLab IDE provided by MicroChip.


Drifting off-topic somewhat, but I'll second teh vote for the Warp-13
- it's what I use, and it works nicely.

On topic, it's a PIC that monitors and switches my tank heating (I
have three heaters and a particular sequence I want them to swicth in
, for various reasons). Although they have a useful current drive
it's obviously not uop to heating purposes, so the PIC drives a
transistor drives a mains relay.

regards, Ian SMith
--

is there a web page showing your pic stuff ??

David


  #14  
Old June 19th 04, 05:36 AM
The Outcaste
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

On Fri, 18 Jun 2004 08:51:14 +0000 (UTC), "david"
bubbled forth the following:


"Ian Smith" wrote in message
...
On Wed, 16 Jun 2004, Matt Davis wrote:

As for programming hardware, I use a Warp-13 from Newfound Electronics

as
it plugs nicely into the MPLab IDE provided by MicroChip.


Drifting off-topic somewhat, but I'll second teh vote for the Warp-13
- it's what I use, and it works nicely.

On topic, it's a PIC that monitors and switches my tank heating (I
have three heaters and a particular sequence I want them to swicth in
, for various reasons). Although they have a useful current drive
it's obviously not uop to heating purposes, so the PIC drives a
transistor drives a mains relay.

regards, Ian SMith
--

is there a web page showing your pic stuff ??

David

Warp-13 at http://www.newfoundelectronics.com/
The MCU's at http://www.microchip.com

HTH

Jerry
  #15  
Old June 19th 04, 10:27 AM
david
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

"Ian Smith" wrote in message
...
On Wed, 16 Jun 2004, Matt Davis wrote:

As for programming hardware, I use a Warp-13 from Newfound

Electronics
as
it plugs nicely into the MPLab IDE provided by MicroChip.

Drifting off-topic somewhat, but I'll second teh vote for the Warp-13
- it's what I use, and it works nicely.

On topic, it's a PIC that monitors and switches my tank heating (I
have three heaters and a particular sequence I want them to swicth in
, for various reasons). Although they have a useful current drive
it's obviously not uop to heating purposes, so the PIC drives a
transistor drives a mains relay.

regards, Ian SMith
--

is there a web page showing your pic stuff ??

David

Warp-13 at http://www.newfoundelectronics.com/
The MCU's at http://www.microchip.com

Jerry

Thanks Jerry I use Pics at work and can program them in asm. but I was
wondering if Ian had anything on the web about his aquarium system.

David


  #16  
Old June 19th 04, 02:21 PM
Ian Smith
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

On Fri, 18 Jun 2004 08:51:14 +0000 (UTC), david wrote:

"Ian Smith" wrote in message
...

On topic, it's a PIC that monitors and switches my tank heating (I
have three heaters and a particular sequence I want them to swicth in
, for various reasons). Although they have a useful current drive
it's obviously not uop to heating purposes, so the PIC drives a
transistor drives a mains relay.


is there a web page showing your pic stuff ??


Well, I'm nearing teh end of a four-channel on-board mixer for a
multi-engine radio control hovercraft that mixes speed, lift, steering
(via on-board gyro) and and idle setting from teh receiver, and
controls two three motors (lift and two thrust) and three servos (one
rudder and two proportional thrust reversers), but I guess it was teh
fish PIC stuff you wanted to hear about...

No, there's nothing about it on my web pages, though I keep vaguely
meaning to put it on.

The PIC heater controller is a long-running work-in-progress. Teh
head of the asm file is fairly informative:

; Ian's astounding digital thermometer system
;
; uses 16F877 pic
;
; The system has seven temperature sensors on AN0 - AN6,
; It averages AN0 and AN1 to give a virtual sensor on AN7
; All inputs are scaled so that 0 degC = 0V, 102.4 degC = Vdd
; Thus, can direct read ANx value as tenths of deg C
;
; AN7 is actually a control knob, which is read only in config
; mode, during which time temperature readings are suspended
;
; Control switches are on port B upper nybble
; RB7 on-board config switch (not currently used)
; RB6 'mode' switch
; RB5 +, yes, increment
; RB4 -, no, decrement
;
; Four outputs are on portb lower nybble, these are shuffled
; for ease of board layout
; RB3 output 4
; RB2 output 1
; RB1 output 2
; RB0 output 3
;
; Visual output is on port D, including an LCD in 4 bit mode
; RD7 heartbeat LED, on when processing
; RD6 LCD_E LCD Enable control line
; RD5 LCD_RW LCD Read/Write control line
; RD4 LCD_RS LCD Register-Select control line
; data bits are connected on low nybble:
; RD3 DB7 on LCD
; RD2 DB6
; RD1 DB5
; RD0 DB4

I've forgotten what teh sensors are - I'd need to dig my notes out,
but they look like standard small plastic transistors. They give an
output voltage that's linear with temperature over the range 0-120 deg
C, and I feed that through an op-amp to the analogue inputs of the PIC
to make interpretation easy (as described above). I solder them onto
the wires and encase teh ends (sensor and a little along teh
insulation of teh wire) in epoxy.

The sensors are two in teh tank, one in the sump, one in teh
room air, one internal in teh unit (near the voltage regulator
heat-sink). The room air and unit internal are just becaue I could -
the unit doesn't do anything with the values.

There are four mains relays, driven via a transistor driven by teh PIC
output. They switch mains power to sockets on teh back of teh unit
case.

The circuit is built on veroboard, so is physically larger than it
needs to be, but everything (including transformer and power supply)
fits in a nice case 205x180x70mm with aluminium front panel.

The front panel has a 16 character x 2 line LCD, three press-buttons
(mode, up-or-yes, down-or-no) and a knob to twiddle. There is an LED
for unit on, an LED heartbeat (so you can see it's working properly),
and LEDs fro each of teh switched outputs.

In normal operation the LCD shows the name of a sensor, teh current
temperature and on teh second line the max and min since last reset.
Pressing + or - steps through teh sensors.

Pressing mode for a couple of seconds goes to config mode where you
can clear max and min, and set the criteria for switching on outputs.
Also, there's a smoothing algorithm written in for teh temperature
sensors so a single bad reading doesn't switch teh heaters wrongly,
and in config mode you can switch that on or off. (I've never
detected a bad reading, but it seemed like a good idea so I wrote it
in).

Max, min and settings are all written to eeprom, so are not lost if
the power goes.

The criteria is the bit that's work-in-progress. At the moment it
just switches the three outputs on teh basis of a simple coded-in
criterion (two are on when teh average of the two tank sensors is
below 24 deg C, teh third when it's below 27 deg C). The code will
eventually let you set a criterion which works by switching on each
output when sensor 1 is above a set value and below another set value,
and sensor 2 is above one and below another and sensor 3 is above one
and below another and ... sensor 8. This lets you switch on
more-or-less anything, because if you don't want a sensor to
contribute you set it to 0 and 99.9 (on when above 0 and below 99.9 =
always on), if you want an output on below 24 you set on when above
0.0 and below 24.0, if you want on when above 27 (say, to swich on
cooling) you set on on when above 27.0 and below 99.9.

This will let me set things like heaters on when tank is below 24 and
sump is below 28 - teh heaters are in teh sump, and I wouldn't want to
boil teh sump if teh circulation pumps were off.

The 16F877 is probably overkill, but I did want more than four 10 bit
adc, plus 8 bits to control LCD, plus at least 4 outputs and 4 inputs,
plus a moderate amount of eeprom data, and decided that I'd get the
one with the maximum amount of program space that met those criteria -
hence 16F877. There's also a USART in there, and the pins for that
are currently unused, so I could have teh output on a serial port to a
PC, when I get round to it.

I'm not really sure why I haven't finished it off - it was more an
exercise to see if I could than to fulfill a need. When I started I
knew next to nothing about electronics (I did some in physics at
school over 15 years ago) and had never touched a microcontroller, but
I bought an electronics text-book by Horowitz & Hill and downloaded
masses of gumpf from Microchip's website and started reading. My
first PIC program and circuit switched a LED on when you pressed a
button, then switched it off four seconds after you released teh
switch. My second program and circuit was the temperature controller
- I favour the in-at-the-deep-end approach to learning!

Is there anything specific you wanted to know?

regards, Ian SMith
--
|\ /| no .sig
|o o|
|/ \|
  #17  
Old June 19th 04, 09:05 PM
david
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

top posted
I am reading this now just what I wanted.
always interested in diy pic stuff I measure temp with a thermister but it
is a bit adhock wonder if you can identify your sensors for me sounds much
more reliable

many thanks David

"Ian Smith" wrote in message
...
On Fri, 18 Jun 2004 08:51:14 +0000 (UTC), david wrote:

"Ian Smith" wrote in message
...

On topic, it's a PIC that monitors and switches my tank heating (I
have three heaters and a particular sequence I want them to swicth in
, for various reasons). Although they have a useful current drive
it's obviously not uop to heating purposes, so the PIC drives a
transistor drives a mains relay.


is there a web page showing your pic stuff ??


Well, I'm nearing teh end of a four-channel on-board mixer for a
multi-engine radio control hovercraft that mixes speed, lift, steering
(via on-board gyro) and and idle setting from teh receiver, and
controls two three motors (lift and two thrust) and three servos (one
rudder and two proportional thrust reversers), but I guess it was teh
fish PIC stuff you wanted to hear about...

No, there's nothing about it on my web pages, though I keep vaguely
meaning to put it on.

The PIC heater controller is a long-running work-in-progress. Teh
head of the asm file is fairly informative:

; Ian's astounding digital thermometer system
;
; uses 16F877 pic
;
; The system has seven temperature sensors on AN0 - AN6,
; It averages AN0 and AN1 to give a virtual sensor on AN7
; All inputs are scaled so that 0 degC = 0V, 102.4 degC = Vdd
; Thus, can direct read ANx value as tenths of deg C
;
; AN7 is actually a control knob, which is read only in config
; mode, during which time temperature readings are suspended
;
; Control switches are on port B upper nybble
; RB7 on-board config switch (not currently used)
; RB6 'mode' switch
; RB5 +, yes, increment
; RB4 -, no, decrement
;
; Four outputs are on portb lower nybble, these are shuffled
; for ease of board layout
; RB3 output 4
; RB2 output 1
; RB1 output 2
; RB0 output 3
;
; Visual output is on port D, including an LCD in 4 bit mode
; RD7 heartbeat LED, on when processing
; RD6 LCD_E LCD Enable control line
; RD5 LCD_RW LCD Read/Write control line
; RD4 LCD_RS LCD Register-Select control line
; data bits are connected on low nybble:
; RD3 DB7 on LCD
; RD2 DB6
; RD1 DB5
; RD0 DB4

I've forgotten what teh sensors are - I'd need to dig my notes out,
but they look like standard small plastic transistors. They give an
output voltage that's linear with temperature over the range 0-120 deg
C, and I feed that through an op-amp to the analogue inputs of the PIC
to make interpretation easy (as described above). I solder them onto
the wires and encase teh ends (sensor and a little along teh
insulation of teh wire) in epoxy.

The sensors are two in teh tank, one in the sump, one in teh
room air, one internal in teh unit (near the voltage regulator
heat-sink). The room air and unit internal are just becaue I could -
the unit doesn't do anything with the values.

There are four mains relays, driven via a transistor driven by teh PIC
output. They switch mains power to sockets on teh back of teh unit
case.

The circuit is built on veroboard, so is physically larger than it
needs to be, but everything (including transformer and power supply)
fits in a nice case 205x180x70mm with aluminium front panel.

The front panel has a 16 character x 2 line LCD, three press-buttons
(mode, up-or-yes, down-or-no) and a knob to twiddle. There is an LED
for unit on, an LED heartbeat (so you can see it's working properly),
and LEDs fro each of teh switched outputs.

In normal operation the LCD shows the name of a sensor, teh current
temperature and on teh second line the max and min since last reset.
Pressing + or - steps through teh sensors.

Pressing mode for a couple of seconds goes to config mode where you
can clear max and min, and set the criteria for switching on outputs.
Also, there's a smoothing algorithm written in for teh temperature
sensors so a single bad reading doesn't switch teh heaters wrongly,
and in config mode you can switch that on or off. (I've never
detected a bad reading, but it seemed like a good idea so I wrote it
in).

Max, min and settings are all written to eeprom, so are not lost if
the power goes.

The criteria is the bit that's work-in-progress. At the moment it
just switches the three outputs on teh basis of a simple coded-in
criterion (two are on when teh average of the two tank sensors is
below 24 deg C, teh third when it's below 27 deg C). The code will
eventually let you set a criterion which works by switching on each
output when sensor 1 is above a set value and below another set value,
and sensor 2 is above one and below another and sensor 3 is above one
and below another and ... sensor 8. This lets you switch on
more-or-less anything, because if you don't want a sensor to
contribute you set it to 0 and 99.9 (on when above 0 and below 99.9 =
always on), if you want an output on below 24 you set on when above
0.0 and below 24.0, if you want on when above 27 (say, to swich on
cooling) you set on on when above 27.0 and below 99.9.

This will let me set things like heaters on when tank is below 24 and
sump is below 28 - teh heaters are in teh sump, and I wouldn't want to
boil teh sump if teh circulation pumps were off.

The 16F877 is probably overkill, but I did want more than four 10 bit
adc, plus 8 bits to control LCD, plus at least 4 outputs and 4 inputs,
plus a moderate amount of eeprom data, and decided that I'd get the
one with the maximum amount of program space that met those criteria -
hence 16F877. There's also a USART in there, and the pins for that
are currently unused, so I could have teh output on a serial port to a
PC, when I get round to it.

I'm not really sure why I haven't finished it off - it was more an
exercise to see if I could than to fulfill a need. When I started I
knew next to nothing about electronics (I did some in physics at
school over 15 years ago) and had never touched a microcontroller, but
I bought an electronics text-book by Horowitz & Hill and downloaded
masses of gumpf from Microchip's website and started reading. My
first PIC program and circuit switched a LED on when you pressed a
button, then switched it off four seconds after you released teh
switch. My second program and circuit was the temperature controller
- I favour the in-at-the-deep-end approach to learning!

Is there anything specific you wanted to know?

regards, Ian SMith
--
|\ /| no .sig
|o o|
|/ \|



  #18  
Old June 19th 04, 09:37 PM
Ian Smith
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

On Sat, 19 Jun 2004 20:05:03 +0000 (UTC), david wrote:

I am reading this now just what I wanted.
always interested in diy pic stuff I measure temp with a thermister but it
is a bit adhock wonder if you can identify your sensors for me sounds much
more reliable


I'm fairly certain they are LM35DZ, and I got them from Farnell.
It's not 100% because that's based on teh fact that I've done it by
checking in my bits box and found a packet claiming to contain 5
"LM35DZ ic-precision temp sensor", and actually containing only one,
and I think I bought a couple of spares for design development.

It might be farnell part number 409-091, and if so I expect a trip to
teh web site will yield a data sheet fairly easily.

I thought about thermistors, but this sensor with its linear output
and an appropriate couple of resistors on an op-amp to scale teh
voltage to a convenient range seemed easier.

regards, Ian SMith
--
|\ /| no .sig
|o o|
|/ \|
  #19  
Old June 21st 04, 05:56 PM
david
external usenet poster
 
Posts: n/a
Default Aquarium Lighting

thanks Ian got that and the pdf I will get some in to play with
"Ian Smith" wrote in message
...
On Sat, 19 Jun 2004 20:05:03 +0000 (UTC), david wrote:

I am reading this now just what I wanted.
always interested in diy pic stuff I measure temp with a thermister

but it
is a bit adhock wonder if you can identify your sensors for me sounds

much
more reliable


I'm fairly certain they are LM35DZ, and I got them from Farnell.
It's not 100% because that's based on teh fact that I've done it by
checking in my bits box and found a packet claiming to contain 5
"LM35DZ ic-precision temp sensor", and actually containing only one,
and I think I bought a couple of spares for design development.

It might be farnell part number 409-091, and if so I expect a trip to
teh web site will yield a data sheet fairly easily.

I thought about thermistors, but this sensor with its linear output
and an appropriate couple of resistors on an op-amp to scale teh
voltage to a convenient range seemed easier.

regards, Ian SMith
--
|\ /| no .sig
|o o|
|/ \|



  #20  
Old April 21st 11, 11:33 PM
adensymond adensymond is offline
Junior Member
 
First recorded activity by FishkeepingBanter: Apr 2011
Posts: 5
Default

The aquatic hobby continues to gain in popularity, manufacturers are developing more and more professional equipment, each year. You need for your installation program will guide the depth and size of your tank, the light you need any special aquatic animals, if you intend to live plants in your design.
 




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
aquarium lighting alkad mzu Tech 2 February 11th 04 08:30 AM
Lighting question Bruce Abrams Tech 0 December 10th 03 03:14 PM
PB avec racine à la mise en eau aquarium ! PLESTAN thierry Tech 1 September 12th 03 10:53 AM
New aquarium!!! :) losing fish! .. :( blove General 1 August 23rd 03 05:26 PM
side lighting Roger Sleet Tech 3 July 26th 03 04:30 AM


All times are GMT +1. The time now is 09:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright ©2004-2018 FishKeepingBanter.com.
The comments are property of their posters.