The Christmas tech industry shutdown is fast approaching and it looks like it's going to be pretty dead. Lest ye think that I'm sleeping on the job, which I usually am and it's not a job, I can already see a steep decline in any WSN news whatsoever. In fact, I can't even imagine a company putting out a press release at this time since 99% of the tech industry will be in forced shutdown mode.

In the meantime, I apparently have to attend a meeting in Tokyo on Christmas. After that, I need to take my wife on a date since Christmas in Japan is a couples' day similar to Valentines'. On top of that, I apparently need to follow the custom of buying a Christmas chicken at KFC and then a Christmas cake which is a white cake with white frosting. Apparently, Xmas is the busiest day of the year for KFC here. In the US, I can't imagine any day being busy for KFC. Unfortunately, my wife doesn't care much for the other tradition of going to a love hotel after all of the festivities, so that probably means that I'll be getting some software done Christmas night.

Ha ha ha...welcome to my life...*sigh*

I'm switching FreakLabs to a bigger server at my ISP so there may be some weird issues within the next 24-48 hours. Just wanted to let you know in case you see the site go down mysteriously. By the way, I won't be able to access my email for a while too.

Hmmm...although my last post was a rant on my personal beliefs, I didn't think that I would see an example of what I was talking about so quickly. I just posted this article on the situation with Meshnetics. Granted that it's not exactly the company's fault since they basically ran out of money and had trouble finding new investors. I feel bad for all the employees that got laid off since finding a job in this environment is so ugly. 

“You try to rationalize, you think of the good that might come out of it,” he said. “You say to yourself, either they go or you go. You say the decision is not yours, I’m just following orders. But I know they’re going to be in a world of pain when they enter the job market now.” -- Ilya Bagrak, MeshNetics software product manager

Anyways, I think that it's going to be tough for WSN startups in the coming months. WSNs are such a new industry and the protocols are still at an early enough stage that the market hasn't fully appeared yet. Everyone is just fighting over scraps and at the same time, a lot of customers are putting off experimenting with anything new as they try and conserve cash.  I wouldn't be surprised if we saw more WSN companies go down.

Well, I guess there's something good to be said for staying a lone programmer working on something like Zigbee. As the financial walls are tumbling down everywhere, I'm still at the same burger joint writing code, and thinking about what time I should walk my dog tonight. Of course the weakness of the dollar to the yen makes that hamburger a bit expensive :(

Just wanted to let people know that I updated the chip comparison. I just added the AT86RF231 and the MC13224 chips. I'm not sure what other new 802.15.4 transceivers/SoCs came out other than that. If anyone knows any more that should be added, please inform me.

Also, I'm starting my new series on Zigbee/802.15.4 tutorials. I figure that it's about time I put some work into the site. I'm going to put the articles under their own menu button at the top menu so that they can be easily accessible. So far, I've been publishing my articles as dynamic (ie: blog) content which is kind of a mistake. Some of the good articles should be kept in a special section so that it can be easily referenced. I'll be making this change to the older articles as well. 

I've already started porting the FreakZ stack to hardware. I spent some time studying the AT86RF231 transceiver as well as the Contiki Raven port that was done for it. There were some changes I had to make to the driver to massage my driver api into it, but I just got the makefile up and running today. It's probably gonna be a while before I can get FreakZ running in the hardware tho.

That's about it. 


It's a lazy Thanksgiving weekend and I've been kind of bumming around and thinking about many things. Now that I have most of the backlogged tasks for the consulting (ie: income generating) gigs out of the way, I have the luxury to get back to work on the project. But the time off also gave me a chance to contemplate some questions I had about the project as well as the site

One of the biggest things I realized is that I have been seriously lagging on improving my site. When I first started it,  I had grand dreams of turning it into a fountain of information for wireless sensor networks as well as other things that interested me. However as I got deeper into the project, coding and trying to  get the project released started consuming a lot of my time and I eventually started neglecting the site other than keeping the news posts up to date.

By the way, since we're on that subject, I've been noticing a significant slowdown in the amount of press releases for wireless sensor networks. I can only assume that all the recent grim financial news is putting a crimp in companies that were previously experimenting with wireless sensor networks, which is totally understandable. I just hope that the VC-backed (and I guess private equity backed) WSN chip makers can hold out okay. Since I'm basically from the semiconductor industry and still have a lot of contacts in it, I must say that things are looking pretty grim. In fact, one of the distis that I talk to has seen sales for its main product line drop by 90% for next year. Ouch…

Anyways, just thought I would share that with ya so I could add to some of the doom and gloom that is spreading around everywhere.

Back to the story…I was talking about how the site was being neglected due to the coding, and also the workload from the contract jobs. December looks to be a pretty slow month for the consulting work (luckily I'm on retainer, heh heh) so this gives me a great opportunity to do the things I wanted to do on the site as well as move to the next stage in the project.

For the site, I want to add an instructional section. I'm not sure what I will call it, but I plan to have detailed explanations about how Zigbee works. I get a lot of questions and posts about Zigbee, but there seems to be a lot of confusion about how it actually works and fits together. After spending so much time in bed with the Zigbee spec, I would have to say that if documentation could be spaghetti, that would be some pretty nappy pasta.

It would take a gargantuan effort to untangle the spec by someone who is new to it and hasn't intimately dealt with the intricacies of it. And also, the internet is full of articles on Zigbee, but most of those articles are usually high level explanations of it. There isn't any resource I've seen that deals with the details in depth, as well as the implementation issues that are implied by it.

Another instructional section that I want to start is one for rapid prototyping. It's an area that I've noticed some interest in from other people that have contacted me on the site. Or maybe it's just me being biased and inferring interest in something that I'm interested in :) Anyhoo, I think it's a subject that's general enough to be of interest to most of the readers of the site, especially those that are involved in RF design, since that's an art in itself. The focus will be on individual or freelance engineers and how they prototype their designs. That being said, it'll probably be a mix of homebrew and industrial techniques, with the focus on getting a design out quickly. Most readers probably know that this is of intense interest to me, which prompted me to buy the CNC PCB mill, as well as a bunch of other equipment. But my approach is a bit expensive and borderline maniacal geek. So I'll also be soliciting articles from other people on their development and prototyping techniques to provide more balanced opinions.

Basically, what I'm trying to say is that I don't have anything interesting to write about since the site gets enough opinions about Zigbee, ISA100, 6LoWPAN, etc from the news links. And since I'm pretty much a one-dimensional person, I'll just write about stuff I know or am interested in. Hopefully both.

On the FreakZ side of things, I've already started porting the software over to the Atmel platforms that they were kind enough to send me. I originally wanted to get the Daintree basic sniffer working on one of the Atmel boards, but ran into a dead end. Apparently, you need to purchase a $250 package for it, and you get a CD with a registration number. That entitles you to download the software from the Daintree site. Unfortunately, my boards were free (ie: no CD), and I don't want to spend $250 for the basic sniffer since it only decodes MAC and NWK frames. So I've decided to go back to my trusty old Microchip Zena board which decodes frames from the MAC layer all the way up to the APS layer. Although it only handles Zigbee 2006, the changes between the 2006 spec and the 2007 (Zigbee residential) is fairly insignificant in terms of frame formatting. So I don't think there will be a big impact on the sniffer other than some misnamed fields. I hope!

Also, there's been a lot of effort recently to port Contiki over to the Atmel Raven boards now that Atmel is working with Adam and SICS for the SICSLoWPAN project. So this should make the porting of FreakZ somewhat easier and get my hardware moving faster.  

As I mentioned, since December looks to be a slow month for consulting, I'm hoping to regain some of the project time I lost for the last month and a half. Hopefully I can use the time to get the hardware going and also improve the site.

Happy Holidays!

p.s. I'll also be migrating my site to a more powerful server. Recently it feels like it is loading slower and the CPU utilization of the server I am on is pretty high. So I contacted my ISP and asked them to move it to a more powerful server. It only costs about $10 extra per month so I figured what the hell...that's only two cups of coffee in Tokyo...

Well, I have to say that I am pooped. Things have been busy these past three weeks and unfortunately, I've been so exhausted that I just couldn't muster the energy to post anything. Since this is the first Saturday night I've taken off in a while, I thought I would let everyone know what I've been up to.

It all started with the disti makeover project that I thought I could pop out quickly. The plan was to port the vendor USB stack over to the hardware and then write some drivers for the sensor boards. Unfortunately, that went out the window pretty quickly when I couldn't get the stack to run reliably. I then spent the next two weeks writing a USB stack from scratch, which pretty much put a dent in my plans to start working on the Zigbee hardware. Luckily, I was able to turn the mini-project into an open source USB device stack so some good came out of it.

I was surprised when the disti ordered ten sets of MCU and sensor boards from me. I guess they purchase the boards from me since they probably don't want the hassle of getting the parts and assembling them. I'm good for prototype soldering but to do ten sets of boards was hopelessly painful. After buying up all the parts, soldering them down, testing the boards, and fixing the bad PCBs, I would have to say that it took approximately 3-4 hours per board. I ended up only giving them six sets because my head hurt. It took almost two days straight of inhaling flux fumes and trying to track down mysterious hardware bugs to get those six boards out. And my neighbors probably didn't appreciate hearing my air compressor pumping after midnight. 

I've decided that I need to improve my PCB assembly flow. I had originally thought that I would outsource them to some assembly house, but after I made some inquiries, the quotes I got were insane. They were in the range of $2000 for 10 sets (1 set = 1 MCU board + 1 sensor board) with a 3-4 week lead time. That's $200 per set! I was only charging $100 and that included the parts (they pay me a retainer too so I felt bad to charge them more...). Anyways, that kind of pricing isn't acceptable to me, so I'm going to try and move to a solder paste/reflow process instead for future boards. I already checked in Akihabara and found convection-based toaster ovens for about $150. My current reflow oven is about the size of an EZ-bake oven and could only fit about two MCU boards at a time. I originally bought it to reball BGA chips and didn't expect to use it to actually do a lot of reflow soldering. I'm going to do some tests on the convection ovens and if they work out, then I can have a low-cost scaleable solution for reflowing boards. 

Well, after that whole episode was finished, I spent a couple of days trying to understand how my CNC PCB mill works. The thing is insanely precise and I was stepping the head in 100 micron increments. However it does take a certain understanding of the basic workings of CNC equipment (ie: feed rate, spindle speed, tool precision) as well as a fairly deep understanding of gerber files and RS-274X formats. Luckily, Chris at AccurateCNC was very helpful and held my hand through the whole ordeal. I now realize that I had the wrong concept of the tooling that I needed and that for the dimensions I had in mind (8 mil trace width, 8 mil spacing), I should have purchased more precise tools. The CNC machine was very precise however the precision of the bits that you purchase plays a large factor in the minimum trace width that you can achieve.

I was eventually able to obtain the dimensions that I wanted, but I spent a lot of time getting the technique down. I'll probably post up a tutorial on CNC PCB milling in the near future for any others that decide to go the CNC route, since I think that rapid prototyping is going to become essential for people making RF boards. Hopefully, others won't have to make the same mistakes I went through and they can get up and running quickly. 

Finally, I did take time out about two weeks ago to attend the Make Magazine Tokyo Meetup. For people that don't know Make magazine , it's a magazine dedicated to people tha make their own stuff (hence the name...duh). However it's attracted a following of people that blur the lines between art and technology so you get a really interesting mix of people when you attend the events. In the US, the mix is more like the Burning Man crowd. In Tokyo, I'd have to say that the mix was clearly divided. Half the hall was filled with hardcore otaku (geeks) that were a cross between anime and electronics otaku. All of the exhibits on that side were fairly technically sophisticated, although there were many mechatronic projects that involved female anime characters (ahhh...paradise...). 

The other side consisted of artists and crafts people. The artists had really bizarre installations with a hint of tech and were actually pretty interesting. One girl created a latex heart that beat according to CPU utilization of the PC. Frivolous but cool. The crafts people focus on textile based projects and so there were a couple of wearable electronics types of things. Most of them used the Arduino Lilypad with conductive thread to implement the textile electronics. The one very noticeable thing that I took away from the meetup was that the girls were much cuter on the art side of the hall than the geek side. Hey, I'm married, not dead...

I spoke to some of the people at the meetup and mentioned my open source USB project. They recommended that I build an Arduino board for it since the current Arduino uses the silly FTDI bridge for USB serial access. I'll probably email the guys behind the project to see if they're interested. Also, selling a board on the side might help me earn some cash to augment my meager income and it might also get me a collab project with some of the cute, artist, bohemian, hippy chicks.

Anyways, that's pretty much what I've been up to. Now that all of that is out of the way, I just need to finish up some last work for my other part time job which I've been neglecting. Then, I'm gonna start porting the stack over to the Atmel boards I received. I feel bad because I bugged the guy to send me the boards ASAP but it's been like a month since I've touched them. *sigh*

Well, stay tuned because Zigbee will be coming back on line soon. Sorry about the delay.

Here's some pix of the Make meetup in case you were interested. Sorry, no girl pix. My wife periodically checks the pictures on my digital camera...

Just wanted to let you know that I made some minor updates to the site. There were just some things lacking such as project info, etc. So I added a Project link on the top menu bar with some info on the FreakZ and FreakUSB projects. The info is pretty minimal right now, but at least it can instruct users where to download the source code and to browse the documentation. You'd be surprised how many emails I get asking for links for that kind of stuff.

I've also added two new forums, one for each project. Questions related to any project should go in those forums. 

Hope these updates are useful. I really need to do more work on the site...

Hi all.
Sorry about the radio silence recently. I'm trying to catch up with some of my work projects that kind of got left behind recently. Looks like I have at least another week's worth of work left before I can resume the Zigbee development. Gonna try and bust some ass to power through everything. Talk to you later.
Yay Obama!

Obama won!!! I don't want to get too political on my blog, but I was rooting for him big time. It's like the first time since I was able to vote that someone I wanted made it into the White House.

Two posts in one day. Haven't been this active since I started the blog.

Last weekend was a busy one for me. It was supposed to be a three day weekend, but I felt like it wasn't relaxing at all. It all started on Saturday evening when I got an email from Chris at AccurateCNC that my machine arrived at Narita. One thing I didn't realize about freight is that they only ship to the airport. After that you need to do the receiving yourself.

So off on my adventure I went. Sunday morning, I called the freight company in the US. They told me to call their Japan branch. The Japan branch told me to call the airline (ANA). The airline told me to call the airline cargo department. The airline cargo department told me that I needed to personally go to Narita airport to clear the package through I left immediately.

Once at Narita, I had to go off the beaten path to the cargo area. Its the part of the airport that everyone passes by on the freeway on their way to the passenger side of the airport. 

Narita Cargo Area

The airport was about an hour and a half away and I arrived still wearing the clothes I slept in. The cargo area was huge and after a good amount of asking around, I made my way to the ANA cargo area. The lady helping me was really nice, considering it was a Sunday and everyone in cargo seemed to be in a constant state of panic. She gave me the air waybill for the package and told me to go to customs.

Customs was a nightmare. It was two hours of grilling me on the contents of the package. Its not easy to explain what a CNC PCB milling machine does to someone who doesn't know what a PCB is. The conversation went something like this:

Him: Whats a "desktop PCB CNC milling machine"?

Me: Its cuts out a PCB pattern on a piece of copper board.

Him: Whats a PCB?

Me: Its a printed circuit board.

Him: So this machine is a PCB?

Me: No, its used to make PCBs.

Him: Is that like a computer chip?

Me: No, it connects computer chips.

Him: So this is a computer?

Me: Yes *sigh*

It went on like that for about two hours and finally got the classification of computer/robot/machine. At customs, you need to pay a 5% tax on anything coming in that is declared. Unfortunately the invoice was attached to the waybill and it showed the final price of the mill, the acoustic enclosure, and the shipping. All together it was approximately $11,000 so the final tax was about $600. OUCH! 

After being bled dry, they finally approved my waybill so I had to go to another building to pick up the crate. This was my first experience with a palleted item so I went up to the counter and waited in line. When it was my turn, I showed the lady my waybill. The conversation looked like this:

Her: How do you want the item shipped?

Me: Via Yamato or Sagawa (they're like UPS and FedEx in Japan)

Her: *chuckling* Your item is too heavy for them. You'll need a car to pick it up.

Me: I don't have a car. I walked here. (She then looked at me with the disgust that can only be reserved for people that were wasting her time)

Her: You'll have to charter a truck. 

Me: What does that mean? (Another mean glare from her)

Her: That means you hire a truck to specifically bring that item to its destination.

Me: How much does that cost?

Her: A couple of hundred dollars. (Now its my turn to give her a mean glare)

Me: Shit.

She finally took pity on me and called a truck charter company. Fortunately, my apartment was in Tokyo which is close to the airport so it only cost $150 to get the item to my apartment. However that was the cheapest of the cheapest prices. When the item arrived the next day, it was loaded on the truck with no way to get it down. The truck driver was like a 70-year old man, and the truck was an old junker with no lift. We had to ask strangers passing by on the sidewalk to help lift the crate out of the truck and on to a shopping cart from the local grocery. Once it was on the shopping cart, we finally were able to get it to my apartment. 

Whew...what an ordeal. I gave the man $30 for a tip since I must have taken a few years off of his life by having him help lift that box. After I got it in front of my apartment, I knew there was no way to get it in the door. I had to take it apart and get it in piece by piece, since I was alone. So I uncrated it and tried to break it down. Unfortunately, the machine and enclosure was bolted to the bottom of the crate so I had to figure out a way to get underneath the crate to unbolt it. I need to thank Chris at Accurate CNC next time for making my life a living hell through his meticulous shipping methods. They are effective, though.

To make a long story short, I finally got it unbolted and got the unit inside piece by piece. It was the most stressful 2 days I've had in a long time.

Here are some pictures of the unit. I also took pics of some of my other equipment. Its mostly just pics of stuff I had to move to make room for the machine.

Hmmm…it feels like its been a long time since my last post. Actually, in the blog-world, one week is an eternity.
Anyways, I've been taking a small breather from the Zigbee stack after the release last week so I could catch up on some of the work projects that I needed to finish. It was like my life was put on hold for about three weeks so there was a lot of things that needed to be done.

I mentioned before that I took on a second part-time job. Its pretty nice because now, my take-home pay is approximately the same as it was when I was working full time for one company. However I still have the freedom to work on the stack and can still control my own schedule. Ahhh…life is good…

The second company that I'm helping out is a semiconductor distributor. Originally, they needed me to help answer technical questions for their product lines and also communicate with their suppliers in English (it’s a Japanese company). However since that job description is pretty boring, I've expanded the scope to something more interesting.

Having been on the semiconductor supplier side for so long, I've had the chance to see what its like from the vendor side and how they view distributors. I've also had the chance to meet many distributors and see their strengths and weaknesses. In my opinion, the biggest problem with distributors is that they're ill-equipped to handle the semiconductor environment of today.

The semiconductor world right now is much different than it was just a few years ago. Before, it was fine to just hawk chips. Most of the issues that came up were hardware related, and software issues were the customer's problem. The hardware issues could easily be handled by the semiconductor vendors.

Unfortunately today, it is completely different. Sometime within the past ten years or so, the focus went from hardware to software. MCU-based SOCs permeated the industry and software availability started to outweigh hardware performance as the main priority. Also, chip prices dropped like crazy as everyone and their grandma started making ARM-based SOCs. Hell, even the 8-bit microcontrollers started getting everything and the kitchen sink thrown into them; ie: an AVR AT90USB1287 8-bit micro has 128 kB flash, ADC, multiplier, multiple UARTs, I2C, SPI, USB host, USB device, multiple timers, comparators, etc. Can you imagine the amount of software needed just to fully utilize the chip?

SoCs (including 8-bit microcontrollers with a shitload of peripherals) are basically an MCU IP core surrounded by a bunch of peripheral IP cores. From an IC design point of view, as long as you have the IP available to you, you can crank out SoCs like pancakes…and that is what most of the companies are doing. That’s also why you see the chip prices dropping like crazy. As an example, one of the companies I worked for previously sold an ARM7 microcontoller with a high speed USB device interface and a 3Gbps SATA interface for less than $1. And that was over two years ago.

So the point is that with margins dropping and software requirements going through the roof, semiconductor suppliers are unable to handle the amount of software support required for their products. You can easily see this by emailing support at Atmel/Microchip/Freescale/(name your supplier) and seeing the response time if in fact you do get a response. Support is rationed so that Tier-1 customers get the highest priority (the volume customers, ie: 50-100k/month+), Tier-2 customers get whatever is left over (ie: 10-50k/month+), and then finally, Tier-3 (low volume) customers are left to fight over the scraps.  

It's hard to blame the semiconductor vendors (even though I always enjoy doing it), since their margins are dropping like rocks and it's expensive to hire a bunch of software engineers. So increasingly, semiconductor suppliers are relying on distributors to provide technical expertise and support to their customers. However most distributors aren't set up to handle technical issues. I rarely see a distributor that even has a lab, and if they do, its usually some old-ass analog scope and a soldering iron.

So when the disti started talking to me about helping out with some of their technical issues (ie: support), I started to think that it might be interesting to see if its possible to turn a sales-oriented disti into an engineer's dream distributor. Most distis are happy just to find a guy that's heard of programming since a disti is usually the last choice for any decent software or hardware engineer to work for. The stigma attached to doing customer support is like a slap in the face for most engineers that are serious about their work. So this one is getting a little more than they expected.

I've decided to call this project "Extreme Disti Makeover". There are three parts to the plan:

  • Create a reference hardware platform. The platform needs to be modular so the center of the platform is an MCU board. The MCU board will have standardized connectors with a fixed pinout for peripheral boards. That way, the peripheral boards that are made can be interchangeable with different MCU boards. Whenever possible, the chips will be based on the disti's line card.
  • Create a software library that’s ported to the reference platform. The software library will consist of open source software for things like I2C, SPI, timers, UARTs, PWM as well as communication stacks such as a USB device, TCP/IP, and of course Zigbee stacks. Almost all of the software is already available as open source (except for the Zigbee stack which is still being developed :) ).
  • Training the sales people. I'm going to do a weekly 2-hour training for the sales guys that consists of 1 hour of basic design principles for hardware and software, followed by 1 hour of actual implementation on the reference platform. Of course, it will be a pretty basic level, but the main point is to get the guys to actually use the products they are selling. This is unheard of since most people at distis have never even touched the products they are selling. I'm not sure how this will go, but it will be interesting to see if its possible to turn the sales guys into techies.

Basically, this is kind of an experiment, and will probably end up being a lot of work, but its kind of a refreshing break from Zigbee once in a while. It will also be interesting to see if I can pull something like this off. Here's a couple of pics of the first boards for the reference platform. I'll probably be adding a few boards a month to this platform as well as some software (in between stack development of course Laughing)