Showing posts with label projects. Show all posts
Showing posts with label projects. Show all posts

Thursday, August 12, 2010

Solar Grid Inverter Monitoring System - Part 2

The second part of this project requires the RS232 to be signalling at a longer distance than the usual fifteen metre limitations.

To overcome this distance limitation and maintain reliability of the serial network, we use of a special telecommunication device called a RS232 extender. 


The RS232 Extender

The Gefen RS232 extenders will be used to extend the RS232 connection from the Fronius IG grid inverters to the remote location, with over one hundred feet of Cat5e cable.
RS232 Extenders


RS232 Extenders

The Gefen RS232 extenders will perfectly reproduce all 9 pins from one end to the other and have the ability to provide power over Ethernet to the second extender, saving on extra cables and power supplies.

The extender units act as a sender and receiver pair on the RS232 network. Allowing the grid inverter's data logger to send Windows computer information to the Fronius access software.

The RS232 extender sender unit connects to Fronius IG grid inverter at one end and the RS232 extender receiver at the computer terminal at the other end.

RS232 Extenders Diagram

Then the Cat5e cable connects the send and receive extender units, over 300 metres away. The sender unit is powered by a 5 volt power supply, which will also power the receiver via the Cat5e cable.


The Fronius IG Access Software

The free Fronius Solar access software is available for download from their corporate website at http://www.fronius.com.

The software provides advanced onsite data analysis and archiving options for the PC. As an administrative tool, it offers full setup options for all system components in Solar Net.

Fronius Solar.access

The software is easy to install on the Windows system, with a helpful installer wizard.

Once installed, the software is located in the programs section of the windows start menu.

Fronius Solar.access

The Fronius access software splash screen displays the general energy output information for the photovoltaic solar power system.


Fronius Solar.access


Under the administration menu, the new PV system can be added and configured for the RS232 connection back to the grid inverter's data logger.

In the next part of this series, I will be looking at connecting the monitoring software and data logger to collect information from the school's solar power system, and explaining the features and advantages that computerised power monitoring can have for an organisation.


Other PV Solar Powered Systems and Concepts

A PV solar power system has many other applications apart from grid power installations. One example is NASA's Helios aircraft, remotely piloted to fly at high altitudes.




The electrically powered Helios is constructed mostly of composite materials such as carbon fibre, graphite epoxy, Kevlar, styrofoam, and a thin, transparent plastic skin.

The main tubular wing spar is made of carbon fibre. The spar, which is thicker on the top and bottom to absorb the constant bending motions that occur during flight, is also wrapped with Nomex and Kevlar for additional strength.

The wing ribs are made of epoxy and carbon fibre. Shaped styrofoam is used for the wing's leading edge and a durable clear plastic film covers the entire wing.

The Helios collects a variety of information in the atmosphere, and runs mainly on solar power.

On August 14, 2001, the Helios Prototype, piloted remotely by Greg Kendall, reached an altitude of 96,863 feet, a world record for sustained horizontal flight by a winged aircraft.

The altitude was more than 11,000 feet or more than 2 miles (3.2 km) above the previous record for sustained flight by a winged aircraft. In addition, the aircraft spent more than 40 minutes above 96,000 feet.

Tragically the Helios crashed over the Pacific Ocean on 26 June 2003.

Friday, July 30, 2010

VMware Server 2 - Part 4 - High Availability Services

High availability is a general requirement, rather than a extra feature, in today's server environments.

Especially as organisations and people have become more reliant on IT systems for everyday tasks.

A simple way to build redundancy into VMware Server 2 software is by using the Linux High Availability software on a Linux CentOS installation.
Clustered servers in racks

This example configuration works well for systems that are server-only devices, e.g. web servers, FTP servers or internet mail systems.

Desktop virtual machines are not recommended for this set-up, because information can be lost when the Linux HA starts new instances of all the virtual machines.


Two Things Required

For this project, there are two requirements for constructing a small cluster of VMware Servers.
  • Redundant Datastore
  • Redundant Server Hardware
In this example, the redundant datastore will be using FreeNAS, with Linux HA offering the redundant VMware Server services.


Linux High Availability

The Linux HA software maintains a set of building blocks for high availability cluster systems, including a cluster messaging layer, a huge number of resource agents for a variety of applications, and a plumbing library and error reporting toolkit.

For this example installation of Linux HA, the heartbeat will be using the IPfail service, which will be the main focus for the VMware Server redundancy.

The Pacemaker functionality will not be used for this example, but can be used in larger server farms for cluster management.


Setting up the Linux HA on CentOS

An IP network, using a crossover Ethernet cable on eth3, has been set up on both the CentOS VM servers, which is used to send heartbeat information to and from the Linux HA services.
Heart beat Ethernet cable
It is important that your host file contains the correct host names of the servers, as required by Linux HA.

I.e., for this example Server1 and Server2 need to be in the host file.

more /etc/hosts

127.0.0.1                  localhost
192.168.0.100          Server1.test.com.au server1

Below are the example configuration files for the Linux HA on each of the VM server.

(CentOS Server 1)
/etc/ha.d/ha.conf file
-------------------------------------------------------------------
logfile /var/log/ha-log
watchdog /dev/watchdog
bcast eth3
keepalive 2
warntime   10
deadtime  30
initdead  60
auto_failback on
node Server1
node Server2
udpport  694
respawn root /usr/lib/heartbeat/ipfail
ping 192.168.0.1
--------------------------------------------------------

/etc/ha.d/haresources file
--------------------------------------------------------
Server1 192.168.0.100/24/eth0 vmware::start
--------------------------------------------------------

/etc/ha.d/authkeys file

--------------------------------------------------------
auth 1
1 crc

--------------------------------------------------------

(CentOS Server 2)
/etc/ha.d/ha.conf
--------------------------------------------------------
logfile /var/log/ha-log
watchdog /dev/watchdog
bcast eth3
keepalive 2
warntime   10
deadtime  30
initdead  60
auto_failback on
node Server1
node Server2
udpport  694
respawn root /usr/lib/heartbeat/ipfail
ping 192.168.0.1
--------------------------------------------------------

/etc/ha.d/haresources file
--------------------------------------------------------
Server1 192.168.0.100/24/eth0 vmware::start
--------------------------------------------------------


/etc/ha.d/authkeys file
--------------------------------------------------------
auth 1
1 crc

--------------------------------------------------------



The Network Attached Storage Setup

The network attached storage being used for the VMware is the open source FreeNAS distribution.

FreeNAS is a free network-attached storage server, supporting: CIFS (Samba), FTP, NFS, rsync, AFP protocols, iSCSI, S.M.A.R.T., local user authentication, and software RAID (0,1,5), with a web-based configuration interface.

FreeNAS Logo
In this example, the two VMware Servers are connected on a separate IP network on eth1. The gig-E switching network is then connected to the FreeNAS server where the vmdk files and datastores will reside.

VMware Server cluster


CIFS or NFS mounts will have to be setup on the NAS before installing any virtual machines, so that the VMware Servers can mount the FreeNAS server, giving a redundant storage of the VM's vmdk files.

Example of mounting the NAS from CentOS:

mkdir /vmware
mount -t cifs  //FreeNAS_IP_Address/vmware /vmware -o user=admin,pass=abcde

Make sure that the /etc/fstab file is updated with the mounting information, so that the NAS mounts will reconnect in the VM Servers on reboot.

192.168.10.10:/vmware /vmware cifs defaults 0 0


Overall Setup of the System 

The overall setup uses two separate switched networks for reliability to the NAS and Internet - one network for the redundant NAS services to the VM Server for the VM's vmdk files, and the other network for data access to the Internet and other LAN services.



The two VM Servers are connected by a crossover Ethernet cable to run the heartbeat service.

The heartbeat service controls the VM Server redundancy.

This setup (or close variations) allows for a reliable setup for high availability VM Servers, without investing in an expensive SAN and only using the free VMware Server 2 software.


There is more to come in "VMware Server 2 - parts 5 and 6". 

I talk about monitoring the server, and changing system resources, among other things VM technical.

Stay tuned...

Wednesday, July 28, 2010

Solar Grid Inverter Monitoring System - Part 1

Solar based power has become an important part of modern strategy for some organisations as they move from carbon based fuel dependence to renewable energy.

One of my current projects is looking at a solar power applications for a school that is working towards establishing a carbon neutral power system.


Solar panel array for power

The solar panel array that is currently installed on the school's roof has enough panel area to produce up to 5 kilowatts of electrical power on a sunny day.


Fronius Grid Inverters
 

Grid inverters for solar power
Three Fronius Grid Inverters
Three Fronius IG 30 grid inverters can feed up to 7.5 kilowatts of power back into the grid, or to the school's AC electrical systems.

These high power inverters form the centre of the photovoltaic system, as AC power and access back to the power grid is essential at the school.



Grid inverters are essential for a power system to have mains AC power and photovoltaic power, enabling seamless use of both power sources as a single power source.


The goal of this project is to network the Fronius inverters into a PC system running MS Windows, so that information about the power grid and photovoltaic solar array can be collected for educational and organisational use.



Cabling the Grid Inverters for Computer Monitoring

Grid inverters for solar power
Inverter, fuse box and Cat5 plate

Grid inverters for solar power
Blue cables are the serial bus

The three Fronius grid inverters have been mounted on the wall in a way that makes it easy to network the units together.

The three inverter units all have special Com cards, so they can be networked together in a bus type network.

At each end of the Cat5 bus network, special terminator plugs are used to close circuit on the network.


Grid inverter network for monitoring
Grid Inverter Bus Network and PC Serial Connection


The last unit has a special data logger card that gives the Fronius grid inverters a data IO port for a computer via RS232.

The data logger card has a DB9 connector, which has been then converted to Cat5 for easy of use in the networking cabinet. 


Grid inverter network for monitoring
RJ45 connector in the rack to the Data Logger

The cable run from the DB9 connector on the inverter can be up to 20 metres in length.

But for longer lengths of cable, RS232 extenders maybe required.

For this example, the Cat5 serial cable is terminated into the network rack in another building.

The Windows PC is connected to the terminated rack connection, which connects back to the Fronius grid inverters with which the Windows PC will be communicating.



For part 2 of this project, I install and setup the Fronius IG access software on the Windows PC.

I will also be explaining the features and advantages that computerised power monitoring can have for an organisation.

Stay tuned.

Saturday, July 24, 2010

VMware Server 2 - Part 3 - Mounting an ISO image on a Datastore

Mounting ISO images onto your virtual machine can be very handy for installation and management.

It removes the need for a physical CD/DVD drive to run the installation CD, upgrades and resource packages for the virtual machine.
VM Server Logo - Copyright VMware

Using ISOs for Installing Guest Operating Systems

A handy way to make it easier to install a guest operating system, is to use ISO images from the datastore as virtual CD/DVD drives.

In this example, the Slackware Linux 13.1 DVD ISO image will be downloaded to the ISO datastore and used for the guest installation.


cd /vmware/iso/   (Pre-mounted datastore directory)
wget http://www.slackwaremirror.com/slackware-13.1-install-dvd.iso


Then the rest is done from the VM Server 2 web console.

To install from an ISO image instead of a physcial CD/DVD drive, there is only a slight difference between the standard guest installation covered in part-1 and installing from an ISO image. (For larger views of the pictures, just click the image.)


VMware Server ISO Config

VMware Server ISO Config

In the virtual machine installation wizard, the part the concerns the ISO images is the "CD/DVD Drive" options.

In this screen, selecting the option "Use an ISO Image" will allow the user to have a virtual drive instead.

On the next wizard screen, the browse selector allows the adding of the ISO image on the server datastore.


VMware Server ISO Config

Click  browse and the datastore selection window appears.

Browse to the ISO datastore and select the slackware-13.1-install-dvd.iso image to use as the virtual drive.

After hitting OK, the original CD/DVD properties screen appears with the correct path to the ISO image. 

Follow the rest of the wizard as if you were installing a standard virtual machine on the server.

Once the wizard is finished, starting the guest OS from the console will start the installation of the OS from the bootable Slackware Linux ISO image.

Install as per normal. 


Changing the Virtual CD/DVD Drive ISO Image

After installing a guest operating system, you may want to mount another ISO image for upgrades of operating systems or installing other applications.

VMware Server ISO Config

To change the ISO image, go to the console and stop the virtual machine.

Under the summary section of the virtual machine's console tabs, in the hardware panel, select the "Edit" option under the CD/DVD Drive subsection to bring up the CD/DVD drive options window.


In this window, the user can select the connection as a ISO image in the radio buttons.

Click browse to select the ISO image from the server datastore.

Once the image is selected, click OK and re-power the virtual machine to have access to the new CD/DVD image.

Now the user is ready to run the application install CD/DVD or operating system upgrade disc.



VMware Server ISO

Mounting ISO images as virtual CD/DVD drives is very handy, and means you don't have to maintain a store of discs.

But wait, there is more to come in "VWware Server 2 - parts 4 and 5" of the blog.

I talk about monitoring the server, changing system resources and clustering the VMware server, among other things VM technical.

Stay tuned...

Thursday, July 22, 2010

Building an Industrial Robot - Part 1 - The Robot Brain and Body

Here's my project to make a universal platform for industrial robot experiments.

The requirements are to develop and construct an industrial grade tracked robot for under US$2000.

The robot has to be able to work in harsh environments, be net-workable and operate for long periods before recharging.


A series of blogs will follow the progress of the tracked robot project, and this part is focused on the base construction and layout of the robot's computer.


The Robot's Main Body

Before you mount a computer brains for a robot, you need a body to mount it, so I created a quick, cheap and strong assembly method.

Robot's main body
Side of the robot without the hatch

Robot's main body
Top of the robot without the hatch

The main body is made of poly carbonate panels with aluminium framing for lightness and strength.

The panels are glued to the aluminium frame with silicon, the same way you would build a fishtank.

This makes construction of a robot body easy, without too much drilling and reducing the number of bolts or rivets that might come lose during the robot's operation.

Also, construction makes the robot's main body water-proof, in case it has to operate in low level water.

The main body has been sprayed with a grey primer and matt black finishing paint to protect the polycarbonate body and increase water-proofing.

It also gives stealth or a black ops look to the robot.


Robot's main body
Side view with the hatch on

Robot's main body
Top view with the hatch on

With the top hatch and soft mounts on, the main body is sealed for protection of the robot's computer systems.

The GPS is mounted on the top, next to the 2.4 GHz omnidirectional antenna.

The pole mount at the other end of the main body is for the web cam.

In the centre, the main hatch opens to access the computer system for system reprogramming, battery maintenance and internal repairs.


The Robot's Computer
The main brain of the robot will be driven by a Mini-ITX system running Linux.

The Mini-ITX system will be using a SSD to boot  and run, which removes the requirement for a hard drive that might be damaged when the robot is in motion.

The idea behind the Mini-ITX is to reduce complexity from hardware into software tasks, and making the programming and design of the robot's brains much easier.

Mini-ITX Motherboard

The main part of the robot lies in the PIC Micro-controller connected to the Mini-ITX by a RS232  connection.

This controller has 20 inputs and outputs for driving motors and reading sensors.

The PIC Micro-controller allows the software on the Mini-ITX to interface with the robot's outside world.


The 802.11g Linksys bridge is set to connect to the local access point for remote access to the robot via IP, either for the information of a remote user or for the robot to download new information and instructions.

The network security is done by WAP encryption on the layer 2 as well as 256 AES VPNs from the Linux OS.

802.11 Wireless Bridge

The Webcam and GPS are plugged straight into the Mini-ITX via USB cables.

This supplies the robot's computer with GPS positioning and a digital eye for navigation.

Computer Layout Components:
  • Mini-ITX computer
  • 802.11g Ethernet Bridge
  • USB GPS
  • USB Webcam
  • 2.4 GHz Antenna
  • Pic Micro-controller Board
  • USB, RS232, Cat5 and Coax cabling
Computer system for the robot
The Robot Computer Layout

The above diagram show the logic layout of the connections and hardware used for the computer controller.

The Mini-ITX connections use Cat5 to the 802.11 bridge, RS232 to the PIC Micro-controller and USB to the web cam and the GPS.

The 802.11 bridge is also connected to an antenna with shielded coaxial cable.

The choice of operating system for this robot project is Gentoo Linux.

I have found this Linux distribution ideal for embedded and custom designed systems.

It is very easy to make live images and small OS footprints with Gentoo Linux.

I have tested Gentoo Linux on Mini-ITX systems before without any issues.
Gentoo Linux Logo - Copyright Gentoo Linux

More to come in the next parts of this project, as we examine the power system, track design, motor systems and software applications required.

Wednesday, July 21, 2010

VMware Server 2 - Part 2 - Application Virtual Machines


Application Virtual Machines

For the people who want a virtual machine up and running without hassles, there are application virtual machines which can be installed within a few minutes.

A variety of pre-packaged applications are available. In fact, far too many to mention here.

A good resource for application VMs is the VMware appliance marketplace:
http://www.vmware.com/appliances

WMware Application Virtual Machines


Installing an Application VM

For this example, I am using the SugarCRM application from Bitnami. It is a free download from their website:
http://bitnami.org/stack/sugarcrm.

This test uses the OpenSUSE 11.1 version for the installation.

cd /vmware/test  (or your own datastore)
wget http://bitnami.org/files/stacks/sugarcrm/6.0.0-0/bitnami-sugarcrm-6.0.0-0-opensuse-11.1.zip
unzip bitnami-sugarcrm-6.0.0-0-opensuse-11.1.zip

All ready and done, with the vmdk files in the pre-set-up datastore.

Now to install the application VM into the VMware server.


Setting up the VM 

There is only a few things that are done differently when installing an application virtual machine. (Click the images for larger versions of the examples).

VMware configuration screen

VMware configuration screen

As with creating a VM in part-1, you select the datastore you want to use and the VM's name.

For this example, the test datastore will be used again for the VM files.

On the next screen of the wizard, the correct OS for the application VM needs to be selected for the application to work.

In this case, the selection is SUSE Linux. This will suit the SugarCRM application requirements.

VMware configuration screen

VMware configuration screen

Moving on to the most important part in the wizard.

This time, instead of creating a new disk, to run the application VM, the image can be selected by "Use an Existing Virtual Disk" option.

VMware configuration screen

VMware configuration screen

This will give the ability to browse the datastores for the downloaded vmdk files.

Browse to the correct datastore and select the SugarCRM vmdk file for SUSE Linux.

Then after pressing the OK button, the drive configuration screen will appear again with the application VM in the browse field.

For the rest of the installation of the application virtual machine, the configuration wizard follows the same path as installing VMs in part-1 of this blog.

VMware configuration screen


To start the application VM, go to the console tab and click on the play icon.

Once started, click the console screen again to launch the application VM display to gain access to the virtual machine.


VMware configuration screen

Now there is a nice copy of SugarCRM running on the VMware Server.

All ready for set-up and deployment by Internet to a client's office VPN or for a personal CRM software system for in-house work.

And all installed in under 5 minutes.

But wait, there is more to come in "VWware Server 2 - parts 3 and 4" of the blog.

I talk about mounting ISO images and clustering the VMware server, among other things VM technical.

Stay tuned...

Monday, July 19, 2010

VMware Server 2 - Part 1 - Installation and Guest OS Setup

Have been working with VMare Server 2 as my lab development system over the past month.

Chose the VMware Server 2 over the free VMware ESX bare metal installation, as it will allow me to customise the operating environment.

The main OS that the VMware Server 2 will be running is CentOS 5.5 64 bit version.


VMware Logo - Copyright VMware
The VMware Server 2 software can be downloaded for free (after registration with VMware) from http://www.vmware.com.
Registration to the site also gives access to other VMware products and trial software.


Installing the VMware Server 2 Software

I used a fresh install of CentOS (which ESX is based on anyway) to install the VMware Server software.

Downloaded the latest binary installer, but left the RPM package. I have tried the RPM package before and it seems to work fine with CentOS, but perferred the more generic approach.

After downloading the software package and uncompressing it, I just ran the installer to start the configuration. Most questions can be left at their defaults.

cp VMware-server-xxxx.tar.gz /temp/dir
cd /tmp
tar -zxf VMware-server-xxxx.tar.gz
cd vmware-server-distrib
./vmware-install.pl

Accept the default directories for the binary files, daemon files, library files, manual files, documentation files, init directories and init scripts.

Then running vmware-config.pl will start the software configuration part of the installation.

./vmware-config.pl

Again, most questions can be left at their defaults, except for the location of the store for your virtual machine files and the serial code that you get from VMware when you download the file.

Controlling the service is simple. Running the script "/etc/init.d/vmserver start|stop|status|restart" makes it easy to control the service.

Installing a Guest OS

Once the VMware Server is up and running, add some virtual machines.


Connect to the host server - https://IP.domain.address:8333.

A simple username and password prompt is displayed once the interface comes up.  


VMware configuration screen

When the username/password dialogue disappears, the main screen appears. 

Before making any virtualized system, there needs to be a datastore made for the machines. Clicking on "Add Datastore" on the right panel starts the wizard to add a new datastore. 


VMware configuration screen

The datastore wizard just requires two values for a local disk: the Datastore name and the location of the datastore files on the CentOS installation. 


VMware configuration screen

Having set-up the datastore, I can start the wizard to make a virtual machine. 

To start the wizard, the link is in the top right menu panel. (Click the images below for larger views)


VMware configuration screen

VMware configuration screen

First give the VM a name and to select a datastore. Press next to continue.


On the next screen, the wizard then asks for the guest operating system. For CenotOS, the Redhat 5 selection is used in this example.


VMware configuration screen

VMware configuration screen

The next wizard screen asks for some basic system information.


For new, the defaults are fine and can be changed later if needed.

After pressing 'next', the wizard asks about the VM's virtual disk.

Select "Create a New Virtual Disk" for the next screen.


VMware configuration screenVMware configuration screen

The default 8 Gigabytes for the CentOS installation will be fine for the test.


Next the wizard asks about network adapters.

To proceed, click the "Add a  Network Adapter", as this VM will be needing a network connection.


VMware configuration screen

VMware configuration screen

For the network, the Bridged interface will be used to make the test easier.

Power on as start should be ticked.

The next wizard screen asks about CD/DVD drives to connect.

for simplicity's sake, we will connect the physical CD/DVD drive to the VM. (Make sure the ISO install CD is in the drive on the physical machine for OS installation)


VMware configuration screen

VMware configuration screen


Select the CD/DVD drive location on the CentOS bare-metal OS.

Pressing next on the wizard shows the floppy disk configuration. A floppy drive is basically useless at the moment, so it will be left out by selecting "Don't add a floppy drive".


VMware configuration screen

VMware configuration screen

For the fun of it, the USB controller will be added. But otherwise it would be normally left out unless mapping USB drives or devices.

The last screen gives a summary of the installation before completing.

When all looks correct, pressing finish creates the virtual machine.


VMware configuration screen

Now there is a new virtual machine in the VMware Server web console.

By selecting the VM name in the left panel, access to the VM's information and tools becomes available to the user.


VMware configuration screen

To start the VM, go to the console tab and click on the play icon. (Again, check the install CD is in the CD/DVD drive).

Once started, click the console screen again to launch the VM display to start the installation of the OS into the virtual machine.

The OS installation screen should appear like a normal PC stating on a boot-able CD/DVD.

Guest Operating Systems that I have Tested:

Operating SystemGuest NotesWorking
CentOS (32bit) http://www.centos.org
  • Easy to install and set-up.
Working
Gentoo (32bit) http://www.gentoo.orgWorking
Slackware (32bit) http://www.slackware.com
  • Installed straight up with no problems.
Working
Untangle (32bit) http://www.untangle.com
  • Installed all fine.
  • Bit slow on the boot.
  • Network interfaces are a bit tricky to set-up.
  • Great firewall for other VMs.
Working
Windows XP (32bit) http://www.microsoft.com
  • Installed all fine.
  • Very snappy interface with VMware tools installed in the guest operating system.
Working





Over all, the VMware Server 2 software on CentOS 5.5 is easy to install, configure and create virtual machines.

A system administrator can get it all running in under an hour without much fuss



More to come in "VWware Server 2 - Part 2 & 3" of the blog , I talk about setting up virtual appliances, mounting ISO images and clustering the VMware Server, along with a few other interesting technical tweaks.

Stay tuned...