Update on wireless boards
by hartmms on Jul.10, 2010, under 6LoWPAN
Back when I got my wireless boards back from the BatchPCB, the ISP header footprints were wrong. I finally figured out what happened.
I was able to get a SAMTEC generated Eagle lbr file for the 0.05″ headers. Their footprints for these headers are 24 mil drill, 39 diameter @ 0.05″ spacing. My footprints were 20mil drill, 24 diameter (yes I know, pretty crappy footprint design). When viewed in the layout window, both footprints have diameters 20mil larger than what was specified in the footprint. How come the samtec footprint is 24drill/39dia, but when place into my layout, the footprint changes to 24drill/44diameter? The resulting footprint has 6mil spacing between via rings (DRC violation). After experimenting a ton in Eagle, it turns out the diameter of the via rings can be overridden by the “restring” tab of DRC window. The SparkFun.dru file as the minimum set to 10mil. This 10mil is actually the width between the drill hole and the ring edge, so x2 to get the full diameter. 10×2=20. This explains why the resulting diameters in the layout window were always different than the footprints. I can now use the official SAMTEC footprint in my designs if I just decrease the Sparkfun pad restring values from 10mil to 9mil. I’ll assume this is kosher to do since min trace widths are 8mil. I believe SparkFun had 10mil instead of the minimum 8mil because in one of their tutorials, they said it’s better to make the rings slightly larger in case the drill hole isn’t perfectly centered on the via pad.
This just goes to show you really ought to use gerbv and measure your spacings and vias before sending your design out to the board house. You never know what may conspire under the hood to screw with your design.
I got a new car, time to hack it!
by hartmms on Jul.10, 2010, under general
So several months ago I was coming home from work and got in an accident. Panic stop ahead of me and 3 of us were following too close, so bang, bang, bang. Luckily no one was injured. I’m during my 13 year old Eclipse and the airbags deploy. That is when I learned that airbags cost a lot, which in my case was more than the car was worth.
So I got myself a Mazdaspeed 3 as a replacement. A rather large step up as a car. It’s 4 doors and has 265HP. The really cool thing is it has bluetooth built into the stereo. So I took my iPhone holder and mated it to a generic PDA/phone windshield mount. Cool thing is when I get in my car and start it up, it auto connects to my phone and starts playing music. Awesome. All I do is just plop my phone into the lego dock and It’s charging while I’m driving down the road. The drawback is the 12V plug in the dash is switched with the ignition. Another drawback is it’s approximately 3 feet away from where I stuck my mount to the windshield.
The dash to the left of the steering wheel has some blank panel fillers. Most likely for other optional items (heated seats) in other countries. I decided to disassemble one of my cheap 12V -> USB car adapters and put it into the dash permanently. While I was planning it, I also decided to take one of my spare keychain garage door openers and put it inside the dash also. This way I would have a couple of buttons on my dash to control the opener as well. (I had the bulky ones that clip into your sun-visor. The good news was the garage door opener remote needs a 12V batter. Even better, the part of the dash with this blank panel is right above the OBD II connector, which has GND and non-switched 12V. My plan is coming together.
So got myself a couple of switches from Radio Shack and went to modify the items. The really nerve racking thing was cutting the dash panel blank. As you can see in my pics, I messed up a little (but nothing a little paint can’t cover up). I failed to pay proper attention to where I placed the USB jack hole and placed it were it collided with the black plastic ring that holds the whole assembly on the dash. Crap. I had to use the dremel to hack up the plastic ring so everything fit. It works again, but doesn’t look pretty. Oh well, it will be hidden behind the dash anyways.
After wiring it all up and testing it out thoroughly, I decided to cut off the status LEDs from the boards since no on will see them behind the dash. I taped it all up and re-assembled the dash. Tested it again and neither garage door button worked. Oh no. I remove the tape and inspecting everything again and thought about what I did between the last successful test and now. I realized the LED on the remote was required for it to function correctly. Whoops. After placing a new LED into the remote, everything worked again.
I’m happy about how it turned out. Looks pretty decent. I would have preferred some cooler buttons, but there was limited space on that blank.
Sorry state of the blog
by hartmms on May.30, 2010, under Uncategorized
Digikey & Mouser keep pushing the atmega128rfa1 arrival date out. I’ll use that as an excuse for my lack of project work. The real reason has been it’s spring and I’m off mountain biking and doing other non-interesting simple projects around the house (spring cleaning).
I did swtich my home alarm system over from lighttpd & cherrypy to a pure cherrypy server. I had to upgrade to a newer python on the ngw100, and it broke the cherrypy and lighttpd integration. I ended up just switching to a new version of cherrypy with basic authentication in it. I tried to get the ssl of cherrypy working, but something got goofed when I had to compile one of the supporting python ssl packages. For now, all web traffic is in the clear. Not a good long term solution, I know, but at least it works.
The eventual solution will be custom iPhone and/or Andriod apps that use ssl socket communication to work. I’m finding my 3G iphone is kinda slow serving up my jquery/javascript site I have now.
Boards received
by hartmms on Mar.21, 2010, under 6LoWPAN, Home Automation
I got my boards back from BatchPCB. They must be popular now as it was only a 2.5 week turn around time.
They all look good, except for the 6 and 10 pin ISP/JTAG header footprints. The holes are too small for the 0.05″ connectors I have. This is very strange as I used the same footprint before for my 0.1″ to 0.05″ ISP adapters and the holes were fine for those boards. I contacted BatchPCB to see if they can help figure out what happened.
boards sent out
by hartmms on Feb.28, 2010, under 6LoWPAN, Home Automation
Digikey and Mouser now sell single quantities of the atmega128rfa1, so I decided to quit procrastinating and finish up the boards and send them out to BatchPCB:
- Xbee pinout compatible module (2mm headers)
- dual motor control featuring the Toshiba dual H bridge TB6552FN chip.
- light switch + dimmer with a a Bias power AC/DC power conversion module.
They all have a chip antenna. I figured I would try to keep it simple for the RF section.
Now all I have to do is dump out the BOMs from Eagle and order some parts. I’d better do it soon before it becomes spring, otherwise I’ll be outside doing fun stuff outside instead of inside working on my boards.
Security web interface rewrite
by hartmms on Feb.20, 2010, under home security
So I ran across a new book about writing apps for the iPhone with html, css & JavaScript. Using my Safari account, I was able to read the book and I learned a lot. I decided that instead of trying to write a native iPhone app for my security system, I’d write a HTML one that could work with any phone or web browser.
So I took the concepts from the book as well as learned some other javascripts tricks and I coded up a new site:
As you can see, the page looks very iPhone-ish. There’s even a Back button concept I borrowed from the book. What is also new is when I click on a toggle button, it brings up a jQuery popup now alerting the user what was pressed. This also allows time for the app to send the command and wait for the status on the security server to change before querying door/alarm status again. In the case of a garage door button press, the app waits a full 20 seconds for the door to operate.
This sending of command and fetching of results is done with “ajax” javascript by removing and inserting html into a specific “div” section. I’m actually excited about the results and how I was able to learn “ajax” and “modern” web programming code. So much better than the early ’90s vintage html table I had before.
New method for severe weather alerts
by hartmms on Jan.24, 2010, under Home Automation
A while back I wrote a simple perl script to grab weather watches/warnings from the National Weather Service (NWS). They used a “CAP” (almost identical to XML) standard for the data Well, the NWS decided to change formats on me. After looking at modifying the script to work again, I decided hacking it up again to work was just not a good idea. Time for a new app! I’m calling it an app because apps are all the rage these days. I wrote the app in Python and used 3 notification methods:
- custom interface to my home info panels (Nokia 770 tablets running my own home security/automation GUI written in python-gtk )
- Prowl iPhone push notificaion
The new addition I’m excited about is the Prowl notification. Before, I only had email and I would often miss the single beep and vibrate of my phone. Now with Prowl, I can send an “emergency” notification and my phone will beep till I acknowledge it by viewing the alert. Awesome. I’ll post the code here once I’ve tested it out for a few more weeks as well as comment and clean it up.
In other news, one my my Nokia 770 tablets bit the dust. I picked it up the other night to check the weather in bed, and the touch screen didn’t respond. After hard resetting it, the screen came back on with streaks and was unreadable. I took it apart, hoping a reset of any LCD connections would fix it. No luck. The screen functions just barely enough that I can tell everything boots correctly. Oh well, good thing I had another 770. I’ll be off to scan ebay for replacement units. Maybe I’ll get lucky and run across one for parts that I can nab real cheap. It might be time to grab an N800 or N880, but the price will determine what I get.
Better Eagle PCB libs
by hartmms on Jan.21, 2010, under general
If you use Eagle PCB, do yourself a favor & download this set of libraries. There are tons of good symbols and footprints in there. They are organized into very useful bins that make it easy to browse for part ideas. No more hunting and pecking through 30 pages of Digi-Key search results for “switch”.
Also check out the site behind the libraries:
ZigBee boards almost ready
by hartmms on Jan.03, 2010, under 6LoWPAN, Home Automation, home security
I now have 3 ZigBee/6LoWPAN boards ready for sending off to BatchPCB. In addition to the two I showed previously, I have added a light swtich/dimmer board as well. I’ve ditched the 3 way option on the antenna and gone with just a ceramic chip antenna. I picked a Johanson balun specifically tuned to the atmega128rfa1 chip. I’m working on getting a few samples from them, as you can’t buy them from anywhere I can find. Hopefully Johanson will be nice to me and send me a few. If not, I’ll have to go with a generic balun from Digikey, with 3 caps for filters.
I also added a ftdi debug header to the blind/motor and light switch boards. This will really help with the light switch board as I can debug most of the functions (zigbee & capactive touch) without needing to hook it up to the AC line. I can test the final dimming with live AC, but the board contained inside a plastic box.
It took a while to get the light switch finalized. I took apart a Luton dimmer box I have to see how the do it. It looks like they have some sort of micro-controller from ST controlling a ST triac. Their design only requires 2 external wires, both of which can be wired to the “hot” from the supply and the hot of the light. I believe this is what Bias power called a “no neutral” configuration. At any rate, it provided a nice verification of lots of articles about AC dimming I read on the net. Triac AC dimmers require filtering to prevent them from injecting noise into the house wiring. The filtering also keeps the lights from humming when dimmed. Taking apart their dimmer also gave me an idea how I can use a simple aluminum plate to act as the switch face (behind the swtich cover) while also being the heat sink for the triac. Just use a through hole triac, bend the device over and use a rivet through the hole to fasten to the plate. Easy as that.
Unfortunately, the Christmas break is over and I won’t have the time to dedicate to these boards that I would like. That may be a good thing, since I can’t see anyone carrying the atmega128rfa1 yet.
I’ll post board schematics & layouts when I have finalized them. I gotta also figure out a license to tack on them (TAPR, LGPL, etc).
New boards for wireless in the works
by hartmms on Dec.13, 2009, under 6LoWPAN, Home Automation, home security
I spent some time creating new boards:
- 6lopan/zigbee module that fits in a Xbee footprint
- 6lopan/zigbee dual motor control board
These are preliminary boards. They pass BatchPCB DRC checks, but I need to go over the schmetics again as a sanity check. Also the ground planes/RF trace widths are not finalized either.
- 6lopan_module
- zigbee-6lopan_motor_board
PDFs of the 2 designs:
6lopan-Xbee_module_board
6lopan-Xbee_module_sch
blind_motor_brd
blind_motor_sch
The next board I work on will be the light dimmer. I’m thinking this will be a 2 part solution, one part wireless/dimmer/AC part and the other will be the capacitive touch pads & LEDs. The idea being the main board will be contained inside a protective box to prevent shorts/mishaps. I’m still trying to figure out what the switch should look like. I like what Lutron did with their vierti switch. However, I would rather have a completely seamless touch surface. The extra touch would be to have a power symbol transparent with a blue backlight indicating status:
Something like this for the dim value would be cool as well:
The slider effect will be hard to get with LEDs. Also, I have no idea how to construct a panel with a combination of solid and transparent bits. Oh well, the touch/LED panel isn’t that critical. The harder part is to get the main board working first. And I’m thinking that the hard part of all of these projects will be the software.










