Wednesday, September 25, 2013

DTMF Decoder Test Circuit

 As part of a few projects I'm working on, I want circuits to be able to decode DTMF tones played over an amateur radio link for remote control. This can be done with a moderately powerful processor in DSP, but I opted to buy a handful of MT8870D dedicated DTMF decoder chips on eBay.

I wired together a quick little test circuit, and it worked right away.
Video:


The built circuit is straight out of the datasheet on page 15.
I'm feeding audio into it from a GM300, which is a common commercial radio that with some effort you can get working on the amateur bands. I haven't done any testing yet as to how noise immune this DTMF decoder is, but I expect most of my remote control commands to be done with enough power that radio link noise won't go beyond the datasheet specs.

Monday, September 9, 2013

How to Have Electricity and Internet at Burning Man

And Still Feel Good About It

As I mentioned in my previous Burning Man post, my big project for Burning Man was trying to get our camp solar-based electricity and Internet for the week. Considering that we had no idea what we were getting ourselves into, and that we weren't willing to bring a gas generator, both projects went surprisingly smooth with only a few little hang-ups along the way.
The electrical system was built around a "TSMT-20A" solar charge controller, which I got on eBay for $21. Solar charge controllers are the glue between a solar panel, a battery bank, and a load, that opens and closes switches to try and prevent the battery bank from being damaged. This controller also happens to have "lighting" modes, where it uses the solar panel as a light sensor and is smart enough to turn the load on when the sun sets, and then turn it off again X number of hours later. Since we were running more than just outdoor lights off of our electrical system, I put the controller in "regular controller" mode and moved on with life.
The controller is important because batteries are temperamental beasts. Feed them too much energy, and they boil off water and damage themselves. Drain too much energy out of them, and they grow sulfate crystals, shed plate sponge material, and damage themselves. This means the charge controller has two jobs; disconnect the solar panel from the battery bank in the afternoon when the system is fully charged, and disconnect the load in the middle of the night when the battery bank is fully drained.

When you pay $21 for a charge controller, you don't get one with any of the extra tricks like maximum power point tracking (MPPT), where they try and change the impedance of the load on the solar panels to try and eak out a little more energy throughout the day by moving the fixed voltage load (the battery) to a more optimal point on the panel's IV curve.  We were ok with this, since we designed our camp's power budget accounting for a poor level of efficiency between the panels and our camp's loads.
The battery bank we used was a pair of old Trojan-105 220Ah 6V batteries that were gifted to me for helping rebuild the scissor lift they came out of. These batteries hadn't been well taken care of, and are by most metrics on their last legs. The internal resistance of the bank is grossly high, which means you can't draw any significant current out of them (which is exactly what you need in a scissor lift), but most of their capacity is still there. This is perfect for my uses for them, since our loads are low and slow.

The solar panel is a relatively small 100W 20V panel that we borrowed from the alternative energy lab at Cal Poly.

Being amateur radio operators, most of our electrical loads are already 12VDC, which meant that we could simply plug them straight into the output of the controller (radios, lights, the WiFi AP, etc). For the rest of our devices, we needed some way to convert the 12VDC into what we needed. For 5V USB charging, I brought my USB power strip, and for 120VAC loads we brought a 400W inverter.

The picture above shows the system mostly assembled, which was done on-site. I hadn't been sure how I wanted to route everything, so while back in civilization, I went to town with a drill press and drilled a ton of random holes, even though I only ended up using a quarter of them for routing and cable control. The DC distribution from the controller to all the loads was done with Anderson PowerPoles, which is the standard 12VDC power connectors used for amateur radio.
Once put together, the system worked great for keeping all our electronics charged and running our camp lights. We were rolling in power all week; we never ran out of power during the night, and the battery bank was usually fully recharged by noon or early afternoon. We even started leaving a power strip out in the middle of our camp so any passers-by could charge their devices. Nothing in the picture above is ours; we left out the power strip when we were leaving for dinner, and came back to it filled with other people's dead electronics.

I had been a little worried about going into Burning Man depending on an untested $21 Chinese charge controller, but in the end it worked like a champ. Once we came home, I finally bothered to pop it open, and was even more impressed with the device's construction.

  • The battery is fused with a 25A ATM auto fuse soldered onto the board. Probably the cheapest 25A fuses you can get, and one I happen to keep in stock for my truck.
  • The power FETs on the back used gap filler to thermally couple them to the metal back plate of the controller. They are cheap unmarked FETs, but it's clearly viable to upgrade the controller with another three FETs in parallel with those that come stock.
  • The controller is an ATMega48! I didn't bother tracing it out, but I'd bet the test points at the top of the board is the ISP bus for reprogramming the device. I didn't have any complaints with the stock firmware, but it doesn't get much easier than this to be able to write your own custom charge controller firmware to run on this. A project for someone with more free time than me, I'm afraid.

Black Rock City Internet

Needless to say, getting Internet into our camp was slightly more challenging than providing electricity. Black Rock City does have a microwave link network out of the city to civilization, which is piped out to the center camps at 3, 6, and 9 o'clock as open access points. We had hoped to get closer to one of these camps to make our job easier, but we still managed to make it work out at 8:30 and K.

Even having Internet at all is a debatable subject at Burning Man, but it was something we wanted to have and make available for others around us. Some burners may be able or willing to pack up and ride off into the desert for a week with no outside contact, but many of us power nerds aren't willing to leave matters like our personal businesses, websites, and important mailing lists to their own for that long. If a minimal Internet connection is the difference between smart people coming to Burning Man or not, it's a cultural shift that burners are going to need to come to terms with.

What we did was bring a Ubiquiti NanoStation, which has an internal 10dBi gain antenna that we aimed at the nearest open camp access point. Since Nanostations are based on Atheros WiFi chipsets, and we had ours running OpenWRT, we were able to configure two wireless networks on the single radio; the first as a client to the remote access point, and a second re-serving it locally as "TheCoveredWagon."

The key with trying to re-serve remote APs like this is that WiFi client mode in OpenWRT generally works best when the WiFi network is its own network interface, and not part of an interface bridge, due to the problem that bridging a WiFi client interface with Ethernet interfaces requires MAC address translation (not to be confused with IP NAT, which is similar but much more widely used). This means that you then need to route between the client WiFi interface and your local interface, which we did using the standard WAN/LAN firewall rules and a local DHCP server.

We also had the issue that the local AP must be on the same channel as the client connection to the remote network, which means that you can't set a channel for the local AP, which means that it goes down when the remote connection disappears. This meant that every time a remote AP went down, we couldn't pick a new one from our phones or my MacBook Air, but had to instead get out a laptop with Ethernet, plug it into the router, and log in from there.

The Internet was spotty all week, and even when it worked, it was slow (we're talking 2-20kBps slow), but it was enough to be usable for us to keep up with email during BM, and since we were re-serving it as an open access point, we saw ~60 other devices connect and use our Internet connection as well.  Running a traceroute and ping from our network to Google was somewhere between entertaining and depressing:

Speaking with the guy in charge of all the municipal BRC microwave links, he said that if we bring 5GHz gear, we're welcome to tie into the city distribution backbone to make being our own ISP for BRC easier next year. Another one of those appealing "city life" projects that I'd love to be more involved with the next time I attend Burning Man.

Monday, September 2, 2013

My First Burn

This last week, my buddy Marcel and I attended Burning Man; a festival "dedicated to community, art, self-expression, and self-reliance." It was an unbelievably huge experience, being a city that grows out of the middle of the Nevada desert and is the home of 68,000 people for only one week.

Our motivation to go was to see and meet the people behind all of the amazing applications of technology out in the middle of the desert.  We found some others who had the same motivation, and a lot more who were there for totally different reasons.  It was fascinating to get to meet both types of people, and in the end I've come home with so many new ideas that I'm still trying to digest.



Preparation

I've already written an entire blog post on the building of my truck's cargo/canvas rack. Once we got to Black Rock City and hung the canvas, its value was undeniable. In the mid-day heat, being able to crawl into my pickup where it never got hot at all was a god send.
 Due to scheduling, we weren't able to roll out for BM until Tuesday, putting us there about 48 hours after the gates opened. I spent Monday night pacing the house trying to figure out what we'll immediately realize we'd forgotten once we get there. We of course packed about seven days of food, which turned out to be gross over-kill, since SO MANY other people insisted on feeding us throughout the week.

 The mechanical strength of the cargo rack wasn't enough for us to be willing to leave it as-is, so we added some additional rope Tuesday morning to structurally re-enforce it.
 After six hours of driving, we turned north past Reno, and drove off into the Nevada desert for 80 miles. There is actually a mountain range in front of us, but the smoke from Yosemite made that less clear...
 We were beaconing all week on APRS as AI6MS-10, which during the drive served to reassure our parents that we were still alive, and during the event gave us a quick and easy way to log our camp's battery voltage (which deserves it's own blog post).

The Black Rock City weather station was also beaconing, so we were really excited to see it, and the other amateur radio residents of BRC, show up on our tracker.
 We spent the ride up getting more and more excited about getting to BRC. Spoiler: we weren't disappointed.
As we approached BRC, the traffic got progressively heavier and slower. It never stopped, but we spent a long time going 20-40MPH on the highway.

Once we turned off the highway, it was another two hours until we finally got through the gate, even two days after it opened.  At the gate, they stop and search every car for contraband. This is where showing up in a pickup was a huge advantage; everything was laid out in my bed, and clearly labeled, so the inspectors spent all of about 15 seconds doing one walk-around of my truck before waving us in. They didn't even have us open any of our huge totes.



Our Camp

 Even though we managed to get to the gate road at a reasonable 430p, even 48 hours after the gate opened it still took us two hours to get through the inspection lines and into the camp. 630 didn't leave us with much time to pitch camp before dark, so we did some basic unloading, but pretty much just pitched our tents and left most of the work for Wednesday.

Here I am working on our camp's electrical system. We brought a 100W solar panel and a set of 220Ah batteries, which left us with plenty of power for our devices and lighting. I'll do a more thorough analysis of that system later.
On the side of my truck, we mounted a 6' mast for our communications systems.


  • At the top of the mast is a X-50 dual band 140/440MHz antenna for our amateur radio base station. Needless to say, our amateur radio equipment proved to be invaluable at Burning Man. Everyone else was running around fish out of water without their cell phones, and it wasn't unusual for camps to lose members for 4-10 hours at a time due to a lack of communications. Marcel and I only had difficulty getting in touch once on the Playa, and that was with both of us away from camp and on complete opposite sides of the city. I managed to climb a piece of art work and we were able to talk fine then.
  • Next is Marcel's set of bubble lights. These were amazing for being able to find our camp at night. The city starts with street names and numbers, but without street numbers, inside of each block the best you can do is saying which third you're in and what other distinctive camps you're by. We were a little worried by the top light's >1A current draw, but we ended up with so much spare electricity, we always left the bubble lights on all night.
  • Lastly on the mast is a Ubiquiti NanoStation2, which we used to establish a long-range WiFi link into center camp, which we then redistributed locally with the SSID "TheCoveredWagon" as our own little ISP. At times we had 20-30 devices simultaneously associated, which meant our Internet wasn't so great, but we did the best we could. 
After we finished building camp, it was time to gear up and strike out into the Playa.
 I was surprisingly well prepared for the desert, and didn't have any major heat-related melt-downs like I did last summer while visiting TI in Dallas. This mostly came down to some good equipment choices, and solid hydration discipline, on my part:

  • Ventec Tactical Goggles - These were hands-down the best $10 I spent for BM. You do need to modify the stock foam padding to add more ventilation (it's air-tight with the stock padding), but 10 minutes with an exacto knife fixed that.
  • A high quality bandana - It's critical that you spend more money on a good bandana than you have to. Cheap bandanas will fall apart, and the better fabric was well worth it. Between the bandana tied over my face when needed and the goggles, I was able to spend hours out in the white-out dust storms typical of the Black Rock desert, without ever even getting uncomfortable.
  • Evaporative Cooling Bandana - This one was less critical, but staying cool and hydrated in BRC is challenging and important. It was usually almost impossible to tell if you were even sweating at all out in the dust and heat, so any extra cooling was important. 
I saw a lot of melt-downs from people who showed up grossly under-prepared for the heat, or simply didn't take care of themselves once they got there. The beginner's guide that came with the tickets told us to bring at least 1.5 gallons of water per person per day. THIS IS NOWHERE NEAR ENOUGH WATER FOR BURNING MAN! Marcel and I looked at that number, shook our heads, doubled it, and came in just about right. Not counting the additional fruit juices and beers we had, we each drank about two gallons of water per day, and used an additional half a gallon for washing and cleaning. I have no idea where that 1.5gal number came from, but it is grossly wrong.
 Of course, we weren't just at Burning Man to fight the desert and see the art; we got to meet countless interesting people as well. One morning, on my way back from the bathrooms (four blocks away), I got kidnapped by a gang of men running around in bright pink ski masks and forced to join their 9am drinking party. While being held hostage, I met Nicole from Australia, who happened to be camping down the block from us, and who we spent a lot of the rest of the week chilling with when Marcel and I weren't hunting for amateur radio operators.
 While out riding around the Playa, we got caught in a dust storm and got to sport our matching bandana dust respirators.
Turns out, behind Nicole's camp was part of the Dropbox team! I got to bend their ears for 30 seconds and bitch about how I hate how their protocol discovers other hosts on a LAN for Dropbox LAN Sync before we all went back to partying and having a good time.
At Burning Man, when you sit down with someone and get them talking, they almost always have some kind of story. We met dozens of people, but one good example was our next door neighbor, Crafty, who had just bought this old LA transit bus that someone had converted into a camper. He has plans for how he's going to fix it up and convert it for future camping trips and burns. He was a cool guy, and even gave us a pair of flooded lead-acid batteries he didn't want any more. Thanks Crafty!


Artwork at Burning Man

 A huge part of the BM experience is all of the artwork that just permeates life in BRC.
 There is almost no way to give a sense of scale out on the Playa. You can go out there and walk for half an hour and then stumble upon some random lone piece of artwork that is just as interesting and neat as anything put up in the core of the town.
People's costumes were hilarious as well. We were walking home from the man when we encountered a guy trying to teach a group wearing wedding dresses how to ride a single-wheeled gyro scooter.
 At the heart of the city is the Burning Man, which this year consisted of a four story UFO and the classic man, which stood 112 feet high and is at the very center of town, geometrically. Whenever I got lost or disoriented in town, I'd just look for the Man and center camp (at 6:00 and B) to get my bearings again.
 If you thought the art was impressive during the day, you get floored again once the sun sets and the lights come out.
 The party and club scene was fast and hard. The number and scale of clubs built downtown was amazing.
 The fire art was also impressive.


Some of my favorite pieces of art weren't the huge 100 foot tall installations, but the snarky burning man humor that you found in the most unexpected places, like the bathrooms.

One of our new Burner friends, Tug, uploaded some great HD video from his RC planes and copters:


Black Rock City Airport

 Thursday, Marcel, myself, and some of our newly found burner friends wandered out to the city airport to admire all of the planes flying into BRC.
 Marcel was in charge of nerding out the most on this adventure, but after last summer in Arizona (post 1, post 2), I had a good time looking at the planes as well.
Of course, when you're in Rome, talk to the Romans. The pilots were some of the friendliest people we met all week, and several of them gladly offered to give us fly-overs of the city the next morning before it got too hot. YES! The next morning, Nicole and I got to go up with Wizz Bang, and had a great time getting a birds-eye view of the city.



 Hey look! It's our camp way out in the burbs. That's what we get for showing up 48 hours late...



Needless to say, we had an amazing time. Thank you thank you thank you Wizz Bang!



City Life

 Probably one of my favorite parts of Burning Man was actually one of the most normal. Even though 68,000 of us were stuck out in the middle of a freaking desert for a week, with almost nothing other than what we brought, a thriving city with things you'd expect in any city still came to life, even if always with little Black Rock twists.

 The clubs were, of course, numerous and impressive.
 I found at least two radio stations in town, with everything you'd expect; talk shows, interviews, music, etc.
 The ad-hoc network infrastructure worked surprisingly well. Tons of 5GHz WiFi gear for the long-range links between the city's uplink and everyone who needed (or in our case, wanted) Internet.


 Of course, every city would be incomplete without a skate park and a bowling alley. BRC certainly would be.

 The dining scene was also surprisingly lively, considering that money is strictly passé in BRC. The Farmers market was a huge bust at the end of the week, since most of their fruit had already spoiled, but that's what you get for having a farmers market in the middle of the desert after five days without modern refrigeration.
 The Temple of Whollyness was a very good place to go collect oneself and morn past losses.
 THEY HAVE A FREAKING GO CART TRACK!


Marcel and I even managed to find the 30kW power plant that powers lots of the major lighting installations out in the middle of the playa. Power lines were simply buried in the dust. Eve was doing her best keeping the dust off the panels, but it was kind of a losing struggle.



Exodus

 Saturday morning, we were having breakfast and looking around, and realized that no one had left yet... We had heard horror stories from years past for when the weather was as nice as it was this year and everyone stayed until the last moment. Getting out of BRC involves driving down a single two lane highway going through the nearest town, so when 68,000 people all wait until the last moment, the traffic is HORRID. We both have lots of things we need to get done this week, and didn't have time to get caught in traffic, so we decided to cut out a day early.
 The only way that you can even tell we camped here was a few stake holes. Unfortunately, this seems to be unusual; we saw camps doing all sorts of awful things to the playa surface below their camps, primarily while packing. I saw one camp dump hundreds of gallons of shower grey water on the clay surface while they were packing up, and then justify it with "well, it'll all evaporate eventually." Watching people take Hollywood showers every day was unbelievable and disappointing.
 An hour and a half after we started packing, we were ready to roll out. Our total waste production for the week was 5.5 gallons of grey water and a four gallon bag of trash. We were disappointed watching other camps being much more wasteful than that throughout the week...
Finally back in Sunnyvale, and still covered in Playa dust. I spent all day Sunday and some of Monday cleaning, and you can still find dust in my equipment and truck.



My Thoughts

After spending a week out on the playa, and all weekend digesting what I got out of it, I'm coming away with really mixed feelings as to what I thought of Burning Man. I met tons of interesting and smart people, and had an amazing time, but it was hard to get over the surprise that for every awesome person we met and hung out with, we saw a lot more losers and people who clearly weren't interested in experiencing Burning Man beyond being a tourist or bucket lister.

There were entire blocks of camps where people drove up in their RVs, dropped a gas generator out the back, and watched Black Rock City drift by. Maybe they really were testing their self-reliance by renting an RV and still taking a shower every day, but Marcel and I were pretty disgusted.

I understand that everyone came to Burning Man for different reasons. Every technology person we talked to wished there were more technology people, and every art person wished there was more art people there, but what value were the fields of RVers adding to BRC? I couldn't convince myself that these people didn't see BM as anything more than another experience like hiking the Inca Trail or visiting the Great Wall of China. Talking to them, I got this under-whelming sense of anti-intellectualism that I REALLY didn't expect to be getting at BM, and couldn't figure out how they didn't think of the place as much more than the highest density, shittiest, most expensive, and most interesting camp ground they had ever camped at.

What they were (or weren't) trying to get out of BM shouldn't have bothered me, but the shear number of them made it hard to find a camp site or even the other interesting people I was looking for. I worked damn hard to get to BM and to leave at the end of the week with such a small impact on the environment; watching others take the easy way out invariably cheapened my experience.

Does this mean I didn't have a good time? Lord no. This has been the most thought provoking week of my entire life. Do I think I'll ever go back? I'm really not sure. The cost and work to get there is really prohibitive, and to meet the same kind of people, I can spend less money and energy and meet them at other events.

If someone came to me and said "Kenneth, we need an engineer for our camp. We'll take care of the hard stuff like food and logistics; just bring your electrical and communications systems," I'd think really hard about saying yes. Will I grab one of my buddies and do what Marcel and I just did again? No, probably not.