Description of the controller design 1.0: Read more...
Aqua Reef Meter V2.0
Digital controller with measurement of aquarium water parameters using in saltwater aquariums
I present a different theme than the radio, but also interesting, its own aquarium controller design with power measurement, we are currently working on.
Since I am interested in the Aquarium, intrigued by the suggestions of colleagues from the aquarium forum, I decided to construct a simple yet sophisticated measuring device using in aquariums, including saltwater aquariums.
Should make a radio module, you could combine both themes :)
This system has the assumption of the following options:
- Measurement of water temperature in °C
- Measurement of salinity , expressed at once in the density
- Measurement of pH Water
- Measurement of the degree of oxidation REDOX
- 4 independent outputs
- Each of the outputs configured for measuring a parameter dodowolnego
- Communication controller with a PC via an RS232 interface
- The possibility of any RS232 vias, which makes the controller more versatile
- Programming the CPU via an ISP
- Programming the processor to a PC via RS232 using the free application
Each parameter is calibrated from the Menu control and can be attributed to any of the outputs.
In version 2.0 the system controls the four output relays for the various devices, such as lighting, metering pumps, solenoid valves, coolers and heaters. Switching times are programmed separately
for each output.
The controller can be used for example to switch on the fan surface of the water, the temperature threshold is reached taking into account hysteresis 0.2 ° C. Such a small thermal jump
is hardly felt by the inhabitants of the aquarium.
Employed here readily available, the newer 28-pin processor ATmega88 is how it turns out, relatively high opportunities of the more expanded capabilities for controller version 1.0.
An application for handling ARM from your PC
The controller Aqua Reef Meter works specially written by me program. It is a simple application used mainly for viewing on a computer screen parameters
in the aquarium and the analysis results. The addition to the display of the measured parameters also displays graphs of the time these parameters. The interval of these charts can be adjusted.
This allows you eg to record parameter changes in minutes, hours or many hours or days. These results can be saved in a CSV file then easily editable.
Another primary function of this program is the ability to upload a newer version of the processor ATmega88 in the controller. This function is available from the Tools menu.
Start the cutted simple input system for measuring the redox potential. I used to ORP electrode plastic AquaMedic mV. It was a fresh electrode, which has just dipped
A positive reading of the redox potential of aquarium water can be made only after several days of soaking the electrode. Nevertheless, it connected the electrode dipped into the input system
The input system used a TL072 operational amplifier, which in its structure includes two amplification stages built in JFET technology, which provides high input impedance.
Initially, I used LM358 system here, but it soon turned out that the input impedance is too low, resulting in rapid saturation of the ORP electrode. To supply the TL072 system
need an additional negative voltage. I released them in a simple manner using NE555 system as a generator voltage of reverse polarity relative to ground.
This system powered with 12V DC output voltage generated row-8V, which is more than enough to wysterownia stabilizer 79L05 giving the output voltage of-5V negative
sufficient for proper system operation TL072.
REDOX measurement is performed as follows: the first amplifier operates as a repeater with high impedance. ORP electrode is switched to the inverting input of the amplifier. The output of this amplifier is connected to the second input
nieodwracającym. Just separate the input voltage is indicated on the second step. In version 1.0 it was an amplifier to strengthen the times 4th This allows the voltage of the electrode with a value such as 500mV
was enhanced to approximately 2V. This is necessary for accurate measurement, as in the case of version 1.0 of the controller as a transmitter used a simple 8-bit system PCF8591P
from 2.56 V reference source corresponding to one byte. So the result obtained was divided in the controller for 4 which was a good measuring accuracy is sufficient to
determining the redox potential in the aquarium.
In version 2.0 a measuring system for measuring the redox is similar, but the potentiometer regulating the secondary reinforcement of operational amplifier is adjusted for the voltage measurement accuracy
10-bit converter. Its native resolution is 1024 points, so you had such a good gain, to 2.56 for the reference sources to obtain the correct indication of the redox measurement.
When thus prepared the measurement system changed to the target display, a blue color backlight, which makes the driver more "maritime" in appearance.
Then the system programmed the first version of ATmega88. There were no surprises, no type of pull-up resistors or for a rapid action of the loop.
But I finally managed to get a pre-electronic system. The controller immediately began to read the value of REDOX flawlessly.
ORP probe still was not wet showing redox potential overvaluation. I left her still submerged in sea water.
Measurement of pH
To measure the pH of the experiment I used a similar system as the input Redox measurement, but with the use of LM358. For measuring the pH at the beginning of the input of the measuring system used the BF245 FET, which has a fairly large input resistance.
Connect the pH probe directly to the input voltage follower cause distorted results due to the low input impedance in relation to the output current source which is the pH electrode.
To begin with divider resystorów 1K and 4k7 k 1 has been established, the input voltage of approximately 3.5 V when the electrode is not connected. After connecting the electrodes to the input of the system,
duplicate the output voltage is established around 2.5 V. After placing the probe in a test fluid of pH = 9, the output voltage was 2.44 V at a temperature of about 25C calibration solution.
In the case of my transmitter is not required additional reinforcement, since the voltage 2.56 V is sufficient for the transmitter (for 10-bit converter).
I connected the output of the repeater transmitter input at 3 in the plate of the controller. At the output of a duplicate plugged resistor and capacitor in addition to pre-stabilize the output voltage to the proper processing by the transmitter AC.
I put the probe in the test fluid pH 9 at a temperature of about 25C.
Calibration of the system I made two functions for fluids pH 4 and pH = 9
Measurement of pH is of interest to me for (7-8,5). Using 10-bit converters improved measurement that is leaps above 0.01-0.02 at about pH. However this does not estimate the pH of the test water.
With the two-point calibration of the pH electrode was able to get right, a fairly accurate result of the measurement of alkalinity of the solution, in this case sea water.
This system can be successfully applied to study the pH throughout the range of pH4 to pH9, and also in freshwater aquariums, aquarium especially in the Amazon, in which the pH of water is highly acidic.
Measurement of salinity
I decided to measure the salinity indirectly, by measuring the impedance of the test first, the water, setting the conductance (G = 1 / R), and then converting the measured value of the density with temperature. At the beginning I took T = 25C. Temperature coefficient decided to take a temperature when connected.
Recommended to maintain density in the aquarium should be between 1,022-1,025 g/cm3. Ideally it would maintain the value of 1.023 g/cm3 . I took this value as the target density.
The 2.0 version of ARM used a ready-salinity probe TEH System. Probe cable ends with a standard BNC connector.
The measurement system, similar to the previous system I designed using the LM324 operational amplifiers comprising 4. Measurement of conductivity due to salt water test must be different. As in salt water there is the phenomenon of electrolysis of water to measure the impedance of the voltage of the constant value is difficult because of the possibility of this phenomenon. At the ends of the probe when connecting the DC voltage very quickly electrolytic capacitor is formed. Therefore, salinity should be measured with alternating current. I am due to the simplicity of the system I decided to simplify things a bit and use a rectangular signal generator with a frequency of about 2kHz . Although the AC voltage is not, but it seems to effectively eliminate this phenomenon.
Planned similar to the previous measurement system, but changed. The inverting input amplifier II working as a repeater is shown with a simple square wave generator in the form and layout of the amplifiers LM324.
This is a duplicate entry równierz through 100k resistor in parallel plugged the water resistance of the measuring probe. Signal generator "suppression" of water resistance is shown in the third amplifier.
At the output of the amplifier modulated square wave signal is converted to fixed by the system integrator with a capacitor 22U. I arranged horseshoe output voltage of about 2.50 V. With a drop in water temperature during the night, I noticed that at temperatures 25C (down 2C) raised the voltage to the value of 2.03V. It is thus the effect of temperature on the density - density change of 2% at a temperature change of 1C.
It is of the exact translation of changes in output voltage as a function of conductance involved in my program in the controller.
When calculating the proper density to take into account the temperature, a constant conductivity of sea water and ORP changes.
Electronic diagram of a controller in 2.0
After the successful launch of a prototype version of the controller drew a diagram. This is the second version of the working device.
As you can see this is not a complicated device. Contrary to appearances, contains several readily available components and is not much different from the previous version. It is worth an additional RS-232 communication system with a PC.
Due to the use of AVR is possible to program the processor using ISP connector is on the board in the form of five pins.
Active as in version 1.0 was placed in a plastic housing having a Z-28A on display notch. PCB connector has soldered 230Volt which were bolted to the conductors
cable outputs. The outputs were used with the socket pin hermetic 230Volt PE protection. This is to further secure the use of the controller near the aquarium.
A detailed description of the constructions controller is contained in the annotation to version 1.0.
The whole design of the controller is similar to that version, so installation on their own should not pose
too many problems. The three buttons put on plastic cap.
Before installing the top cover holes drilled on the buttons and LEDs.
When drilling holes, you can use a ready template shown in the photograph, which can be applied directly to the housing and mark the drilling location.
On the front cover positions the label is made of waterproof paper. Designed leaders before drawing printed out on a color laser printer.
After running the system controller had a tendency to interfere with the switching outputs. To remedy this, an additional capacitor 100nF soldered directly
the Vcc supply pins of the processor. All of the input signal wires and power cables test done in the form of shielded cables. Prevent a disturbance.
At the nearby photograph is an example of mounting the controller next to the tank. To this end, drilled a small hole with a diameter of 6 mm at the rear end just above the controller PCB and hung with a small dowel and bolts with a wider head. It is a proven and relatively convenient method of mounting the controller. Especially in places
where there is an increased risk of spillage of water.