<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Beer, Coffee, and a little DSP</title>
	<atom:link href="http://www.rowetel.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.rowetel.com/blog</link>
	<description></description>
	<pubDate>Thu, 28 Jan 2010 22:23:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Linux.conf.au (LCA) 2010</title>
		<link>http://www.rowetel.com/blog/?p=149</link>
		<comments>http://www.rowetel.com/blog/?p=149#comments</comments>
		<pubDate>Wed, 27 Jan 2010 01:37:30 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=149</guid>
		<description><![CDATA[I have just returned from an amazing week at LCA, which was held in Wellington, New Zealand this year.  I am really, really tired.  A week at LCA make feels more like the jet lag from flying around the world a couple of times.  It is just so intellectually stimulating, both during [...]]]></description>
			<content:encoded><![CDATA[<p>I have just returned from an amazing week at LCA, which was held in Wellington, New Zealand this year.  I am really, really tired.  A week at LCA make feels more like the jet lag from flying around the world a couple of times.  It is just so intellectually stimulating, both during the conference, in the hallways and after hours.  I met people who had flown from Europe and the US just to attend LCA - it&#8217;s that good.</p>
<p>Lots of interesting ideas at LCA, I thought I&#8217;d share some of them with you:</p>
<p><strong>Electric Vehicles at LCA</strong></p>
<p>Wellington impressed me with it&#8217;s vibrant <a href="http://en.wikipedia.org/wiki/Trolleybuses_in_Wellington">trolley bus network</a>, and many taxi companies driving the Prius.</p>
<p>I obtained my Electric Vehicle fix from Bill Dube and his amazing <a href="http://killacycle.com">KillaCycle</a>, which pulls 6 second quarter mile times and accelerates at 3G - thats 100 km/hr in less than 1 second.  My wife only pulls two Gs backing out our driveway <img src='http://www.rowetel.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  (at least it feels like that).  Best of all it uses the exact same Advanced DC motor as my <a href="/ev.html">EV</a> (actually two of them)!  Bill was in New Zealand as a guest of the local drag racing community and attended some of LCA and exhibited the KillaCycle at the nearby <a href="http://www.tepapa.govt.nz/">Te Papa</a> museum.  An inspiring guy who is doing wonderful things for Electric Vehicles.  His philosophy is to promote EVs by making people want them.  He makes them want them by showing how EVs can out perform Internal Combustion (ICE) vehicles.  It&#8217;s actually really easy to make a very fast electric vehicle, and the KillaCycle costs a fraction of ICE drag bikes with equivalent performance.  This is because Electric motors are small, don&#8217;t need a gearbox, and are all torque off the line. </p>
<p>Also present was Tom Parker and his <a href="http://carrott.org">electric mini</a>, a nice AC conversion with an advanced microcontroller based Battery Management System (BMS).  Tom is firmly in the &#8220;full function microcontroller per cell&#8221; camp of BMS design, compared to the <a href="http://evworks.com.au/tech/EVPowerBMS/">simpler analog designs</a> that some people favor. This is an interesting debate.  Although I run an <a href="http://www.rowetel.com/blog/?p=141">analog BMS</a> I can see pros and cons in both approaches.  Analysing failure paths for a BMS is a interesting exercise.  Putting any software between my batteries and sudden death in a high EMI environment scares me.  A &#8220;crash&#8221; in electric vehicle software (say a speed controller) can be very literal.  So I like the idea of multiple analog and digital interlocks in failure paths.  I considered building a uC type BMS, but I wanted my EV on the road fast, rather than go through an extended development and debug cycle.</p>
<p>Tom and Phillip Court are also working on the <a href="http://www.tumanako.net/">Tumanako</a> project, which includes an open source AC speed controller for EVs, a very worthwhile project.</p>
<p><strong>Key Notes</strong></p>
<p>Both Key Notes were very good, really captured my attention and made me think. One part of <a href="http://opendotdotdot.blogspot.com/">Glyn Moody&#8217;s</a> talk suggested the idea of open notebooks - sharing science as it develops in an open fashion.  I think I have been doing just that on this blog: &#8220;open engineering&#8221; where I discuss projects I am working on as they develop.  I make a point of talking about how it feels to have a bug, talk about the wins and losses, and use a narrative rather than text book style.  </p>
<p>If you look to the right of my <a href="/blog">blog</a> home page, you will see that these posts are consistently the most popular.</p>
<p>Benjamin Mako Hill had some really interesting ideas on how locked down phones, unskippable first tracks on DVDs, and other <a href="http://www.fsf.org/bulletin/2007/fall/antifeatures/">anti-features</a> in software really mess with our life.  A nice examples is cameras that won&#8217;t boot with third party batteries.  Implementing these anti-features are actually complex programming jobs for some poor lost souls.  I mean it&#8217;s <strong>hard</strong> to lock down Vista Basic to make sure it can only run 3 applications at once.  </p>
<p>A really scary thought is that <a href="http://www.fsf.org/bulletin/2009/fall/the-computer-in-my-pocket/">3 Billion of us</a> pass our most sensitive data through devices completely controlled by companies we don&#8217;t trust at all.  These devices are called cell (or mobile) phones. Gives new and important meaning to telephony projects like the <a href="http://villagtelco.org">Village Telco</a> and <a href="http://openbts.sourceforge.net/">OpenBTS</a>.</p>
<p>Mako&#8217;s memes are strongly aligned with the <a href="http://manypossibilities.net/2009/01/why-wifi-in-africa/">Cell-networks as a Walled Garden</a> ideas of Steve Song.</p>
<p><strong>Tridge, FOSS, and Patents</strong></p>
<p>Great talk by <a href="http://en.wikipedia.org/wiki/Andrew_Tridgell">Andrew &#8216;Tridge&#8217; Tridgell</a> on Patent Defense for Free Software.  In particular how to analyse patents from an open source perspective.  The key message for me was not to be frightened off by patents.  Instead, we should apply the same serious analysis and rigor we apply to FOSS development to analyse patents so we can avoid them interfering with our FOSS projects.  He also discussed various defenses - to my surprise the &#8220;prior art&#8221; is the weakest and hardest to prove.  The best defense is to annihilate the specific claims of the patent.  This requires careful analysis, far beyond simply scanning the patent abstract.  </p>
<p>Furthermore, he suggests that the FOSS community make patent infringement claims so painful that closed companies wince at the thought of tangling with FOSS developers.  Many patent claims are very narrow in practice so this is not as hard as it sounds.  For example if a FOSS developer is hassled over a specific patent they should develop a work around and publish it.  A free alternative to the patented (and presumably licensed) technique greatly reduces the value of that patent.  I have written about the <a href="http://www.rowetel.com/blog/?p=121">need for free speech codecs</a>, an area where people constantly get spooked by patents.</p>
<p>This talk and a few questions to Tridge gave me a great plan for ensuring my <a href="/ucasterisk/codec2.html">codec2</a> project won&#8217;t hit any patent hassles.  More on this topic in this <a href="http://apcmag.com/patents-biggest-threat-to-free-software.htm">APC mag</a> story and of course check out the LCA talk videos when they are posted.</p>
<p><strong>Village Telco at LCA 2010</strong></p>
<p>I was involved in three talks at this years LCA.  The first was presented by <a href="http://jms.id.au/">Joel</a> at the business mini-conf on behalf of <a href="http://atcom.cn">Atcom</a>.  Atcom are keen on building custom hardware for open source projects.  This helps them create new business and I feel is &#8220;a good thing&#8221; for open source.   I want to encourage the idea of hardware companies working closely with open source developers.  So Joel, Edwin, and I put together a presentation on <a href="/downloads/lca_2010_hw_for_open_source_v0.2.odp">Hardware for Open Source</a>.  The presentation went well, thanks Joel.</p>
<p>I presented on <a href="http://rowetel.com/downloads/lca2010_village_telco.ppt">A Big Phoney Mesh</a> - an update on the Village Telco and Mesh Potato over the last 12 months.  To keep the talk fresh I chose to talk mostly about topics that interested me, like the <a href="http://www.villagetelco.org/2009/12/antenna-testing/">recent antenna experiments</a>.  I also made a point of finishing in just 30 out of the allocated 45 minutes, allowing plenty of time for questions.  Too many talks run over time.  You can&#8217;t inform people about your topic unless they have a chance to drive the content via questions.</p>
<p>We had an ambitious demo planned for the talk.  At the start of the talk we threw 5 Mesh Potatoes into the crowd and told the audience to set up a Village Telco for me.  Meanwhile I continued the talk.  About 10 minutes later &#8220;ring-ring&#8221; goes the phone next to me - our little Village Telco was alive!  Amazing!  To cap it off we called Elektra in Berlin - half way around the world in Berlin, who was also using a Mesh Potato.  I was impressed this all worked, the LCA Wifi is very busy with 500 people using laptops in a small area.</p>
<p>I had a lot of help from Elektra, Steve, Edwin and the Atcom guys, Joel, Paul, and Mike in setting up the conference bling and these demos - thanks everyone.</p>
<p>We also had a Village Telco booth at the open day where I must have talked to several hundred people over 4 hours.  We set up a bunch of Mesh Potatoes in other booths so we could demo the system.  I had a lot of very encouraging comments and could have sold a box of Mesh Potatoes - everyone wants them for first world applications!</p>
<p><img src="/images/lca_2010_open_day_2_sm.jpg" /></p>
<p>Several people are interested in slight variations of the Linux plus microcontroller idea that we use for the Mesh Potato.  Think of an Arduino with a Linux/Wifi back end, or a Wifi router with serious analog and digital I/O of a microcontroller for interfacing to the physical world.</p>
<p><strong>Other</strong></p>
<p>I enjoyed the annual (unofficial) LCA Hadley-David session. Hadley runs <a href="http://nicegear.co.nz/">Nicegear</a>, and distributes IP04s in New Zealand.   Like last year we hooked up for an enjoyable couple of hours chatting about a variety of topics, for example geeky cell phones (Hadley has a N900), solar power, IP04 GUIs and the laid back, hacker lifestyle we both share.</p>
<p>I attended a <a href="http://hackerspaces.org/wiki/">Hacker Space</a> BOF in a kebab shop (I survived on a diet of chicken kebabs at LCA this year).  I really like the idea of a physical space where I can go to to work and interact with other hackers.  Especially as I work at home and only interact virtually most of the time.  Especially if it eventually has machine tools.  So now I am talking to a bunch of people in Adelaide about setting one up.  Key issue is how to boot strap, physical spaces cost money.</p>
<p>It was also nice catching up with <a href="http://jasonjgw.net/">Jason White</a> who demoed the latest svox-pico TTS software.  Good open source speech synthesis software is really important for the Blind Linux community.</p>
<p><strong>Conclusions</strong></p>
<p>I think I am getting more out of LCA each year as I develop as a hacker and become more a part of the open source scene.  However fatigue is a serious problem for many of us.  Think I need to &#8220;taper&#8221; next time, no more hacking other projects right up until I get on the plane to LCA.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=149</wfw:commentRss>
		</item>
		<item>
		<title>Wifi Phone call using 17mm of PCB track</title>
		<link>http://www.rowetel.com/blog/?p=148</link>
		<comments>http://www.rowetel.com/blog/?p=148#comments</comments>
		<pubDate>Thu, 14 Jan 2010 05:32:51 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Hardware]]></category>

		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=148</guid>
		<description><![CDATA[Yesterday Joel and I performed some simple but effective tests of the Mesh Potato using etched PCB monopole antennas down at Henley Beach.  Fancy name for a quarter wave antenna, when etched on PCB at 2.4 GHz this means a 17mm by 3mm PCB track.  A part of me still can&#8217;t quite accept [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday <a href="http://jms.id.au">Joel</a> and I performed some simple but effective <a href="http://www.villagetelco.org/2010/01/potato-on-the-jetty-range-testing-pcb-antennas/">tests of the Mesh Potato using etched PCB monopole antennas</a> down at Henley Beach.  Fancy name for a quarter wave antenna, when etched on PCB at 2.4 GHz this means a 17mm by 3mm PCB track.  A part of me still can&#8217;t quite accept that phone calls are possible using a 17mm PCB track as an antenna!</p>
<p><a href="http://www.villagetelco.org/2010/01/potato-on-the-jetty-range-testing-pcb-antennas"><img src="http://www.villagetelco.org/wp-content/uploads/2010/01/mp_pcb_ant_range_jetty3.jpg" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=148</wfw:commentRss>
		</item>
		<item>
		<title>How not to connect to microstrip</title>
		<link>http://www.rowetel.com/blog/?p=147</link>
		<comments>http://www.rowetel.com/blog/?p=147#comments</comments>
		<pubDate>Wed, 13 Jan 2010 23:53:29 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=147</guid>
		<description><![CDATA[A few days ago I wanted to build some more PCB monopole antennas for testing with the Mesh Potato.  This is really easy - you just solder the SMA connectors to the PCB, and add a few bolts.  So I built 4 antennas and hooked them up to SWR bridge (described here) to [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I wanted to build some more <a href="http://www.villagetelco.org/2009/12/antenna-testing/">PCB monopole antennas</a> for testing with the Mesh Potato.  This is really easy - you just solder the SMA connectors to the PCB, and add a few bolts.  So I built 4 antennas and hooked them up to SWR bridge (described <a href="http://www.villagetelco.org/2009/12/antenna-testing/">here</a>) to make sure the impedances were OK.</p>
<p>They were all duds - high SWR and clearly not resonant at 2.4GHz.  Huh?  The first two I built last month worked fine.  An hour of head scratching and ill temper followed until I worked it out.</p>
<p><img src ="/images/mp/mp_pcb_ant_connector_bug.jpg" /></p>
<p>On the recent antennas (top) I had soldered the connector to the front of the PCB, the same side as the microstrip and antenna feed.  On the first antennas (bottom) I had (purely by chance) soldered the connector to the rear of the PCB.  These antennas worked well.</p>
<p>This is a graphic illustration in how microstrip transmission line works.  A transmission line (e.g. an Ethernet cable, television cable, phone cable) transports your signal from one end to the other more or less intact.  A regular piece of wire will distort the same signal over any significant distance, for example you can&#8217;t use regular wire to connect your TV to your TV antenna.</p>
<p>Transmission line is specially designed for the signal and impedance at the source and load of the line.  Mess with the design of the transmission line, and the impedance changes, and your signal gets messed up.  For example if you nick or bend your TV cable your picture might get fuzzy as signal is lost part way down the cable.</p>
<p><a href="http://en.wikipedia.org/wiki/Microstrip">Microstrip</a> is one way of making transmission line on Printed Circuit Board (PCB).  Our monopole PCB antenna contains a length of microstrip transmission line that feeds the signal from the connector to the antenna:</p>
<p><img src="http://www.villagetelco.org/wp-content/uploads/2009/12/pcb_monopole.png"  /</p>
<p>The actual antenna starts where the solid chunk of ground plane (blue) ends.  Both the antenna and the transmission line are the same 3mm track.  However when you put a ground plane 1.6mm below a 3mm width PCB track on FR4 PCB dielectric you happen to get a 50 ohm transmission line.  It&#8217;s just like a piece of 50 ohm coax as far as the signal is concerned.  Without the ground plane the 3mm track starts radiating (or receiving).</p>
<p>Now placing the connector on the ground plane side of the PCB means the connector doesn&#8217;t interfere with the microstrip.  Electrically the connector ground becomes part of the ground plane:</p>
<p><img src="/images/mp/microstrip_connector_correct.png"  /</p>
<p>However if the connector is placed on the microstrip side we now have a messed up stacking of conductors - we have a conductor at ground potential just above the microstrip track rather than 1.6mm away:</p>
<p><img src="/images/mp/microstrip_connector_incorrect.png"  /</p>
<p>Suddenly the transmission line is not a transmission line any more and the energy being fed into the assembly doesn&#8217;t make it to the antenna.  </p>
<p>Note in the last picture the microstrip track and connector ground are not electrically connected, as the solder mask insulates them.  However the transmission line properties of the microstrip are messed up due to the nearby ground conductor of the connector.  I also haven&#8217;t illustrated the plated thru hole for the SM connector center pin and matching PCB pad on the ground plane side.</p>
<p><strong>Links</strong></p>
<p>I finally understood transmission lines after reading the chapter from Tony Kuphaldt’s on line book on <a href="http://openbookproject.net//electricCircuits/AC/index.html">AC electric circuits</a>. This series of books is excellent and I highly recommend them.  I found the link to these books on Mark VandeWettering&#8217;s  <a href="http://brainwagon.org/2009/12/07/tank-circuits/">brainwagon blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=147</wfw:commentRss>
		</item>
		<item>
		<title>First Mesh Potato Beta Experience</title>
		<link>http://www.rowetel.com/blog/?p=145</link>
		<comments>http://www.rowetel.com/blog/?p=145#comments</comments>
		<pubDate>Wed, 13 Jan 2010 22:50:38 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=145</guid>
		<description><![CDATA[Yesterday I watched Joel set up the first beta Mesh Potato.  It&#8217;s always interesting to watch some one else work through a familiar task.  A good way to tune User Interfaces and documentation.
 
]]></description>
			<content:encoded><![CDATA[<p>Yesterday I watched <a href="http://jms.id.au/">Joel</a> set up the <a href="http://www.villagetelco.org/2010/01/first-beta-mesh-potato/">first beta Mesh Potato</a>.  It&#8217;s always interesting to watch some one else work through a familiar task.  A good way to tune User Interfaces and documentation.</p>
<p><img src="http://www.villagetelco.org/wp-content/uploads/2010/01/joels_beta_mp01.jpg" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=145</wfw:commentRss>
		</item>
		<item>
		<title>The Amazing Louis Palmer</title>
		<link>http://www.rowetel.com/blog/?p=143</link>
		<comments>http://www.rowetel.com/blog/?p=143#comments</comments>
		<pubDate>Thu, 07 Jan 2010 22:21:59 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Electric Vehicles]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=143</guid>
		<description><![CDATA[Last night I went to an excellent talk by Loius Palmer, famous for driving the Solar Taxi around the world in 2007 - 2008.  His stories of the trip were very funny and it was just amazing to see what one very motived guy can do.  He has also rode the length of [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I went to an excellent talk by <a href="http://www.louis-palmer.ch/">Loius Palmer</a>, famous for driving the <a href="http://www.louis-palmer.ch/solartaxi-eng.htm">Solar Taxi</a> around the world in 2007 - 2008.  His stories of the trip were very funny and it was just amazing to see what one very motived guy can do.  He has also rode the length of Africa by push bike, and flown across the USA at 60 km/hr in an ultralight.  An example of a life well lived.  If you get a chance to see Louis talk in person or on video I highly recommend it.</p>
<p align="center"><img src="http://www.louis-palmer.ch/300-louis.jpg" /></p>
<p>He was in Adelaide to help promote the <a href="http://www.zero-race.com/">Zero Race</a>, an 80 day race around the world in zero-emission vehicles.  In particular the talk was to help our local team entering the race - <a href="http://teamtrev.com/">Team Trev</a>.  Trev is a very novel 2 seater car that weighs only 350kg and is assembled from a novel composite material that is simply folded like cardboard.  The light weight makes it extremely energy efficient - about 1 cent/km (compared to my EV at about 3 cents/km) for electricity.</p>
<p align="center" ><img src="http://teamtrev.files.wordpress.com/2009/11/trev_wsc.jpg" /></p>
<p>Louis has a passion for Electric cars.  In particular &#8220;solar cars&#8221; - electric cars charged by PV arrays on domestic roofs.  The key take away was that solar powered EVs like <a href="/ev.html">mine</a> are totally possibly today.  You should be able to buy a small electric car with a 200km range for $10,000, then run it for free from a $5000 PV solar array. He is puzzled why <a href="http://www.rowetel.com/blog/?p=117">the big manufacturers don&#8217;t get it</a>, and expects the small innovative companies will eat their lunch.  I agree.</p>
<p>Louis had some great graphs that showed the big problems with current &#8220;green&#8221; technologies, like hybrids (glorified petrol cars, excessively complex), biofuels (not enough land in the world), and hydrogen (uses 3 times the electricity/km of battery electric cars).  All duds.</p>
<p>He sees China as the best hope in a world naively sailing towards <a href="/blog?p=37">Peak Oil</a>.  They lead the world in Solar Cell production and have over 100M electric vehicles (mainly scooters).  Australia, on the other hand, leads the world in per-person carbon emissions.  Although I am happy to say that South Australia (my state) is getting very close to 20% renewable electricity thanks to a bunch of wind farms going over the last decade.  We also have great PV feed-in tarrifs (I get paid 55 cents/kWh for electricity I export to the grid, and pay only 20 cents/kWh for import).   Australia also has a pretty good rebate scheme for home PV solar arrays, that cover perhaps $4500 of the typical installation cost.</p>
<p>Louis had some great quotes, for example &#8220;if we can afford to bail out banks and big car companies, why can&#8217;t we afford to bail out our children?&#8221;  During his Solar Taxi travels he noticed a lone solar panel on a roof in Canada.  He asked the owner, an indigenous Canadian lady, why she had such a panel.  She said, &#8220;We natives think 3 generations ahead&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=143</wfw:commentRss>
		</item>
		<item>
		<title>Baboons, Mesh networks, and Community</title>
		<link>http://www.rowetel.com/blog/?p=124</link>
		<comments>http://www.rowetel.com/blog/?p=124#comments</comments>
		<pubDate>Tue, 05 Jan 2010 00:39:03 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[The Next Wave]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=124</guid>
		<description><![CDATA[At both Village Telco Workshop I had the pleasure of meeting David Carman and Antoine van Gelder, who founded and now administer the Scarborough Wireless User Group (SWUG).  Scarborough is located almost on the southern tip of Africa, on the edge of Cape Town, South Africa.
SWUG uses a mesh network to provide Internet access [...]]]></description>
			<content:encoded><![CDATA[<p>At both <a href="http://www.villagetelco.org/2009/08/the-second-village-telco-workshop/">Village Telco Workshop</a> I had the pleasure of meeting David Carman and Antoine van Gelder, who founded and now administer the <a href="http://swug.za.net">Scarborough Wireless User Group</a> (SWUG).  Scarborough is located almost on the southern tip of Africa, on the edge of Cape Town, South Africa.</p>
<p>SWUG uses a mesh network to provide Internet access to people in Scarborough, as DSL is largely unavailable.  DSL is connected at one edge of the mesh, and is then distributed throughout Scarborough and some neighboring villages.  Users buy their own routers and local youth have been trained to flash and install the routers as mesh nodes.</p>
<p>The mesh network also provides connectivity to those who couldn&#8217;t otherwise afford it, and to kids whose parents don&#8217;t wish to pay for Internet. The result is wider access which promotes greater community participation in local applications.</p>
<p>Subscription payments are voluntary, with paying traffic prioritized over non-paying. This has worked surprisingly well to ensure that everyone gets access and we are able to afford sufficient bandwidth. The accounting system is fully automated (using bank deposit email notifications), so administration is hands-free and anonymous.   The accounting system removes what would otherwise be a serious admin burden.  It uses pmacct and changes iptables rules on the fly.</p>
<p>David has installed several communication forums (including phpbb, mediawiki, argwatch).  Mailman is most effective. Email is the preferred modality for the naive user and mailman works well for the naive moderator. However the kids on the mesh appear to be using Facebook to organise themselves!</p>
<p>SWUG has lead David and Antoine into some interesting projects.  </p>
<p>They have written a very cool application called <a href="http://swug.za.net/argwatch.php">ArgusWatch</a> to track incursions of Baboons into the community!  The Baboons have a habit of sneaking into peoples homes and making a big mess.  One thing that fascinates me is how &#8220;local&#8221; this application is.  We are used to most web apps having a global audience.  Makes me think there must be many very useful, very local applications that could be written to address local community issues.</p>
<p>David has become skilled at real world mesh network issues like Wifi propagation and is a strong contributor to the <a href="http://villagetelco.org">Village Telco</a> project.  Antoine has been very busy building <a href="http://code.google.com/p/afrimesh/">Afrimesh</a>, a GUI for the <a href="http://villagetelco.org">Village Telco</a> that is now running on the Mesh Potato.  Funny how these community projects change the direction of our lives.  I started out messing around with <a href="/blog/?p=73">Asterisk on a DSP chip in 2005</a> and some how I now build Mesh Potatoes!</p>
<p>Talking to David got me thinking about mesh networks and community.</p>
<p>Now a community used to be something local, for example I might get together with other parents from my daughters school and work together to get a school crossing installed.  Local people with a common interest working together.  A social organization with social aims, compared to say a business organisation that has business goals.</p>
<p>Then the Internet came along and widely dispersed people with common interests could be connected.    So now we have widely separated people with a common interest working together.  A good example ais the <a href="/blog/?p=73">Open Hardware</a> projects I have been working on as part of the <a href="/ucasterisk/index.html"">Free Telephony Project</a>.  Individuals from Canada, China, Bulgaria, Australia working together to develop complex telephony hardware designs.  Together we built leading edge <a href="/ucasterisk/ip04.html">IP-PBX</a> technology - as good or better than products coming from giant hardware companies.  One example is the <a href="/blog/?p=20">BlackfinOne</a> - a community built open hardware Linux board, forerunner to the <a href="/ucasterisk/ip04.html">IP04</a>:</p>
<p align=center><img src="/images/bf1/bf1_helicopter_view.jpg"></p>
<p>Mesh networks close the circle.  A mesh network depends on neighbors working together.  My Internet comes via my neighbor&#8217;s router.  There is a dependency that encourages people to work together and help each other (even if only by leaving their router on).  So just like the first example we have local people working together, but this time facilitated by Internet technology.  SWUG is a social enterprise that outperforms the incumbent Telco in delivery of broadband to the people of Scarborough.</p>
<p>In my travels to <a href="/blog/?p=91">East Timor</a> I found an interesting counter-example.  East Timor has very little local Internet infrastructure and very little local content.  Most of the Internet traffic goes straight up a satellite dish to ISPs in other countries.  I found no examples of IP traffic going from a browser to a web server in East Timor - it all left the country as a first step.  As you can image the cost of accessing information on the Internet is prohibitive ($5-10/hour where people would be lucky to earn that in a week).  I wonder what that does to a community?</p>
<p align=center><img src="/images/timor/tl_ant_tree_sm.jpg" title="Satellite Internet distributed by point-point Wifi links in Dili, East Timor"></p>
<p><strong>Thanks</strong></p>
<p>Thanks David Carman for checking this post and providing additional details of SWUG.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=124</wfw:commentRss>
		</item>
		<item>
		<title>Electric Car BMS Controller</title>
		<link>http://www.rowetel.com/blog/?p=141</link>
		<comments>http://www.rowetel.com/blog/?p=141#comments</comments>
		<pubDate>Mon, 28 Dec 2009 00:27:11 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Electric Vehicles]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=141</guid>
		<description><![CDATA[This post is about a Battery Management System (BMS) Controller that I have designed, built and tested for the Lithium batteries in my Electric Car.  I recently installed some SkyEnergy Lithium batteries in my EV.  Lithium batteries are sensitive to overcharge and undercharge so some sort of Battery Management System (BMS) is required.
A [...]]]></description>
			<content:encoded><![CDATA[<p>This post is about a Battery Management System (BMS) Controller that I have designed, built and tested for the Lithium batteries in my <a href="/ev.html">Electric Car</a>.  I recently installed some <a href="http://www.evworks.com.au/index.php?product=BAT-SE100AHA">SkyEnergy Lithium batteries</a> in my EV.  Lithium batteries are sensitive to overcharge and undercharge so some sort of Battery Management System (BMS) is required.</p>
<p>A BMS Controller (aka BMS Master Unit) disconnects the chargers when the batteries are full and warns you when they are empty.  For a bit of fun I designed most of the logic using transistors and diodes rather than using a microcontroller or regular logic chips.  It has been designed on fail-safe principles to best protect my expensive new Lithium battery pack.</p>
<p>The BMS controller works with BMS modules that sit on every cell.  I use the <a href="http://www.evworks.com.au/index.php?product=BMS-CM090-V6">CM090</a> BMS modules from <a href="http://www.evworks.com.au">EV Works</a>.  Here is a photo of 4 of the BMS modules installed on 4 cells:</p>
<p align=center><img src="/images/ev_cm090_installed_sm.jpg"></p>
<p>The BMS modules are the red PCBs with the components in translucent plastic.  Note the thin blue wire connecting each module.  This wires snakes through every one of the 36 BMS modules and forms a &#8220;dead mans switch&#8221; normally closed loop.  If any one of the modules detects an over volt (4.1V) or under volt (2.5V) condition it opens the loop.  The BMS Controller then does something sensible with this open loop information.  When charging this means stop charging.  When driving this means stop driving.  Otherwise you can kill your cells or in the worst case even start a fire.</p>
<p>Every cells is slightly different, so you need one BMS module per cell.  The BMS modules also function as series regulators.  As the cell reaches 3.6V during charging the BMS module starts bypassing some of the charge current.  This helps bring all cells to a similar state of charge.</p>
<p><strong>Re-cycling Lead Acid Chargers</strong></p>
<p>Now most people installing Lithium batteries would go out and buy a commercial <a href="http://www.evworks.com.au/index.php?product=BMS-MCU-TS90-EV2">BMS controller</a> and a suitable charger for their battery pack.  However I made a promise to my long suffering, EV supporting (and EV-driving) wife that the entire Lead-acid to Lithium conversion would cost no more than $6,500, which was about the cost of the Lithium cells and CM090 BMS modules.</p>
<p>That meant I had to re-cycle the chargers I had laying around, which amounted to a 96V (8 by 12V) AGM charger and a bunch of 12V dual-stage Jaycar M-3612 chargers.  Lead acid chargers usually charge to around 14.7V per 12V battery.  So the AGM charger that is rated at 96V actually charges to around (96/12)(14.7) = 117.6V.</p>
<p>I ordered 36 Lithium cells which have a nominal voltage of 3.2V.  After some reading and a few emails to the helpful EV-works guys I determined that the Lithium cells are just about fully charged at 3.6V.  So we need a charger (or chargers) capable of a total of 36(3.6)=129.6V.</p>
<p>This just happens to break down nicely to the AGM charger (117.6V) plus one 12V charger.  However each charger will charge at a different rate.  So this means I need two BMS Controllers, one for the 32 cells connected to the AGM charger, and one for the 4 cells connected to the 12V charger.  Each would have a separate loop of BMS cell modules to monitor.</p>
<p><strong>BMS Controller Requirements</strong></p>
<p>I came up with these requirements for the BMS Controller:</p>
<ol>
<li>During charging independent monitoring and cut off of the two BMS module loops.</li>
<li>When driving sound a buzzer if we get a low voltage situation.  This buzzer shouldn&#8217;t fire when charging.  I like the idea of an annoying buzzer.  My wife was quite good at &#8220;driving through&#8221; visual warnings of low batteries with my lead acid pack!</li>
<li>When a BMS module loop opens charger power should be cut and stay cut.  It shouldn&#8217;t start charging again if the cell voltage drops (which they do just after charging), as I don&#8217;t want the whole system cycling off and on all night.</li>
<li>It should handle up to 100 ohms of loop resistance from the series connected CM090 BMS modules.</li>
<li>It shouldn&#8217;t draw significant power from the car&#8217;s battery pack or 12V battery when not in use.</li>
</ol>
<p><strong>Analog versus Microcontroller</strong></p>
<p>Many people have developed Lithium BMS systems.  An obvious choice for each cell module is a little microcontroller that communicates with it&#8217;s peers using some sort of serial bus.  Then as well as BMS functions you could report the voltage and temperature of each cell, and do all sorts of other magic.  The EV Works guys have taken the KISS approach and used an analog design, which I guess is a bunch of voltage references and comparators plus a big transistor to dump the heat during series regulation.  They argue that in the heavy duty EMI environment of an EV it&#8217;s too easy to crash a microcontroller and screw up digital communications.  Software can also be a source of problems.  Would be a bummer to set instead of reset a bit and burn down your garage from an overcharge fire.</p>
<p>I have experienced EMI problems in my EV - my microcontroller based voltmeter/ammeter instrumentation goes nuts when I accelerate and often resets itself while I drive. </p>
<p>However there are plenty of cases where microcontrollers have worked for years in high EMI environments.  For example a petrol car&#8217;s fuel injection computer operates just fine while located a few inches away from a 10kV spark ignition system.  So I think the analog idea has some merit and is likely to have less bugs and be easier to develop, although I wouldn&#8217;t rule out microcontrollers.  Using analog instead of a microcontroller also has a kind of retro appeal.</p>
<p>So I decided to try using transistor and diode logic, and no microcontrollers.  I almost got away with it, too.</p>
<p><strong>State Machine</strong></p>
<p>I like state machines, they are a relatively error-free way of designing complex logic.  I use them widely in software and hardware projects.  This project needs a simple state machine, but the implementation (using discretes) is complex.  So before heating up the soldering iron it&#8217;s a good idea to have a very clear idea about the logic.  This approach let me break down the circuit into clear logic blocks (flip flop, inverter, diode gates), each that was implemented as a separate chunk of hardware.  Divide and conquer.</p>
<p align=center><img src="/images/ev_bms_state_machine.png"></p>
<p>When power is applied we start charging (CHARGE State), and any break in the BMS module loop causes us to switch off the charger (OFF state).  Once we have switched off we stay off, no matter what happens to the loop.  Two states can be expressed with a 1 bit flip flop, which brings us to the schematic.</p>
<p><strong>Schematic description</strong></p>
<p>Here is the BMS <a href="/downloads/bms_controller_sch.pdf">controller schematic PDF</a>.  I also have the gschem files if anyone wants them.</p>
<p>There are two BMS Controllers, one for each loop.  The BMS LOOP2 Controller at the bottom is the easiest to understand.  Q6 and Q7 form a Set-Reset flip-flop.  You pull the base of Q6 low to set the flip flop, and the base of Q7 is taken low to reset the flip flop.  When power is applied, C6 sets the flip flop, putting it in the CHARGE state. Led D12 lights when the flip-flip is set (CHARGE state).  </p>
<p>When the flip flop is set, the collector of Q7 is close to 0V.  This pulls the base of Q9 low via D18 and R22, allowing current to flow through the relay that controls the AC power for the LOOP2 charger.  </p>
<p>Note that the relay current flows through the BMS module loop.  This is an extra layer of safety - even if the flip flop gets stuck on, if <strong>any</strong> of the BMS modules open the loop then charging will stop.  The BMS modules can handle 100mA and the relays chosen use 70mA.  A fuse in the BMS cell module loop is a good idea.</p>
<p>When the BMS module SLOOP2 opens R19 pulls the base of Q8 high which causes Q8 to switch on.  The collector drops to near 0V and pulls the base of Q7 low via D13, resetting the discrete flip flop.  The system is now in the OFF state and even if SLOOP2 closes again power to the relay and hence charging will be disabled.</p>
<p>D14 and D15 in the base circuit of Q8 make sure that Q8 stays off when nominal currents are flowing from the relay circuit through RLOOP2.  For LOOP1 (32 BMS modules) RLOOP1 was measured at 20.5V, with 70mA flowing 1.4V is induced, enough to switch on Q8 if D14 and D15 weren&#8217;t present.  </p>
<p>I built the first version using a piece of PCB with squares cut using a Dremel:</p>
<p align=center><img src="/images/ev_bms_first_sm.jpg"></p>
<p>But this soon became unwieldy and I was concerned about shorts.  So I rebuilt it using veroboard which was neater and I hope more reliable in the long term:</p>
<p align=center><img src="/images/ev_bms_second_sm.jpg"></p>
<p>The left hand side controls the AGM charger, the right hand the 12V charger.  Only one side would be needed for a single charger.  The electronic parts total just a few $, the relays are probably the most expensive part.</p>
<p>This board was mounted in a plastic box with the relays, AC power sockets, terminal strips etc.  Crimped automotive lug-type connectors connect the BMS Controller with the sense loops in the car, 12V ignition power, and car ground.  These connectors can be removed in a few seconds so I can take the BMS Controller inside to mess with it.  Until recently, this happened a lot!</p>
<p><strong>Taming a too-smart AGM charger</strong></p>
<p>The BMS LOOP1 controller is a little more complex.  After trying the BMS controller I noticed the AGM charger would stop charging after about 90 minutes with a &#8220;battery error&#8221; warning.  I think this is because of the different charge characteristics of Lithium batteries compared to lead acid.  Lithium cells seem to charge very slowly between 3.3 and 3.4V until very near the end of the charge.  For example a cell might remain at 3.34V for hours while it charges.  The voltage of a lead acid pack moves more linearly as a the pack charges, unless the pack has dead cells in it.   My AGM charger is &#8220;smart&#8221; and thought it had a lead-acid pack with dud cells.  So it stopped charging and raised an alarm.  </p>
<p>The AGM charger could be reset by power cycling it, so I included a timer to do just that.  What I needed was an oscillator with an on time of 90 minutes and an off time of 30 seconds.  I looked around for an analog design but chips like the NE555 are limited to a few 10&#8217;s of minutes due to analog effects like capacitor leakage.  So I relaxed my analog-only approach and used a PIC microcontroller, here is the <a href="/downloads/chargetimer.asm">PIC source code</a>.</p>
<p>In the BMS LOOP1 circuit D9, D10 and R12 form a two-input AND gate, ensuring the AGM charger (Charger 1) is only turned on when both the PIC timer output and flip flop are set.  Diode AND gates effectively clamp the &#8220;low&#8221; voltage to 0.6V, so D8 ensures the base of Q4 is less than 0.6V keeping Q6 off.</p>
<p>BTW it is really, really important not to confuse the SLOOP1 and SLOOP2 wires when installing in the car - we don&#8217;t want the wrong charger switching off!</p>
<p><strong>Drive Mode</strong></p>
<p>The schematic discussion above deals with Charge Mode, where the idea is to stop charging when the BMS modules open the BMS loop due to one of the cells being over 4.1V.  In Drive mode, the BMS module loop opens when any cell drops beneath 2.5V.  This will probably happen during acceleration with nearly-flat cells, due to the internal resistance of the cells.  </p>
<p>In Drive Mode we don&#8217;t want the flip flop or relays to be active, we just want to sound a buzzer when  either SLOOP1 or SLOOP2 opens.  So in Drive Mode we just power the inverter circuits (Q3 and Q8).  Diodes such as D19, D22, D21, D1, D6 and D20 isolate the Drive Mode circuit from the Charge mode circuit.</p>
<p>In Charge Mode the circuit is powered from a 12V plug pack.   In Drive Mode the 12V &#8220;Ignition&#8221; rail from the car powers the circuit.  This ensures there is no drain on the cars traction or accessory battery when we are not driving.  The &#8220;Ignition&#8221; circuit is just the 12V rail of the car that becomes active when you switch the ignition key to &#8220;On&#8221;.  The term &#8220;Ignition&#8221; is a bit of a misnomer in an EV but you get the idea.</p>
<p><strong>Testing and Development</strong></p>
<p>I developed the BMS Controller circuit over a few weeks as a pleasant part time activity.  At first I didn&#8217;t pass the relay current through the loop, I had it wired in the collector lead of the flip-flop Q2.  However one day I had a near-death experience where I had somehow zapped Q3 without knowing so the flip-flop never flopped into the OFF state.  Luckily I was monitoring the batteries at the time and no damage was done.  However it convinced me to add the redundancy of passing the relay current through the BMS module loop.</p>
<p>Initially I had the AGM charger connected to 32 cells and one 12V charger connected to 4 cells.  However I noticed that the AGM charger took much longer to finish the charge.  The reason was the current from the AGM charger was only 7A, compared to about 12A from the 12V chargers.  With 32 cells the AGM charger was seeing about 32(3.3) = 105.6V so it was &#8220;tapering&#8221; the charge current to the lead acid cells it thought it was charging.  So I tried connecting the AGM charger to 28 cells and added another 12V charger.  This brought the AGM charger current up to about 10.5A - much better.  The 2nd 12V charger was added to the LOOP2 circuit, as I reasoned that identical 12V chargers charge at about the same rate.</p>
<p>The only problem with running the AGM charger on just 28 cells is that it doesn&#8217;t taper the current towards the end of the charge.  The series regulators in the BMS modules have only limited bypass capability (700mA) so for effective equalisation we would like a final charge current of just a few A.  I&#8217;ll need to watch that over time, to see if the cells drift apart in state-of-charge.  A proper Lithium charger would be adjusted to taper the current off the whole pack to a point where the BMS modules could effectively equalise on every charge.</p>
<p>Here are the chargers mounted in the back of the EV.  Just two were mounted when this photo was taken:</p>
<p align=center><img src="/images/ev_lithium_rear_sm.jpg"></p>
<p>And a close up looking down on the (three) chargers:</p>
<p align=center><img src="/images/ev_bms_three_chargers_sm.jpg"></p>
<p><strong>Jaycar MB-3612 Charger and Lithiums</strong></p>
<p>The low cost 12V lead-acid chargers I have used are really well suited to blocks of 4 Lithium cells.  Curiously, these chargers work better for Lithium cells than for the lead acid batteries that they are designed for (see <a href="/blog/?p=134">EV Bugs</a> post)!</p>
<p>These chargers have a simple two-stage tapered current design.  When the voltage they see is close to 12V, they charge at about 12A.  As the lead acid battery charges and the terminal voltage rises this drops linearly to a few A as the battery reaches 14.7V, which results in rather slow charging and no equalisation for lead-acid batteries.</p>
<p>However this profile just happens to be very good for Lithiums.  My Lithuim cells stick to around 3.2-3.3V for most of the charge (hours), then they quickly shoot up to 3.6V (plus) in the last 20 minutes.  However as the voltage rises, the MB3612 tapers it&#8217;s current off.  This allows the BMS module series regulators to shunt current around cells that are a little ahead of the curve.  The result is the over voltage cut out never fires for the 12V chargers, and the cells are always nicely equalised.  I guess the small number of cells under each charger (just 4 per charger) also helps.</p>
<p>In practice the LOOP2 controller never switches to the OFF state, as the 12V chargers stop charging before any one Lithium cell reaches 4.1V.  The LOOP1 AGM BMS controller always switches to the OFF state, as one of the 28 cells charges a little earlier than the others.  The lack of tapering of the charge current means full charge current is applied right to the end, when the 28 cells are at about 101V.</p>
<p>Note: my MB-3612 12V chargers have been modified to allow series-string connection (removed ground wire from negative lead, making the output fully floating), and tweaked to charge to 14.7V instead of the rather low 14.1V they were initially set to (trim-pot in middle of PCB).  </p>
<p><strong>Next Steps</strong></p>
<p>The BMS controller has been working nicely since I put the Lithium-powered EV on the road 2 weeks ago.  Next I would like to design a PIC or Atmel based voltmeter/ammeter/Ah meter.  As you can see I enjoy messing with electronics and the EV, so I am just looking for an excuse to build some of my own instrumentation.  </p>
<p>An Amp-Hour counter would be really useful for Lithiums as they are not afflicted by the <a href="http://en.wikipedia.org/wiki/Peukert's_law">Puerkert effect</a> like lead acid batteries.  This would make a AH counter a really useful indicator of &#8220;fuel&#8221; remaining.</p>
<p><strong>Thanks</strong></p>
<p>Thanks <a href="http://blog.mithis.net/">Mithro</a> for lending me his PIC programmer and PIC collection when he migrated to Sydney - has been very useful for this and a few other PIC projects.</p>
<p><strong>Links</strong></p>
<p><a href="/blog/?p=142">Lithium Batteries for my EV</a> - converting my EV from lead acid to Lithium<br />
<a href="/ev.html">David&#8217;s EV Page</a><br />
<a href="/blog/?p=134">EV Bugs Post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=141</wfw:commentRss>
		</item>
		<item>
		<title>Lithium Batteries for my EV</title>
		<link>http://www.rowetel.com/blog/?p=142</link>
		<comments>http://www.rowetel.com/blog/?p=142#comments</comments>
		<pubDate>Mon, 28 Dec 2009 00:26:51 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Electric Vehicles]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=142</guid>
		<description><![CDATA[Over the last month I have been installing a pack of SkyEnergy Lithium cells in my EV.  I like working on my EV.  Gets my out of the office and I enjoy the mechanical side, especially welding.  A pleasant way to spend a few hours a day.  
There has been a [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last month I have been installing a pack of <a href="http://www.evworks.com.au/index.php?product=BAT-SE100AHA">SkyEnergy Lithium</a> cells in my <a href="/ev.html">EV</a>.  I like working on my EV.  Gets my out of the office and I enjoy the mechanical side, especially welding.  A pleasant way to spend a few hours a day.  </p>
<p>There has been a cool side effect from working on my Electric Car.  Since I <a href="/blog/?p=39">started this EV project</a> 2 years ago there has been a steady improvement in my mechanical skills.  I feel capable of handling other mechanical jobs that previously would have intimidated me.  When I hit a tough problem I say, &#8220;Well, if I can build an Electric Car, then how hard can this be&#8230;&#8230;..&#8221;.  </p>
<p>In this post I will talk about my Lithium battery rack construction, as this might be useful to other people contemplating their own conversion.  I certainly found the battery racks a major challenge when I started my EV project, but of course it depends on your skill level.</p>
<p>The main reason for the Lithium conversion is the long life cycle of Lithium cells (3000 cycles plus, or perhaps 10 years).  We have done about 10,000 km on lead-acid batteries, and they were a fine way to get started with EVs.  However with the natural drop in new technology prices and the high Australian dollar Lithium packs have dropped in cost by 50% over the last two years.  So it was time for us to take the plunge.</p>
<p>Out with the old:</p>
<p align=center><img src="/images/ev_front_lead_acid_sm.jpg"></p>
<p>In with the new:</p>
<p align=center><img src="/images/ev_front_lithium_sm.jpg"></p>
<p><strong>Lie, Damn Lies, and the Range of EVs</strong></p>
<p>I had a firm budget from my wife for the Lithium conversion that I was determined to stick to.  So I decided to buy 36 100Ah cells.  These have a nominal voltage of 3.2V so this gives us a capacity of 36(3.2)(100) = 11.5kWh.  Cruising at 60 km/hr my EV uses about 5kW so this suggests a range of (11.5/5)(60) = 138 km.  Hmmmm.  One thing I have learned about EVs is that there are lies, damn lies, and EV ranges.  </p>
<p>In the real world many factors reduce the practical range on an EV:</p>
<ol>
<li>In real world driving we need to stop and start a lot.  Acceleration uses a lot more energy than cruising, for example normal acceleration to 60 km/hr requires 15kW in my car.  Higher currents have higher resistive losses.  I do recover some of this energy back, for example when I see a red light I coast the last couple of hundred meters, using 0 energy (try that in your carbon-burner that must idle all the time).</li>
<li>Each of the cells in a battery pack are slightly different.  Somewhere in there is the &#8220;weakest cell&#8221;.  When any one cell in the pack is discharged you must stop driving.  Passing current through a discharged cell will kill it.  As all of cells are wired in series when this weakest cell is discharged thats the end of your driving.  It doesn&#8217;t matter if 35/36 cells have 10% left - the weakest cell defines the range.</li>
<li>People often ask me &#8220;what is the range of your EV&#8221;?  I say &#8220;I don&#8217;t know - and I don&#8217;t want to find out!&#8221;.  Just like a petrol car it is bad news to empty the petrol tank completely.  So we avoid fully discharging the pack, just like you avoid emptying your petrol tank.</li>
<li>Range depends a lot on how you have been driving.  For example lots of hard acceleration will drain your pack quickly.  Power requirements increase sharply with speed.  At 30 km/hr I use just 18A, and 60 km/hr 45A, at 80 km/hr 75A.  This is probably due to drag increasing, it takes a lot more energy to push through the air at high speeds.</li>
<li>Fully discharging your battery pack is bad on the lifespan.  For example the Lithium cells that I am using have a 2000 cycle life at 80% Discharge, or 3000 cycles at 70%. </li>
</ol>
<p>From driving my EV for a year I have an experimental figure of about 120Wh/km, about 50% higher than the 5 kW @ 60 km/hr cruise figure (5000/60 = 83 Wh/km).  This figured was worked out from the range of my lead acid packs.  So with a 11.5 kWh pack this gives an estimated range of 11.5/(0.12) = 95.8 km.  Lets de-rate to 70% to be kind to the battery pack and allow for variation in traffic conditions and the &#8220;weak cell&#8221; lurking somewhere in my pack.  So we arrive at a range of (0.7)(95.8) = 67 km. </p>
<p><strong>Lithium versus Lead Acid Battery Racks</strong></p>
<p>I decided to build a new battery rack for the rear of the car, and to modify the front rack as it also supports other items (such as the speed controller) and is more complicated and harder to rebuild.</p>
<p>There are a couple of cool things about Lithium compared to lead acid:</p>
<ol>
<li>Having a large number of smaller batteries makes it easier to fit into odd shaped compartments, such as those found in cars.  Each of my Lithium cells is the size of a large paperback novel, 4 of them took up the same space as a 12V lead acid cell.  I used this convenient fact to fit blocks of 4 cells in the front rack positions where lead acid batteries used to sit.</li>
<li>Lithium packs take up less volume overall that lead acid, their volume/energy density is higher than lead acid.  Put another way - I get my boot (trunk) back! The rear Lithium pack ended up fitting in the spare wheel bay at the bottom of my boot.</li>
<li>Weight is the biggie.  My previous lead acid packs weighed in at a hefty 280kg, the Lithium pack around 112kg.  This means I can now seat 4 people rather than 2, and stay beneath the legal GVM of my car.  I <a href="http://spreadsheets.google.com/pub?key=pPVkMR_Pu2WR_XrIpvBBncQ&#038;gid=4">estimate the curb weight</a> as around 900kg, just 40kg over the weight in Internal Combustion Engine (ICE) configuration.</li>
<li>Lighter weight has a knock on effect on battery rack construction.  The rear rack only needs to restrain 70kg of batteries instead on 180kg, each of the blocks of 4 batteries in the front weigh just 13kg rather than 32kg - lighter than a regular car battery!  So lighter battery racks can be built saving more weight and safely securing the racks is easier.</li>
</ol>
<p><strong>Building the Lithium Battery Racks</strong></p>
<p>By trial fitting Lithium cells in various parts of my car I worked out a rough idea of where they would all go.  I ended up putting 21 in the back, and 15 in the front.  My welding skills dictated that the design would be welded up out of 20 x 20 mm right angle mild steel.  I started with a simple base that held the bottom of 3 rows of 7 cells:</p>
<p align=center><img src="/images/ev_lithium_rear_1_sm.jpg"></p>
<p>The curvature in the photo is due to my camera.  The right angle pieces were all 500mm.   Compared to lead acid Lithium cells are harder secure.  Instead of 8-10 batteries I now have 36 that must be kept from rattling around.  The sides of Lithium cells should also be restrained otherwise they can bulge during heavy charge or discharge.  I used plywood panels at either end of each row of batteries to restrain the ends.</p>
<p>To cut the metal to length I use an angle grinder with a thin cutting disk.  Wear safety glasses and ear protection.  My arc welder is just a low cost $200 model.  Tip: don&#8217;t arc weld in shorts.  I speak from experience.</p>
<p>I welded up a top section with right angle around the outside and 20mm flat across the top.  </p>
<p align=center><img src="/images/ev_lithium_rear_2_sm.jpg"></p>
<p>The whole thing gets clamped together using threaded rod at each corner:</p>
<p align=center><img src="/images/ev_lithium_rear_3_sm.jpg"></p>
<p>OK so now I hit my first problem.  Lithium batteries have <strong>a lot more</strong> exposed terminals than lead acid packs.  The top section of my rack was just a few mm away from shorting out dozens of connections.  What to do?  I ended up raising the top section 20mm using wooden battens as spacers.  You can see the wooden spacers in the photo below of a trial fit in the back of the car: </p>
<p align=center><img src="/images/ev_lithium_rear_4_sm.jpg"></p>
<p>The wooden spacers raise the metal top section above the plane of the terminals.  I painted the rack using grey pressure pack primer and black gloss paint, $3 a can from the auto shop.  Quick and easy, and looks nice.  </p>
<p>The rear rack is bolted to the car via 8 bolts through the thin sheet-metal of the spare wheel bay.  On the underside of the car the bolts run through lengths of 20mm flat to spread the strain around the thin sheet metal:</p>
<p align=center><img src="/images/ev_lithium_spreader_sm.jpg"></p>
<p>The previous lead acid rack (supporting 200kg) was bolted through the chassis rails but with the low mounting location and light weight of the Lithium rack I feel comfortable with a lighter mounting method.</p>
<p>The guidelines we have for battery racks in Australia are hard to interpret and impossible to test.  I spent a lot of time and energy worrying about battery racks on my first two EVs conversions.  My conclusion is that ultimately it&#8217;s up to the subjective opinion of the inspector on the day you get the car checked out.  As described in my <a href="/blog/?p=134">EV bugs</a> post I found the whole inspection experience  <a href="http://en.wikipedia.org/wiki/Kafkaesque">Kafkaesque</a>, but some people breeze through it.</p>
<p>In the absence of useful specifications I design battery racks by comparing the weight to people.  My back rack weighs 70kg, which is about the mass of one person.  A person is secured to the car at three points using a woven seat belt and 12mm bolts fitted to reinforced points on the pressed sheet-metal chassis.  So I ask myself, &#8220;would this rack design hold a person in the case of an accident or roll over?&#8221;.  (In the case of the lead acid racks it was three people.)</p>
<p>I am less concerned about the batteries in the front as I figure in an accident where are they going to go?  At worst they might bounce around the engine bay, but will be unlikely to penetrate the firewall into the passenger cabin.  My ICE car battery is secured by a plastic molding (!), and my Lithium cells weigh much less.  I test them by shaking each rack as hard as I can and making the car bounce around.</p>
<p>The rear rack sits nice and low in the spare wheel bay, with the carpet replaced I have nearly a full boot for shopping.  I don&#8217;t carry a spare tyre, as I reason the EV is always no more than 20km from home and a rescue mission can be mounted by our other car.</p>
<p align=center><img src="/images/ev_lithium_rear_sm.jpg"></p>
<p><strong>Front Racks</strong></p>
<p>I used similar construction for the front rack (photo at the top of this post).  I welded in extra rails to the existing racks so I could slide in linear blocks of Lithium cells.  The top sections were the same as the rear rack, and the same wooden spacers were used.  There is room for a few more cells should I want to upgrade.</p>
<p>If this was a new conversion I would have placed all of the front Lithium cells in one block, as interconnecting them with cables and threaded rod terminal posts is a pain compared to using the strap type interconnects.</p>
<p><strong>First Impressions</strong></p>
<p>After a few weeks of messing about in the shed I backed my Lithium-powered EV out for the first time.  My first impression was that I felt like I was in a 4WD!  Removing a few 100 kg of lead made it sit up about 50mm higher than before.  But it felt like 2 feet at the time!</p>
<p>There was no big difference in acceleration, in fact the car is not as zippy as with the lead acid pack.  This is surprising given the lighter weight and my previous lead acid pack was just 96V, compared to the Lithium pack which cruises at around 115-118V.  Guess there is nothing like the low internal resistance of a fully charged lead acid pack.  However if I put my foot down I can still get 400A out of the Lithiums off the line (around 45kW at 0 rpm) which would give many cars a good run for their money.</p>
<p>The current is nice and low, about 45A at 60 km/hr which is great.  The car does feel lighter around corners and over bumps, but it&#8217;s not a huge difference.  I have done one run of 50km on one charge (in light traffic) so far, but most of our driving is 15km round trips, and we tend to charge between trips.  After 50km the voltmeter read 115V, or 3.2 V/cell.  Unlike lead acid batteries, this doesn&#8217;t tell me much about the state of charge.  Lithiums seem to sit at 3.2V all day long then fall over in a big hurry.  I really need an amp-hour meter to know where I am at.</p>
<p><strong>Charging</strong></p>
<p>I have designed a <a href="/blog/?p=141">BMS Controller</a> for the Lithium pack that let me recycle my old lead acid chargers.  </p>
<p>I measured the power to charge the EV after a couple of test drives and arrived at a figure of 170 Wh/km (measured at the wall).  This seems high compared to the 120 Wh/km figure I used above but may be due to charge efficiency of the batteries and chargers.  An amp-hour meter on the car would help reconcile these numbers.</p>
<p><strong>EV Running Costs</strong></p>
<p>At 18 cents/kWh a km costs us (0.17)(18) = 3.1 cents in &#8220;fuel&#8221;.  If I used off peak electricity at 9 cents/kWh at km would cost 1.5 cents/km.  We average 30 km/day or 5.1 kWh.  This amount of electricity could be generated for free by a 1kW solar PV panel apart from the capital cost (around AUD$5,000 at the moment, and dropping).</p>
<p>A petrol version of this car that gets 14 km/litre would cost (130 cents/litre)/14 = 9.3 cents a km, plus much higher maintenance costs.  There is no servicing in an electric vehicle, brakes and tyres are the only wearing parts.  You do need to replace the batteries every 10 years but I imagine that will cost about $3,000 in 10 years time and far far less than accumulated ICE servicing and repair costs over the same period.</p>
<p>However I don&#8217;t like arguing for Electric Vehicles on the basis of cost.  It&#8217;s funny how many conversations I have seem to focus around running costs.  As if that&#8217;s all that matters.  The main reason I like EVs is that they don&#8217;t use fossil fuels.  Rather than burning irreplaceable fossil fuels just so I can rent a DVD I make the fuel right here on my roof.</p>
<p><strong>Other Lithium Rack Ideas</strong></p>
<p>Thanks to <a href="http://www.evalbum.com/2468">Peter Campbell</a> for sharing the details of the battery racks in his Lithium powered Charade (same model as my car).  As described in these <a href="http://www.aeva.asn.au/forums/forum_posts.asp?TID=1084&#038;PID=18732#18732">AEVA Forum</a> posts he used slotted steel which could be bolted together first for trial fitting, then welded.</p>
<p>Here are a few photos of Peter&#8217;s rear battery racks, thanks Peter!</p>
<p align=center><img src="/images/ev_lithium_peter_1_sm.jpg"></p>
<p align=center><img src="/images/ev_lithium_peter_2_sm.jpg"></p>
<p align=center><img src="/images/ev_lithium_peter_3_sm.jpg"></p>
<p>I hope this post is useful to anyone thinking about an EV conversion.  It&#8217;s the sort of information I would have found very useful when starting my conversion!</p>
<p><strong>Links</strong></p>
<p>David&#8217;s <a href="/ev.html">EV page</a>.<br />
Weight Distribution with <a href="http://spreadsheets.google.com/pub?key=pPVkMR_Pu2WR_XrIpvBBncQ&#038;gid=3">Lead Acid</a> and <a href="http://spreadsheets.google.com/pub?key=pPVkMR_Pu2WR_XrIpvBBncQ&#038;gid=4">Lithium</a> Batteries.<br />
A <a href="/blog/?p=141">BMS Controller</a> I had fun designing for the Lithium pack</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=142</wfw:commentRss>
		</item>
		<item>
		<title>Mesh Potato Antenna Testing</title>
		<link>http://www.rowetel.com/blog/?p=140</link>
		<comments>http://www.rowetel.com/blog/?p=140#comments</comments>
		<pubDate>Tue, 22 Dec 2009 20:29:21 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=140</guid>
		<description><![CDATA[I have just completed a long blog post on some tests Jeff and I did yesterday on Wifi antennas for the Mesh Potato.  We tested a bunch of wire and PCB antennas.  Next step is to discuss the results with the community and come up with a consensus for the production Mesh Potato [...]]]></description>
			<content:encoded><![CDATA[<p>I have just completed a long blog post on some tests Jeff and I did yesterday on <a href="http://www.villagetelco.org/2009/12/antenna-testing/">Wifi antennas for the Mesh Potato</a>.  We tested a bunch of wire and PCB antennas.  Next step is to discuss the results with the community and come up with a consensus for the production Mesh Potato antenna.</p>
<p align=center><img src="/images/mp/tripod_450.jpg"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=140</wfw:commentRss>
		</item>
		<item>
		<title>Transmitting Continuous Wifi Signals</title>
		<link>http://www.rowetel.com/blog/?p=139</link>
		<comments>http://www.rowetel.com/blog/?p=139#comments</comments>
		<pubDate>Fri, 11 Dec 2009 08:46:57 +0000</pubDate>
		<dc:creator>david</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rowetel.com/blog/?p=139</guid>
		<description><![CDATA[To measure the Mesh Potato transmit power under Linux I needed to generate some continuous Wifi signals at a fixed bit rate.  This is not as easy as it sounds so I&#8217;m writing a short post as an addendum to the Measuring Wifi Transmit Power post as it might be useful for some one [...]]]></description>
			<content:encoded><![CDATA[<p>To measure the Mesh Potato transmit power under Linux I needed to generate some continuous Wifi signals at a fixed bit rate.  This is not as easy as it sounds so I&#8217;m writing a short post as an addendum to the <a href="/blog/?p=136">Measuring Wifi Transmit Power</a> post as it might be useful for some one else.</p>
<p>Wifi transmit signals are pulsed with a low duty cycle.  For example a short packet like a beacon might only transmit for a few 100uS every second.  This makes life difficult for low cost test equipment like my Tek 492 analog spectrum analyser or <a href="http://pe2er.nl/wifiswr/index.htm">Wifi antenna test kit</a> that like continuous signals.</p>
<p>All I wanted was a (nearly) continuous signal at a fixed rate and power level so I could check the power level on the spec-an.</p>
<p>However Wifi signals are usually transmitted as part of an exchange with other Wifi devices and the 802.11bg protocols themselves require an exchange of ACKs and occasional beacons that may be transmitted at different rates.  On top of that there are automated algorithms that shift the channel bit rate based on packet loss statistics.</p>
<p><strong>Set up</strong></p>
<ol>
<li>Boot Mesh Potato, connect via Ethernet and kill batmand to prevent any spurious 1 Mbit HNA packets while we are measuring at other rates.  We are using ad-hoc mode, AP mode may need some other foo to stop transmitting any automated packet transmission.</li>
<li>Set spec-an for pulsed Wifi measurements (pulse stretcher on my spec-an).  I used 1MHz resolution BW, narrow Video BW, min-noise and max-hold functions but this will be spec-an specific.</li>
</ol>
<p><strong>Generating Continuous Wifi Signals</strong></p>
<p>Couple of ways to do it:</p>
<ol>
<li>ping broadcasts:<br />
<code><br />
# iwpriv&nbsp;&nbsp;ath0 mcast_rate 54000<br />
# ./ping 10.130.1.255 -fqb -s 1400<br />
</code></p>
<p>Note: Use a long packet (-s 1400) to get a decent packet length and hence transmission time.</li>
<li>regular pings:<br />
<code><br />
# iwconfig ath0 rate 54M<br />
# iwconfig ath0 txpower 19<br />
# ping 10.130.1.1 -fq -s 1400<br />
</code></p>
<p>Note: we can use regular iwconfig interface, this is also builds up a signal much faster than (1), seems to be a higher packet rate.</li>
<li>netcat:<br />
<code><br />
# iwconfig ath0 rate 54M<br />
# iwconfig ath0 txpower 19<br />
# cat /dev/zero | ./netcat -u 10.130.1.1 7777<br />
</code></p>
<p>Note: this is much faster again than (2), max-hold function on spec-an not really needed.  Must be sending much more data (higher packet rate) than ping.</li>
</ol>
<p><strong>Notes</strong></p>
<ol>
<li>I installed the full versions of ping and netcat, the busybox ping didn&#8217;t do ping floods (-f).</li>
<li>To get accurate power results I needed to enable the &#8220;pulse stretcher&#8221; function on my spec-an to cope with the non-continuous Wifi energy. Especially at the higher rates this had a big effect on measured power (4dB at 54M, 0dB at 1M).  More modern FFT based spec-ans are better at pulsed signals.</li>
<li>The Tx-power level on iwconfig is not accurate for all rates (e.g. it reports/allows 19dBm at 54M when it&#8217;s really 14dBm).  It&#8217;s closer at rates beneath 36Mbit/s which have 19-20dBm target calibration power levels.  The calibration procedure has different target power levels for each bit rate which aren&#8217;t reflected in the iwconfig information.</li>
<p>With these spec-an settings and command lines I managed to get measured power outputs under Linux consistent with the calibration test reports of the Mesh Potato.  At the lower bit rates the waveform was almost continuous so the max-hold and pulse-stretcher weren&#8217;t really required.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rowetel.com/blog/?feed=rss2&amp;p=139</wfw:commentRss>
		</item>
	</channel>
</rss>
