Monday, March 23, 2009

Aluminum welding progress

I ordered a bunch of aluminum parts from eBay and McMaster. I've spent a few afternoons just cutting the metal into random parts and TIG welding it back together


I've made a few coupons to test the five basic weld types:

* Butt
* T-joint
* Open corner
* Lap joint
* Edge

The above picture only shows a T-joint and open corner, since those are my best types.



This pipe doesn't do anything useful, unfortunately. I just made random cuts on my miter saw, rotated the two pieces 180*, then welded them.


I'm still working on getting nice, consistent beads, but they have good penetration, and I'm getting a lot more confident with aluminum.

DIY wave-maker plans

I have provided a basic schematic and parts list for the aquarium wave maker circuit. Here is what you will need:

*Blue plastic "double" electrical box (for household wiring) $1
*Standard electrical outlet and outlet/switch faceplate $2
*12 volt transformer and full-wave bridge (cut up an old one that you are not using. $6 for Jameco #100095)
*Power cord (cut up an old one)
*558 timer chip (Jameco #27457) $1.20
*Solid state relay Kyotto KB20C02A (Jameco #175214) $6.55
*7808 or 7809 voltage regulator (Jameco #876352) $0.56
*two 100K pots (Jameco #29103) $2.18
*two 3,300 uF capacitors (Jameco #93666) $1.22
*PN2222 transistor (Jameco #178511) $0.12
*perf board, wire, maybe a 16-pin DIP socket, misc caps and resistors $2.00

Total parts cost is about $23. Here's a link to Jameco

Notes: My circuit provided times of about 1 to 6 minutes for the on and off periods. You may want to put a 10K resistor in-line with the 100K pots. If either pot is turned too far down, the circuit will stop oscillating, so the additional fixed resistance will prevent this from happening.

This circuit does not provide the "soft start" that many commercial wavemakers tout. These motors likely use shaded poles for starting, and a soft-start controller would have to control the frequency of the AC power, not just the voltage. I find it pretty unlikely that this is what any wavemaker does, and for the price they charge, it's probably cheaper to buy a new powerhead every year! I haven't used my wavemaker long enough to know if it will kill the powerhead. I'm using an Aquaclear powerhead, and it clicks loudly upon startup, but there is no chatter. I may make another post about modifying the impeller to cope with the repeated startups.

I've experimented with using dimmers, current-limiters, etc, to control the speed of powerheads. The speed can only be reduced %10 or %20 before the motor stalls. It's not really practical without control over the frequency of the AC waveform.

The Solid-state relay in this circuit has a current limit of 2A. This mean it can control up to about 200W of powerhead.

Saturday, March 21, 2009

Aquarium wave maker

Here's a really simple project that turns an aquarium pump on and off at a specific rate. This is supposed to simulate ocean currents which periodically vary instead of blowing constantly like a mechanical pump does.

The project is built within an electrical box and uses a 558 quad-timer chip as the timing device. I used a monster capacitor and resistor to get time values of 1 to 6 minutes (variable with a pot). The on and off times are independently variable. I used another part of the 558 chip to flash an obnoxiously bright LED. There is also an override switch. The output of the 558 chip drives a transistor, which triggers a solid-state relay. The relay controls power to the outlets.

I added some plans here: http://benkrasnow.blogspot.com/2009/03/diy-wave-maker-plans.html

Aquarium temperature controller (PID loop)

Store-bought aquarium heaters suck. It's just that simple. They're cheap too, so maybe the suckage-to-price ratio is correct, but I felt that the temperature in my tank could be a whole lot more stable than it was a with a standard submersible heater. The main problem with the glass-tube heaters is that the temperature sensing device (a bi-metallic strip) is located inside the heater itself! How does the heater know what the tank water's temperature is? It doesn't. These submersible heaters are setup to maintain a relatively constant temperature inside the heater tube. The assumption is that the heat load on the aquarium is approximately constant, therefore the water temperature will be fairly steady. In my house, the ambient temperature changes quite a bit, so the heat load on the aquarium changes, and the submersible heater does a poor job of temperature regulation.

The solution is to use a sensor that is mounted some distance away from the heater. The sensor will accurately measure the water's temperature -- not the heater's. Systems of this type are available to aquarists, but they are overpriced, and offer only on/off control. Instead, I bought a PID (proportional, integral, derivative) controller with a platinum resistance temperature device (fancy thermometer). The whole thing with a solid-state relay was $70 on eBay! I mounted the controller in an electrical box and wired the solid-state relay to control the outlet. I am still using the tank's original submersible heater, but I set its temperature control wheel all the way up, so that it is on whenever it receives power. It is switched on and off via the relay.

The controller is a Eurotherm 2132. This is a very complicated piece of equipment. It has numerous settings, menus and modes of operation. It's definitely overkill for controlling an aquarium's temperature, but I really enjoy tinkering. My favorite feature is the auto-tuning of the PID loop parameters. I set the controller up, and let the tank's temperature drop to about 78*F. I programmed the controller to bring the temperature up to 80* and to initiate its "learning process". It switches the heater on and off and records how quickly the tank rises and falls in temperature. This way, it knows the time constant of the system, and how to best choose the PID parameters. The learning process took an hour or two since the system has an inherently slow response. For those that are really curious, here are the parameters that the controller calculated:

proportional band: 1.45 *F
integral time: 3923 sec
derivative time: 655 sec

This means that the controller uses proportional control when the tank temperature is within .725*F of the setpoint (half of the total 1.45*F band). Below the band, the heater is constantly on. Above the band, the heater is constantly off. Proportional control means the heater is switched on/off rapidly to generate a percentage of its full output power.

The integral time is very large, which means the system reacts very slowly, and the integral action should be very gentle. Specifically, the controller will modify the proportional output up or down at a rate of one full proportional band per 3925 seconds of 1*F error. So, if the tank is constantly 1* too cold, after 3925 seconds, the controller will boost the output by %100

The derivative time indicates how much the controller responds to rapidly changing tank temperatures. 655 seconds means that if the tank temperature were changing at a rate of 1*F per second, the output would be adjusted by 655%. If the tank temperature were changing at a rate of 1*F per hour, the output would be adjusted by 18%.





I also added a chiller to my tank, and have it controlled by the same PID controller. Check it out here:
http://benkrasnow.blogspot.com/2009/03/diy-aquarium-chiller.html

DIY automatic water top-off system for home aquariums

Please see my post about the improved level sensor here.

One of the daily chores of aquarium keepers is adding water to the tank to compensate for evaporation. For reef aquariums with intense lighting, the amount of evaporation can be substantial. In my 5 gallon nano-reef, I add 1-2 cups every day. This task is not only boring and repetitive, it is also stressful for the aquarium. The sudden change in salinity of adding 1-2 cups (or 2-4 cups, if I forgot a day) is bad for the tank inhabitants. The solution is to design an automatic top-off system. Here's how I did it:

I built a non-metallic water level sensor from two plastic fiberoptic cables and some spare plastic parts. The ends of the fiberoptics are directed towards each other at about a 60* total angle. The imaginary point of intersection is a few mm in front of the sensor head. The sensor works by sending light out one fiberoptic and sensing how much light returns via the other. When the water level is within 1cm of the sensor head, the amount of light returned is very high since the surface of the water is a good reflector. As soon as the water rises above the sensor head, the amount of returned light drops to near-zero.



This sensor works very well with only one problem: bubbles. If air bubbles start to collect on the fiberoptic ends, they can reflect enough light to cause a false-positive even when the sensor is underwater. I modfied the sensor after taking this photo by cutting away excess material, and making the fiber ends more flush with the sensor's plastic. So far, these modifications seemed to have worked very well.


The sensor is mounted on the aquarium's rim. The white plastic adjustment screw locks the sensor in place after moving it to the desired water level.

The light sending/receiving is accomplished with an off-the-shelf part. It's a Keyence FS-V11. These are used in factories to sense the status of parts on a conveyor belt, etc. It's a very cool little device, and is adjustable to have a custom light/dark threshold. The Keyence's output drives a solid-state relay, which controls power to the outlet. The outlet supplies power to a small water pump (Aqua-lifter AW20) that draws water out of a store-bought container, and drips it into the aquarium. The pump is slow, which is good, since it will affect the tank's salinity gradually.

Interestingly, the sensor has a sort of built-in hysteresis. The water forms a meniscus with the sensor head, and as the level drops, the meniscus keeps the sensor submerged as the level drops below the sensor head. Finally, the meniscus breaks, and the sensor "sees" the water surface. The pump is activated, and the level rises until it meets the sensor head. This provides a nice on/off cycle action.