Electric Pickup Truck: Cost of Ownership

ev_operating_costs
We have owned an electric S-10 pickup truck for the last 1008 days (2.75 years) and used it as a daily driver. It was driven most frequently to the MARTA station, a 4 mile round trip commute, but also made trips to hardware stores, the Georgia Tech Campus, and to the homes of various people who were selling furniture or other larger items on craigslist. It uses twenty (six volt lead acid) golf cart batteries for its traction pack, and they have gradually lost capacity. When brand new, I would take the truck on 20 to 25 mile trips without stressing the battery pack. Recently however, the absolute maximum range of the truck had dropped to 12-14 miles and if you actually drove it 14 miles you could watch individual batteries hitting their absolute end of their state of charge. Although it could have functioned as a “Get to the MARTA station” vehicle for another year (or two?) I decided it was time to replace the pack to be able to comfortably go to the hardware store or make an extra emergency trip without worry. I have placed 685 charge cycles on the pack, which is in line with the lifespan for lead acid golf cart batteries.

The replacement pack cost $2,171 (I gave back all but one of the used batteries for the core charge), which gives me the final piece of information needed to calculate the total cost of ownership over the last 1008 days. We spent $464 on electricity (estimated at $0.11 a KWH), $610 on maintenance, and the previously mentioned $2,171 on batteries. Obviously, the battery pack is the large cost here. In fact, the electricity cost is very small on a monthly basis, and was never more than 10-15% of our total KWH usage.

We drove a total of 4,861 miles in that timeframe, giving a cost of $0.66 a mile or $3.22 a day. This does not take into account licensing and insurance, but those costs would be exactly the same for an internal combustion engine (ICE) vehicle. If the S-10 were an ICE model, it would probably get around 20 mpg, so the fuel cost (estimating $3.50 for a gallon of gas) would be $0.175 per mile. So for 4,861 miles it would take 242.55 gallons of gas or a fuel cost of $849. This would imply that an ICE vehcile would have to have a maintenance cost of $2400 to get the same per mile cost of ownership as my EV.

Although ICE vehicles are more expensive to maintain, unless something major on the engine exploded, it looks like my hypotheical ICE S10 pickup wins the straight up cost comparison. Of course, I never had to drive out of my way to stop at a gas station, and there is the matter of 242.5 gallons of gas I didn’t use. (the lead and plastic in my batteries goes back to the factory to make new batteries)

In the interest of full disclosure, my first pack of batteries was purchased at a Sam’s Club for $1,800, so my true cost per mile is closer to $0.59. (But I used the pack replacement cost as an estimate for the cost of ownership for my next pack.)

I am hopefull that my 2nd pack (from Interstate batteries) will last longer, either because Interstate sells better batteries, or because I have learned how to care for them better. (Although I don’t think I did anything horrible to murder the first pack…)

Small Phone Review: Sony Ericsson Xperia Mini cell phone

I recently purchased a Sony Ericsson Xperia Mini ST15a Cellphone to see if I would like it enough to replace my HTC Aria / Liberty A6366. (I did a review of the aria here.)

Form Factor:
I specifically picked the Xperia Mini because it is a small phone. Small enough to fit in my backpack’s older style cell-phone pocket. Small enough to (easily) fit in my front pocket if I want to carry it around without my backpack. From an outline standpoint, it is actually smaller than the HTC Aria, (and weights a half oz less) but it is almost 50% thicker (only 16mm or 0.63 inches). I was slightly worried that it might be a bit too thick, but after using it for a few days I have decided that it’s fine. The extra thickness is nice to keep it from disappearing in my hand…it’s a VERY small form factor for a modern android smart-phone.

Buttons & Ports
The audio jack comes out the bottom of the phone, which means I have to put it in my backpack’s cell-phone pocket upside down when listening to music with headphones. The micro-USB port is also on the bottom, and covered by a small removable plastic tab that is “hinged” to the phone with a small piece of plastic that goes into a hole. I doubt that the plastic tab will last for more than a few months, as I plug in the phone to charge at least twice a day. The USB port has a “square” appearance, and does not look like a micro-USB on first glance. You have to look inside of it to determine which way is “up” (it’s “upside down”…), but a standard micro-USB cable does work with it. Not major issues, but I don’t see the point of having a removable cover for a port you are going to be using multiple times a day.

A volume up/down rocker is on the top right side, and the bottom right side has a dedicated camera button. You have to long-press the button to auto-start the camera application, I have never started it by accident, and it’s nice having a dedicated button to pull it up. The power button is on the top left.

The battery cover/back of the phone snaps on and off from the side and wraps around the back of the phone. You have to pull the battrey to change the SIM card, and the back cover has a small plastic tab that holds the MicroSD card in when the cover is on. (You need fingernails or tweezers to remove the microSD card, it does not have any push-spring-return mechanism.)

The phone’s speaker, LED flash, and camera lens are on the back.

Screen:
The screen is just slightly (0.2in) smaller than that of the Aria, and has the same resolution (320×480). Even at the full brightness setting it doesn’t appear to be as bright as the Aria’s screen, but I haven’t noticed it being too dim either. According to the Internet, the glass is “scratch resistant” but not “Corning Gorilla Glass”. I typically use a plastic screen protector on all of my phones (at least for the first year or so) and keep them out of pockets with keys, so the exact type of glass probably doesn’t matter. Percentage wise, a much larger portion of the front of the Xperia is screen.

Software/UI:
I purchased a phone that was not carrier branded, so the only pre-loaded apps it had came from Sony Ericsson. I was able to remove, disable, or hide all of the annoying pre-loaded offers and things I didn’t want, and almost immediately downloaded the Sony Phone Companion software for my PC to upgrade the phone to Android 4.0.4, so I can’t comment on the original Android 2.x OS that the phone originally shipped with.

Android 4.0 on the phone is as good as my CyanogenMod ROM on the Aria. My phone has full support for setting itself up as a wifi-hotspot for wireless tethering. (Perhaps carrier branded versions of the phone have that part of android disabled?) It also supports various VPN’s out of the box (noticeably lacking is OpenVPN, I had to set up a PPTP server at home, which was actually a lot easier than getting an OpenVPN server working). In short, the stock OS/ROM did everything I want from a phone, so I don’t anticipate having to root the phone and install CyanogenMod on it anytime soon.

Freedom/ROM Support
However, I am happy to report that CyanogenMod did support this phone (I use the CyanogenMod supported phone list as a pre-filter for any phone shopping, just in case I don’t like the default software the comes with the phone.). I am even happier to report that Sony Ericsson fully supports you voiding your warantee by providing an online service that allows you to unlock your bootloader so that you can replace it with anything you want. This feature is what made me specifically decide to give the Xperia a shot.

Camera/Flash:
I like having an LED light on the back of the phone. I installed an application that lets me switch it on and off from the home screen. Even if it didn’t act as a flash for the camera, a flashlight seems like such a useful thing to have built into your phone I don’t know why all phones don’t have them. I haven’t actually evaluated the phone’s camera yet….

The biggest negative of the phone is the limited memory footprint, and with modern applications (I’m looking at you Google!) starting to take up more and more space, I find myself having to choose what to un-install just to be able to install updates on other more critical applications.

Using a Raspberry Pi as a RepRap print host with webcam

I set up a Raspberry Pi as a print host for my RepRap (using the Pi Camera Board as a webcam to view the print status). Here are my summary steps:

  1. Install Rasberrian and update it.
  2. Configure your system to enable wifi (if used) and camera board (if used) and enable the SSH server if you want to remotely administer the pi board using the “sudo raspi-config” command (you may also want to tweak your overclocking settings here, I’m using “Moderate”)
  3. Install OctoPrint following directions here: https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian
  4. If you have a camera board, you may need to update your pi firmware (sudo apt-get install rpi-update; sudo rpi-update)
  5. To get the camera board set up as a streaming webcam, install mjpg-streamer experimental version from here:
    “git clone https://github.com/jacksonliam/mjpg-streamer”
  6. You can compile it on the Pi using these instructions:
    http://www.instructables.com/id/Create-an-internet-controlled-robot-using-Livebots/step5/Get-the-webcam-streamer-for-Raspberry-Pi/ (ignoring the step to download from sourceforge.net)
  7. Install the plugins to /usr/local/lib with “sudo make install”. Copy the www directory to the same location.
  8. Start the webcam streamer: mjpg_streamer -o “/usr/local/lib/output_http.so -w /usr/local/lib/www” -i “/usr/local/lib/input_raspicam.so -x 640 -y 480”
  9. Start OctoPrint (“OctoPrint/run”)
  10. Test it by pointing your browser to your raspberry pi’s IP address, port 8080 for the mjpg-stream and port 5000 for OctoPrint
  11. When all that works, put some commands in your /etc/rc.local file to start them both up whenever your Pi boot sup. I used: su pi -c ‘/home/pi/OctoPrint/run’ & AND su pi -c ‘/usr/local/bin/mjpg_streamer -o “/usr/local/lib/output_http.so -w /usr/local/lib/www” -i “/usr/local/lib/input_raspicam.so -x 640 -y 480” ‘ &

My Thoughts: Everything works great on a wired (ethernet) connection, but my wifi adapter is performing extremely poorly for streaming video of the printer. Also, why can’t the camera board just have V4L support out of the box?

Fixing the problem where gparted (parted) won’t see a partition due to a mac partition table

I purchased an external HD that was “mac compatable” but I used it with a linux system and used fdisk to put two partitions on it.

Later on, I wanted to use gparted to easily resize one of the partitions, but it refused to see any partitions at all on the disk.

fdisk could still see them just fine, but reported “Partition type: mac”

It turns out that the problem was that the disk originally came with a mac partition table in addition to (right after) the regular MBR Master Boot Record.

I noticed that the first partition didn’t actually start until 63 sectors into the disk (at the beginning of the 2nd cylinder).

Device Boot Start End Blocks Id System
/dev/sdb1 63 1171893554 585946746 83 Linux

So I used DD to copy the first cylinder to a file:

sudo dd bs=512 count=62 if=/dev/sdb of=firstCyl.bin
62+0 records in
62+0 records out
31744 bytes (32 kB) copied, 0.000715733 s, 44.4 MB/s

Looking at that bin file in an editor, I saw the string “Apple_partition_map” which is a dead givaway of what the problem was.

So, I wrote out all zeros to the first cylinder:

sudo dd bs=512 count=62 if=/dev/zero of=/dev/sdb
62+0 records in
62+0 records out
31744 bytes (32 kB) copied, 0.00165608 s, 19.2 MB/s

And then I copied the first sector (512 bytes) back from the firstCyl.bin file I had made:

summetj@constantine:~$ sudo dd bs=512 count=1 if=firstCyl.bin of=/dev/sdb
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00183878 s, 278 kB/s

And it worked! Now gparted is no longer confused by the apple (mac) partition table that I zeroed out, and sees my partition.

dyndns.org (dyn) ddclient configuration fix

I have been using ddclient to update my dynamic dns records for various servers and laptops for many years now. Around a month ago they all stopped updating the DNS server. I eventually tracked the error down to a line in the configuration file:

server=members.dyndns.org

It’s not like I had made up a random server name…this server had been working successfully for several years. And it is the server recommended by the ddclient automatic configuration script generator on the dyndns.org website even now. [https://account.dyn.com/tools/clientconfig.html] However, at least for me on Ubuntu 10.04 and ddclient 3.8.0 it had stopped working.

I changed it over to:

server=members.dyndns.com

And this fixed the problem.

Serial Shift Register MOSFET driver (version 1.1)

My BubbleDisplay project needed to control sixty DC motors or solenoids to control air injection into individual columns of liquid. Due to the large number of outputs needed, I am using a chain of (74HC595) serial shift registers so that three I/O pins can control all sixty outputs. As each serial shift register has 8 outputs, this requires eight chips (for a total of 64 outputs, four are unused). The 74HC595 can not source/sync enough current to drive the motors/solenoids directly, so I am using a TO-220 N-Channel MOSFET rated at 60 volts and 32 amps (digikey: FQP30N06L-ND) to drive the load, with an 1N4001 rectifier diode to handle current spikes. Because I had to make 8 (9 for a hot spare) copies of this circuit, I decided that fabricating a printed circuit board was the only way to go.

Circuit board with 8 LED's and 8 MOSFETS connected to a 74HC595 shift register

It only took me two tries (Moving from Version 1.0 to 1.1) before I was happy with the design, which you can see (populated for testing) above. Looks a lot nicer than the prototype, right?
protoboard with MOSFETS and LED's
Continue reading

Opening winmail.dat files in Thunderbird

Outlook will attach items and forwarded email embedded in a “winmail.dat” file. The winmail.dat file is a TNEF file and Mozilla Thunderbird does not process them natively. The LookOut plugin for Thunderbird will allow you to see the attachments embedded within the winmail.dat file and treat them like normal attachments.

Testing Glycerin as a bubble medium

The tube on the left is filled with Glycerin. I like how the bubbles float up much slower and are more defined. Also, because the Glycerin has a lot of “micro-bubbles” in it, the light from the RGB LED’s in the bottom of the tube diffuses out of the mixture much more, and gives the whole tube a colored glow effect.

One problem is that if I want to make larger bubbles (than in the video above) I need to increase the size of my nozzle. The current small nozzles will make “separated” bubbles if I run air through them for too long, demonstrated below in this video:

Of course, I had to try making bubbles really fast! (The upper limit in Glycerin is slower than in water…)

Glycerin is relatively safe (msds) as long as you don’t eat it, although it can cause skin and eye irritation if you don’t wash it off. Clean up is easy, as it dissolves in water, but it’s more messy than just plain water, and costs a lot more! Even buying in bulk, it takes $8 worth of Glycerin to fill a 6′ long 1″ square tube!

Bubble Display Videos

I have been playing around with the timing for how long to turn on the air pumps (as well as the delay time between bubbles). This video is my “favorite” so far for the solid bubbles (on the left) 30ms on-time, and 300ms delay. Obviously, the aquarium air stone tube (right side) needs a longer delay to separate the air pulses.

Of course, I also tried playing around with super fast bubbles!

And with the smallest bubbles I could make (the electronics can give a 1ms pulse, but the motor/air-pump needs at least 8ms of power to eject a bubble…)

Bubble Display Prototype 1

I have the physical structure, electronics, and pneumatic systems all integrated (for 2 of 6 channels) on my first prototype for the Bubble Display. The electronics are mounted on one side of the upright board, while the air pumps, check valves, LED lights and acrylic tubes are mounted on the other. (Click photos for larger versions)
The electronics for a bubble display prototype

Six air pumps, connected with check valves to the bottom of acrylic tubes filled with water

And here is a video of the system driving two channels (tubes of water). This is a 10ms bubble size, which is quite small. I will be experimenting with various lengths of time to drive the air pumps to make bubbles of different sizes, as well as experimenting to find out how small of a delay I can use without having the bubbles run into each other as they rise. (The length of the tube will affect that as well, so it’s just about time to make some six foot tubes!)