Kill-a-Watt Meter and Computer Power Usage

July 29th, 2010 by admin

I posted this information earlier in the year on the now defunct Google Buzz, but recently revisited it.

I bought a Kill-a-Watt P4400 power meter to check computer power usage.  You plug appliances into the meter and then plug the meter into the wall. The meter has an LCD display of various statistics. The results:

Computer Power when On (Watts) Power when Off (Watts) Monthly Cost Yearly Cost
Generic Athlon 1.6ghz Desktop 100 5 $8.74 $114
Dell PowerEdge SC1435 2x CPU Dual Core 160 13 $14 $182
SunFire X2100 1x CPU Dual Core 120 8 $10.50 $136
Sun V2 2x CPU Single Core Opteron 155 13 $14 $182
Shuttle 2ghz Athlon 65 5 $5.30 $74

While the cost difference isn’t huge, the lesson here is to size your always on machine for the tasks it needs to do. Additionally, since I bought the Shuttle case used, the cost difference versus the generic desktop case was only about $50, which is easily made up by the energy bill savings. Additionally, the Shuttle case is quieter and takes up less space.
The biggest lesson? Don’t leave 5 computers plugged in all the time even if they’re all off 99% of the time (like leaving a 75W light bulb on permanently!). I remember when I moved in to my current house, there were no fancy electronics plugged in at all; just a few chargers on a power strip which I turned off religiously. The electricity bill was usually less than $15/month. Now, there’s two occupants and I do not turn power strips off and the bill is rarely less than $100.

Energy cost source: http://www.electricity-usage.com/Electricity-Usage-Calculator.aspx

Bookmark and Share

Android Bluetooth

July 28th, 2010 by admin

Once the Arduino board had a Bluetooth module attached, it was time to make it talk to another device.  We chose our Nexus Ones– Android 2.2 powered smart phones.  Briefly, prior to Android 2.0, Bluetooth support in the Android OS was really awful and generally not worth bothering with.  Even today, it’s still kind of weird.  Now with 2.2, it seems stable, but there are many programming pitfalls.

Although there are sample applications online to implement Bluetooth, it wasn’t easy and took several days of persistence to get it working reliably.  It’s quite easy to cause the application to lock up or crash.  You’re going to need multiple threads, so you’d better get used to that.  The Bluetooth read() function is blocking, so if you were to try and read using the same thread as your UI, the UI would appear unresponsive.  We wrote the application so that the main thread creates the UI.  This thread then spawns a communication thread which runs independently.

Managing the communications thread can be tricky.  After all sorts of experimentation, we realized that all we really needed were to handle the onResume and onPause events.  onResume fires whenever the phone wakes up (plus a big gotcha: also when the display changes orientation– though luckily you can turn this nuisance off in the manifest.xml).  onPause fires when it goes to sleep.

We set up the application so that onResume it creates the communication thread.  onPause, it stops it (both to conserve battery and because Android might shut the Bluetooth radio off on its own).

The communication thread searches all paired devices for the device with the name of our bluetooth module.  It gets its MAC address and then connects to it.  It then goes into a loop that reads data and uses inter thread to communication to send a string back to the UI thread.

The UI thread has a handler for accepting messages.  It parses the string it receives and updates the UI.

The communication thread also has a send() function which the buttons in the UI are programmed to use.

The last gotcha was that pairing & connection in Android can be weird.  Originally, we’d hard coded a MAC address into the program, and when the comm thread attempted to connect, the pair password box would sometimes appear, other times it would pop up under our application.  The only way to tell it was there was to look in the notification tray.  This wasted hours and hours of our time until we figured out the solution:  if the device isn’t paired correct already, forward the user to the built in Android OS Bluetooth settings screen with a pop up warning message to go pair from that screen.  When they’re done and they hit the back button, the application searches the list of paired devices again; if it finds it, it continues onwards.

Bookmark and Share

Arduino Bluetooth

May 10th, 2010 by admin
This past Friday, Ben hosted our third “Hackathon” event where we get together and write Android applications.  In this case, however, we also had some Arduino code to write since the application we were creating did two way communications between an Android phone and Arduino with BLUESMIRF bluetooth module.
Tips:
  1. Make sure to reverse the TX and RX pin connections when connecting the Arduino to the BLUESMIRF module
  2. Watch out for sample Arduino Mega code online– the plain Jane ATMEGA128 or 328 based boards only have one serial port (Serial), whereas the Mega boards have multiple ports (Serial1,Serial2).
Here is a collection of handy links:
  • Arduino Bluetooth Tutorial:

    http://www.arduino.cc/playground/Learning/Tutorial01

  • Interrupts:

    http://www.arduino.cc/en/Reference/AttachInterrupt

  • Arduino Serial available():

    http://arduino.cc/en/Serial/Available

  • Serial read():

    http://arduino.cc/en/Serial/Read

  • Serial println():

    http://arduino.cc/en/Serial/Println

Bookmark and Share

High Level Home Automation Standards

May 3rd, 2010 by admin

For some time now, I’ve contemplated the possibilities of smarter home automation.  There’s a lot of focus on low level protocols for home automation– X10, ZigBee, etc.  These are often called “high level” protocols, which they sort of are from the point of view of, say, an electrical engineer.  But they’re not high level for a software architect point of view.

What I’m thinking about is something like DeviceNet for the PLCs used in manufacturing equipment, or  SNMP for networking equipment, or JMX for application servers.  These standards focus on exposing to management software various variables that are readable or configurable on each device.  With SNMP, applications can post statistics to the SNMP daemon running on a network router and then an administrator can monitor the device and adjust settings– all remotely from a unified console that monitors the whole network.

What seems to be happening so far is everyone has their own interface for each device.  I can see my PG&E smart meter settings if I log into the PG&E website.  I can see the settings for my Linksys router, if I go into that interface.  I can see how much power my server is using by walking over to the Kill-a-watt meter on the power strip and reading the display.  That’s fine for 3 devices, but as the number of smart devices grows, it’s not going to cut it.

Have I missed something?  Or is it time to brain storm ideas for the home automation projects I have in my head?

Bookmark and Share

Maker Faire 2010

April 29th, 2010 by admin

I’ll be at the Maker Faire Bay Area 2010.  More details available here.

Bookmark and Share

Converting a Children’s Bike to a Folder

June 21st, 2009 by admin

After looking at some tiny folding bikes like the Strida, I decided to spend an afternoon creating my own tiny folding bike. I had a 16″ wheeled kids bike from a garage sale. I figured all it needed was a heavy duty door hinge in the middle to fold in half and some seat and steering extentions.


The bike is a bit “springy” thanks to its old school thin walled steel construction


The biggest door hinge I could find

I have to give myself credit for the quality of work I did. I prepped all joints very well and the welding was of high quality. If only I had done some measurements before I got the tools out…

I welded a pipe on to the original seat tube to extend it. I ground the weld down, sanded it, and painted it all black. I also created a cool extention for the steering. I took the original handle bar clamp, which was designed to clamp a horizontal tube, cut it off, and welded it back on turned 90 degrees to clamp a vertical tube. I then welded another clamp in the usual orientation to a piece of pipe which I then stuck into vertical clamp. I placed the original handlebars into this extended tube.

The hinge was a bastard to weld on, and I create a strange jig to hold it all together while I welded, utilizing an old piece of furniture and the garage’s ceiling joists. I used the biggest door hinge I could find.

Then I decided to go for a ride. I was slightly alarmed when I got on the seat. The children’s seat post is maybe 3/4″ OD. When it is a foot long, it doesn’t flex much. But when it’s been extended by another two feet, it suddenly gets very springy. Banishing all fear of my weld breaking and a seat post violating my most prized organs, I set off down the driveway. The short wheelbase was a bit… “nervous”. I had a hard time tracking in a straight line. This drunken weaving might have been ok if the pedal to ground clearance was not so low, and not decreasing like it was because the hinge was bending apart. My oscillations became so wild that the pedals started to drag on the concrete. By the time I reached the end of the driveway, with neighbors looking at me like a madman, I was ready to give up. The bike took care of that however by throwing the chain. I was unceremoniously dumped into the street.

I remembered Billy Bob Thornton in Bad Santa. “Well, they can’t all be winners kid…”

Bookmark and Share

Maker Faire 2009

June 5th, 2009 by admin

HybridMojo was located in Bike Town at the 2009 Maker Faire in San Mateo.  Our booth included not only a few electric bicycles, but educational information on sustainability, basic ev components, and how to build bicycles.  The carnival themed test of strength pedal generator from the Google I/O Developer conference was back once again, this time with the reliable MY1018 motor.

The fair organizers put an entrance right nearby us, so we got quite a bit of traffic.  The upgraded booth probably helped too, as it was more elaborate than any in sight.  And amusingly for us, we had debated how to hang our bright orange banner so we clipped it to the ends of two 10 foot sections of EMT.  This sign became a meeting place of sorts, with folks on cell phones milling about trying to meet up with friends using the sign as a landmark.

Last year, everyone wanted to know max speed and range so we created information sheets that hung off the bikes.  This year, by far the most common questions were whether the bikes have “regen” and why the tandem is powered by Makita batteries– so we’ll be updating the website and information sheets accordingly.

Many thanks to Sherry and Bridgette and the rest of the crew who put the show on.  Great time as always.  And thanks to our crew– Ben, Sheila, Victor, and Mike!

090530 Maker Faire 2009090530 Maker Faire 200949 pictures Google Maps Location
San Mateo Expo Center, San Mateo, CA
May 30, 2009
Bookmark and Share

First Recumbent Electrification: Updates

May 30th, 2009 by peter

I’m using this bike, so here are my updates:

A bike that is a poor bike without electrics added will become an even poorer bike with all the weight and power of electrification. Start with a good bike.

I had to fix some derailleur adjustment issues but the chain still slips. I will replace the chain (note: the Walmart chain I used appears to be at fault, it slips right out of the box!). The tiller steering is very annoying, and the pedals aren’t forward enough for me (the bike was built for shorter legs). Also, the seat back is not quite cushioned enough to be riding for long periods.


First Lithium Powered Commute from Peter’s Bikes on Vimeo.

November 10th, 2008

I now intend to improve this bike. The tiller steering needs to go and the front fork with it. It is too thin and the brake mounts can’t be used with the motor on at the same time, since the chain occupies the same space as one of the brakes. Devising a new motor mounting could take some effort… Alternatively, I could use a switch, some relays (to disconnect the motor from the batteries and motor controller), and a coil of stainless steel wire to use the motor for braking. If you connect the power wires of the motor together, it will brake. Adding resistors between the power wires will vary the braking force; it’s tough to find big enough resistors, but you can use a coil of wire wrapped around a plastic pipe too– just vary the length of the wire.

Bookmark and Share

NAHBS 2009

February 27th, 2009 by peter

Just flew into Indianapolis today for the North American Handmade Bike Show.  This is the premier event for handmade bikes in the country and I look forward to meeting the people behind the machines and learning from them.  Certainly there will be some osmosis, but there are also a host of seminars that I will be attending.  And of course, some drooling over bikes and gear.  Well, it’s six hours till the alarm goes off, so I’m going to bed.

Bookmark and Share

Charging, Cargo, and Guages

December 22nd, 2008 by admin

It’s tough to compare bikes qualitatively so I mounted some guages on the bike to grab some actual hard data. I took a piece of plastic and dremeled two holes in it so I could attach it to the front boom with a hose clamp. I then held a voltmeter agains the plastic and drilled two holes through the plastic and the bottom of the meter and screwed them together. I wired the meter to the generator output. I also added an ammeter to measure the current flowing from the generator. I left room for another meter to measure battery pack voltage and then finally mounted the bicycle computer.

Guage cluster

I added two Sterilite trash cans under the driver’s seat for cargo carrying. I placed them low enough to avoid interfering with the handlebars. Where to put the batteries now? They will likely hang behind the trash cans, but for now they are IN the trash cans.

Speaking of batteries, charging 12 batteries one by one is no fun. Each battery takes about 20 minutes tops– depending on how far it was discharged– but that’s still 12 batteries that need to be baby sat. I inquired on the Endless-Sphere forum about whether the Makita fast charger allowed charging of multiple packs in parallel and it does work. Fellow e-biker Jonathan D. hooked me up with 2 Makita LXT shells– battery packs with no batteries inside. I opened one up and soldered a wire to the + terminal and another to the – terminal and routed them out of the shell through a couple of holes near the front of the shell. I attached an anderson connector. I then tortured myself trying to work with the security screws that hold the shell together before I just dremeled their heads to turn them into slot head screws.

I then rewired the 2 packs I built to be 18v each– all batteries are in parallel. Now I can put the shell on the charger and attach it to one pack and it will charge the whole pack– theoretically. It should take 4 x 20 minutes for each pack, but at least I don’t have to baby sit it. Turns out, however, that the 7 little pins in a yellow connector on the battery report some sort of status information to the charger and the charge always fails after two minutes with the shell. DoctorBass on endless-sphere suggesting opening one of the working Makita’s and soldering the anderson connectors to it’s terminals.

battery image

Finally I fixed the kick stand; leaning the bike against stuff was getting really obnoxious as its now about 40-50lbs fully loaded and would probably get damaged in a fall.

Full shot of the bike

Testing

Former partner in crime Eron V.’s holiday party provided another opportunity to test the bike. We took turns giving party goers rides and then turned the bike over to the more adventurous. So far about 12 people of varying stature and weight have ridden the bike, mostly in the tandem configuration, and I haven’t found any problems except that the seat post keeps coming lose and twisting in the socket. High speed ride and stability is actually better with two riders, but a very low speed oscillation in the steering gets worse with two people. If you ignore it, the bike moves in a straight line, but at about 2-3 mph there is a feeling that the bike wants to turn back and forth and it’s unnerving.

The greatest load carried so far has been 380 lbs with a 240lb rider in the back.

I rode from home to work twice, once alone and once with my significant other on the back.

Average cruising speed (alone): 17.5mph. The bike seems to hit some controller limit at 18.5 on the flat
Average cruising speed (two riders): 16.5-17.0mph (depending on rider). Max speed drops also by 0.5-1.0 mph.
The motor got much hotter with two riders.

Ride time (alone): 38 minutes
Ride time (two riders): 40 minutes

Battery state was

One rider: v0=39.3V, vf=35.3V
Two riders: v0=39.3V, vf=34.5V

Low voltage cut off is set below a safe level right now, but 28V would be a sensible limit. Voltage sag on full throttle acceleration is about 1.0-1.5v.

Odometer currently reads 43.8 miles.

Next upgrade is a head light! Very hard to ride through the marshes with no light.

It takes some coordination to get on the bike

Riding the tandem with Eron's mom on the back

Bookmark and Share