Friday, October 29, 2010

Powering the OLPC XO-1

Another device that I thought would be worth trying out with the generator is the laptop from the One Person Per Laptop project, the XO-1.

I have been fortunate and have acquired two of these XO-1's (sparky and sparks). Both of them were pre-release versions and have been superseded in various ways, but they still attach attention when brought out on display. Kid's just love them.

Both XO's were able to be run via the inverter from their charge packs. (One of them has an issue with it's battery taking a charge, which is why it is off in the photo.)

When I get some more Anderson connectors I'll look at how they go when connected directly to the 12v-14v supply.

Tuesday, October 26, 2010

First Power Generation Application

I didn't have any luck finding my 240V inverter, but I was able to borrow one from a friend (in exchange for fitting it with an Anderson Powerpole connector.)

So, you have a peddle powered generator.. what's the first application or device that can be tested with his new power source? Being Australian and and an Amateur Radio operator, the first device had to be a radio. (For overseas readers, Australia has a proud history of peddle powered radios, which together with the Flying Doctor service, brought emergency healthcare to the centre of Australia.)

The second application was therefor a peddle powered television.

The small television did not have a rating listed on it anywhere, but after peddling for 30 minues or so, while catching up on the evening news, I would say that it is about 25 or 30W. It is uncertain what the efficiency of the inverter is at this stage.

I see this setup quickly becoming a core part of my exercise program.

Anderson Powerpole Connectors

With my increasing number of 12V appliances, thoughts quickly turned to what would be an appropriate standard power connector. In the past, these appliances have had a huge range of different sized cylindrical or barrel plugs with different polarities, typically powered by a 240V plug pack.
One DC power connector which has gained some prominence is the 'Powerpole' or 'Anderson' connectors. These connectors have been chosen as the standard DC power connector for Amateur Radio operations, particularly where emergency and disaster relief operations are in mind. (eg. by WICEN)
These connectors have a couple of unique features. The most obvious is their shape.The 'plug' and 'socket' ends are identical (and symmetric) and can be used as either end of a connection. The blade contacts themselves are self cleaning, in that the motion of connection and disconnection allows the terminals to scrape any foreign material from the electrical connection area.
For those mathematically astute people, the connectors are symmetric under a rotation group. (Look out for further discussion of this in another blog post.)
The connectors come in several different ratings, but for the most common sizes for which I'm interested (15amp, 30amp and 45amp), they share the same plug enclosure, but take different sizes/gauge of wire.
There was some research required to relate the US wire specification (maximum current and gauge) with the Australian ratings (maximum current and cable cross section.) Bunnings sells cable for outdoor lighting, which had a cross section of 3.3mm^2, which corresponds to 12 gauge wire, the size that is rated for 30amps. This cable is twin core and all black, not the pretty red and black 'zip cord' that is available from the Anderson Connector distributor, but I can't see any reason why it wouldn't work.
For more information on Anderson Connections see the Powerwerx website (a distributor).

Friday, October 22, 2010

Pedal-Power Update

A very useful site is for Bosch, which produces after market replacement parts. The PDF downloads from this page have all the technical specifications for each vehicle engine type.

The budget

Someone has asked about what the budget was... I have spent maybe $250 up to this point, but now knowing what I need it would be a little less. Some things could be purchased on e-Bay etc.

  • Bicycle trainer $115 on ebay (mine was new) (eg. Remove and throw away resistance roller.
  • Alternator $55. From City Dismantlers, Gepps Cross (Toyota Section) Connecting plug - free - worth asking for it when you get the alternator, as mine was stripped from the wiring of a wreck.
  • Old wooden shelving $??. It's what I had lying around.
  • Assorted Hardware: screws, bolts, toggle maybe $60. I used stainless steel toggle for tensioning, and Stainless U-bolts to clamp the trainer to the board. (Not the cheapest solution, but reusable parts.)
  • Aluminum L section (cut and drilled to suit) $6 Purchased from Bunnings in 1.6m lendth.
  • 12V Battery (required) $28 from Jaycar 12V 6AH Sealed Lead Acid. No reason for this specification other than this is what I had around.
  • Switches with 'missle cover' $12. Always wanted on of these I want to install add a couple more.. a second one to switch the 'load' on... alternator has some trouble starting to generate if another load is pulling from the battery, and on to isolate the battery.
  • Spade and Blade Crimp connectors $2.75 (per pack of 8) Various sizes. Still need to find proper size for battery terminal connection to alternator.
  • Cables $?? Scavenged from various bits and pieces. Plan to use regular extension cable (from Bunnings) to extend 'Ignition' and 'Load' switch so that they are accessible from the handlebars while on the bike. (I might have to rethink this as these are rated for 10A AC, and some of the applications that I am looking at use 30A rated wire.
  • Anderson Connectors $5 pair from Jaycar. I would like to replace the spade and banana plug connectors that are currently being used, with Anderson 30A connectors where ever possible. (This will be the subject of another blog post with links.)

I have also bought a couple of boxes from Jaycar to mount these swithes, as well as two LED's (and resistor) that replaces the usual 'charge lamp'.

Other considerations/thoughts/things to try..

I have tried making a radio call from the bike, powering my Handheld radio. There was sufficient noise on the supply to be heard on the output, while both receiving and (as reported) transmitting. Some work needs to be done to remove this (Large Capacitor + something else.. got some Amateur Radio friends on the case).

I have a small 240V inverter around somewhere. If I find it, I'll see if it is possible to run a small TV directly while peddling.

A summary, of sorts.

Nothing in this project has really been engineered so I would like at some stage to take a bunch of measurements and do some calculations on the systems efficency etc.

For example, I would love to get a 'current clamp' and get some measurements of the running generator under different loads.

The alternator has a build in voltage regulator, which works by modifying the current in the rotor windings. This means that the choice of peddling rate doesn't particularly matter (voltage remains the same) and the gearing is sufficient to spin up the alternator to fairly high RPM's if required (calculation required).

Thanks everyone for your interest.

Monday, October 04, 2010

Building a Pedel Powered Electric Generator

Greetings.. over the last couple of months, thoughts and materials have been gathering in order to build a pedal powered electric power supply, which could be used, amongst other things to recharge batteries and to power an amateur radio transceiver.

I am pleased to announce that the first stage of construction, getting an vehicle alternator to reliable produce power, has been achieved.

Pedel Powered Alternator - Stage 1

From pedal-power

I've put some pictures up on the web here..

Stage 1 involved getting the alternator mounted properly and the generate a stable output voltage.. which it did at 14.7V. All that it is currently doing is recharging the battery.

What has been constructed?

Step 1 - The alternator and wiring harness.

An alternator from a local used car parts dealer was purchased. I picked up a Toyota alternator for $55 at Gepps Cross wreckers. I started to build up the wiring harness.. it wasn't really possible to test anything properly as (apparently) the alternator only starts to kick in at around 800-1000 RPM. Some quick calculations indicated that that the racing bike would be able to do provide this (with a direct friction drive with the wheel) at reasonably low speed (6km/h - simulated, it's on a trainer.) It may be necessary to even further reduce the ratio by fitting a larger wheel to the alternator. This would also help with the traction if it was something like a go-cart or small sack truck wheel.

When obtaining the alternator, it is definitely worth asking for the connecting plug at the same time. Mine was stripped from a wreck at the wreckers, and supplied for no cost, which was quite handy. (I did have to go back the day after to ask about getting it though.)

From pedal-power
The alternator was connected up like this...
From pedal-power

Step 2 - Mounting.

The mounting for the alternator was the biggest concern. It needed to be sturdy enough to hold the alternators weight and allow it to be held against the bikes tire and be rigid so that there weren't issues with vibrations as the alternator and the bike wheel were spun up.

A mount made out of welded steel would have been possible, but an old pine board was also handy and fitted the bill quite well. A length was cut to go under the rear struts of the bicycle trainer, and the couple strips of wood were added for feet. The trainer was bolted down to this with a couple of 50mm stainless steel u-bolts.

A stand for the alternator was built from couple of pieces of pine board, length ways. The alternator was mounted by drilling a hole through the boards for a bolt, which allowed the alternator to pivot against the rear wheel of the bike. These boards are held in place by two full length brackets made from aluminium L sections, cut and drilled to suit.

From pedal-power

The final piece of the mounting is an eye-bolt through the other mounting hole on the alternator and a toggle connected to the base of the bicycle trainer stand (where a suitable hole had already been placed), which held the alternator against the tire.

From pedal-power

Step 3 - Assembly and Testing

Everything was assembled and a couple of trial hand cranks were done to run the alternator up. Everything ran smoothly without the alternator energised to produce power.

With the ignition switch on, but with the alternator just resting against the bike tire, the surfaces would slip as the alternator started producing power. This was solved by adjusting the tension in the toggle bolt holding the alternator against the tire.

From pedal-power

While peddling, the alternator produces 14.7-14.8V, and can be used to charge the battery that is currently attached.

What next?

The next step is to see what the system is like generating power for various loads.. and then use it to produce power for real world applications.

I plan to have it on display at the upcoming "Wireless Institute of Australia" National Field Day (aka. national publicity day)on the 23rd of October outside of the Bunnings at Parafield airport.

Update: The local "WIA National Field Day" event ended up being held in the Salisbury Town Centre and the generator was successfully demonstrated to work well.

Friday, March 12, 2010

Part 3a: xlog - Preparing to hack, the aftermath.

The previously published parts of this series can be found here:

Some build issues...

After completing a build, it would be nice if we could return the code the state we started from. This is actually more than a 'nice to have' as it is a useful indicator of completeness. For example, if a particular compiled file isn't removed in a 'make clean', then maybe the associated source code hasn't been added to the source repository. There is not necessarily any logic in this, except that something is wrong, needs to be looked at and fixed.

I think of this as being a zero'th order test for any software that I compile from source, and git makes this issue very easy to describe and characterise.

With regards to 'xlog', after a build and a 'make clean', the 'git status' command reveils the following (where I've reformatted the output just a little.)

Changed but not updated:
  deleted:    po/xlog.pot
  modified:   CVS/Entries
  modified:   data/doc/CVS/Entries
  modified:   po/CVS/Entries
  modified:   src/CVS/Entries
Untracked files:

The first issue is with po/xlog.pot, which has mysteriously disappeared. It can be restored with the following.

$ git checkout -- po/xlog.pot
I have seen glib errors when trying to run the application and haven't got to the bottom of this yet. I don't see the error occur if I make sure that the above file is present, but I haven't been able to reliably replicate to problem.

The '''CVS/Entries''' files can be committed to the git repository, but looking at the actual differences shows that this is only due to timestamp changes from upstream. It would probably be safe enough to ignore these files, and git has a file that allows these this to be set. (An exercise for the reader. Have a look at the man page for git.)

$ git diff CVS/Entries
diff --git a/CVS/Entries b/CVS/Entries
index 30be513..42e4863 100644
--- a/CVS/Entries
+++ b/CVS/Entries
@@ -36,4 +36,4 @@ D/xlog////
 /missing/1.3/Wed Jan 14 11:45:11 2009//
 /mkinstalldirs/1.3/Wed Jan 14 11:45:11 2009//
 /xlog-2.0.lsm/1.1/Tue Feb 10 09:33:11 2009//
-/aclocal.m4/1.8/Thu Mar 11 11:55:55 2010//
+/aclocal.m4/1.8/Thu Mar 11 12:54:52 2010//

Finally, other than '''AUTHORS''' and '''ChangeLog''' (which are symbolic links as specified in README.cvs) all of the other files have come into existence in the build process and should be able to be safely removed, as they didn't exist in the original source.

$ rm -rf autom4te.cache
$ rm configure
$ find . -name | xargs -n 1 rm

This leaves use with the following, which is where we want to be:

$ git status
# On branch master
# Untracked files:
#   (use "git add ..." to include in what will be committed)
# ChangeLog
nothing added to commit but untracked files present (use "git add" to track)

A git repository with the code that I will be working on in the next blog posts has been setup here:

Monday, March 08, 2010

Appendix: References (links etc.) for xlog hacking.

Useful Webpages



git - The Fast Version Control System


epkg is an encap package manager.

Software Repository

I'll be updating my code changes to xlog here.

Part 3: xlog - Preparing to hack

The previously published parts of this series can be found here:
So, we've downloaded the source code for xlog from the CVS repoistory:
  cvs -z3 co xlog
Even before configuring, the first thing I do is put the whole thing into a Git repository. The main reason for doing this upfront is that it then becomes possible to see what files are created or altered during the software building process. When we get around to making changes we can then make use of branches and commits.
  cd xlog
  git init-db
  git add .
  git commit -m 'Initial commit'
Use 'git status' to see which files are different.

Lets now build the software, as per README.cvs.

  ln -s ...
  make install
Now, 'make install' will fail unless you give yourself system (root) privileges as it will try to install the code into the system directories (eg. /usr/bin, /usr/lib etc.). For the developer, there are several methods to get around this requirement. I use a tool called 'epkg', which allows software to be installed

To update the repository from upstream:

  (commit any outstanding changes to another branch)
  git checkout master
  cvs update
These changes can then be pulled into a local working branch by using:
  git checkout (your-branch)
  git rebase master

Thursday, March 04, 2010

Part 2: Hacking on xlog

In the first part on "Hacking on xlog" I eluded to the fact that xlog was good, but that I wanted to made some changes to it. The following article discusses these changes. What changes do I want to make to xlog?
  • Be able to add additional rules for more contests - Currently xlog has some useful rules and checks (eg. duplicates) but they are either overly general (check for all the duplicates in a log file) or specific to a particular competition. It would be good able to support different contests rules by either an extension language or a plug-in or dynamic library architecture.
  • Make the User Interface (UI) layout configurable - It would be good to be able to modify the UI to suit the way that I setup and use my set radio. Gnome and Gtk+ applications can be written using libglade, where the UI is defined in an XML file along with the functions that they call. It is then possible to rearrange the interface via the XML code, without touching any of the underlying code. Currently, xlog has 'hardcoded' all of the widgets and their positions into the code of the application itself.
  • Add support for other forms of radio operation - Logging is necessary in on-air contests but there are other types of radio operation where a suitable logging application would also be very useful. Examples include: Running nets, Message Relaying and Emergency Operations.
  • Multiple Operator Support - Support for multi-user access and multiple user logs. This would be useful for multiple user stations and for collating logs for competition managers.
In order to make these changes and make any form of useful contribution, I'm going to have to download the code and spend some time poking around in it, just to understand how it works. More about this in my next post.

Tuesday, February 23, 2010

Logging Software for Amateur Radio contacts - xlog


Something that I have recently been looking into is Amateur Radio logging software available on Linux, in particular Ubuntu and Gnome. One of the things that Ham (Amateur) Radio operators like to do is make contacts with other Hams, exchange details and sometimes, even exchange physical 'QSL Cards', which are postcards giving details of the contact made (Frequency, Equipment used etc.). In general, the more and varied these contacts are the greater the enjoyment found in the hobby. In addition to the adhoc 'CQ' contacts, there are regular contests, where operators try to make contacts in a particular period of time, on particular radio bands. Logs of the contacts make are submitted to the contest manager and points are awarded based on the contest rules. Rules include such things as a point for every contact made, multipliers for contacts made in particular bands and bonus points given for particular types of contacts. The software that I have found and I am most happy with is called 'xlog', which does most of what I want. I would like to be able to get it to do more (see below) and there are a couple of things which if they were done just a little bit differently would make if even more useful and easy to customise. The software is licensed under the GPL v2, so in the words of Jeremy Clarkson - 'How hard can it be?' The plan is to put together a series of posts about my experience with working on this software. Future posts will follow something like the following outline..
  • What do I want to change?
  • Getting the source - and using git.
  • Setting up the development environment - using epkg
  • Making changes.
  • Getting these changes back into xlog.
Watch this space.