Tuesday, September 18, 2012

Wake EMC Beat Me To The Punch

Well, sorta.

My local electric power supplier, Wake Electric Membership Corporation, has changed out our electric meter for a new, highly capable electronic digital meter. You can now, for free, get a rough graph of your hourly, aggregate power utilization:

I say "beat me to the punch" because they got their meter installed before I got my Arduino power measurement device working. So in that sense, they "beat me". If your standard includes "providing power consumption data granular down to the second", then they haven't beat me.

With their system, you can get data down to the hour. You can't get any more detailed than that for free. This is only measured at the feed point for the house. You can't get circuit-by-circuit, since they are only using the meter to measure. They will give you more data if you sign up for their premium service at US$9.99 a month, but they don't say what that "more data" is.

Regardless, this is good stuff and I'm glad to see it. I've been playing with it and figured out already how to lower my electric bill.  I had developed a habit of fluffing clothes in the dryer every morning on "warm", which was costing me far more money than I thought. Exactly the personal benefit I want from measuring electrical power consumption!

This kind of measurement is helpful for gross electrical loads of limited duration. Something that happens at a particular, possibly repeating time will show up on this pretty well.  Very tiny loads are invisible. I can't tell what's going on with something as big as a PC or small as a power brick.

But there are loads shown I don't yet understand: the every-other-hour kilowatt-hour load you can see in the graph. (each of the green blocks that's 1kwh high and separated from each other by 1 hour)  I'm not sure if that's the water heater coming on/cutting off, or if it's the time-weighted aggregate of all the "ghost power loads" that stay on in the house during both day and night. I may not able to determine that from what little data is shown here.

So this data doesn't discourage me from finishing the project of Arduino-based power measurement. It is encouraging because I've already gotten benefit from this (crude) data, showing the power of being able to do granular, real-time data. Being able to measure with the precision and immediacy of an Arduino data collection system will allow me to find more and smaller problems, like maybe if a power brick or PC power supply are going bad.

Friday, August 3, 2012

ZoneMinder Update

Using ZoneMinder in a virtual machine. 

If a surveillance system is to do any good it has to stay on all the time. If it's a computer and stays on all the time it needs to be a low power system to save money, heat and provide good reliability. Low-power computing is a good way to go with surveillance, hence there's a tangential tie-in to "openwattmonitor". Find more at  http://www.zoneminder.com/

A buddy has been trying to see if he can get a purpose-built ZoneMinder virtual machine up and running. He queried me on this blog some time ago. Steve, I hope you have gotten my comments and that my feedback is useful for you. Don't give up, you are on the right track.

Your TrendNet IP cam was one of the vendors that ZoneMinder was made to work with from the start, so you've got the right hardware. The trick is configuration, not an easy thing with ZoneMinder.

My suggestion to you is not to use pre-built VM's that have ZoneMinder installed, or you'll miss out on the goodness. Those VM's are just as hard (or harder) to configure than bringing up your own from-scratch ZM install. I'll be glad to share with you how I did mine.

I could be wrong: please tell me if there's some overriding reason you are going with a pre-built VM appliance - if it's just to save time, trouble and complexity, I don't think the pre-built VM's do a good job of that. I tried one and it's harder than building from scratch!

ZoneMinder 1.25 has just now been released, and it's good. There are big improvements in current versions of both Ubuntu and ZoneMinder. I have to do a "forklift upgrade" of my own ZoneMinder install: I want to go to Ubuntu 12.04LTS and ZoneMinder 1.25. I intend to just delete what I have and start anew.

ZoneMinder is complicated but powerful, robust and well made. It's gotten a great deal of improvement and development recently and works better than ever with Ubuntu! Let's do it man!


That GUY

I am obsessed with e-Bikes.

The year was 1976. I was 14 years old and put a used lead-acid car battery and 12VDC electric permanent magnet motor onto an old blue salvaged Schwinn bicycle. Thank you Bob Frisby, (owner of Frisby's Gulf station) for giving me that used lead-acid battery. You changed my life!

It was heavy: the battery alone was 50 lbs, more than the weight of the bike and motor together.

It was unstable: the only way the bike could stand up was with my weight on it, countering the weight of the battery.

It was slow: my mechanical Schwinn speedometer showed me reaching 18mph. Faster than a 14 year old could go on a heavy old steel Schwinn. Pretty good but not fast enough to avoid traffic any better than a bicycle.

It had short range: I could go a maximum of 6 miles with the car battery, unreliably. Meaning I could only reach out 3 miles and still get back home for a recharge.

It was fantastic: I loved it so much that I should have dedicated myself to the technology and pioneered better systems. But I had other, more pressing problems to solve. Instead I took a path that would raise my standard of living and allow me to provide for a family. 

The kids are grown and on their own. I achieved the family and career objectives. I never forgot the ebike euphoria. 

Now I have a chance to get it back.

Times have changed. Now we have Lithium Polymer batteries which have a power-to-weight ratio of over 10 times the old lead-acid batteries. We now have compact, powerful motor controllers using IRFB4110 FETS that didn't exist back then and hub motors that are so simple, efficient and refined that anyone can build an ebike simply by swapping out a rear or a front wheel and adding a "torque arm" to keep the high torque of the motor axle from damaging the bike frame. (It can "spin out in the dropouts", a dangerous event. The wheel literally tries to leave the bike frame from the motor power. :-) )

Converting a bike you already own is now something mere mortals can do for less than thousands of dollars - you can spend about $800 on the electric components and end up with with smooth, strong, consistent performance and incredible efficiency. Imagine cruising around for 10 miles or more at 20mph for pennies a mile and not needing licensing or insurance (in North Carolina, USA) It's a great short-distance transport in situations where a bicycle can work, but you don't want to arrive sweaty.

The Story So Far

For the last year, I have been experimenting with a converted "Short Wheelbase Recumbent" (SWB recumbent) . I converted it to an ebike by replacing the rear wheel with a hub motor wheel, adding a controller, a computer display and a Lithium Polymer battery (in the little plastic box on top of the rear rack). Where I got most of my components from is www.ebikes.ca. Tell Justin "James Sent You"! :-) 

From the rear left, showing the big pannier bag that can hold clothes, laptop and cellphone:

Better view of the pedal drivetrain from this angle. The front sproket is 52 tooth, good for pedaling up to 30mph!

I could not resist stopping and taking a photo of today's gas price at a gas station on the way home. 

No gas today, thank you!
There's a problem with this machine: it's very unstable - so much so that I consider it unsafe at speeds I can attain with the electric motor. So I'm moving the components over to a new conventional upright bike, today. (August 3, 2012)

Next Machine: Gen2 eBike

The first ebike was experimental: I already owned the bike, so I didn't have to buy one. I figured out where to buy a low-cost version of a 26" rear motor wheel, added a controller, a monitoring computer and a Lithium Polymer battery.

I used the initial test machine, the SWB recumbent, to learn how to size the battery and what kind of performance to expect. The recumbent allowed me to "just do it": get on the bike, get somewhere, learn something. But it's not safe enough to ride to work every day, it has two different size wheels (so you have to carry different size tubes) high speed maneuvering is not stable, and low speed maneuvering, forget it: the bike wants to fall over to it's side very badly. Recumbent fanboiz may disagree with me, but you'll never see a recumbent in the X-games BMX tubes, that's for sure!

eBike performance is dependent on the particular bike, rider weight and the "mission": the distance, speed and route you need to make sure you can travel. To figure out what an ebike can do for you, there's this "experimental time" where you have to figure out if it will even work: the amount of power you have available and the durability of the bicycle components must be able to handle the loads and speed demands you plan to place.

More importantly: building an ebike is an abomination: bicycles are designed and built for people less than 250lbs pedaling up to 15-16 miles per hour.

When you convert to an ebike, you add about 30lbs in motor, battery, controller, cables and electronics. And you push the bike to be ridden, routinely, well beyond it's design speed. I'm aiming for 25mph - some ebike builders aim for 40-50mph: which is into the realm of an electric moped or light motorcycle.

The new ebike must be the production model: a daily driver - something I can use to get to work with at least two days a week. I went out and bought a bike specifically for the purpose with the characteristics I needed:

- a stable, crank-forward upright bike design
- 26" wheels front and back
- V-brakes (although I can switch to a disk brake up front and probably will)
- large, strong frame with a large main triangle for battery installation, braze-ons for water bottles, rear rack/panniers
- A big, cushy, comfortable seat
- Something faster than mountain bike gearing. I'll probably swap out the front sprocket/shifter at some point also....

I don't want to build an electric moped or light motorcycle. This is to be a true hybrid bicycle with both the motor drivetrain and the human pedal drivetrain to be fully functional, viable means of propulsion. If the battery runs out of juice or some component fails (up to and including the motor) then I want to be able to get home under my own power. That emergency transport mode is important to me for everyday reliability. Plus, there is an exercise aspect to it that I want to preserve.

This bike is very big, you just can't tell it from the photo. The wheels are 26" diameter mountain bike wheels. The tires are so huge, they make the wheels look small: those tires are over 2 inches thick. For reference, conventional road bike wheels are "23c" - less than an inch thick. These fat 2" tires will eat even more energy but I'm going to try them out for safety's sake: they should much easily absorb road bumps and obstacles.

This bike will be much less comfortable and much less efficient than the SWB recumbent. I'll wear "office clothes" into work, but change into riding shorts on the way home for the hard workout.

I expect power consumption compared to the SWB recumbent to rise from 15 watt-hours/mile (SWB) to 20-25 watt-hours/mile (new bike). That's never a good thing for a battery powered vehicle as it shortens the available drive range. I'll be looking for ways to improve the efficiency.

If you've never ridden an ebike, stay tuned. I'll post pictures, data and describe how it works and what it's like. I have a "build thread" over at endless sphere forums. For more information, check out www.endless-sphere.com

The plan is to ride into work with very little, light pedaling. Enough to wake me up but not enough to get sweaty. Then after work to ride home hard as I can go, both from pedaling and the motor assist, getting a shower when I get home.

I am under no illusion, this idea will become much more of a challenge as we go from summer to fall to winter here in the eastern US. I don't want to give up just because the weather goes cold, dark and wet, but I'm not at all certain this is a vehicle I'll want to be riding on a dark, late fall day in rain just a few degrees above freezing.

Becoming "That GUY"

A good friend of mine now says I'm becoming That GUY...the fruity fellow you  see at some point during your commute: he's walking, biking (maybe riding a really strange bike or some weird motorcycle). He's always out there, come rain, shine or cold. Why would he do something stupid like riding a bike in bad weather during rush hour, rather than just give up and get a car, stay warm, smart and anonymous? Just who does that fool think he is? :-) :-) :-)

If I have to become That GUY to get my fat ass out of the car and quit spending money and wasting my life riding around on cushy seats insulated from the environment around me and burning petroleum, then OK. If getting out of the spam can with the rest of the lemmings makes me That GUY....then so be it.

I am obsessed with being energy efficient and what I burn in gasoline or electricity is of great interest to me. I drive a hybrid for that reason. But the hybrid, as good as it is, doesn't tell me everything. The ebike, with it's onboard computer measuring watt-hour usage, gives me even more data second-by-second. I'm excited to know exactly how much energy I spent getting to work on an ebike! (and BTW, it was about 548 watt-hours each way on the SWB recumbent, or about 1 kilowatt-hour round trip. For comparison, one gallon of gasoline can produce about 36 kilowatt-hours.

On the ebike, I'm 54 times more efficient than my hybrid Toyota Prius. If I burn 1.5 gallons getting to work and back (75 miles round trip, 50mpg, about 1.5 gallons), then it's the equivalent of getting 2700 miles per gallon! That's a pretty good reason to be That GUY, and I'm not alone: there are enough of us doing this that we call it "The Electric Revolution". We have suppliers, we have storefronts, we have parts being made and we have ongoing innovation.

But I don't want to be a cold, shivering That GUY. I'm interested in meeting the challenge comfortably, getting some exercise and seeing if that kind of a ride is usable even in terrible conditions.

My motives are stingy and selfish. I want to spend very little to get to work and stop putting miles on my expensive Prius. To do this successfully, I plan to stay comfortable and more importantly, ensure that the bike performs as it should!


This Blog is Not Abandoned

This OpenWattMonitor power monitoring project trundles on. 

I've been distracted by wonderful new things from the Arduino folks. Check out the "Leonardo":

and the Arduino Ethernet:

Find these at http://www.arduino.cc

What's so awesome about the new products is that they have more digital and analog I/O's, so my delay is not gratuitous. Recall that I am unable to monitor all the circuits in my meter base box with the Arduino I have. With the Leonardo and it's extra analog I/O, I can monitor all those circuits.

This blog has been silent because I spent weeks and months researching extra I/O for the Arduino. There are some good solutions for adding I/O but they add complexity and cost.

That's not where I want to go with this: the power of Arduino is simplicity, elegance and low cost. So I stopped and went to other projects. That turned out to be a good decision.  I'm still implementing the hardware I have, but after the measurement shield is done I plan to repurpose that hardware and convert to a newer Arduino platform with more I/O and built-in Ethernet.

I have confidence in the Arduino developers that they will continue to grow and mature the platform in the future.

Also, the Freetronics folks have been very busy and have come out with some super products, like this: http://www.freetronics.com/products/etherten#.UBvLb1S8xVU

I know of no Android port for Arduino and I do not think it is feasible at this time due to the limits of the Arduino platform. However, my personal belief is that Android-on-Arduino is inevitable. If you are reading this and know of a port underway, I'm glad to be corrected in comments - thank you!

Soon, I will need the help of a licensed electrician to change out the breaker box that also serves as my meter base. I need more circuits for future projects. That has kept me from implementing Arduino power monitoring.  When I have this done, I'll have more room for monitoring devices and more circuits for things like solar PV and wind!

There are other new products out there (raspberry pi, VIA APC) that will act as very low-power servers for the Arduino, and I intend to implement something like this for data management from the Arduino. http://www.raspberrypi.org/

This new form of personal computing has taken off and is setting the world on fire. The organization that created, manufactures and sells the product is backordered for at least 5 weeks. It seems there's quite a market for very low power, very efficient and user-friendly computers that don't necessarily run Windows, but can do all the things Linux or Android can do!

Another, more commercial variant is the "Via APC": http://apc.io/

VIA is a well-established and respected PC chip maker and motherboard maker in the far east. They have produced a near-low-cost PC running Android using the "Neo-ITX" motherboard form factor. Unlike the Raspberry Pi, the APC will fit into a Neo-ITX, Mini-ITX or MicroATX case and use the power supply as well. It, too, runs Android and is very power-efficient.

The low-power Android computing market is hot! I'm hoping all the conventional Linux distros will see this and connect into this revolution to benefit from it.

The New Paradigm is Very Low Power computing. People are demonstrating that they'll leave Windows to get it and the computing hardware industry, suffering from lackluster sales, is more than happy to go there in search of new revenue from new markets.

The OpenEnergyMonitor guys have made tremendous strides. They have incorporated, produced new products and have an active, running store where you can buy their products. These guys are doing fantastic work over in the UK: http://openenergymonitor.org/emon/