Thursday, October 10, 2013

Mileage




I'm sure you've seen those black and white oval stickers people are using as bumper stickers. In not sure their lineage but when I first saw them they were mainly used to identify touristy places by acronym or pseudo-acronym: OBX for the outer banks of NC, DI for Duck Island, etc. Then I started seeing them for colleges, then sports teams. Now it's race distances. I see a lot of 13.1 and 26.2 for half marathons and marathons respectively. There are also the 70.3 and 140.6 for half Ironman and Ironman distance triathlons. I thought about getting one to commemorate my 30 miles of Lobsterman Triathlon  but after my USAT sticker fell off out of shame I kinda gave up on the idea of sticking things to my car. My geek side took over and I came up with a sticker that commemorates people who made it through a year on Earth - 585,000,000 miles. Then I started thinking I could have a little + so people could display their total mileage for the year, but of course that's just going too far :-).

Sunday, October 06, 2013

Beat(?) Time



I kind of love the metric system. The promise of super simple math to convert between units just has such an allure for me. Have ten of something? Bump up the unit and drop a 0! Have a wave with a 1 meter wavelenth? You barely have to think to to know you'll have 1000 crests and troughs in a kilometer. What could be cooler? And I'm completely serious. For someone so ridiculously slow at simple math (6 x 7? I still split it up mentally into ((3 x 7 = 21) x 2) = 42) this is such a time saver not to mention the error reduction benefits.

This is all fine and dandy until we get to time. Pop quiz hot-shot, how many seconds in day? I may as well have asked you how many inches in a mile. (If you know the answer to either of these off-hand at least admit that most humans don't). So if English distance is as complicated and archaic as the time units we still use whatever happened to Metric Time? So what's the deal with metric time? Where did it all fall apart? A quick trip to wikipedia (http://en.wikipedia.org/wiki/Metric_time) tells us that in 1795 when the other parts of the metric system were introduced in France metric time was basically abandoned. Which I kind of get, the concept and use of the second is such a basic foundational unit in science and engineering that a shift would b like moving the ocean. Speed, acceleration, frequency: they are all based primarily on the standard second.

So that's a little background. I've thought about metric time off and on for years. It's just so darn complicated. And to make it worse, time is relatively different all around the world. First, noon in Tokyo is different than noon in LA, you can blame the rotation of the Earth for that. So we could introduce the idea of local time. The time of day being dictated completely by solar noon in the specific location. This is an idea I've been tossing around in my mind lately. With current technology it could almost be practical to have completely local times, time in each individual location being specific to that location. Want to show up to your dentist appointment on time? Let your handheld computer determine when you have to leave based on type of transportation, traffic, distance and local time. But what if I'm not physically going there, what if I have people all around the world calling into a presentation? True, so that pushes me in the other direction, a standard planet time. When I say 12:00 I'd love to have everybody think the same thing. Who cares about time-zones anymore anyway? And don't get me started on Daylight Saving Time. Not only do I need to know where you are, what time of year it is but I also need to know local customs?!? Yikes.

The reason I've been doing some research on this topic rather than just juggling it around in my head is I'm thinking about building a metric clock to tell me the metric time of day. It brings up a lot of questions. Mostly it's discouraging because there aren't any great answers. But, something on the wikipedia article I mentioned above caught my eye and gave me hope. Enter .beat time (http://en.wikipedia.org/wiki/Swatch_Internet_Time) aka Swatch Internet Time. Beat Time sounds both awesome and frightening depending on how you look at it and Swatch Internet Time makes me think of Bill and Ted's Excellent Adventure. Either way the idea is pretty cool, it's basically the simplest part of metric time, 1000 beats in a day actually implemented, be it very infrequently. The cool thing is they have a website (http://www.swatch.com/zz_en/internettime/) and there are a couple rudementary Android apps people have done. So it's not a lot but it's something!


Monday, September 30, 2013

Another sneak peek


Slow progress because my day job has been pretty insane lately (mandatory weekends, why is that even a thing?!?). But anyway, here's my power setup actually powering an XBee radio. With a lot of luck I'll have it programmed to sample data pretty soon and that will be about halfway to my summer goal.

Thursday, September 26, 2013

Sneak peek of my latest project


Here's the power supply setup for my latest project. In the middle we have a Lithium Ion Polymer Battery - 3.7v 2600mAh (http://www.adafruit.com/products/328) sourced from Adafruit.com, to the left is a 6V 2W (medium size) solar panel (http://www.adafruit.com/products/200) also from Adafruit and and finally on the right is nifty charging circuit from Adafruit (http://www.adafruit.com/products/390). The charging circuit is pretty clever. It lets me charge from the solar panel, a USB port or a 5V power supply. It also has a load output with a bypass circuit that I'll use to power my project. I'll have to be a little careful though, when I'm receiving power from the battery I'll be getting somewhere between 3-4 volts but when I have full sun steaming up my solar panel I might be getting 6 volts. Fortunately including a regulator in my project is easy so I'll be covered up to 16 volts.

Time for a little math.

First lets start with the capacity I have from my battery and charge setup.

Battery: 2600 mAh
Charge rate: 330 mA (2 W /  6 V = 333 mA)

Hours required to provide a full charge: 2600 mAh / 330 mA = 8 hours.

Average full sun hours for Portland, Maine-
Average: 4.51 hours per day
High: 5.23 hours per day
Low: 3.56 hours per day

So in the best conditions I can't expect to be able to recharge a fully discharged battery each day and the winter will be worse. Also, I'd like my project to be able to make it through a couple cloudy days without running out of juice completely.

Lets say I want to make it through 3 days with effectively no sun, from a full charge. That's roughly 84 hours. With a 2600 mAh capacity battery that means 2600 mAh / 84 h = 30.95 mA. We'll call it 30 mA. So I'd like the average load to be less than 30 mA.

So far we've talked about the power capacity, now lets talk about power rate.

The load I want to power has a draw rate of 40 mA for the low power option or 295 mA for the higher power option. Those currents exceed the budget of 30 mA that I set for myself. Fortunately we're talking about averages and we can use that to our advantage. Consider the concept of PWM, the idea that you can trick an LED into operating like it had 50% voltage by powering it with a very rapidly pulsating signal with a 50% duty cycle (on half the time and off the other half). Using this same concept I can extend the range of my battery by switching my load off (putting it into sleep mode) and only turning it on intermittently.

So what kind of duty-cycle would I need? For the low power option 30 mA / 40 mA = 75%. For the high power option 30 mA / 295 mA = 10%. So to cover either option I can sleep for 9 seconds and wake up for 1 second. Or to be safer sleep for 19 and wake for 1. If I really want to extend the battery range I could even wake up for 1 second every 10 minutes, for a duty cycle of 1/600 which would be an average load of .5 mA for high power and .07 mA for low power. That comes out to half a year on battery for the high power option and over 4 years for the low power option! Of course that's all completely theoretical, I think the self discharge from the battery itself would limit me to a month or so at most and the sleep mode for my loads are not truly power free. But the idea that I can power what I need to consistently with the supply I have seems to be feasible. It might even be worth considering a smaller panel and battery if I wanted to make the project more compact.

Another rather sophisticated modification would be to tailor the load to current and future conditions. In the winter it could automatically decrease the duty cycle or if the weather calls for a few days of rain make sure the battery is fully charged and decrease the duty cycle. If it's sunny and the battery is fully charged, set the duty cycle to the max and take advantage...




Friday, December 14, 2012

Why I Have $178 Jeans on My Wish List (or, why the $20 pair actually costs a lot more)

Wish Lists-

First, I have to admit I really like Amazon's Wish List feature, for a number of reasons. Whenever I think of something I think I really need I put it up on my wish list instead of putting it into my shopping cart.

This does a number of things,


  • It keeps me from making too many impulse purchases because something that seems really important today may seem less important after a couple days of thinking about it. Sometimes things sit on my list for a while and eventually I decide I don't need them after all and drop them.
  • I can gauge the importance of what I think I want today versus other things I've put on the list in the past. Yeah that fancy Android Watch would be cool to have but I'd rather save up for a new Guitar to replace the thirty-something-borrowed-and-never-gave-back one I've been using for 20-odd years now.
  • It helps me budget and manage spending better. Maybe this month I had some unexpected car expenses so the list stays put. In a couple months I have it payed off and can take a look at what I might need from the list.
  • It's not just for me. I also keep track of gifts I think of for friends and family. When an occasion presents itself I'm not left thinking, "What can I get so-and-so?", I might have a something they mentioned a couple months ago that I would have otherwise inevitably forgotten about.
  • I can kind of keep track of prices and sales. It's not the most efficient process possible because it's not automatic but I can put something on the list and watch the price fluctuate over time. A bulb I'll eventually need for my TV started somewhere near $100, yikes. Today its less than $35. I have a camera and a drawing tablet on the list that I know will decrease in price over time. Keeping them on my list let's me keep tabs on them over time and when they hit a certain price I'll consider them. There are a pair of outdoor speakers I'd like for my patio but I know they periodically go on sale for $30 less than they are today so since I'm not in a rush I won't consider buying them until I see them on sale again.
  • It's not just items from Amazon. I can put anything from any website on the list. I can even put random items on the list. I'd say most of the items I have listed are available on Amazon but I don't need to purchase them there. If I can find something locally I'd rather support the local business but if not Amazon is happy to drop it off at my door.

The Jeans-

So back to the jeans... For Christmas this year I took the easy way out, when family asked about what I might want I pointed them to my Amazon wishlist. Somewhere half way down the list I have a pair of Loomstate organic cotton jeans with a list price of $178 that my dad happened to notice and questioned my sanity. I could probably find them for less retail but when I added them to my list I added them right from loomstate.com. Sadly they don't make these jeans anymore (I wish I knew why) so I missed my chance anyway. But the question remains, why $178 for a pair of jeans when I could go to Target and get a similar style for around $20?

The answer is cost. Yes, those $20 jeans appear to cost $158 less but that's not the full cost that you and I, and everyone on Earth ends up paying for them. Those $20 jeans are made by workers in China or India making somewhere around the ballpark of 10 cents an hour, without the benefit of safe or healthy working conditions. But before you even get to the workers, where does the cotton for the denim come from? Fields can be made to produce a lot of cotton quickly by dumping tons of fertilizer, but then you also need tons of pesticides and herbicides to produce it so quickly and cheaply but then of course the fields will be so damaged they won't produce anything more for generations. Oh, and don't drink the water nearby. Speaking of water- there's also the dying process, which to be done cheaply also requires a lot of water and of course that can't be properly disposed of when it needs to be done cheaply and quickly either. Since the jeans were made in China or India, to get to you they need to be shipped. Coal burning transport ships are the cheapest, also one of the largest single producers of CO2 today.

Here's a excerpt from Loomstate's website to describe how they do things differently (found here):

Beginning with the design process in our New York studio, Loomstate directly manages all stages of manufacturing, from the fabric mills, to the cut & sew facilities and finally the laundries to ensure all partners are participating in responsible manufacturing processes. Loomstate works with factories representing the "Gold Standard" or model of excellence of responsible production methods. All Loomstate factory partners are required to adhere to a code of conduct and Terms of Engagement in our company manufacturing agreement. These factories must use the highest environmental and labor standards, controlling factory pollution, and enforcing fair labor as the cornerstone of the effort.

Loomstate is fully committed to organic farming, which is a form of agriculture which avoids or largely excludes the use of synthetic fertilizers and pesticides, plant growth regulators, and livestock feed additives. Organic cultivation requires managing and preserving the sensitive ecosystem as opposed to stripping the land of its resources as conventional farming does. Loomstate uses 100% certified organic cotton from various regions of the world such as Turkey, Peru, Africa, India and the USA. 

Now I'm not saying they do everything perfectly, I just don't know all the details but it sounds like a much better outlook and focus than the companies that turn a profit on the backs of the laborers and the environment. Is that along worth $158? I guess it depends how you look at it.

Then there's the issue of what are you really getting for the money? Cheap jeans are designed to last for a certain period of time. That period of time is not especially long. I had a very comfortable pair of jeans I got from Target a couple years ago. They lasted a couple months before they lost continuity (a seam in the buttocks area completely gave way). Now I'm not known for having an especially extravagant posterior so I have to blame the construction of the jeans themselves. Not being a slave to fashion or trends (or even common style rules if we want to get down to it) I would have been better of spending twice the amount I spent on jeans that probably would have lasted 5 times as long. And when I wear my jeans I wear them, I don't think a week is too long for one pair of jeans at a time.

I'm not saying everyone (or anyone) should go out and buy $178 jeans (I didn't) but before you bring your latest purchase to the checkout (or click checkout from the website) I hope you think about what the full cost really is, not just how much you are paying.