The Orb

I bought an Ambient Orb yesterday to play around with. It’s a pretty cool little thingy, but there are problems. If you just wanted to use it for keeping track of your stocks, I guess it would be okay but the problem is that the updates can happen up to 30 minutes apart. I had originally thought it would be cool to use the orb to monitor my web traffic, or status of the web server or something, but with updates that far apart, most likely I’ve already found the problem and fixed it before the Orb finds out.

Ambient is willing to sell you a serial kit, so you can send commands instantly, and quickly for $40, and they are even cool enough to supply a schematic so you can built it yourself if you like, but that removes the cool wireless aspect.

The ideal solution would be to find a way to reprogram the cap code in the pager inside, or even just find it out so you could send commands over the pager network. I’m still working on that facet. I can’t find a data sheet for the pager module that Ambient used in the Orb so as of now that’s a limiting factor. I know who makes it, but they are pretending they didn’t 🙂

This all came about because I decided to build an Orb. I got interested in the Orb the other day while browsing around and decided it would be a fun project. I’m using an Atmel AVR Mega 8 to control it and send PWM to discrete red, green and blue LEDs. Mine looks decent, but I was having trouble finding a good way to mix the colors. I was also just generally curious about how they did it, so I decided to buy the real thing and take it apart, which I did.

Hmm. More later. Tired now.

Math Fun

How many digits are in a number n bits expressed in base b?

digits = n / (n / logb(2 ^ n))

In case your calculator doesn’t have a logb(n) function on it (mine doesn’t), use the version below.

digits = n / (n / (log(2 ^ n) / log(b)))

I’ve needed to know that several times and never took the time to figure it out or find it, but today I did. Isn’t that handy?

Here’s a little JavaScript calculator you can use to try it out.


How LEDs Work

So I’m working on a little project that involves a bunch of LEDs and I ran into something I didn’t understand. I had always understood that LEDs effectivly had no resistance and had a maximum current they would pass before frying. For most that’s about 20-30ma. This is why whenever you hook up a LED you put a resistor in series. It all follows Ohms law very easily.

The trouble came yesterday when I noticed a circuit diagram that uses 6 LEDs in series, direct from the power supply to ground with no resistors. With what I knew, if that power supply could push more than 6x20ma = 120ma the LEDs should blow up. Obviously they weren’t so what is going on?

Here’s what I’ve come up with, and I’d appreciate it if you would tell me if I am wrong.
LEDs have a fairly unique (I think) property called forward voltage drop. An average LED always drops 2.0 volts no matter how much you put in or what else falls on the other side of the circuit. An LED has two important ratings. Voltage and max current. An average LED might be 2.0v and 20ma. The LED does not conduct until the forward voltage reaches the voltage rating and then at that voltage the LED will draw the current rating. So, if you feed an LED exactly 2.0v it will draw 20ma no matter how much the power supply is willing to provide. So, with those numbers we can calculate that the LED has an effective resistance of 100 Ohms. That’s the part I am not sure I am right on 🙂
With that in mind, if we give the LED 5.0v, assuming it’s internal resistance doesn’t change then the current is going to be higher. We get 50ma which is getting the point of the LED’s maximum current before it’s damaged.

The problem comes when you provide the LED with more voltage than it’s forward voltage drop. When the current gets to ground the voltage has to be 0, so if you provide more voltage than the LED is willing to drop it’s going to have to use more current to make up the difference. Also throw in the mix that an LED’s resistance goes down as current goes up, so the increase is exponential instead of linear. I haven’t been able to find much information on that yet, so I’ll just let it stand.

So, what I think is going on is that if the LED voltage drops all add up to the total voltage supplied then the voltage at ground is 0 (as it should be) and the LEDs don’t have to consume more current than they want to. If the voltage varies by a volt here or there it’s okay because the LEDs have a little headroom for how much current they can handle.

Does that make any sense? I hope it does, cause I feel like I *get* it now 🙂

Kill Bill Vol. 2

Went and saw Kill Bill Vol. 2 last night with Scott, Adam and JoLynn. Wow. Pretty cool. It was completely unlike the first volume. The fighting was extremely minimal and I think you might have seen one or two drops of blood. Instead you got long dialogues and monologues, lots of background and in Tarentino style, seveal minutes of pitch black.

If you didn’t like the first one because of how violent it was, go see this one. The violence is mostly gone and what there is is pretty tame. If you did like the first one because of all the violence, go see this one to see why it all happened in the first place!

Brew Day (Fat Tire Clone)

Today was the second brew day of the season and I decided to try to clone Fat Tire from New Belgium.

The recipe I used was from the book North American Clonebrews, which is a book full of tried and true recipes for your favorite commercial beers. I definitly recommend it.
I missed my target SG by a little bit because I forgot to account for the extra wort size. I like to have 11 gallons of wort so I can put a little extra in each fermenter. I only used enough grain for 10 gallons so I missed my SG by a few points. Should still be the same beer, with maybe a little less alcohol.

I’m particularly proud of the PVC sparge arm I am using in this picture. I built that from 1/2″ PVC in about 20 minutes with about $5 in parts from Ace Hardware. It worked great! This fits the top of a 10 gallon Rubbermaid cooler. If you want it to fit something else just measure the diameter of where it should sit, subtract two and divide by two. Use that number in place of the 7″ cuts I have below. Here’s how I made it:
4′ of 1/2″ Schedule 40 PVC
(3) 1/2″ PVC slip on end caps
(1) 1/2″ 4 way PVC cross
(1) 1/2″ slip on PVC to 1/2″ FPT (female pipe thread) adapter
(1) 3/8″ to 1/2″ brass hose barb to MPT (male pipe thread)

Cut four 7″ lengths of the PVC. Put a cap on the end of three of them and the adapter on the end of the fourth. Stick the other end of each into the 4 way cross. Put some teflon tape on the threads of the hose barb adapter and screw it in to the PVC adapter.
Using a teensy drill (mine was 1/8″ I think, but smaller would be even better) drill a few holes in the bottom of each of the four pieces. Leave about an inch or two near the ends so water doesn’t sprinkle outside your cooler.
You could PVC cement to make everything permanent, but it all fit together nice and snug and I didn’t have any leaks so I didn’t bother.

Throw it on top your sparge vessel and you are ready to go. It doesn’t rotate, but if you drilled small enough holes it doesn’t matter. The drops coming out won’t bore holes in your grain bed.

First Friday

Tonight Andrea and Charles showed Adam, JoLynn and I Kansas City’s artistic side. We went and enjoyed First Friday. First Friday is the first friday of each month and all the art galleries (of which there are way more than I realized) downtown open their doors and everyone goes and gets drunk and enjoys art. It was super cool and made me realize how little I know about the city and it’s downtown. There were hundreds of people wandering around several blocks having a good time. I ran into Jeff and Catherine (whose name I might have spelled wrong) and completely failed to ask them to join us, because I’m stupid. I didn’t get to see Eric (Hi Eric!), who was also down there somewhere.

This whole deal was an eye opener for me. I’m not really the art gallery type, although I love art. Andrea mentioned at one point that I’m “one of those guys” in response to me suggesting that maybe some of these artists were just untalented hacks who were calling their lack of skill art to try to make some money. When I see a piece of pottery that is supposed to be a cup and saucer and part of it is caved in, and part is broken and the glaze is all messed up and it’s painted in various shades of shit I think to myself “That guy just isn’t very good, so he calls it art and then you can’t criticize him for it.” I learned later that that guy founded Kansas City’s art district and basically invented pottery as an art form.

What the hell do I know?

I’m just subjective as hell. I either like it, or I don’t, and if I don’t I’m not likely to beat around the bush. That’s okay though, not everyone has to like the programs I write 🙂

Yea, I just compared my bits and bytes to your paintings.

We wrapped up the night at 75th Street Brewery which was awesome. Giant soft pretzels and cask brown ale a happy Jason make. Andrea lives within walking distance of: 75th Street Brewery, Chipotle, Wendy’s, a French bakery, Waldo Pizza and some other great stuff. I’d be dead in 6 months from alcohol and cholestoral.

Anyway, First Friday was very cool, and I think will only get better. I’m really looking forward to next month and I think it will be more fun as I get to know the area better. It gave me a better appreciation for downtown. While I’ve always thought the idea of urban living was cool, I’m so suburban it hurts and I really don’t have a clue. Andrea and Charles live and breath it, and made it accessible. So, thanks 🙂

Bouyant Dentistry

You know the phrase “I have to pee so bad my back teeth are floating”? I never understood that phrase till I became a fan of the beer. Now I get it. For those of you who don’t fill your bladder so full that it wants to pop, I’ll explain. Eventually when you have to pee sooooooooooooooooo bad, when you START peeing you feel it in your teeth. It’s really freakin’ weird. It’s like this tingly, painful, weird feeling.

Man, I love that.

Also, thanks to Adam, Scott, JoLynn, Ryan, Shawn and Kwanza for partying it up with me at OC. Happy birthday to me! I’m old now.