-->
If you wish to express your gratitude for this information, supporting the advertisers on this site in turn supports me, so feel free to check out what they have to offer.

Monday, June 1, 2015

Adding a WiiMote to the Pi2 media center

I decided to forego the lirc setup, instead I used a cheap bluetooth dongle and added a wiimote to control Kodi. Here are the steps I used below to do that.

First plug in the dongle, then we need to install some utilities to get bluetooth working.

    apt-get install bluez-utils

Now we need to make sure that things are working properly at this point between the pi and dongle.

    sudo service bluetooth status

Now we install the event client for kodi.

    sudo apt-get install kodi-eventclients-wiiremote

Now Kodi needs to know what to do when the buttons are pressed on the wiimote, it parses xmls in the keymaps, so lets make a file to let it know what it needs to do. Replace vi with nano if you prefer it .

    vi /home/pi/.kodi/userdaya/keymaps/wiimote.xml

and place these contents into the file.



<keymap>
  <global>
    <joystick name="WiiRemote">
      <button id="1">Up</button>
      <button id="2">Down</button>
      <button id="3">Left</button>
      <button id="4">Right</button>
      <button id="5">Select</button>
      <button id="6">Back</button>
      <button id="7">VolumeDown</button>
      <button id="8">ActivateWindow(Home)</button>
      <button id="9">VolumeUp</button>
      <button id="10">ContextMenu</button>
      <button id="11">ActivateWindow(PlayerControls)</button>
    </joystick>
  </global>
  <FullscreenVideo>
    <joystick name="WiiRemote">
      <button id="1">BigStepForward</button>
      <button id="2">BigStepBack</button>
      <button id="3">StepBack</button>
      <button id="4">StepForward</button>
      <button id="5">OSD</button>
      <button id="6">Stop</button>
      <button id="10">CodecInfo</button>
      <button id="11">AspectRatio</button>
    </joystick>
  </FullscreenVideo>
</keymap>


Now we need to get the unique address of the wiimote you want to be using for this implementation.

    sudo hcitool scan

and press 1 and 2 on the wiimote while it is scanning and it will spit out an address of the device you put into discovery mode. We're going to launch the wiimote-eventclient and force it to bind to that address. We are going to modify the Start script from my previous post a bit to get the wiimote integrated to Kodi, if you don't have that script in place don't worry I'll just copy what the whole thing should look like into this block below. The one thing you will need to change is the address after --btaddr, again this needs to be the address that we've just found with hcitool.

    vi /home/pi/RetroPie/roms/kodi/Start.sh

And put the following in.

#!/bin/bash
#Start Kodi in the background and grab its pid
/usr/bin/kodi-standalone &
PID1=$!
#Start the Kodi Wiimote event client
/usr/bin/kodi-wiiremote --btaddr 00:1F:32:A2:6D:81 &
PID2=$!
# enters a loop while Kodi is running to watch the log and kill it when the exit command is found.
while kill -0 $PID1 2> /dev/null
do
sleep 10
kill=`tail ~/.kodi/temp/kodi.log | grep "remove window"`
if [[ -z $kill ]] ; then
sleep 10
else
killall kodi
break
fi
done
wait ${PID1}
kill ${PID2}
exit


Now when you run the script above you should see it start kodi and you should see your adapter light up and you should also notice a notification in the bottom right that says that it has found a new connection for wiimotes. Now take the same wiimote you used earlier and press 1 and 2 at the same time, it should connect to your pi and you should see a notification on the screen that it has found the remote and give you a battery percentage read out and you should see solid lights on the wiimote. Congratulations you can now use your wiimote with Kodi. When you are done doing things you can press and hold the power button on the wiimote to turn it off and conserve battery, when you want to do stuff again just press the 1 and 2 button at the same time again and it will reconnect.

If you would like to customize your keymap for the wiimote please see the documentation at http://kodi.wiki/view/EventServer for button number reference and see the keymap.xml options at http://kodi.wiki/view/Keymap.xml

Thats it for now, good luck!

Saturday, March 14, 2015

Pi 2 Media Center and Gaming system all in one!

First a fair bit of my history with the Raspberry Pi, there is a Tl;dr you might want to skip to if you are in a hurry.

    I have had Raspberry Pi media centers around my place pretty much since the hardware hit the market, and while they have done the job I can't say that they have done it well or reliably, just ask my family. With the B Rev1 I had out of the box success with a Raspbmc build on Frodo in our living room. This encouraged me to purchase 3 Rev2 Bs to implement them as frontends for our bedroom, my daughter's bedroom and one to replace the memory lacking Rev1 board and repurpose that board as a tinker toy. That is when my bubble burst and paradise was lost. These Rev 2 Bs were an odd bunch as far as performance, I cloned the wonderfully stable image from the SD card on the Rev1 board as it was the fastest way I could get everything configured how I wanted, and brought them online one by one changing their hostname configurations as necessary.
 
    I say they were an odd bunch because while they were all running identical images on the same class SD card with the same power supplies, performance and stability were nowhere near identical across the three Rev2s. One would work just fine for a day or two then lock up completely requiring a hard reset which around 50% of the time would corrupt the SD card and require a re-image. One would work, but the UI was noticeably more laggy. The last is very stable and performs well, in fact it is still running the same image I put on it 3 years ago in our bedroom I haven't had to touch it since I deployed it. I tried OpenELEC to see if a different distro was any better on these little devils, no dice. After a while I could only attribute these variances to the pi hardware itself as the issues followed the pis not any of the rest of the variables. This experience left a very bad taste in my mouth and I started the search for something better, with more horsepower and stability.
 
    Given that my day job is best described as a developer for an R&D firm I no longer had to take the financial risk myself on these things, as an inexpensive micro-computer that is stable is very desirable as a platform to develop a project on, so I have had a chance to evaluate several micro computers. Many more powerful than the pi, but none as easy to get up and running on a project with, so the answer unfortunately always came back to the Pi.

    Some hardware stability came in with the B+ and its superior power supply, but not enough to make me jump for joy. So I can't explain the amount of hope, and fear, that burst onto my horizon when I heard the announcement of the Pi2. My fears were soon alleviated and replaced with an equal amount of joy after reading some of the first hand accounts from those souls that had them in hand already.
   
     We got some in for ourselves at work a couple weeks ago, but my other responsibilities there were keeping me from being able to tinker with them in the office. I asked the boss if I could take one home to evaluate, and to my delight he agreed as long as I made sure it was documented that I had it on loan, I don't think this blog post will count as proper documentation, but I'm documenting it here none the less. So my family get to be my guinea pigs for the stability of this hardware, but by now they are used to it.

Tl;dr : BOO!!! To Pi Rev2s. YAY!!! to PI2s, cool jobs, good bosses, and understanding families.

Now on the the project, a Media Center frontend and gaming system all in one.

The Hardware:

If you want to build this exact setup you are going to need to get a Raspberry Pi2 and all the fixins to power and connect it to your TV (SD card, power supply, HDMI), you are also going to need some game controllers. If you are like me, you still have some snes controllers or perhaps some gamecube controllers laying around collecting dust, if so you're in luck! Go get yourself a USB gamepad converter from amazon and you're set. I chose these http://www.amazon.com/gp/product/B002IXZ5DE/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1 and http://www.amazon.com/gp/product/B0089NVTDM/ref=oh_aui_detailpage_o03_s01?ie=UTF8&psc=1 they work great for my setup, no drivers necessary on raspbian just plug and play.

The OS:

This project was built on Raspbian, images are available from www.raspberrypi.org, I built mine on the 2-16-2015 image. Clone the image to the SD card however you desire, I prefer dd, but win32diskimager seems to be pretty popular. Hook it to your TV and go through the raspi-config to resize the disk, set the right timezone, change the password/hostname, and anything else you might want to tweak with the base raspbian build. I left mine set to boot to the console instead of starting X as we won't actually be needing X.

Here's a shot of the raspi-config tool, you will want to do item 1 for sure, I suggest option 2, setting the time zone is under option 3. If you want to use the tool to change the host name it is under the advanced options menu.


Games:

Once I heard about the RetroPie project back in 2012 I had a fit of nostalgia remembering all the games I played as a kid and wanted to get one spun up. However since I didn't want to have multiple Pis to accomplish the tasks I wanted, as I was certain the Pi 1 didn't have enough horsepower to do the job since it was struggling to run XBMC/Kodi, I never messed with it much. Once the Pi 2 was in hand I dug back in to the RetroPie project and seen that they had made tremendous strides since I had last checked them out and had a very simple to use setup script to take a vanilla raspbian build and install EmulationStation and all the emulators (Yay!) I followed the steps found on http://blog.petrockblock.com/2012/07/22/retropie-setup-an-initialization-script-for-retroarch-on-the-raspberry-pi/ for getting the Emulators and ES installed, I just went with the binary based installations as I didn't feel like waiting hours to test something.
Here's a shot of the RetroPie setup script, I did the recommended install then came back later and took option 3 to further configure my ES installation.
I was also surprised that there were a few games included after the build. Here's a shot of the one I care most about and the reason I started the project.







Media Frontend:

Next I checked out the Raspberry Pi forums to get Kodi installed on the same raspbian build an hoped that there wouldn't be any conflicts with dependencies. I followed these steps found on this forum post nearly to a tee http://www.raspberrypi.org/forums/viewtopic.php?f=66&t=99866 I didn't do the usermod steps as my pi user was already in all those groups so they were not necessary on my system. But I did notice something potentially troublesome with this setup of Kodi, it would always blackscreen when I wanted to exit and never return to terminal in spite of me implementing the recommended steps in the post to prevent this problem. So I made a launch script that contains a watchdog that watches the Kodi log for the exit command then kills the process, which, while not pretty, did solve my problem without introducing any new ones that I know about yet. The script is in the next section.

Yay! Kodi is working!
The User Experience:

So now we have Emulationstation, RetroArch and a handful of other emulators, and Kodi setup and working on the pi. Now my family needs an easy reliable way to access both games and media without having to run command from the terminal. After opening EmulationStation and poking around at the configs a bit I knew I had my answer. What we are going to do is simply create a launcher for Kodi inside EmulationStation, modify the ES config at /etc/emulationstation/es_systems.cfg and add a Kodi system.

    vi /etc/emulationstation/es_systems.cfg

Add the following lines to the end before the </systemlist> line, use nano if you don't know how to use vi.

      <system>
        <name>kodi</name>
        <fullname>Kodi Media Center</fullname>
        <path>~/RetroPie/roms/kodi</path>
        <extension>.sh .SH</extension>
        <command>%ROM%</command>
        <platform>pc</platform>
     </system>
 

Then make a directory for the kodi "roms" in the RetroPie/rom folder.

    mkdir /home/pi/RetroPie/roms/kodi

Then make the script that I mentioned in the Kodi section.

    vi /home/pi/RetroPie/roms/kodi/Start.sh
   
And copy in the contents from below.

    #!/bin/bash
    #first thing we do is launch the Kodi standalone binary and grab the pid so we can monitor it.
    /usr/bin/kodi-standalone &
    PID1=$!
    # enters a loop to watchdog the log file for an exit signal
    while kill -0 $PID1 2> /dev/null
    do
    sleep 10
    kill=`tail ~/.kodi/temp/kodi.log | grep "remove window"`
    if [[ -z $kill ]] ; then
    sleep 5
    else
    killall kodi
    break
    fi
    done
    wait ${PID1}
    exit
   

Then make it executable,

    chmod +x /home/pi/RetroPie/roms/kodi/Start.sh

Now you need to run the retropie setup script again and under Setup>Advanced>Autostart EmulationStation you want to enable it, while you're here, if you didn't configure your RetroArch controller I recommend doing so now. Once done with that reboot your Pi and it will come back and load into EmulationStation and you should see a Kodi system listed with the Start "rom" inside, this will start Kodi and when you exit Kodi you will come right back to ES where you can pick an Emulator or relaunch Kodi. You can load roms directly into the folders on the pi at /home/pi/RetroPie/roms/$systemfolder/ and they will show up next time EmulationStation is loaded.

Kodi system in Emulation station
Here's the script that we made earlier under the Kodi system.


I still have to implement lirc and the GPIO IR receiver I had set up on one of my old Pi's running Raspbmc but that is for another time, I have a nice little wireless keyboard that will serve as navigation in Kodi along side my Android and Yatse for now. You have probably noticed the little rainbow box is in all my shots, I did a bit of research and this is the Pi's built in low voltage warning so I need to get a better power supply for it. The one I'm using is a cheap 4 port Monoprice cell charger with a dedicated port that should serve 2A @ 5V, but apparently it doesn't hold the voltage under that kind of load. There is a way to turn that off in the boot config.txt file, but I would rather replace supply with one that will hold voltage.

Thanks to all the folks over at RetroPie for thier work to make this simple, also to Micheal Gorven for maintaining the repo for the Kodi build I am using. One more shot (sorry for the fuzziness, but you can probably make out what it is.) before I go back to putting this Pi2 through it's paces.



Good luck!



Monday, October 1, 2012

Toshiba Satellite C655 Screen Replacement

I have recently had the pleasure of replacing my first laptop screen. The Toshiba C655 below is not mine, I was asked if I could replace the screen in it by a co-worker. Having never done one before I called a friend of mine who I knew had and asked how difficult it is to replace one, he informed be it was a pretty simple process.

If the Toshiba C655 is the model you are replacing the screen on then here is how you do it, it takes about 15-20 minutes and is fairly simple. I recommend popping the screen out far enough to get a part number before ordering, just to keep there from being any kind of mix ups, the C655 actually has two different screen types that were used for the same model. I confirmed the type then ordered mine from LaptopScreen.com it came in about 3 business days through UPS.

Tools required:
  • Small Philips screwdriver
  • Exacto or other razor knife
  • Patience

First thing I figured I had better do is remove the battery so I wouldn't accidentally turn this thing on mid screen pull.


Flip it back over and locate the screws in the screen bezel, they are circled in red in the picture below, they are covered with a small sticker to make them blend in a bit better.

 Here is a closer view of one of them.


Now carefully take a knife, carefully remove the screw covers and set them aside. I used my pocket knife for the first one but I would recommend using the exacto or razor blade as it is much easier to get under an edge of the sticker.


Here they are all removed.


Remove all four screws and set them aside as well. Now for the part that takes just the right amount of force and finesse, removing the bezel. It is snapped to the back pretty well honestly, so you must be careful not to crack the flimsy plastic as you pry it apart with your fingers. Pick a spot away from the corners and apply the kung-fu grip to the bezel pictured below.

Now carefully pry the bezel away from the screen until you can get your fingers under the front of it a bit more.


 Eventually you will be far enough under it that it will unsnap.


Carefully work your way around until you get it all removed, the corners are more difficult, I used two hands to apply gentle pressure to it coming from both the top and side. Slipping the hinge covers (circled below) off was probably one of the most nerve wracking parts of the process as you can't just tilt the screen back far enough that you can just lift it out, and the whole time you are pulling on it you are expecting to hear a click and see the lower half of it go flying away never to be part of the laptop whole again. I was probably being too overly cautious, but as I said before this is not my laptop so I don't want to break anything on it getting the screen out. Anyways, just be gentle and patient and they will come out without breaking.


Now for actually removing the screen from the laptop you will have 3 screws holding the screen to the frame on each side, I circled them in the horribly blurry picture below(my apologies). These are different than the screws holding the bezel together so make sure to not get them mixed up for reassembly. I recommend leaning the screen back a bit before removing the screws, it keeps the screen from plopping out and makes it easier getting the new one back in. Moving the frame without the screen is difficult to do without bending the frame itself, it is very flimsy with out the screen screwed in, so I would put it wherever you want it for putting the screen back in.


Now we need to identify our screen type, most of the C655 are LED from my understanding, but apparently some of them are backlit LCD's so before you order a screen check the connection circled in red below, and the part number circled in yellow below. If there is just one connection, as this one has, then it is an LED with a 40 pin connector, if there are two then it is a backlit LCD with a 30 pin connector and a connector for the back light.

The plug has a thick plastic sticker over the connector and the plug holding it in place, my guess is that this is to somewhat insulate the plug and keep it from wiggling loose over time. carefully take your knife and peel up a corner.


 Peel it back to just the plug.



The cord also has some adhesive holding it in place to the base of the back of the screen, so lift gently from the back side of the cord until it is free.



Now you are ready to gently unplug the connector, I used the peeled up part of the sticker to hold on to and pulled straight down.


Remove the old screen and place the new one on the keyboard oriented as the old one was.


Plug the connector in to the new screen. Be sure all the pins have seated, pull the heavy duty sticker tight, but not too tight mind you, and stick it to the back of the new screen.


Apply some pressure to the cord at the base of the screen so that the cord adhesive sticks again.


Put the screen back in the frame, and put your screws back in.


Normally I would suggest testing the screen at this point, so slip the battery back in carefully.


Well crap, the battery is dead and he didn't bring me the charger, I guess we will test it when I take it back to him.


Snap the bezel back together around the new screen, be careful not to pinch any of the wires running around the inside of the bezel. Put the 4 screws back in.


Put your screw covers back on.


Now you are done, you can now enjoy your crack free screen, as soon as you recharge the battery. On a side note as soon as we got the charger plugged in to it and hit the button the screen came up and everything was working just fine.

Good luck with your screen replacement, and even if you don't have the exact model shown here, your replacement should go something similar to what is outlined above. You may have more or less screws, and if the manufacturers are jerks they will have some funky screw head on them so you have to buy a tool from them to remove the screws, but most are just standard tiny phillips screws. If your laptop has a built in webcam it will make things a bit different, TimBobSqrPnts from Reddit recommends unplugging it as well.

Sunday, March 18, 2012

Whole House Fan for a Standard Sliding Glass Door.

   I'm going to start with a bit of back story to explain why I went this direction instead of a more traditional approach of buying a whole house fan or even the similar commercial product like the Aircycle, so if you would rather skip to the how to it starts in paragraph 6 with the shopping list. I also provided some rough schematics for the cabinet here.



Here is a picture of the mostly finished product. I plan on staining and sealing it, but I wanted to put it into use.


   My Wife and I bought a house when we were 18 and 19, if we had it to do over again we would do it differently, but we don't so for now we are living in the double wide trailer that we purchased and put on a new foundation on a half an acre we bought from my uncle. There isn't anything really wrong with the house and it has served us well as a dwelling, that said I would like to have a basement, and a handful of other little things I would do differently if I had the option to go back and build a house instead. Financing for a trailer is highway robbery over financing an identical built home as well, higher interest rates and mandatory PMI for the life of the loan for example.

   The trailer is about 1450 sq ft has vaulted ceilings and is really, really well insulated, my only complaint with that is my attempts to use window fans and box fans to pull in night air to keep the house under 80 during the day without kicking on the air conditioner have failed. Even when it gets down to 50 degrees at night I am only able to vent enough hot air to get down to about 70 if the house is starting at 80. The ultimate solution to this problem is a large whole house fan mounted in the ceiling that blows massive amounts of air into the attic and out the roof or side vents in the attic drawing cool air in through the windows or doors that are open in the house. However  with a vaulted ceiling there isn't much open attic space out on the outside edges of the house. With the lay out of the house the fan would have to go in the living room or the kitchen in the middle of the house to get enough space between the ceiling and roof to get good ventilation to the attic vents already in the roof, logistically and cosmetically this isn't a very viable option.

   I climbed up on the roof to see if I could maybe boost the bathroom exhaust fans with some larger in line duct fans to do the job, no luck, they were vented using small 3" pipe and I don't think I could get a high enough velocity fan in that would fit in the small pipe to do the job for a reasonable price.

   I then decided that something like my "suction tower", as I'm calling it, was pretty much the only option. First I searched for a commercial option, because I don't have enough time in my schedule to do the projects I want to do as it is. The only thing I could find was the "Aircycle" that I linked to earlier, and for $400 I would want it to move much more air than it does. The suction tower cost me around $300 out of pocket because I had most of the small ticket items like screws, switches, wire, and electrical boxes just laying around from other projects. Someone should be able to reproduce this for under $400 from scratch and get a fan that can move up to 8000 CFM instead of 1700. That is over 4.5 times the volume of air moved with only a little over 2 times the energy usage, plus if you only use one fan on low you get around 2 times the air moved with the roughly same electric used as the Aircycle on high. After doing more research for this post I realize I should have purchased This fan as it moves almost twice the CFM for roughly the same price as the ones I bought at my local Orschlens after shipping. If you use the ones from northern tool you may have to modify the width of the cabinet to get them to fit right, I don't know the exact dimensions of that fan drum, but I would suggest using the Flow Pro fans as you get more bang for you buck with some minor modifications to my plans.



Shopping list for this project. Admittedly I would use different fans as I explained in the previous paragraph.
  • 2 12 foot 2x10s
  • 1 12 foot 2x4
  • A 4x8 foot sheet of 3/8" plywood
  • A couple standard electrical boxes
  • A standard 110v house electrical outlet
  • A light switch
  • Wall plates for the outlet and switch
  • A 10 foot 3 prong extension cord at least 14 gauge wire
  • Possibly some wire nuts
  • Some Romex connectors
  • 2 of These fans.
  • 4 casters, the ones I used are 3" tall (if you use any other size you will need to keep that in mind when you cut the 2x4s and the 2x10s for the sides.
  • *Optional: a Thermostat from an attic fan* (Make sure it can handle the load of 2 of these fans.)


1. Start out by measuring your door opening write down your measurement from the floor to the bottom of the door frame. Subtract the height of the casters from this number, in my case I started with 74 inches minus my 3 inch casters leaves me with 71. Measure the width with the door all the way open as well, if it is less than 32 inches you will have to use 1 by lumber and be much more careful with it when assembling as it is easier to splinter and crack, and less sturdy than 2 by lumber. If it is less than 30 inches this will not work for you at all.

2. Cut 2 2x10s and 2 2x4s to the calculated number from step 1, once again 71 inches for me. Use a table saw and cut an inch off the long edge of the 2x4s leaving you with 2 boards that should measure 1-1/2 inches x 2-1/2 inches.

3. Measure the depth and width of the groove that your door slides into on the door frame when shut, mine was 1 inch wide and 1/2 an inch deep, I cut a 1/2 by 1/2 inch corner out of one of the trimmed down 2x4s to leave a 1 inch by 1/2 inch tab that will slide into the groove the door does when it is shut. Here is a picture to kinda show you what I am talking about.
The 2x4 that is nearest the camera has a corner trimmed out so it will fit in the door frame where the door would when closed.
4. You need to cut 3 2x10s to the length of your fan's Diameter, mine were 26 inches.


5. Now you need to assemble them into the cabinet pictured below, I used 3 inch screws here, and the middle shelf is just that, right in the middle of the cabinet centered 35-1/2 inches from either end.

6. Now would be a good time to put the casters on as well, you want them as close to the corners as you can get, I used 1 inch long screws here as anything longer would have went through the 2x10.

7. Attach the 2x4's to the face of the tower you want facing out the door, be sure the grooved out side is on the side that will be against the door frame. Line them up so they hang out on either side to allow you to slide them in the groove in the frame and close the door on the other side to provide support so the tower doesn't blow itself over in the middle of the night and scare you to death.


8.  You should probably install the electrical next as getting around the fans to mount the outlet box is a pain, I didn't do it that way as evidenced in the pictures, but it was 10 at night after a full day of work and my brain wasn't firing on all cylinders, that is also why the pictures aren't the best for explaining the step I'm trying to. 
       8.1 Anyways, you will take and cut the part of the cord you plug into off strip the insulation back about a 1/4 to 1/2 inch and wire it to the outlet in the box, most outlets have a guide telling you which side is supposed to be black wire and which is supposed to be white printed right on them, and green is always ground. 
Here is the back side of a standard outlet, you will want to attach the black to one side the white to the other and the green to the green screw terminal.
       8.2 The switch is not 100% necessary as these fans have their switches right on the back of the fan so they are easy to get to even after the cabinet is closed up, but I put it in anyway. You will strip off the outer insulation of the cord for about 2 inches and cut the black wire in the middle of the exposed section but not the white or green. Push the stripped off part of the cord into the switch box and pull it out the front far enough to wire it to the switch, strip the black wires back 1/4 to 1/2 an inch and wire them to one post on the side of the switch each. Strip a section of the green insulation off and loop the wire around the ground terminal then tighten the screw.
Here is the back side of a standard switch you will want to hook one black to the top terminal the other to the bottom and loop the green around the green screw terminal.
       8.3 This step is also optional, but I wanted a thermostat on it so it wouldn't get too cold in the house at night, so I wired in an old attic fan thermostat I happened to have laying around. Wiring on the thermostat is the same as the switch, cut the black and hook them to both connections on the thermostat leave the white in tact and strip a bit of insulation off the green and loop it around the ground terminal and tighten it down.
This one was taken the following morning after I realized I hadn't gotten a picture of the outlet placement, I mounted it close to the inside of the cabinet and underneath so if it rained it wasn't getting directly wet.
9. Take your fans out of the little cart they are mounted in, keep the bolts and knobs as you will use them to mount them in your cabinet.
Here is a shot of the empty carts
10. Take the guard off the front of the fans, and remove the carrying handles from the outside as they will be in the way when you go to mount them in the cabinet. NOTE: Unplug them first, the blades are semi-sharp and I'm not responsible if you lose some fingers because you bumped the switch while messing around in the fan.

11. Place the fans in the cabinet where you want them, line the back of the fan up to the inside edge of the cabinet. Make sure you have them facing so they will be blowing out of the house when the cabinet is lined up in the door. Spin them so that the hole that the bolts where in for mounting them to the carts are up against the sides of the cabinets, take a pencil from the inside and mark where they are.
You can see the bolt coming out of the fan here and into the cabinet frame.
12.  Remove the fans.

13. From the inside drilling out put 3/8 or 1/2 inch holes in the center of the marks. (3/8 will work but you will need to be more precise on placement and if the hole is level or not as that is the exact diameter of the bolts)

14. You will need to go to the outside now and counter sink the holes so you can use the knobs that were threaded on the mounting bolts as the bolts aren't quite long enough to reach all the way out to the outside of the cabinet. the round part of the knob is 1 inch in diameter so take a 1 inch bit and drill about half way through the board from the outside in the holes you made from the inside out.

15. Set the fans back in, line up the holes and push the bolts through their mounting holes and the cabinet, thread the knobs on from the outside until they are nice and tight. Once done mount the guards back on the fans.
Should look something like this when you're finished.
16. Now measure the outside dimensions of the inside face of your cabinet, mine was 71x28-3/4 inches.

17. Cut a piece of plywood to the dimensions in step 16

18. Measure from the top of the cabinet to the middle of the top fan, mine was 21-5/8 inches, write it down.

19. Measure from the top of the cabinet to the middle of the bottom fan, mine was 56-5/8 inches, write it down.

20. Measure from the side of the cabinet to the middle of both fans they should be the same number, mine was 14-1/2 inches, write it down.

21. Go to your plywood and make a mark at the measurement from step 18 down from the top and the measurement from 20 in from the side, do the same with the measurement from steps 19 and 20.

22. Now mark a circle using the radius, or half the diameter of your fan and the center points you just marked on the plywood. I used a bit of string tied to my pencil at 13 inches out and anchored at the middle point with a push pin and drew my circles for the top and bottom fans. This step takes a bit of practice and a string that doesn't stretch is a must.

23. Cut out the circles carefully, I used my router as I don't have a jigsaw, but ideally you would be using a jigsaw for this.

24. Mount your plywood to the inside side of the cabinet, make sure your holes for the fans line up with the fans. It doesn't have to be perfect, but the closer to perfect you get it the better results you will get from your fans.

25. Cut a hole for your switch box and mount it in the hole, I had to un-wire and re-wire it but I got it working at 11 the night before without adding the plywood and called it a night, I added the plywood like I originally planned the next day, and I will talk about the benefits of adding the ply in the conclusion.

26. Mount your thermostat somewhere where it will get the air from inside the house pulled across it constantly so that it is getting a sample of what temperature your house actually is. I put mine on the inside between the two fans and it seems to be working ok there.

27. I took a zip tie and tied all the cords together and tucked them up under the middle shelf and it doesn't look too bad that way, I would recommend doing something to tidy up the cords cause having them loose could cause some problems.

28. Plug it in, put it in the door, slide the door shut around it, and test it out.

Here are some more shots of the mostly finished product
Inside view

Door side view

Frame side view
Outside view

   I added the handles from the fans to either side of the tower in the middle to give you a good place to grab it and move it around from. It is a bit top heavy but if you are careful it is pretty stable while it is rolling around, once it is in the door however it is solid, and you can cut and place a block behind the back side of your inside sliding door to essentially lock the fan in place giving you security if you need it. When it isn't in use I can just roll it to the side since it is on casters and close the door.

   As mentioned in step 25, I ran it the first night without the plywood because I was beat after a full day of work and running some personal errands, I got it operational and went to bed. I noticed significant blow back from the fans as it wasn't sealed into the door so a lot of air was essentially looping around right at the door, adding the plywood stopped  most of this, and the closer you can get your ply cut to the right spot and size the better your results with this will be. I am planning on adding a bit of weather stripping to seal the gap between the fan and plywood so that it is even tighter. There was also a significant noise reduction by adding the plywood as much of the fan noise from the outside of the fan is blocked by it. I measured the decibels from 2 feet after adding the ply and with both fans on low it runs about 85db, or about the same as a busy street, and both on high is a bit too loud at 105db, or similar to a lawnmower.  I didn't measure without the ply but I can tell you that before on low was close to the same noise level as after on high so adding the ply essentially dropped the noise level 20db. Once you get about 8 feet away from this you can carry on a normal conversation without needing to raise your voice when it is on low, which is plenty of air movement for normal situations. I feel that this is a tolerable level of noise especially since it will mostly be only in operation at night. I like that I have the ability to really clear out the air in the house by kicking it up on high for about 10 or 15 minutes, in case we get back home late that day or some other abnormal event prevents me from kicking it on as the sun and temperature go down.

   If you can't add a whole house fan to your house feasibly for whatever reason, I feel this is a good alternative that costs less than installing a traditional whole house fan. The whole project took me about 5 hours including daydreaming time for the design, so someone with some construction experience should be able to get this built in a couple hours or so.

   On a side note I think I found a decent use for the carts that the fans came on, these little plastic trays are pretty wobbly when you get them full of plants that just got watered, and they are the perfect size to set in the cart comfortably. I'm going to take the left over plywood and make a platform so that they can sit even on top of it, but otherwise this will be great for me to pull them out during the day so they can get some sun, but bring them in at night so they don't get too cold or wind blown without worrying if the tray is going to buckle under the load and kill all my seedlings from dropping 3 feet to the floor.
I really think I'm going to get some decent peppers this year! At least, I hope anyways.

Thursday, February 2, 2012

A Portable Automatic Filler Valve that hooks to Garden Hose

I have made a couple of these, they are handy for keeping livestock or outdoor pet's water tanks full at all times (make sure they are shaded all day long or you are in for some serious algae growth), or making tasks like filling a pool or large water tank an unsupervised affair. You can use what ever plumbing between that you want but getting from the 3/4" garden hose to the 7/8" fitting for the toilet fill valve is something most of the hardware store employees in my area have been unable to help me with.

Shopping list, total cost for materials that could be used again $9, total cost for parts around $20. It could cost less if you can get all your fittings in plastic, but I was unable to.

  • An universal toilet fill valve (should cost around $8-12)
  • A short section of  3/4" PVC pipe (around 3 feet is plenty for a filler like the one I am making, under $3)
  • 2x3/4" PVC slip elbows (around $0.30 each)
  • a 3/4" PVC slip to 3/4" female thread elbow (around $0.50)
  • a 3/4" PVC slip to 1/2" female thread elbow (around $0.50)
  • a 1/2" male pipe thread to 3/8" compression adapter (the only one my hardware store had was in brass, it cost around $3)
  • a 3/4" male pipe thread to 3/4" male garden hose (once again only available to me in brass around $4)
  • a 3/8" PEX faucet supply line (around $2)
  • a small container of PVC primer and cement (the small 4 oz cans were around $4 each, and I hardly used any of it)
  • a roll of thread seal tape (around $1 for a roll and hardly used any of it as well)
Here is a picture couple pictures of the PEX adapter so you know what you are looking for.




Lets get everything we need lain out and prepared so assembly will go quickly. First we need to cut our PVC, I used a hacksaw, we need 2 pieces around 3" long and one around 14"-15" long. To make sealing go smoothly take all the burrs off the inside and outside of your cut PVC ends, this can be done quickly with a round file.

A word of warning about using the PVC primer and cement in combination, it sets very, very quickly. You have at most 10 seconds after slipping the pieces together to line it up where you want it. After that, for all purposes of re-positioning a joint, the pieces are bonded on a molecular level. 

Assembling the plumbing only takes a few minutes once you have everything together. The process for gluing PVC pipe to the slip fittings go like this.
  1. Swab the inside of the slip fitting and the outside of the pipe with the primer
  2. Let that dry, it should only take a couple seconds.
  3. Swab the inside of the slip fitting with the cement.
  4. Press the pipe into the slip fitting as far as it will go, usually about an inch, as quickly as possible and get it oriented like you want it. As mentioned before it sets very quickly, so pretty much once you stop twisting the connection it will never move again.
  5. Rinse and repeat with the next fitting.
I highly recommend the use of thread seal tape on the fittings that thread into the PVC. You will want to wrap the tape around the fitting clockwise 2-3 revolutions, no more than that though as it will cause binding when trying to get the threads started.

I have lain everything out on the table disassembled as it will be glued or threaded together, so if you are looking for a road map this picture is it.



For those of you who like a walk through I will start on the Garden hose end and work my way to the fill valve.
  1. Thread the pipe thread into the 3/4" slip to thread elbow. (Use caution not to over tighten and strip the plastic threads out of your adapter.)
  2. Glue a 3" piece of PVC into the slip side of the elbow.
  3. Glue a 3/4" slip elbow to the assembly, make sure it is oriented so the next pipe you glue will be parallel to the assembly so far forming a U shape.
  4. Glue the 14"-15" piece of PVC to the assembly.
  5. Glue a 3/4" slip elbow to the assembly so that it runs perpendicular to the bulk of the assembly
  6. glue a 3" piece of PVC to the assembly
  7. Glue the 3/4" to 1/2" slip to thread adapter to the assembly so that it runs parallel with the bulk of the assembly.
  8. Thread the 1/2" male pipe thread to 3/8" compression adapter into the assembly. (Use caution not to over tighten and strip out the plastic threads of your elbow.)
  9. Remove the brass ferrule from the compression nut as you will be using the plastic ferrule that came with the PEX faucet adapter.
  10. Cut the 3/8" PEX faucet adapter down to about 2-3 inches.
  11. Put the 7/8" nut that came with the toilet fill valve on the PEX adapter so that it opens toward the fill valve.
  12. Put the 3/8" compression nut on the PEX adapter so that it opens toward the compression fitting.
  13. Slide the plastic ferrule onto the PEX adapter so that the skinny side is toward the compression fitting.
  14. Slide the PEX adapter into the compression fitting and tighten the compression nut until the PEX adapter no longer moves in the compression fitting. I took a picture of it as it is the only semi complex thing to assemble in the whole project, see below.
  15. Thread the 7/8" nut onto the bottom of the fill valve.
  16. The top is adjustable on the unit I used, so adjust it to the desired water height.
  17. I used a zip tie to tie the rubber hose that comes off the side of the fill valve so that it runs down parallel to the assembly instead of shooting strait out the side of the fill valve.



There you have it, an assembled portable automatic filler you can hook straight to a garden hose. Of course this setup might not be the ideal solution for everyone. I have made these a permanent fixture in a tank before as well. Which requires nothing more than drilling a 7/8" hole in the bottom of the tank and mounting the fill valve in the tank just as you would a toilet tank, then adapting it out to garden hose using the PEX adapter, the compression to 1/2" pipe adapter, a 1/2" pipe coupler, and a 1/2" pipe thread to garden hose adapter (a bit cheaper on parts, maybe a couple dollars, and requires no PVC primer or cement).