Solar Power

February 12, 2011

I’ve always liked the idea of solar power. The thought of getting clean power from the sun just seemed so logical. But like many of us I didn’t really have the time to look into it in detail so I did nothing.

My wife got tired of hearing me mention it so when she saw a flyer for a solar energy talk at a big box home store she signed us up. We knew it would be mostly an advertisement but we figured we might learn something. Long story short, we did get solar installed…but it isn’t as easy (or as hard) as you might think.

Where to put them?

If you are thinking about installing solar panels the very first thing you should think about is where to put them. There are two options, on the roof or on the ground. Most people think of the roof first. In order to put them on the roof you need to have a house pointing in the correct direction. If you have a roof that points in a southern direction then you are in good shape. Even one that points slightly off from south is okay.  If you’re good to go on the direction the second thing to look at is how old is your roof?  If it is more than 10 years old you will need to install a new roof. Most installers want as new a roof as possible. If you are still okay with the roof mount, the last thing you will need is lots of space. If you’ve got a ranch style house then you are probably good to go. If you have angles or dormers on the roof then you probably don’t have enough space.

The alternative to the roof is to have a ground mount installed. For this you need a space that is in the open (no trees to block the sun). We had to go with a ground mount because our house did not point in a good direction and we have odd angles on the roof that limited the number of panels we could install. We have the space, but I was still surprised by the size of the installation. It is 88 feet long and about 10 feet high – that’s 3 rows by 16 panels with each panel 3.5’ by 5.5’.

You will probably have to get permits from your local municipality for the installation.

Solar Panels

If you take the cost of new roof into account, the two installations are about the same  cost.

The Cost

Solar is not cheap. It is a significant investment but I believe the payoffs are worth it. Having said that, you do get help from the federal government and depending on where you live, you may get money back from the state. From the federal government you get a tax credit based on the cost of the system. The credit is about 30% of the cost. We live in Pennsylvania, so we also get a rebate from the state. The rebate is based on the amount of KwH we generate with a ceiling just over $17K. Even with this help you will probably have to cover the remainder of the cost with some sort of loan.

Paperwork, Paperwork, Paperwork

One thing we found out early was that there is a ton of paperwork involved with installing solar. And  it doesn’t end when the system is turned on. You need to go over a site plan as to where the panels will be placed – this after someone comes out to look at possible locations and your latitude and longitude. More forms for the state rebate (which has to be approved before you can start installing – at least several months). Forms for the electric company, the township, the loans. And after all that is done, and the panels are installed, forms for getting yourself setup on one of the energy exchanges. From beginning to end it took us 9 months to get everything done.

The Connections

I never liked the idea of being completely off the grid. We use too much power and all our appliances are designed to run on the grid. I also didn’t want to have to deal with batteries or to get a generator for when the sun just doesn’t produce enough to keep us going. So a system that lets us stay connected to the power grid was the logical way to go. This allows us to “sell” the excess power we generate during the day back to the power company.

Solar panels are Direct Current (DC) so in order to use the power or send it back to the grid means we would need an inverter. Our installation is actually two systems so in our case we would need two inverters. This is all part of the installation so we didn’t have to go out and investigate what to get, but we did have to pay for them. We have two Sunny Boys installed. They have displays that cycle messages that have the total power generated, total carbon saved, and other interesting facts.

Sunny Boys

From the inverters the lines run through a meter that measures how much total energy you make. This is used by the energy exchanges (more on that later). From there it runs through another box with a meter on it. This is the connection between the grid and our panels. From there it goes into the house. This box also has the meter on it that measures the amount of excess power going back into the grid.

When we built our house we had 400 amp service installed. In hind site this was a good thing because the panels generate 300 amps. Most houses have 200 amp service so an extra piece of hardware is required.

Obviously an electrician is needed to install this part of the system. It also needs a second electrician to inspect it and in our case another inspection from the electric company. It is a little frustrating to see the solar array sitting there ready to go but without the final inspections. Luckily the wait was only about 2 weeks.

The Exchange

The last piece of financial information has to do with Alternate Energy Credits (AEC) or Solar Renewable Energy Credits (SREC). For each 1000KwH you generate 1 SREC. We expect to make about 12 SRECs in a year. SRECs can be placed on an exchange and sold. We are using Flett Exchange to sell our SREC’s. The price for SRECs in PA is down due to an oversupply of SRECs from other states but we can sell them in other locations. With the current prices we should generate somewhere between $2400 and $3600 in SRECs per year.

Bottom Line

So far we have had the system running for just over a month. We have gotten one electric bill. We don’t have electric heat so the cold doesn’t matter. It is a little early to tell but so far the bill is down about 30%. This is not counting the SRECs. 

So is it worth it? I will know a lot more come summertime when the air conditioning is running but if the trend with the bill continues then yes. And although I’m not much of a tree hugger, there is also the feeling that I’m doing a little something for the planet. 


WebMatrix and SQL

September 26, 2010

I was looking into using WebMatrix to rebuild a website. This particular website connects to SQL Server. Its very easy to connect a WebMatrix site to an SDF type database file. You simply use the Database.Open(sdffilename) command. But a SQL server isn’t just a file – so how to do it.

One way is to use the Database.OpenConnectionString(connection string) command. But then I would have to put this in code in at least one page. I have a problem putting a constant string in a program to connect to a database.

The way I would do it using web forms would be to create an entry in a web.config file. So I thought if I added a connection through the WebMatrix Databases page it would add the connection string to a web.config file and I could use it – I was wrong. Adding a connection only gives access to the database, it doesn’t update any files or create a web.config file. So I created my own looking like this:

<?xml version="1.0"?>
<configuration>
        <connectionStrings>
            <add
                name="dbname"
                connectionString= "server=ServerDNS;database=databasename;uid=userid;pwd=Password"
                providerName="System.Data.SqlClient" />

        </connectionStrings>

</configuration>

So according to the documentation, I should be able to use the name of dbname in the openconnectionstring method. Again I was mistaken.

It turns out that the Database.Open command will work with a name from the web.config file. So the code was simply Database.Open(“dbname”);

This all worked fine and I was able to call a stored procedure (using the Query method), however, the records in my database had HTML codes in it and they were not being displayed correctly. The data was being encoded before being displayed – so my <br> turned into &lt;br&gt;. This meant that the <br> was actually being displayed on the page – not exactly what I had in mind. I was also using the WebGrid helper to display my data which only made things more complicated.

Looking around the web I found a great article by Mike Brind called Looking At The WebMatrix WebGrid where he talked about some of the settings and options available for the webgrid. One of them was the format parameter for a column in a grid. Using this I was able to use HtmlString to output the data correctly. My Format parameter looked like this:
format: @<text>@(new HtmlString(item.notes))</text>


Fun with VHDs

November 29, 2009

Looking around I found that VHD support is quite extensive inside Win7 but I didn’t realize how much. I also found a few commands that you can run at the cmd prompt to help with VHDs.

Creating

First thing I found was that creating a VHD was very easy. You can use the Computer Management console to create a VHD using the GUI. Simply right click on Disk Management and the Create VHD menu item should be there. Clicking on it starts the dialog windows that will help you create a fixed or dynamic VHD.

image

For those of you who yearn for the days of DOS, you can also use a command at the cmd prompt. Go to an administrative command prompt and enter Diskpart. Diskpart is not just for VHD’s so be careful, you could do some damage to the partitions on your hard drive. Once you’ve started Diskpart, you can create a VHD by issuing the Create command – Create vdisk file=”drive:vhdame.VHD” maximum=max size of vhd type=expandable|fixed

image

This will create a VHD on the drive you specify with the name you specify – in the example above, I’ve created a VHD called blog.vhd on the D: drive. The maximum tells the system the maximum size of the drive in MB and the type lets you create an expandable or fixed size VHD.

Using the Diskpart command you can automate creation of VHDs if you need to. The VHD will be uninitialized and unattached.

Attaching

Attaching a VHD lets you use it like a normal hard drive on your system. You can again right on Disk management inside Computer Management and select Attach VHD. You can enter the location and name of the VHD you want to attach or browse for it. If the VHD has been initialized and formatted it will be assigned a drive letter. Otherwise you will have to initialize the VHD and format it.

You can use the Diskpart command to attach a virtual disk. You first have to use the Select command to select the VHD then you can attach the vdisk

Select vdisk file=drive:vhdname.VHD
Attach vdisk

Once the VHD is attached it will show up in Computer Management.

But there’s more…

Attaching and creating VHD’s was what I was expecting, but I didn’t realize you could install an OS to a VHD without using Windows Virtual PC. You can even install a 64bit OS to a VHD. The trick is to use the Diskpart command when installing the OS. lets say you want to create a bootable VHD – one that you could use to boot your physical machine. We’ll assume you have Windows 7 installed on your computer first. Now put in the DVD of the OS that you want to put on your VHD and boot from the DVD. When windows gets to the first screen you can drop to a command prompt (using Shift-F10) and use the Diskpart commands to create and attach a VHD. Once you’ve done this you can exit the command prompt and continue with the installation. When it gets to the part where you are asked to choose where to install the OS you will see an entry for your VHD. Select it (you will get a message saying it can’t install but ignore it) and continue with the installation.

Once the OS is installed you will have a multi-boot system. The first entry in your multi-boot menu will be the OS on the VHD. If you want to change the menu or add a preexisting VHD to your boot menu you can use the BCDEdit command..yes another command prompt command.  BCDEdit lets you modify what shows in your boot menu and also allows you to rearrange things if you want. 

If you have a VHD that is bootable, you can use the BCDEdit command to install it into your boot menu. Unlike Diskpart, BCDedit is a run and done type command (like DIR). Running BCDedit by itself will present you with a list of your current boot menu and the type and location of the OSs you have on your system. The easiest way to add a new entry you in your boot menu is to copy an existing entry. When you copy an entry BCDEdit will create a new entry with a GUID. You use the assigned GUID to modify the new entry to point it to your VHD. Use the Set option to point the OSDEVICE to your VHD. The command would look something like:
BCDEDIT /set {guid} osdevice vhd=[d:]\blog.vhd

You can get help with BCDEdit by passing in /? as the first parameter.

There is another way to work with your boot menu. You can use the MSCONFIG command. This will not give you all the options that BCDEdit will but you can select a default OS from this menu. One thing I’ve learned is that you should not go into MSCONFIG when you have booted into the VHD. Every time I used MSCONFIG when booted into the VHD the system had problems booting back into my main OS. 


Windows Virtual PC

August 9, 2009

After making sure my Windows 7 install was working properly I decided to install the RC of Windows Virtual PC. This will allow me to use XP mode if I need it and also let me work with some of my existing virtual machines that I had setup with Virtual PC 2007. You will have to uninstall Virtual PC 2007 to install the RC, you will also have to uninstall the Windows Virtual PC beta if you had previously installed it. As has been talked about plenty in the press you will also have to have a CPU that supports virtualization. This would be Intel-VT or AMD-V support.

Everything went well with the install. Then I installed the XP mode piece (which is primarily a virtual machine of XP). Again everything worked well.

Now it was time to try one of my existing Virtual Machines and the first problem arose. One of my VMs had a VHD that was split into multiple files with the first two being about 14Gb and the last one being very small. When I tried to use this VHD WVPC could not find the VHD file. This seemed odd since I could see it fine and I could even copy it. When I copied it WVPC could see the file, but when it tried to use it there was a disk error – somewhat to be expected since the name had been changed on the copy. So I figured I’d rename the copy back to the original name and guess what, WVPC could not see the file anymore.

At this point I tried another VHD that was much smaller. This seemed to work fine so I guessed that the split file was causing the problem. VHD’s are split very simply, so I used the tried and true Copy command to combine the files together. This solved the problem and I was able to start up the VM and work with it…problem solved.

Now that it worked, I tried to rename the file back to the original name – for some reason WVPC was still having a problem with the old name. So I renamed it back to the copied name and left it. If it ain’t broke don’t fix it.


Windows 7 RTM

August 7, 2009

On August 6th the RTM version of Windows 7 was made available to MSDN subscribers. So naturally I had to download it as soon as I could. I decided to try an upgrade on my Dell Studio 17. My Dell was running Vista Ultimate x64 and I figured it would make sense to simply upgrade to Windows 7 Ultimate x64. This machine has 4Gb of memory and plenty of free disk space so I didn’t think it would take that long to upgrade.

Well, it took about 4.5 hours to finish the complete upgrade…a little longer than I expected. But I figure I’ll only have to do this once so no big deal.

I was pleased when everything that had been working still worked. I know I have expected everything to be fine, but this is an upgrade so anything was possible.

The only thing that had real problems was Trend Micro Internet Security’s firewall.

Odd things:

  • The Camera software from Dell was a bit flaky (but it was always a little flaky)
  • Selecting both minimize on use and Hide when minimized in Task manager caused it to always be shown in the task bar.

One thing that pleasantly surprised me was the AT&T wireless card. it worked without any changes. The other thing I noticed was that the fingerprint reader seems to work better (maybe my hands are cleaner…).

There are still plenty of things I need to check, but so far it is working flawlessly.


jQuery, Ajax, Bing, Oh My

July 28, 2009

We had a good turnout for the hands on lab this month. Bill Wolff started the evening by getting everyone to sign up for a Bing API id. You can get one here http://www.bing.com/developers/createapp.aspx. He then went on to build a simple web search page using the Bing web service and lots of CSS code. He has the source on his blog.

I followed by going a little lower tech. I wanted to show some jQuery code that would allow you to connect to Bing using Ajax. I started with a simple HTML page that used the URL method to search Bing and have a callback routine run – all in JavaScript. I then modified the code substituting jQuery calls for the straight JavaScript.

The final step was to convert all the JavaScript into code that would rely on the jQuery library and show that it could be done with less code than straight JavaScript. I also added some extras to the final output just to show how it could be done.

The files can be found on my SkyDrive or by clicking here. You will need to signup for a Bing API id to make them work. You will also need the jQuery library to make the second and third files work. You can get the jQuery library from http://jquery.com 

These examples are to show jQuery and Ajax, so they aren’t pretty from an end users perspective – but you can do that on your own so play with them and see what you can come up with.

And if you have questions about what we’ve shown or have ideas of what you would like to see in the future please leave a comment.


jQuery Presentations

July 3, 2009

At the latest Philly.Net Hands On Lab we tried to create an example using the ListView and an RSS feed. The ListView example was taken from the demo that Joe Stagner did here. Unfortunately his site was not working for the demo so we switched it to my blog.

If you want to see the final ASPX page you can get to it here.

Remember you can find more jQuery information at jQuery.com.

At the previous regular meeting of Philly.Net

Technorati Tags:

I also gave a short intro presentation about jQuery. If you would like to have the presentation you can download it from here.

I hope these presentations helped you get started. Let me know what else you’d like to know about jQuery by leaving a comment.

Thanks.


Dell Mini 9 and Windows 7 Revisited

January 21, 2009

Since the Beta of Windows 7 was released I figured I would try to upgrade my Dell from the PDC release to the Beta. Unfortunately there wasn’t enough disk space on my 16gb SSD to accommodate an update so I decided to simply blow away the existing build and start fresh.

Before I got started I checked for any BIOS updates. I had previously updated to A03 but I found that another update was available  – onward and upward to A04.  The BIOS update worked flawlessly and I was ready to begin.

I decided to boot from the external CD. Since there are no dedicated function keys on the Mini I had to hit the zero key. Of course, this is an exercise in timing since it is only available to hit for a limited time.

Once the install disk booted I blew away both the main partition and the 200mb partition that is created by windows 7.  I then created a single partition but and told the install to use it. Windows still wants that 200mb partition so it repartitioned the disk and began the install.

Expanding the files took the longest – about 20 minutes. The entire install took about 45 minutes.

I did get the wireless hotkey to work by downloading the battery Meter/Wireless Switch for the Mini 12 (for vista). This installed fine on the 9. Thanks to the myDellMini website for the information.

So far the beta is working well – it is responsive and shows no signs of being a beta.


Dell Studio 17 Vista Upgrade

December 7, 2008

I purchased a Dell Studio 17 and it came with Vista Home Premium 64 bit on it. This was the way it came from Dell, it does have 4Gb of memory so the 64 bit version is useful.

I wanted to upgrade this to Vista Ultimate. Normally I wipe a new machine and start fresh, but this computer had very little in the way of bloatware so I figured since all the drivers were loaded and working I might as well try the upgrade.

My first attempt was running smoothly until it got to the second to last part and gave me an error saying it could not configure one or more system components.

I thought it might be something special on the laptop, perhaps the fingerprint reader or bluetooth or maybe the WiFi. I decided to go to the Dell support website and upgrade the drivers. I upgrade the BIOS, the fingerprint reader, and the WiFi. As it turned out, upgrading the WiFi was not the right thing to do…

Still the upgrade of Vista would not work. So I tried removing Daemon tools ( a software DVD drive) – no luck.

I finally tried the web (I should have started there). I found some posts on the technet forum that seems to address the issues. So this is what the recommendation was:

Go into Control Panel/Programs/Programs and Features. click on the “Turn Windows Features on or off” link in the left panel.

  • Uncheck XPS view under ms .NET framework
  • Uncheck Remote Differential Compression
  • Uncheck Windows DFS replication Service

After doing this the upgrade worked. I’m not sure why Windows doesn’t know how to do this but I’m just glad it worked. I was only left with one problem. Remember that I upgrade the WiFi card, well Windows could no longer see it. I had to use the driver disk that came with the machine and reinstall the driver for the card.  After that all was good…


Dell Mini and Windows 7

December 3, 2008

I picked up a Dell Inspiron Mini 910 and decided to put Windows 7 on it. This has been done by other people with apparent success. The only difference was that I got the Mini with Ubuntu preinstalled (it’s cheaper that way).

I knew I might run into driver issues but figured if all else failed I would reinstall Ubuntu and be back to where I started. The Mini did come with a driver disk that appeared to have all the XP drivers loaded. They were in self extracting ZIP files.

After running the install for Window 7 I was left with very little in the way of network peripherals working. I tried to load the XP drivers that came on the CD. Extracting the software was not a problem, but they also tried to run a setup utility which did not recognize Windows 7 as a valid OS.

I grabbed an external USB drive and went to my workstation in the hopes of finding some drivers on the Dell site. There I found some new drivers and an update to the BIOS. I loaded all the drivers from the site onto the USB drive and headed  back to my Mini.

First I updated the BIOS since I would have done that anyway. Then I started to load the drivers from the site. After a few I found the wireless driver and it installed….at least part way. It did have some errors but I figured I’d just try to get connected…and it worked!

After getting online it found some newer drivers at the windows update site for the network so I installed them. After that all the network peripherals were found and I was up and running.

After I got everything working I loaded the blue badge application to turn on all the extras for the 6801 build.

So far Windows 7 is running without problems on the Mini although there are still a couple of devices that are unknown.

image

The Mini came with 1GB of memory and a 16GB SSD. After installing Windows I was left with a little less than 6GB of disk space.

I have since upgrade my memory to 2GB. This was not because the system was running slow, but because a 2GB chip was only $25 – tough to pass that up.  I am also looking into upgrading the SSD. Runcore has a 32, 64, and 128 model out which are supposed to increase performance. They also have mini USB ports on them for easy transfer of disk images. The 32GB model is going for around $120.


Follow

Get every new post delivered to your Inbox.