A few weeks ago while cutting out some wooden letters for one of my Wife’s Christmas present projects, our Shapeoko died. The machine itself appeared to be OK, but it disappeared off the USB bus, and was never seen or heard from again. I tested the traces on the board, and verified pin to pin continuity between the USB connector and the Atmega 16U2 IC, which it’s driver board uses instead of an FTDI or similar USB to TTL Serial converter. Normally when you plug in any USB device to a Linux computer, you see [something] in the dmesg output – even if it has no drivers for the device and in many cases even when the device does not even work. (I recently ran into a case where a USB device kept complaining that it was “unable to enumerate USB device” – but the kernel was still aware of its’ presence on the bus.) In this case, plugging in our Shapoko yielded nothing. Not even the awareness of something drawing power off the port.
I traced out the pins, made sure the zeners weren’t bridged, and I could connect to the 16U2 via the ICSP header (in fact, I was able to save the binary program from it along with all it’s fuse bits!) However, despite all this, it simply did not work. This evening Jeremie replaced the 16U2 with a new one that arrived today from Digikey, I re-loaded the binary programs from the old chip into the new one and voila: The screen shot you see above! Now all I need to do is re-assemble the machine and test it with a real live cut, but that should be peanuts at this stage now that it is alive and well again.
I just love fixing things!
Posted in CNC, DIY Projects, Shapeoko and tagged 16U2, Atmega, Atmel, Circuit Repair, CNC, CNC Router, Fixed, Shapeoko, USB, Woodworking by cube with no comments yet.
Over the past month I’ve noticed that the toilet on the main floor has been running (filling) a lot – overfilling by minutes, if not more. A closer inspection of the inner workings revealed that part of the mechanism responsible for shutting off the water flow was cracked, making it mechanically difficult for the float ball to rise high enough to push the plunger down enough to shut off the flow of water, resulting in hundreds of wasted gallons of water. A quick trip to my local Home Depot found me a very cool-looking, quieter replacement, but now I had no float ball upon which to mount the magnet for my flush sensor. I had to come up with a different solution for monitoring when this toilet was being flushed.
Posted in Conservation, DIY Projects, Energy Monitoring, Integration and tagged Bathroom, Float Sensor, Flush Sensor, Tank, Toilet, Toilet Tank, Washroom, Water, Water Conservation by cube with no comments yet.
We received a lot of rain this weekend, and all of my rain barrels are now full up. I know this because I’ve gone to them and looked, but the next logical step in this project is to find out a way to measure their contents electronically. To date I’ve tried three methods:
Method 1: Float Switches.
Definitely the simplest approach, a float switch is a device that has a mechanism made of a buoyant material, that when it rises with the water a switch is activated. Float switches provide binary data about the contents of the barrel. If they are off, the assumption is that the water level is below the position of the sensor; if they are on, it can be assumed that the water level is above the position of the float sensor in the barrel. Float sensors are great for telling you if a tank is full or empty, but you really get no feedback for everything in-between.
Sometimes this is all you need. In order to collect more rain water whenever it rains, I’ve set up buckets underneath each of the two downspouts on the house. Because our land is on a slope, one of these collection buckets naturally sits higher than the other. Therefore, I simply ran a 3/4″ poly from the higher of the two, and allow gravity to carry water from it down to the other bucket at a lower elevation.
The black poly pipe seen at the left of the bucket is threaded into the bottom of the bucket, so that any water that it collects travels down the poly pipe towards a lower bucket. Unless it is REALLY pouring continuously, the poly should be able to handle most of the rain water that lands in this bucket with the help of nothing but natural forces.
The water from the upper collection bucket runs down hill through the poly pipe until it reaches the lower of the two collection buckets. A gentle bend in the pipe raises it up to the top of the second five gallon bucket where the water pours into the lower bucket. This gentle slope in the pipe has an added benefit: Because the water is gravity-fed, it is fairly slow-moving. The slope allows much of the sediment that passes through the strainer atop the collection bucket to remain in the pipe, so only clear, clean water comes out the other end. After every major rainfall I have to tilt the pipe down into the swill and allow the crud to wash out of it, but this simple gravity-based filter is surprisingly effective.
The second collection bucket is placed beneath the other downspout on the house, so water from both downspouts ends up in the same bucket. Inside this lower bucket I installed a small utility pump, the output of which is directed into my barrel farm.
Inside a five-gallon bucket, I thought this little guy would be perfect for transferring water whenever it rained into the barrels. The bucket was too small for a normal-sized sump pump with an external float, so when I saw this model with a built in, enclosed float for $110, I thought that would be perfect. And it was, almost. Concealed within the plastic housing is not only a float switch and the starting capacitor for the motor, but also a small logic circuit that causes the pump to continue to run after the float has dropped for about 60 seconds to ensure that all the remaining water has been sucked up. Not only that, but the float turns the motor on with only an inch of water present. What I quickly observed was that when it rained, the pump would turn on quickly, blurt out the inch of water from the bottom of the bucket, and then sit there and hum-suck for another minute. If any of the house windows were open on that side of the building, the noise could be easily heard inside and was very distracting. A more intelligent control system was needed. Enter: Dual Float Switches.
I used a piece of vinyl siding material to create a “stick” with two float sensors strategically located thereupon: One sensor was placed so that it would trigger when water had reached the top of the bucket indicating that the bucket was full, and the other was placed near the bottom so that Venturii would get a signal when the water level had dropped low enough to turn the pump off without causing it to draw in air and start to cavitate. These two sensors would provide a hysteresis loop that would maximize the efficiency of the pump without wasting electricity trying to scrape up the last few milliliters from the bottom of the bucket.
Since I could no longer leave the pump plugged in directly, I expanded the Venturii VDAC Controller under the back deck and added four 12 VDC Wet outputs to drive power relays and 8 Digital Inputs to read the float switches from these and future sensors.
You can’t really tell but the output LEDs are green and the input LEDs are yellow. They all kind of wash out to a yellow-ish glow by the image sensor of my phone. After installing a number of ice cube relays to control the Jet Pump’s and now the Lift Pump’s 120V AC Power, I was ready to test the pump again with it’s new feedback sensors:
This worked very well during the first few garden hose tests. The pump did nothing until the bucket was full of water, then kicked on, quickly drained the five gallons into the rain barrel farm, and shut off before starting to suck in air. It was almost silent in doing so, and ran for considerably less time per cycle. I was very excited and thought this project was complete until it rained one night and excitedly I checked my logs and graphs the next morning. I discovered that it had pumped out a few buckets full of water, but then noticed that my other rain barrel was completely full. Clearly it had rained a LOT that night, but my rain barrel farm was still only half full. I went and looked at the bucket only to find that it was full of water but not pumping. I gave the bucket a bump with my knee and the pump jumped to life, emptied and then shut off. It turned out the floats needed a slight adjustment, so I re-worked the apparatus and tested again on the next rain fall, this time successfully.
Method Two for measuring water in a container is by using sound. See my article on measuring Salt with Sound for the specifics, and while this method works well for salt, with water there is so much echo and stray feedback, I’ve found the results largely un-usable.
Method Three: Differential Pressure Sensor.
This was an idea I had several years ago, bought the sensors for it and they’ve since sat in a shoe box on a shelf in my garage until now. The basic theory of operation is that you place a tube into the container so that it’s opening is as close to the bottom as possible, and measure the pressure at the other end with a sensitive pressure sensor. When water is placed into the container, it compresses the air inside the tube, increasing the pressure. The more water that is added to the container, the more air that is displaced and therefore the greater the pressure inside the tube. When water is drained out of the container, the pressure is relieved. By measuring the pressure and applying some mathematics to the result, one should be able to determine fairly accurately how full the container is.
The wires are a bit of a mess, but you can see in the foreground the MPX5010DP sensor on a small breadboard with a clear tube attached to it. I used a drip irrigation clamp to try to ensure there would be no leakage at this end of the tube, and the other end is submerged into the bottom of the barrel with the help of a section of copper pipe:
The copper pipe helps ensure that the tube remains straight and positioned at the bottom of the barrel. I’ve placed it on an angle to attempt to increase the amount of air that is displaced, giving higher resolution of the barrel contents. So far, with the water level near the top, the 10-bit analog input reads about 570 out of 1024, dropping to about 45 when the tube is removed from the water. Assuming a range of (570-45) 525 units to measure a 45 gallon barrel of water, this would give us almost 0.20% increments.
So far in the real world, I’ve discovered some variances throughout the day. I’m not yet sure how much ambient temperature and the excess tubing in my proof-of-concept apparatus is altering the results. The volume that is reported appears to change over the course of the day, despite the water level (supposedly) remaining constant. I was pleased to notice that when I run the Jet Pump, it is very obvious to see the effect on the water level reading, and whenever the lift pump transfers water into the barrel farm, the level rises quickly in the first barrel where the water is dumped and the level sensor is submerged, but then settles out as the water balances between all 5 of the barrels currently connected together. Time will tell how accurate this method is over the long haul. One thing I’m not sure about is how much escape there is through the MPX5010DP sensor itself – if it leaks air, the pressure inside the tube will decrease, indicating less water is present than there really is. Time will tell if this is the case, but so far this method appears to be the most detailed, and perhaps even the simplest. Is it the most reliable though? I will let you know what I find.
Posted in DIY Projects, Irrigation, Sensors, VDAC and tagged Bucket, Copper, Differential Pressure Sensor, Float Switch, Jet Pump, MPX5010DP, Pump, Rain Barrel, VDAC, Water, Water Level Sensor by cube with no comments yet.
I’ve spent the last few evenings and the better part of yesterday (Saturday) putting together the pieces of this Rain Water Reclamation system. The idea is simple enough – collect rain water into barrels when it rains, and then pump that water into the sprinklers when needed to water the grass, trees, flowers and shrubs.
Challenge number one – Connecting the barrels together.
Originally I was thinking about putting a spigot in the center bottom of each barrel, thinking that this would allow the most water to be pulled from each container. After carefully considering a number of designs for stands and bases for the barrels to sit on such that they would be able to accommodate a bottom-based spigot, I opted against this in favor of simply putting one on the side (as much as barrels have sides, per se) and would just have to live with the loss of an inch or two of water in the bottom. As an added bonus, this would also provide a cleaner pickup and prevent larger debris from the bottom of the barrel from being sucked into the pump.
Drilling a 1″ hole with a Rigid hole saw proved a very effective way to penetrate the barrel. By threading a Schedule 40 PVC Slip to Male Thread adapter outward from the inside of the barrel, this provided threads onto which one could mount a 1″ PVC ball valve. I created a rubber gasket for the inside and outside of the barrel using a section of bicycle tubing with a round hole cut into the middle. This provided an extra seal between the barrel wall and the penetrating parts so that silicone was not necessary. On the other side of the valve I threaded in a 1″ male thread to poly Turnseal connector. Originally I had a clamp based adapter of the same type but found that it was nearly impossible to separate the insert from the poly pipe since the barrel and pipe were both virtually non-moveable, and I was worried that if I started to really pull on the pipe it might give way suddenly and cause me to break other connectors, spigots, etc.The turnseal connectors, by contrast, are easily loosened by hand and the poly then slips nearly effortlessly off the fitting. I had to make a special trip to Regency Irrigation as Home Depot no longer carries the Turnseal line of products.
Placing a valve on each barrel was part of the plan from the beginning. I wanted to be able to isolate individual barrels from one another, which proved a good idea for a number of reasons:
- Managing the valves provides that water can be sourced to the pump from specific barrels only.
- If a barrel needed to be removed from the plumbing, it could be disconnected fairly easily.
- Water from one barrel can be transferred to another barrel up to 50% of their capacity by simply opening the valves of both barrels and closing all the others.
Being able to maximize the collection of rain water will be key to making the system effective. I doubt the aesthetics committee will permit me to install a barrel at every downspout, (We have two on each of the house and garage.) I get away with the one on the garage because it’s on the least visible corner. Putting barrels on the sides of the house really isn’t practical because of our specific layout, however I am now considering a 5 gallon bucket with a small submersible sump pump-style pump under the spouts with a garden hose attached to it to collect water from the bucket and push it up to the larger barrels when it rains as the bucket fills. The water could potentially be fed from one of the down spouts directly into the rain barrel farm, however this may not pass the aesthetics committee’s stringent standards. (Then again, buckets may not either…) Maybe I could set them out when there is rain in the forecast and put them away otherwise. Ideally this system would run itself though, so the less manual intervention I have to do the better.
Here’s how I attached 1″ poly pipe to each barrel.
Start by preparing some rubber gaskets to seal the spigot against the wall of the barrel. I wanted to avoid the use of silicone or other adhesives, so went with two sections of bicycle tube with a circle cut out of them.
Place the male threads in the middle of the tire tube and turn it a 1/4 turn to make a mark on the rubber. Fold the rubber in half and use a sharp pair of scissors to cut out a half circle just slightly smaller than the outline you made in the rubber. This will create a gasket as seen on the right, above. One of these on the inside and outside of the barrel will form a water-tight seal without any mess or having to wait 24 hours for the silicone to dry / cure.
Step 1: Drill a 1″ hole in the side of the barrel near the bottom. You have to check the inside and the outside of the barrel to make sure there is enough clearance around the hole for your slip to threaded insert and the valve itself to both be able to snug up to the wall of the barrel. In the pictures I cut this hole a little too close to the barrel seam. The PVC valve could not thread on, so using the hole saw I notched away a bit of the seam to make room. Ideally this hole would have been 3/4″ higher, and thus this problem averted.
Step 2: Place one of the gaskets over the threads of the insert and thread it outward through the hole in the barrel. It should be just large enough to thread into the barrel wall. Tighten it hand tight.
Step 3: Place the other gasket over the threads now protruding from the side of the barrel and thread on a 1″ PVC ball valve.
Now the barrel is ready to be water tested. You’ll want to check for leaks and/or cracks before plumbing everything into place. In my case these barrels belonged to my father, who had them since I was a wee lad. On at least one occasion it looks like some of them must have frozen with water in them, the expansion of which had stretched out a seam along the diameter of the bottom of the barrel. Climbing into the barrel with afternoon sun shining on them from outside is a great way to spot cracks and potential weak spots.
From inside the barrel it is almost trivial to spot cracks, holes, and even weak spots in the plastic. This is a macro view of one such crack I spotted in the bulged seam that spanned the diameter of the bottom of this particular barrel. To seal this crack I decided to try an industrial gasket maker I’d used when repairing front-loading washing machines called Ultra Copper. After cleaning the area with small, stiff-bristled brush I applied the gasket making material like silicone, filling the cracks and smoothing it out. After 24 hours I returned to the barrel to test and found that it had no trouble holding water, at least under the initial tests. Time, of course, will tell how this substance stands up to long term use under gravitational pressure.
After filling the bottom sixth of the barrel with water, the seam and valve were observed for leaks. I’m happy to report that all was dry outside the barrel, and so I moved on with the rest of the installation and further challenges discovered in this project. Read on.
Challenge Number Two: Keeping The Water Clean.
I read a number of articles and writeups on the matter, and the Internet concensus on inline filtration is to put any sort of inline filter after the pump. I had considered the opposite approach, putting the filter before the pump so that it would catch any debris before it went through the impeller, but the reason given on the ‘net is that if you neglect the maintenance of the filter, the pump could starve for water and cavitate, which will ruin the pump in short order. Better to have a blocked outlet than a blocked inlet. So that’s what I did. I went to Regency Irrigation for this part also, they carry a line of Toro filters and the one I picked up is a 1″ inline filter. It has a flush plug so you can purge the filter contents without taking it apart. Simply hold a bucket under the filter, unscrew the cap and it will push collected debris out the hole in the bottom. Re-cap the line and you’re good to go. Of course the screen itself is removable and replaceable if necessary. It has a very fine mesh which should keep even my drip system free from clogging.
Challenge Number Three: Gravity.
There’s a saying I learned a long time ago about the way electricity moves through wires and circuits, “The electricity knows…” This is a reference to the way electricity finds the path of least resistance through a circuit. Water and electricity share many characteristics, including path of least resistance. However one thing that affects water but not electricity is gravity. When you have one barrel full of water, you just need it to be level so that it does not create a “deep end” and a “shallow end.” Or if you have an overflow spout, you might purposefully lean the barrel towards it so that when it becomes full the water will drain out the overflow hole / pipe / tube / spigot / spout. However, when you connect 6 barrels together, all six have to not only be level but have to be level between the six. Otherwise one barrel will overflow while the others are still not full.
It was at this point in the project that I realized just how much of a slope there is in the space under my deck where the barrels are being installed. I had to dig out some spots and fill up others. At one spot I filled the ground with decorative bricks to build up the base enough to level off the last two barrels to the rest of them. Undoubtedly over time as the barrels sit full of hundreds of pounds of water the ground will probably settle and sink a bit, meaning that as much work as it was to level everything this time around, it probably won’t be the last time I have to do this!
Challenge Number Four: Noise.
I was awakened from my sleep at NTP-Synchronized 5:00 this morning when the jet pump kicked on to start the day’s sprinkling. When it first fires up, there is a bit more noise as the pump settles into it’s routine. It sounds like there is a bit of air still in the system, but despite running hundreds of gallons through the system already it does not seem to be diminishing. The sprinkler program I had been running was time-based from last year, and only ran a few of the zones such that the pump could easily overtake the demand, recharge the pressure tank and then shut off… only to repeat this process every minute or so. After half a dozen cycles of this I rolled to my phone and opened a few more zones so that the pump would at least stay running. This prevented the cycling and once the pump remained in operation it was no more noisy than a window air conditioner. However it does suggest that I will have to build a box of some sort to help contain the noise of the pump, as the last thing I want to do with my water reclamation project is to annoy the neighbors with it!
Challenge Number Five: Water Supply
Admittedly, I jumped into this project headlong and really did not crunch any numbers beforehand. Last night to test the system out I filled three of the barrels full of city water, which we will call an approximate 135 gallons or about 510 liters. Based on some rough numbers that I threw together this morning, the pump ran for about 27 minutes before draining all three barrels and cavitating, requiring me to run outside quickly to turn it off as it has not yet been tied into a Venturii VDAC (even though there is one right above it.) Based on the amount of water that was pumped and the time it took, 135 gallons divided by 27 minutes = 5 gallons per minute. Considering that I was running about half of my irrigation system at this point, (Garage North Side, Front Lawn North and South, and House North Strip), and drawing from half the number of barrels on site, I’m roughly estimating that with all six barrels full I’d be able to run each sprinkler zone for about 30 minutes. All the in-ground sprinklers are Hunter MP Rotator series, which have a pretty consistent 10 mm / hour matched precipitation rate. Running them at half an hour each gives 5 mm of precipitation. These numbers mean that in order to water 5mm twice a week, I would have to collect 270 gallons (or 1020 liters.)
These numbers of course, aren’t exact. I’d really need to determine exactly the water flow for each zone that is watering grass and separate it from the zones watering the flower beds, shrubs, trees and hanging baskets. Typically these have been run for 1-5 minutes at a time, but two or three times a day (temperature dependent.) However this all points to the fact that although I’ve assembled six barrels of water, this may not actually go very far when it stops raining in the summer.
Challenge Number Six: Value
Is it actually worth it? Factor in the costs of the barrels, the pumps, the fittings, the pipe, the gas and time of many trips to Home Depot, the days of work to put it all together, testing, and in a few cases, fixing missteps along the way. Water from the endless city supply, clean and clear, delivered under pressure through pipes right to my house, costs $1.7698 per cubic meter plus $1.1028 for sewer since this is calculated based on water usage and does not take into account lawn watering. This also does not take into account the fixed delivery rates, but since you have to pay those regardless of usage, I am excluding them from this calculation. Using these numbers, if I were to fill all six barrels to the brim with city water it would cost $3.53. That means that whenever it rains enough to fill all six barrels from empty, this saves $3.53.
Pumps use electricity. The 1/2 HP jet pump draws 6.5 amps at 120 VAC, or 0.78 kWh. I pay a fixed electrical cost of 8.5 cents per killowatt-hour, so to run the pump for one hour costs $0.0663 or just under 7 cents / hour. Assuming the barrels are full and that I am watering one hour / week, that becomes $0.2652 or just over a quarter. Again, these prices do not include the connection, transmission, distribution, substation, power line, rate rider, balancing pool allocations or administration costs that are present on every power bill; only the actual usage costs are included in the calculations.
So let’s say use some averages and assume that I want to water my lawn once a week. First we need it to rain enough to fill all 6 barrels. That amount of rain would almost certainly supply my lawn with that week’s allotment of water, so now I only need to water three times that month. So I water on week #2, and have saved $3.26. Now the barrels are empty, and I’d need another week of rain to fill them. If we get that rain, we skip another watering cycle, and so water a second time on week #3, saving another $3.26. Barrels are again empty, but in this month we have saved about $6.62. Considering we generally water in the latter part of May, all of June, July, and August and perhaps a few weeks in September, we’ll call that 4 months. If in these four months we saved $26.08. Raw cost of materials (not necessarily what I paid for them, but these are the approximate market values) :
- Barrels: 6 @ $50 each = $300
- Jet Pump 1 @ $479 + GST = $502.95
- Pipe, connectors, filter, valves & fittings = ~$200
Total cost: $1002.95. Savings / year: $26.08. Years to pay back (Assuming it rains enough to keep the barrels full between waterings) : 38.5
Posted in DIY Projects, Irrigation and tagged Barrel, Bucket, Jet Pump, Pressure Tank, Pump, Rain, Rain Barrel, Rain Water, Spigot, Water by cube with no comments yet.