Thursday, August 12, 2021

DIY A/C, A Brief Follow-up

 I went back through my spreadsheet and found a couple of errors in the math, in both the evaporated-water and fan CFM calculations.  After correcting them, both numbers are pretty close, within .07%.  That's scary-close.  I would have been pleased to have them within 5%.  If nothing else, I would have expected the (cheap) fan I bought not to really deliver 1700CFM.

The corrections also showed that the amount of heat power being transferred is amazingly high, but water does require a lot of energy to change it from its liquid to gas phase.   The fact that a lot of heat energy is being moved around suggests that my indirect-cooled A/C setup has a chance of really working, but we shall see.

Wednesday, August 11, 2021

Homebrew A/C testing

 I have moved on to making some measurements on my first version of a DIY A/C system.  My main interest at this point is to get a rough indicator of how much heat energy the unit is capable of absorbing.  I currently don't have two temperature sensors to measure the air's temperature drop (nor do I have an anemometer to measure the air flow through the fan), so I tried doing it by measuring the amount of water consumed by the cooling tower.

Heat energy can be derived from water consumption using the fact that it takes 4184  2,451, 824 joules to convert 1 gram of water to vapor (at the same temperature).  To get the volume change of water, I measured the dimensions of my water reservoir so I can calculate the volume as a function of height change of water.  The test setup looks like this:


The metal ruler that's at an angle is used to measure the change in water level (in the photo, it's about parallel to the house's shadow line).  It's at about a 50 degree angle, which helps to improve the effective resolution of the measurement.  To convert the distance on the ruler to actual height change, I multiply the measurement (in decimal numbers, not fractions) by sin(50), about .776.  If I laid the ruler along the long axis of my reservoir I could get even better resolution, with a multiplier of .545.  Multiplying the volume change (in mililiters) by 4184 results in the number of joules absorbed by that amount of evaporated water.  Dividing that by the elapsed time gives me the watts of heat energy involved

So far I have two data points, starting earlier in the day when the ambient temperature was relatively low (76F) and the relative humidity was relatively high (61%).  In about 34 minutes the system moved approximately 2.2 megaJoules (!), which works out to an average heat power close to 1KW.  A second measurement taken 2 hours 10 minutes later showed an average heat power around 1.9KW.  Since the second number was calculated for the start of the experiment, as the outside air warmed up the effective power went a bit higher than 1.9KW (2.15KW, to be precise).

At the same time, the fan and pump consumed about 90 watts, so it can be seen that the system is capable of absorbing at least 10 times the amount of heat than the system needs to operate.  Not bad!

I need to point out that, as it is now, the system is not suitable for cooling our house.  The exit air is pretty humid so any improvement in comfort due to lower temperature is more than offset by the increased humidity.  I have gotten a 12x12 heat exchanger, a second fan and higher-volume water pump so I can try the indirect-cooled approach, where the evaporatively-cooled water in the reservoir will be pumped through the heat exchanger.  I still need to get some bulkhead fittings to make a clean system for pumping water out of the reservoir.  Desertsun02 has an indirect-cooled setup he shows on a youtube video, but he just snaked the added tubes up and over the side of the reservoir, which permits uncooled outside air to get into the tower.  While I don't really care what the exit air temperature is, that air leakage also reduces the evaporation rate, which is a concern.  Using two bulkhead fittings will get around this problem, as long as the hoses never have to go above the surface of the water.

It also will be necessary to make an enclosure for the heat exchanger so I can pull air through it with my second 12 volt fan.  So I likely will miss the opportunity to try the whole thing during our current heat wave (100F predicted today, 104F or higher tomorrow).

Update:  I let the system run until almost 5PM (a total runtime of about 60,000 seconds).  The overall heat transfer rate came to 2.125KW, for a total of around 12KWH. (51 mega joules).  

I need to think about this some.  The actual heat transfer may be substantially more because the cooling tower cooled a whole lot of air, in addition to evaporating a bunch of water (about 12 liters).  I could calculate what this is, assuming that the fan really moved 1700CFM and (based on ambient vs exit air temp) the temperature drop.  But I believe I can't add the two results -- the heat absorbed by the evaporating water was pulled out of the air (and the residual water in the cooling pads).  So using just the latent heat in the evaporated water probably is correct.  But my calculation produces a result that is about an order of magnitude higher than the water-evaporation calculation.  I definitely need to think about this.....

Sunday, August 8, 2021

DIY A/C experiments

 As is often the case, when the weather turns hot I start thinking about making some kind of home-brew A/C system for our house.  In the northern Willamette Valley of Oregon, for the most part summers are fairly mild so in some ways it doesn't make monetary sense to install a whole-house A/C system.  This, of course, assumes that the house in question has a gas, electric or wood heating system.  Heat pumps have A/C as a "freebie", but we went with forced-air gas.

So earlier this season I was once again doing online searches for DIY A/C systems that don't require exotic stuff like compressors, refrigerant etc. -- in other words, something that could be built using commonly available materials and tools (like a saw, drill, screwdriver and so on).  I came across a series of youtube videos produced by Desertsun02, and this one looked interesting.  He provides a lot of build information so, even though his emphasis was on using solar power to run the thing, it looked like it could be adapted for a test setup.

I built most of Desertsun02's evaporative cooler -- I omitted the 90 degree elbow duct on the output side of the fan.  Here's a photo of it (minus the fan):


 I attached two of the blue evaporation pads using his approach, using copper wire pushed through the pad and wrapping the ends around the PVC pipe, but didn't like the gap between the wires -- any path for air to enter without going through the pad will reduce the cooling capacity of the unit -- so for the remaining pads I used carpet thread, threading it through the pad and around the pipes in a corkscrew fashion.  This worked much better, but I don't think the thread will hold up very long being exposed to the sun's UV.  It also is clear that it will be a pain to replace pads using either of these approaches.  So that part of the design needs some work.

I found a similar problem with the way the fan is attached to the top of the cooler.  The PVC 3-way fittings on the top of the cooler raise the board so there is a ~1/8" tall gap all the way around the board, also permitting uncooled outside air to enter the exit air stream (and it also reduces the quantity of air that _does_ flow through the wet evaporation pad).  This latter problem could be addressed with the judicious use of adhesive-backed foam weather stripping.  However, just to compound the problem, I found that my piece of scrap plywood I'd used for the board was warped.  Since this thing could potentially be exposed to rain, there's no guarantee this wouldn't become a problem even if I started with a perfectly-flat board.

Alright, so despite these problems, how well does my setup perform?  I have to say, so-so; but mostly because the outside air's relative humidity can be pretty high, even in an Oregon summer.  Example:  right now my (homebrew) remote-reading temperature and RH sensor is reporting 72F and 42% relative humidity.  When I tested my evaporative cooler, the ambient temperature was 80F and the relative humidity was about 58% -- not the best when it comes to getting a lot of cooling out of a swamp cooler.  According to my psyrometric chart, the wet bulb temperature was 68F, so that's about the best I could hope for.  My measurements showed the exit air temp was about 71F, and the recirculating water in the cooler had cooled down to about 70F.  If I eliminated the gaps around the edges of the cooling pads and between the fan board and cooling tower, I probably will get the exit air and recirc water close to the same temperature.

Oh, BTW, here's a photo of my remote-reading sensor:


OK, it's a little rustic, shall we say :).  But I just got it working.  It uses a couple of items I bought from Adafruit -- a Feather M0 with an RF69 radio transceiver, and an SHT40 temp/humidity sensor.  I'm powering it with a spare cell phone power bank, which has much higher capacity than the LiPo batteries Adafruit sells for these things.  The Feather boards were designed to be battery powered, so supplying power some other way can be a little tricky -- but, since they also are designed to be powered off a USB cord, the power bank scheme works a treat.

One big issue with evaporative coolers is that the cooled exit air also is much higher in humidity, which is a problem if you're starting out with a relatively high RH (as in, where I live).  So my long-term solution is to add another cooling loop to the swamp cooler.  It will circulate the evaporatively-cooled water through a water-to-air heat exchanger that is inside the house.  A fan will pull warm interior air through the HX and cool it down.  If the interior dew point is relatively high, it also may condense some water and lower the interior relative humidity, too -- but I really don't expect that to have a significant impact on the interior RH.  But I will make sure to design the HX enclosure so condensation that DOES occur is directed back outside, rather than dripping all over the floor.

What would an improved version of the cooling tower look like?  I'm considering the use of U-channel aluminum extrusions to capture the edges of the cooling pads.  To prevent the pads from being sucked into the cooler, I will attach support panels made from fencing mesh.  The U-channel will be screwed to square aluminum tubing, so replacing a pad would be easy -- pull the old one out and install the new one by tucking its edges into the U channel.  An aluminum sheet would be used for the fan mount.

Switching over to aluminum extrusions would still be compatible with hand tools -- a hack saw for cutting the aluminum and a drill for making screw holes would just about do it.  It may be necessary to make corner brackets to assemble the parts into the tower shape, but I haven't gotten that far yet.


Saturday, July 17, 2021

Cat Deterrent design notes

 The PIR detectors and tweeters arrived so I threw a rough prototype together, using a couple pieces of 4 x 1/2 wood for the base and vertical mast.  I used a single shelf bracket to assemble that part of the project.  Then I moved on to the electrical connections.  The PIR detectors have 3 male pins on the top edge, so I made two small receptacles using .1" headers soldered to small pieces of vector board.  I also had purchased a wall wart style power supply that outputs 5V and 12V.  The 5 volt supply runs the Arduino and PIR detectors, and the 12 volt supply is for the tweeter driver.

Speaking of the tweeter driver, I first planned on making a simple class AB audio amplifier, but realized that I don't need even semi-accurate sound production.  So instead I got an L293 quadruple half-H driver, typically used to drive DC motors.  It can output plenty of current and is a single-chip solution.  One side is directly driven by an Arduino digital output pin, and the other is an inverted version.  I used one of my (many) 2N3904 NPN transistors as an inverter.

After putting everything together I started playing with the software.  I quickly discovered that these PIR detectors are a bit noisy, outputting signals due to external interference.  Some browsing through the Web showed that this is a common problem.  However, it also appears that the noise susceptibility is greatly reduced if you minimize the lead length going to the detectors.  I can do this with the bottom detector but not for the top.  However, it looks like I can reject those phantom detect signals using software.  One issue is that, for a person, the top and bottom detectors don't switch at exactly the same time.  This complicated the software because there was a good chance the bottom detector would switch first, so just using that alone to identify a cat would be incorrect.

The other important observation was that, indeed, the PIR detector's field of view is so wide that the top detector was detecting cats -- so the system was incorrectly allowing cats to enter the "forbidden space".  I solved this by attaching another shelf bracket to the vertical board, just below the top PIR sensor.  Then I attached an aluminum sheet to the bracket.  This greatly improved the system's ability to discriminate between cats and humans.

One final thing I did in order to check how the system works in our absence was to get a wildlife camera.  I will set it up to monitor the cat deterrent system and modify things when I find problems with my implementation.

Here's a photo of my (messy) prototype:


The piezoelectric tweeter is resting on the floor.  My L293 tweeter driver board is to its left, and behind that, my Arduino board.

Thursday, June 3, 2021

A Smart Cat Deterrent

Recently our geriatric Siamese cat has started peeing on the floor.  We are going to take her into our vet to determine if she has a UTI,  but it's quite possible that she is just going senile.  She's exhibiting other behavior that suggests this is the case.  We're not to the point of putting her down for that yet,  because we have no carpet on our floors.  Slate and hardwood.  But we DO have some wool area rugs at risk.

So I started thinking about a way to restrict her access to places she visits when she transgresses.  There are some commercial and DIY solutions that combine a motion sensor with some sort of deterrent -- making a loud noise and some sort of electronically-activated spray system are out there.  But they also are activated by a human entering that space.  Some kind of sophisticated image recognition system would likely work to differentiate between people and their pets but would be relatively expensive.  In contrast, a relatively simple logic scheme using two PIR motion sensors looks like it could work.  They would be at two different heights -- one close to the ground and the other about 2-3 feet high.  If both are activated, something tall (like a human) just entered the space.  If only the bottom one is activated, it must be something smaller like a cat.  In that case, the logic circuit will activate a piezo tweeter that emits sound obnoxious to a cat.  This will teach the cat -- hopefully -- to stay away from that area.  If the frequency is above about 15KHz we won't hear it (not much anyway), but the cat definitely will.

PIR motion detectors usually have a fairly wide field of view.  So it may be necessary to place a tube around the top one to restrict its field of view so it won't trigger when a cat enters the area.

To test the idea out I ordered several PIR sensors, a couple of piezo tweeters and a 5V/12V wall-wart power supply from ebay.  The 12V supply will be used for the piezo driver circuit.  I have several Arduinos lying around so I will use one of them to perform the logic and output a high frequency signal to the piezo driver.  So far I have far less than the $$ charged for a commercial device, and it should work better.  Such a deal.  And if need be, I will have enough sensors and tweeters to protect another area.

Sunday, April 25, 2021

XRF update

 It's been some time since I posted -- for some reason, although Covid meant we spend much more time at home, I have remained busy.  But it's time for a quick update on my home-made XRF setup.

I started by finding some relatively inexpensive scintillator crystals that looked suitable for XRF, but got hung up on the detector side.  Photomultiplier tubes are fairly inexpensive but require well regulated high voltage, on the order of 1,000V.  They also are fairly bulky, a disadvantage if you want to perform XRF in the field.  A number of semiconductor manufacturers make something called silicon photomultipliers, commonly referred to as SiPM's.  They typically require something on the order of 30V to operate, much friendlier -- and they are much smaller than PMT's.  A 6x6mm SiPM on an evaluation board costs about $100.

However, I came across a thing called a pocket geiger radiation detector, sold by Sparkfun.  It uses a 10x10mm detector that by itself costs about $100 -- but they're selling it on a circuit board for only $69.95.  In its as-delivered condition it can't be used as the detector for XRF because the design uses comparators, which remove the pulse-height information needed.  However, the circuit board has some pads (possibly used for test purposes) that DO make the analog signal available.  So I bought a pocket geiger and started experimenting.  I used the 60Kev gamma rays from Americium (found in ionization type smoke detectors) as the radiation source, to excite XRF in a thin brass sheet.  I was hoping to see pulses of various heights coming out of the amplifier (from the mixture of copper and zinc that make up brass), and sure enough, I did.

While this result is encouraging, it's not quite enough.  To analyze ferrous metals the copper shield has to be removed, so the ~10Kev x-rays aren't absorbed.  But removing the shield results in a large 60Hz signal coming in from all the power lines.  The detector circuit has very high gain so this is an unavoidable problem with an unshielded detector.  So currently I'm making an aluminum box that will house the detector, and also serve as a shield to block 60Hz and those pesky 60Kev x-rays.  The box will have a partition with a hole in it to admit the x-rays emitted by the sample, and a removable end that, when installed, will fully shield the detector from all that power line noise.  The Americium disks will be placed around the hole so the detector will be shielded from them, but can "see" the fluorescence x-rays.  I have some 1/8" thick lead sheet that will line the interior of the box, just to make absolutely sure that I have no exposure to x-rays.


Then there is the software needed to process the pulses and assign their peak height to individual channels.  That information, in turn, will be used to determine what element(s) are present in the sample.  First things first though -- I need a robust test platform I can depend on before spending the effort on S/W. 

Sunday, June 28, 2020

XRF, a geek's homebrew dream

I recently learned about a really cool way to perform your own elemental analysis on a (relative) shoestring.  Traditional approaches to elemental analysis have taken a number of different paths, starting with chemistry.  Typically, analysis would involve dissolving the unknown(s) in an acid and then using various chemical reagents to determine the components.  Some compounds are insoluble in water, so adding a solution with something that will react and cause some to become insoluble could be the first step in figuring out what you've got.  Since there's a huge number of potential reactions (and possible confounding results), this approach requires a well-stocked chem lab and knowledge of many different reactions.  Not for the hobbyist.

Another approach is spectroscopy.  Based on the light emitted by excited elements, it's very powerful and sensitive.  But there is the problem of heating the sample to a high enough temperature to get it to emit -- and then having the ability to separate the light into its individual components.  This is more approachable because it's relatively easy to make or buy a visible-light spectrometer based on a diffraction grating (or blank DVD), plus a webcam to image the spectrum.  The difficulties are the necessity to make something to ionize your sample long enough to acquire a spectrum; and the need to break your sample down in to some form to feed into your home-brew ionization device. 

On the industrial side, you can buy analysis tools that look at the x-rays emitted by your sample.  One approach that I'm pretty familiar with is to hit your sample with high-energy electrons (accelerated to 30KV or thereabouts), and look at the x-rays it emits.  This requires an electron gun capable of accelerating your electrons.  The x-rays are characteristic of the element(s), so an x-ray spectrometer has to be used in order to distinguish them.  Two detection methods are used, EDX or WDX.  EDX is "energy dispersive x-ray" and WDX is "wavelength dispersive x-ray" analysis.  WDX is more straightforward, and uses a crystal lattice as a diffraction grating to produce a spectrum of the x-rays emitted.  The crystal is rotated to direct the diffracted x-rays into a detector, so it is fairly slow because it must rotated in order to scan through the x-ray spectrum.  In my experience, it also is less sensitive so scan times must be very slow in order to get decent signal to noise ratios.  The detectors used for these analysis tools use relatively exotic gasses like argon + methane in a flowing tube.

On the other hand, EDX is much more sensitive and faster, because it uses a special kind of photo-detector.  The detector outputs a pulse whose height is proportional to the energy of the incoming photon -- the shorter the x-ray wavelength, the more energy it has.  So it is a kind of single-photon detector, but the energy of each photon is categorized and then entered into a "channel" of a multi-channel analyzer.  So all detected photons are detected and characterized, which greatly increases the detection rate.  The downside is that the detector has some losses -- x-rays can enter the detector (a type of semiconductor diode) but they may not deposit ALL their energy -- so they don't produce a signal that is exactly related to their original energy (determined by their wavelength and Planck's constant).  These detectors also need to be operated at cryogenic temperatures, 77K (the temperature of liquid nitrogen) so they have to be inside a Dewar whenever they're are in use.  Attempting to operate them at room temperature will destroy them, a VERY expensive proposition.

All this stuff is way out of the range for hobbyists, unless they buy something used and have the ability to get it to work.  That could require a wide range of abilities, since these tools typically are attached to scanning electron microscopes.  Not impossible, but a pretty high bar for most.


Another approach is XRF.  It is a type of fluorescence, hence it's acronym -- "X Ray Fluorescence".  You probably are familiar with ultraviolet fluorescence, from "black light" bulbs or tubes.  When it occurs, the light emitted is characteristic of the materials involved.  XRF is similar, but uses higher-energy X-ray photons to excite fluorescence at somewhat longer energy x-ray wavelengths.  X=rays are emitted from inner-shell electrons so they are pretty much independent of the oxidation state of the elements -- so they are good for looking at individual elements.  This sounds pretty exotic, but it actually has some advantages -- particularly from a hobbyist's point of view.

What are some of these XRF advantages?  Well, for starters a lot of work for you as a DIY'er has already been done.  Just Google "Theremino XRF" and you will see what I mean.  It's not too expensive to buy scintillator crystals and photomultiplier tubes (and power supplies) from ebay to come up with something that can tell you (for instance) if the paint flakes you've got have lead in them or not.  And it can be done with an x-ray source made from a few dead smoke detectors!  Since this approach is all open-source based, you can take it as far as you want.  Caveat:  yep, you do need to have some experience with roll-your-own electronics, but it's not that high a lift.

Just to add to the attraction, the same setup can be used to look at materials to see if they're radioactive and provide some guidance on what the radionuclides might be.  Not important, you say?  well, Strontium-90 is a common contaminant from Nuke-reactor failures (think Fukushima, and apologies if I got the spelling wrong); and our bodies can't tell the difference between strontium and calcium.  Living on the west coast, we've wondered just how much SR-90 we got from that, but authorities here have not been very helpful to resolve that concern, possibly due to economic issues.  Yes, radioactive cesium also can be detected too.