Monday, July 5, 2010

Alternative power from an Alternator - figuring out wiring

I had a minor mishap with my car, a broken tail light - some angry kid smashed a bin onto it. So I went to the wreckers and picked up a tail light. They had lots of alternators on the shelf, so I got one for the power generation gym project ( stationary excercise bikes hooked up to produce electricity, instead of consuming). A pilot has already been done in HongKong along these lines.

The trick with alternators as opposed to permanent magnet brushless motor I used in the past is that the field windings for the alternator need to be excited with a battery before it can produce enough power to be self exciting. This switchover can be done in theory using an Arduino to monitor the voltage levels, or something smarter to send the produced voltage out to the net.

Also exciting  was LAM-MPI based processing once I figured out how to give separate hostnames to machines booting from the same NFS root image. Here is a script that makes use of the /etc/hosts file in the NFS root to assign separate hostnames to slave nodes.

ipaddr=$(/sbin/ifconfig eth0|grep 192.168|sed "s/.*addr://"|sed "s/\sBcast.*//")
host_name=$(cat /etc/hosts|grep $ipaddr|sed "s/[0-9\.]* //")
sudo hostname $host_name

Here is another option for automatic hostnames. Ideally it should be run after the system completes booting or as part of the ssh profile to change the hostname, so that when LAM-MPI starts the lock-files etc do not conflict. More alternate naming the better.

PS: Here is a very useful link for newer alternators

No comments: