Tuesday, December 20, 2011

PIR Burglar Alarm

This week I constructed a PIR Burglar alarm. Parts I used are: a PIR sensor, an Arduino, a XBee, an XBee Shield, and a high-decibel Siren. The code I used is provided on Make Projects.  I also needed a second XBee and an XBee Explorer.

I decided to use an XBee to send my text alerts wirelessly back to the computer, as part of the Smart Home system, to monitor when a PIR sensor triggers. In the future, the Siren will be on its own node, to be remotely controlled whenever an emergency justifies sounding the Siren.

I'd like to note though that I wont be replacing my current fire alarm system. Smoke Alarms pass stringent standards and are required by law, so I wouldnt ever replace that system with my smart home system. My system just would add a few extra layers of protection in addition to that system. So the Smart Home System would be independent of the Fire Alarm system in a home. As I see it, all nodes will be on XBee, and power will probably be two fold. There will be a backup lithium battery in case power goes out, and the main power supply will come from a land line wired to all the nodes. Nodes that cant be reached with wiring, would have to be solar powered, or simply battery powered.
Next up on my plate is an RFID/XBee Door Entry System. (A link to the product intro is here.) Again, this wont be replacing my keyed locks, this just adds one layer of security on top of existing security features. This entry system in addition to the Face Recognition System I plan to implement, pretty much means, not only will nobody get into my home unless I allow it, but I will know when someone tries to get in with or without my permission. I love biometrics. =)

A merging of two Open CV Logos I found on the web
Please feel free to comment on ideas, Im welcome for suggestions and discussions. As always, I am committed to sharing links of sites I come across that are useful to my research projects. This week, Ive added quite a few more, so take a look.

Peace Out.

Thursday, December 8, 2011

XBee 101

This month I am working with XBee's to get my sensors wirelessly transmitting data. Ive started to come across many tutorials out there, but nobody is saying straight out that XBee's will work out of the box with no setup required. You just have to verify that the PAN ID, CHANNEL and BAUD RATE match both XBee's, but other than that DONT play with any other settings if you just want a simple point-to-point transmit/receive setup.
XBee Series 1 Modem
If I had known that a week ago, I would have spent this time experimenting with sensors, but I just got the thing working last night, because both Sparkfun and Adafruit DONT explicitly state these things. They give you a tutorial to follow, and if you stray from that, you're in trouble. For example, one tutorial I came across said to change my DH and DL serial numbers (thats Destination High and Low), to the serial number of the current XBee you are working with. Thats wrong because then it tries to talk with itself, and nothing will happen.

Anyways, complaints aside, now I have a working XBee network. Its only one node and one router, but thats a start. Next step is to work on sensors, and get a simple setup going for a wireless burglar alarm system. It helps to have a high decibel piezo alarm to get a better feel when its working (as I do). I'll keep you posted of updates, and I might throw some sample code on here the next time I post.

Thats all for now. Peace Out.

Tuesday, November 8, 2011

Tiny OS

Well I built that fan controller board with some mods to the board. Havent gotten around to programming the Teensy ++, I'll get that eventually. Ive really moved on to using some Crossbow sensor units that Ive acquired, and maybe those will help me along to figuring out how to use Xbee Mesh networks, sensor units and Embedded Operating systems. All this stuff is important to create my sensor mesh network for the Smart Home System. Not much new updates other than that. Tiny OS, the embedded OS can be found in the links I added in the sidebar; very useful stuff.

Take care. Peace.

Wednesday, October 5, 2011

Arduino Fan Controller

Well I've managed to get back on my projects lately, so here's an update.

First on my list, if you'll remember was my SMD Exhaust Fan for my soldering station. Thats now done for the most part. I followed the schematic on uchobby.com and built myself a nice fan controller with it. I only changed a few things due to the power requirements of the fans (Im using two, 0.5A 7W Computer Fans) and parts available to me. I used a 4N25 Optocoupler to isolate the microcontroller from the 12V power supply line. I also beefed up the Transistor with a TIP121 Darlington. Based on power requirements, Ive decided that the 1/4W resistor and the 1A diode are fine and dont need to be beefed up. Only the transistor will be handling a high power load, and the TIP121 is rated for 3A, so Im fine. The diagram shown below is linked from uchobby.com.

Ive been toying around with it to make sure it works, and it does with both fans. Designed an enclosure for it to sit in, just gotta send it to the shop to get made. Still gotta build the exhaust hood so that everything can function in its final setup. I'll show pics of it once I get my new circuit PCB in and solder all the parts on. In the meantime, here is a picture of the non-populated board.

Next on the list of things is my IR Temp Controller for the SMD Hotplate. I've already gotten started designing the system and the schematic. This one will be using a IR Temp unit from Harbor Freight (probably one of those cheaper ones), since I found a tutorial somewhere describing how to hook it up to an Arduino and get data out of it. I'll post updates once I get this project done.

Two links I'd like to share that I thought may be useful to everyone: the OSHW Eagle Library, and the NBITWonder Eagle Library.

Stay safe. Peace out.

Saturday, September 17, 2011

Lack of Updates

Well work has picked up a bit, so Ive been unable to work on my projects and move forward with anything. It will probably be like this for the next few months until I can figure out how to balance work and personal projects.

I'll try to get those Teensy shields made as soon as I can, but Im still lacking in a few things. First is a temp controller for the Hot Plate. Second is the Exhaust Hood for the SMD/Soldering Station. Third is the Mini Fridge for all my Non-Edible Project related items. Once I get all three things put together, I can start up doing SMD tests, and then go full scale with the shields.

I got lots of circuit designs for the PWM fan controller and the temp controller, so I'll put together a couple schematics to put into Eagle, and send those off to Laen so that I can move forward with this stuff. I really dont like Perf Boards, and since this stuff is going to be used on a regular basis, I would prefer not to use breadboards.

Well, ranting for long enough. Peace Out.

Sunday, August 28, 2011

GerbV and Gerber Illustrators

This weekend I came across a Gerber Illustrator called GerbV (thanks to Addidis). FYI: this is available for Mac's on MacPorts, and as gerbv on linux/ubuntu. Im currently using it on Windows Vista.

So this little program can convert all your Gerber files into a nice pretty image on your screen, which you can later export as a png to post on your website or share around. Unfortunately, there isnt a very good how to manual for this program, but it is easy to work with. You just have to know the order the layers go in, and what colors you should be using. For this post, I am using Laen's PCB boards for the colors (Purple silkscreen and Gold pads).

Once you load the program, you have to import your gerber files (.ger extension), and the drill file (.xln). The other drill file (.dri) isnt recognized, so you have to generate the (.xln) file. EAGLE does this by default using Laen's CAM file, so you dont have to worry.

Now that you have your gerber files loaded, you should see them in whatever order you loaded them as, and a preview on the right. You'll have to move the gerbers around (using +/-) to get them to the correct order. This Color Datasheet will show you the order the gerbers should be in, as well as the colors of each layer. If you happen to have the colors worked out for standard Green boards ( or some other variation thats popular) please let me know, and I'll link to the datasheet or site that its on.

This gives you a nice pretty image of your board, so you can see what it will look like before you spend the money to make the board. This is very useful to catch any mistakes you've done on the board. And believe me, mistakes do happen. Take for instance one of my previous boards (I posted pics awhile back), the pad sizes were too small because of a software glitch, and two resistors share the same via. Had I used this program, I would have caught those errors, and saved myself a lot of money in re-spinning the boards.

I hope you've learned something from this. Its helped me a lot, and I hope it helps you.

Thanks Addidis.

Now for the update on the SMD soldering station: I've gotten my 1000W Hot Plate (yes Im aware I overpaid by 10 bucks), and still waiting for my Antex USA XS25 Soldering Iron in the mail. Im prepping to build an exhaust fume hood in my apartment so that the solder fumes dont stagnate in the apartment. Also working on an IR sensor to flip the hot plate off when the temperature hits just right. Both DIY instructions can be found on Instructables. Thanks to BikeNomad and Jimk3038 for the how-to's.

Also working on a new board which has everything to do with my smart-home project, which is a smart gas sensor board. Its got a gas sensor and a microcontroller to regulate the correct temperature for the on-board heater. If this board works out, then I'll probably throw this into the pile of 'Patents to do' so that when I post it online for the world to use, I get credit as the original designer. Dont want people going around sharing my hardware and not giving me credit, especially if I start selling this stuff in the future.

Well I think this post has gone long enough.

Peace, Pot, Microdot.

Sunday, August 21, 2011

SMD Solder Station Setup

Well Ive begun to order bits and pieces of my SMD/SMT solder station. First up is a Maxi-matic Elite Cuisine 1000W Hot plate. That runs for about 40 bucks. That sets the stage for getting my SMD stuff soldered. But for rework, and through-hole soldering, I've also ordered an Antex XS25 Professional Soldering Iron. Those run for about 40 bucks as well, but I added a bunch of tips, and a fancy base, so that brought the price tag up to 70 bucks with shipping. 

Things to get still are:

  1. A Laser/IR Temp Sensor
  2. A small refrigerator - for keeping Solder Paste
  3. Solder Paste
  4. Mylar Stencils
  5. Possibly a second soldering iron, but this time temperature controlled
  6. A Magnifying Light - so I can see really small things on my boards
  7. Solder Flux - I prefer the ones in syringes: they're just easier to work with, and give you tiny amounts
Once Ive setup all the components of the soldering station, I can begin assembling components on my prototype board. Of course I'll have to program the Teensy I've got to test that everything works out. But Im considering getting a mobile/portable oscilloscope just to get me started in case I need to test any connections.

Thanks for reading.

Saturday, August 13, 2011

First Prototype Board

Well I got my 3-axis accelerometer Teensy shield PCB's in the mail yesterday, and Im excited. So far all looks good on the design, and Im ready to get my PCB soldering station setup so I can tinker with soldering the SMD parts. Once thats done, then I'll test the board. If it passes all the tests, then I'll solder up the other two boards, test, and put em up for sale (probably an ebay store, linked from the Teensy website). 

Depending on how this sale goes, I'll either expand this venture, or move on to another design. Im curious to know what kind of people can actually use this board in their designs and projects. Its loosely based on the Sparkfun breakout board, but there are additions to this. I've added an LED to the board, along with a reset button for the Teensy. I've also designed this so that it can be used along side with my two other prototype shields that I've drawn up. Again, depending how the sales of this go, I might be selling all three of these boards possibly by the end of the year. 

I'll post a picture of the boards when I get the chance.

Minor update about the Smart Home system: since moving into my new place, and getting setup with the new job, I havent made much progress. But now that Im getting my SMD soldering station setup, I'll be able to solder up those boards I made, and test them to make sure they work. Then once I feel confident about my SMD soldering skills, I'll order up my new sensor boards with SMD pads, just to make things smaller. I'll probably investigate into making a thermally controlled toaster oven to make two sided boards, but that'll be in the future.

Sunday, August 7, 2011

Eagle Libraries

I had a discussion with my supervisor at work a few weeks ago about the lack of Eagle libraries available to people for development. So I've started going around collecting as many Eagle Libs as I possibly can to add them to my collection and make them grow. 

Here is what I've collected thus far: the basic Eagle Libs, the Teensy series, Sparkfun's Libs, Adafruit's Libs, Dan Strother's Libs, and some more. Download all of them zipped together here.

I'll post updates on this when I can. In fact, I'll create a page to host this as a more permanent home.

Also there just so happens to be a Library Repository on the Cadsoft website. 

And of course, the goodie of the day/week/month...Hackaday covers Visualizing PCB Revisions.


Tuesday, July 26, 2011

To Work, or Not to Work

Well, I got a new job at a local start-up company, so I havent been able to make any progress on this project much. I have completed 3 Teensy shields, but unfortunately they have nothing to do with this project, so alas, no progress.

Once I get settled in the new job, I should be able to resume work on this project however I can. The plan for now is to setup my SMD/SMT soldering station at my new apartment, and get my BOM's together to make one massive order from Mouser or Digikey.

I'll post again when I have something tangible to discuss.

Friday, July 8, 2011

New Boards!

Finally got back in town, and what did I get in the mail? My new boards. Purple and gold: Love them. So now the next step is to check them to make sure they're all electronically correct, and order any parts left to order.

I also received my Powerduino, which is the DC-DC converter shield with a MAX1771 chip in it, as well as another prototype board set.

07/10 Update: I caught two major flaws in my electrical test/board revision. I can mod the board to get it to work, so I'll go ahead and do that to make sure the design works before ordering new boards. New boards will implement vias tenting, correct label sizes and fixed via sizes. I am also considering using 3.5mm 2-pin screw headers for connecting the power supply source to the relay board, rather than my specialized header connection thats made for connecting to my DC-DC shield. That way anyone can use it without my Powerduino shield.

More updates to come in the future!

Sunday, June 26, 2011

Designing the Future

Well I spent this week just designing how systems will work, and creating a few prototypes. I intend to do the same next week as well, since I have yet to receive my boards, or my ordered parts.

I have been leaning more and more towards recreating the Black Widow (Probably going to rename it as the Bronco and add some features) since that has all the hardware I need to make a wireless prototype. The shields Im designing for the Arduino Uno, should be able to work with that Arduino clone. So, I'll have my own customized hardware using open source code. Depending on the need for this, I might have it available for sale as well...with Eagle Files posted.

So I've already begun acquiring hardware to setup an SMD/SMT soldering station. That will allow me to solder up all these boards with SMD parts. I wont bother to invest in a Pick-and-place machine or a Reflow oven until I've gotten my prototypes working and a marketable product that I can mass produce myself.
One thing I am interested in investigating is the possibility to change colors of silkscreens and boards. I've seen black, white, purple, green and red boards so far, with white and black silkscreens. So if I can find an orange or blue board, with purple silkscreen, that would be really cool.

Until next time, Stay safe, and Stay Green!

Sunday, June 19, 2011

Netduino & Friends

Happy Fathers Day!

I've been looking into alternative methods to my setup. One of the boards I've looked at is the Netduino or the Netduino Plus. The benefit of the Netduino, is that I have the microcontroller and the network controller on the same board, and I dont need a separate shield for the Arduino to get things done. It depends on your system requirements what you need, but I consider it a downside having to use .NET to program this board. I'd prefer if the developer had kept with the universal C code that is used on the Arduino as well as a multitude of other microcontrollers. But if you're interested in learned the .NET Micro Framework, then this is the product for you (though I am still openly considering this).

Tutorials for this can be found all over the place, but I've found that Channel 9 has a good tutorial for .NET programming.

Another one of these boards I considered is the BlackWidow WiFi Arduino Clone. Sadly, the maker of those boards, Async-Labs, has gone out of business. So if I decide on using these boards, I would have to manufacture them myself for use in my system. WiFi is a greatly advantageous system over Ethernet, but expensive. Maybe once I'm comfortable with all of my current hardware setup, I'll investigate this possibility.

I've also been researching to use the ATTINY series in my boards, rather than the larger ATMEGA series. Of course it depends on my memory requirements, my code size, etc, but I believe certain boards of my system can use them very nicely, thereby shrinking the size of the boards. If you're looking how to program the ATTINY chip, I found a great application at Adafruit, where Lady Ada has used an ATTINY4 in her i-Cufflinks. You'd need the ATMEGA32U4 breakout board to program it, as well as the JTAG cable, and depending on your needs, Pogo-pins (or this link).

I'm left doing some research in these few weeks, and developing some ideas for future boards, while I await my 3 boards I ordered last week. I've managed to buy the majority of the parts I need to make those boards, but all the rest are to be ordered through Mouser, so I'm compiling my order to be sent out next week.

Until next week, Stay Safe and Live Green.


Saturday, June 11, 2011

Prototyping Update

Lots of progress this week. 

I managed to finish two boards and send those to the Fab shop. After a few mix-ups, and footprint errors, the third board was sent to the shop as well. Also, went and purchased some of the parts for the boards from my local electronics store. Ran a bill of around $90 US, but thats because I bought in triplicates, quadruplicates and more to have a ton of spare parts in case I want to make several boards. I'll find out just how many sets I actually bought for once I start assembling the boards, which should be in a couple of weeks, when the new boards come in. Unfortunately I couldnt find the 30A relays I need at the local shop, only 20A, and they are the wrong footprint, so I wont be able to use them (but to keep handy just in case).

The LAMP server is now operational, with remote access enabled so I can work on it without needing to keep switching back and forth to it on the monitor (remote access would be disabled once the system is operational with a touch-screen interface). This makes my life easier. Only thing I havent tested is the MySQL Database, so thats still on my to-do list. Also I'll have to get a domain name and a DNS account to be able to go live with this server...but thats in the future when I want to connect remotely to the system. Now that I know that it works for the most part, I can start writing code to interface with the microcontrollers.

The wonderful thing about the Efika is that you can leave it running overnight, and you dont even know that its still on except for the little LED button that tells you the power is on. Its just that silent. There are no fans, and no mechanical hard drive, so zero noise. Even cooler is that fact that it produces so little heat (haha the pun was intended), so I can put it in my bedroom and just leave it, or connect it anywhere it my house and it runs safely and silently. And with the WiFi card built in, all you need is the power plug, and it just sits there with nothing else plugged in. I admit, you'd have a really clean desktop if you used this as your computer. I have been having quite a bit of fun with this little thing. Only thing I'm not enjoying is the UBoot Bios that doesnt show on the screen while its loading. So you're not privy to some of the features and hardware settings you would normally have access to in a regular computer. But I dont need the fancy options just yet (WiFi WoL), until sometime in the future.

So next up is completing the Arduino shield for the gas sensors with built in power management to keep the heaters at the right settings all the time. I'll try to wrap up the remaining board today to get it in with Laen by Monday's panel. Also I'll try to visualize what the prototype modules will look like to get an idea of things. Gas sensor modules (Fire Detection System) will probably look similar to current smoke/CO detectors, and will have a built in piezo siren.

Monday, June 6, 2011


Well I decided to take this week off and relax for some R&R time.

Starting tomorrow, I'll review my two circuits and make parts lists for both. Once they are completed, I'll put the order through for the Powerduino shield and its mate the Relayduino shield. The good news is that for the most part are easy to solder by hand. The bad news is the parts are a little expensive, but not by much. Maybe around 50 bucks for all the parts for both shields. So if I ended up selling these boards, I'd have to sell them for a little more to break even. I'd probably end up selling the boards individually, and include a parts list.

The Relayduino has the following specs:

-Two 30A/250VAC Relays with Quick Connect Pins
-LED Relay Power Indicators
-Quick Switching up to 66.66 Hz
-Use with the Arduino Uno

The Powerduino has the following specs:

-Power Outputs: 9/12/24 VDC (intended for Relayduino)
-Jumper header to Select which Output is Required
-Uses a MAX1771 DC-DC converter
-Shield is for use with the Arduino Uno

06/06 Edit: Teensy Relay Shields came in today, lots of technical flaws on my part. Its on my list of things to do this week. Fyi, the Teensy Eagle Library on PJRC.com isnt correct, the pin holes are too small. I'll be sure to let Paul know.

So not much else to tell. I'll see you next week.

Saturday, May 28, 2011

DC to DC Converter Shield

I had originally planned to send my Relay Shield to the Fab shop this week, but I ran into a snag. Neither Mouser nor Digikey stock the relays I need, and theyre backordered with a 20 week lead time. =( So Im left redesigning my board to be able to take relays with any power requirement (specifically the 12V relays). What that entails is that the power requirements wont be on-board. There will be a shield (which it plugs into) that will convert the regulated 5V of the Arduino into 9, 12 or 24V depending on the power requirements of the relays used. Im designing the shield with my project in mind, but anyone with various power needs will be able to use this shield. I'll be sure to include a resettable fuse in there just in case (though I dont think you'll need it, because if something happens to break the fuse, your board is probably dead by then).

Once I get these two shields wrapped up and to the shop, I should have an operating power control unit that I can work with for switching lights on and off. You might be thinking, why bother with all of this work? Isnt there an existing board you can just buy to use? The answer is no. The relays I've found on SparkFun, and other places arent reliable to be switching your lights for your home on and off. If you want take a risk, feel free to use them. I personally dont want to burn my house down experimenting with this project, so I'll build it the only way I know how: the safe way. Second, the relay boards I've found dont offer the features that I want. The board that does offer it is made by a company called NCD Relays. I have experience with their boards, and theyre pretty cool, but on the downside theyre expensive. I can afford a bank of these boards throughout my house. I'll go broke before I've finished wiring the house. So I needed a cheap way to give me the same features, but for use with an Arduino, thus I'm making these boards myself.

Nothing new for the other parts of the project. As usual, I'll post various links of projects, and hardware sites I think are relevant and useful to my project.

Sunday, May 22, 2011


Well I got so into the concept of designing my very own prototype, that I got sidetracked from the original task. I just now realized this. On the other hand, I managed to get very far in the design process of the next phase of the prototype (the custom boards). So when I actually get to that stage, I wont have to work very hard. ^_^" 

Back to work on the testing phase of things. I still have to setup the Arduino with the Gas sensors to send data to the LAMP server. If I can get that to work, it'll be a major step. Sadly, Im working alone on this, so things just have to run their course. Being sick doesnt help either. 

Just to keep you folks updated on what I've been working on, I've made the conclusion that the system will contain 3 different power and communications protocols:
  1. Hard power & hard-line communications (ethernet)
  2. Hard power & WiFi communications
  3. Self-Sustained power & WiFi communications
So these 3 protocols are what I'll be using for the various systems. If a module is closer to the outdoors, it'll have a solar panel, and WiFi. If its somewhere indoors, but you cant get to it for cable management, then WiFi and a power adapter from where it is (Hard power).

I've decided that I'll make this entire system open source and open hardware. What that means is that developers who want to build on my system are free to do so to their hearts' content. Users who arent tech-saavy will probably not care that it is open source (other than security, but its offline so no worries yet). Source code however wont be plastered all over the internet, so that shouldnt be a problem. There will be extra features (plugins) that will expand on the base system that will give users and developers alike expanded options. Those will be for sale. For example, a system in a two-story house has 2 modules per room, 4 bedrooms, 3 sitting rooms, and a kitchen. Thats a total of 16 modules in a home. That gives you the fire detection system, and the smart lighting system. Since I've discussed home security as well, the system would include a base of say 4 camera's around that 2-story home. Thats the base package. Say you want to detect an intruder before they enter your home, thats an extra feature. 

I've got lots to do, and this is just a vague explanation of what you can expect to see out of this, but dont hold me to it. Things can change, and this plugin concept is all very new to me. 

Of course, this is all assuming that an Arduino Uno boards are used in combination with custom shields (I'll be selling those). For space requirements, I'll have to resize things and use the prototypes I was designing to make some custom microcontroller boards that have a small footprint. Arduino's are made for hobbyists who want to fiddle around, or amateurs who want to create prototypes (like me). So, I dont really want to come across to consumers that the hardware protecting their homes (and keeping them energy efficient) is hobby hardware. Creating my own is the key. Thats Phase II.

While I had intended this to be an update post, it has sort of turned into a "relieve-yourself-and-get-it-all-out-there" post. Haha \(^o^)/ I do that at times. Im just excited that I got a board sent off to the Fab Shop, because that one is the Teensy DC Relay board I was working on. The AC Arduino Relay shield has been completed, but I have to wait a few weeks until after Memorial day to get it sent to the shop. Once I get that shield, I can start fiddling with switching a light on and off based on a person being in a room.


I've ranted long enough. Take care till next time. Ѡ

Saturday, May 14, 2011

PCB Progress

Well good news. Ive managed to work on and finish four PCB designs: a Relay Shield for the Arduino (rated for 30A & 220VAC) , and a smaller relay shield for the Teensy 2.0 (rated for 2.5A & 60VDC), both of which would be very useful for the Smart Home System. The third shield is a 3-Axis Accelerometer Shield, and finally the fourth is the compass shield. Going to put those aside until I can save up resources to get them made and assembled (I realize they aren't big, but there's more to micro boards then just the PCB's). Ive decided once I have prototypes of these in my hands, I'll post pics of them, along with Schematics, so stay tuned for them.

Thanks to Paul, from PJRC, for suggesting the idea of creating a USB Host Controller Shield for the Teensy 2.0 for the use of multiple USB devices. Theres a chance I can even get the Teensy to run a Bluetooth dongle too! Awesome stuff. Lots of ideas brewing from that, but since its not related to the Smart Home Project directly, I'll see if its possible to integrate it in-Bluetooth controls of home settings, or something.

A note on electricity management/fire prevention module: Ive decided to use shunt-trip breakers in cooperation with the smart plugs so that if the smart plug fails to trip, the main breaker will trip. I've also decided that for the prototype smart plug, I'll use a Teensy 2.0 with my custom relay board. The plan is to eventually integrate the Atmel Microprocessor onto the relay board in a compact package that will fit in a standard size electrical gang box. Im also considering wireless communication (802g wifi) for these, along with some micro or mini dc adapter (120VAC to 5VDC with a regulator & battery) that would allow this module to fit in that box. The goal is that they should be self-sustained and zero maintenance.

Onwards, I'll be working on the Gas Sensor Shield, the Gas Sensor IC Board, and I'll devote more time to getting the server operational.

Live long and prosper.

Friday, May 6, 2011

PCB Development

Well Ive been busy with final exams lately, but what time Ive had has been devoted to creating custom Eagle libraries for all the parts for designing my PCB boards. Im almost done designing the Arduino Gas Shield and a Dual-Relay AC Power Shield (which uses G8P Relays from Omron). While the Gas Shield will be for the Active Fire Detection System, the Relay Power Shield (Powerduino v1.0) will be for AC power switching for lighting controls, as part of the Smart Home system. Once everything looks good, I think I'll upload both shield Gerber files to Batch PCB (and post the Bill of Materials here) for those of you wanting to buy the boards and build the kits yourself (I'll see if Sparkfun can carry these two also). 

For a future board, I tracked down a solid state MOSFET relay with a current rating of 2.5A that would be wonderful for a micro-sized DC Power board for use with the Teensy and Teensy ++. I'll design that when I have the opportunity. That would probably have a use in the alarms for the Smart Home System.

So there are many mini-projects going on simultaneously for the Smart Home System, as Im the lone person working on this. Hopefully I'll have something to show for all this work by Summer.

As an update on the Arduino/Efika side of things, Im having to reinstall Ubuntu on the Cloud server because of a glitch in the software thats now preventing me from having admin rights to edit anything. The Arduino Gas Sensor part of it is somewhat on hold until I sort out everything with the server. With all thats going on with my final exams, and the PCB boards (you can tell Im really bouncing around), I'll get to this when I get to it.

Stay tuned for updates.

Wednesday, April 27, 2011

Design & Coding

Well I've been very busy with courses as the semester is winding down. However, Im working on setting up a LAMP server (Linux, Apache, MySQL, PHP). LAMP is comprised of an Apache HTTP Server, MYSQL Database, and PHP. Also I got a 4-port router in the mail to connect a few prototype modules with the server, and to the internet. Programming work on the modules has slowed down a lot, but its still moving forward. The good news is that I found a blog where someone was able to setup a LAMP server to receive data from sensors through an Arduino, so thats where I'll start.

I've mostly devoted my free time in designing the IC boards for each module for mass production. Im also working on business models to see how successful I can be if I start selling my hardware as opposed to just sharing how the system is constructed. Basically, for those who are technologically saavy, they are welcome to reproduce the system using my posts, tutorials and code. For everybody else, they would probably want a ready to go system based on their needs: thats where I come in. I'll have to design and build the system so that its cheap, integrated, easy to use and simple for everyone, not just people who are technologically saavy.

Also by developing my own hardware, I dont have to worry about hardware attributing to anyone really, except those at Genesi-USA, for the server, DLink for the router, Arduino for the Uno and Wiznet for the ethernet adapter. The goal however for the IC boards is to remove the Arduino and Wiznet from the system, and integrate the Atmega32u4 and the w5100 chips to the board. This ought to reduce the bill of materials and the cost of assembly for mass produced boards.

Usually this step is taken after the system has been completely built and tested, but as that takes a considerable amount of time (which I dont have now), I'll work on what I can in the time I have.

For those who are interested, cheap (or somewhat cheap) PCB Fabrication can be done at Batch PCB (note:green boards are very cheap but contain lead) or at DorkBotpdx (note: purple boards are a little more expensive but are unleaded). PCB masks made from Mylar can be done at Pololu, made from Kapton at Ohararp and made from Steel at Rena Electronics. Solder paste can be bought at Sparkfun and stored in this Mini-Fridge. I recommend Antex Soldering Irons for manual soldering, and from what I've seen, an electric Hot Plate Reflow Skillet for SMD soldering. Id like to note, if you havent heard of Black Pad, read up more, it explains a phenomenon that occurs when the nickel plating of a pad corrodes, thus turning black.

Stay tuned for new updates.

Friday, April 22, 2011

Genesi Efika Cloud Computer

Great News! I got my Efika in the mail today, and I'm so excited. Now I can begin coding the database and all the visual interface GUI. Also I can start work on the module management system. Here are some pictures of the Efika as I opened up the box for the first time. This ought to give you a sense of just how small this computer is. Click on the images to zoom in.

Picture 1: Heres the outside of the box.

Picture 2: Heres the Genesi Logo.

Picture 3: Opened the box.

Picture 4: Pulled the Computer out of the box. You can really see how small it is.

Picture 5: Up close (you can see the power button on the top left of the unit)

Picture 6: Heres the front of the Efika computer. Theres a 12V power, an HDMI port, 10/100mbps ethernet, and audio/microphone plugs.

Picture 7: And heres the back; theres two USB 2.0 plugs and an SDHC card slot.

Heres the bottom of the unit with all the certification labels, website info and where its made. (Company is based out of San Antonio, TX, but the devices are assembled in China)

Picture 9: Finally we get to all the extras that come in the box: the power adapter, the power cable, and a serial adapter.

Heres another look at that serial adapter (didnt want to take it out of the protective bag just yet, because I dont know what Im going to use it for)

Well I guess that concludes 'show and tell'. I'll post updates when I start getting the software setup to get it to communicate with the Arduino.

Tuesday, April 19, 2011

Arduino Gas Sensor Module

Well I've begun work on the gas and smoke detection module for the Home Manegement system. This involves the use of the two sensors I briefly dicussed in my very first post. The first sensor is the MQ-7 which is a Carbon Monoxide gas sensor which detects CO as well as other combustible gasses, such as Hydrogen or Natural gas. While the second sensor, the MQ-6, which is a Liquified Petroleum Gas sensor, which detects combustible gasses such as LPG, isobutane, and propane in the air and ouputs its reading as an analog voltage. The MQ-7 sensor can measure concentrations of 10 to 10,000 ppm, while the MQ-6 sensor can measure concentrations of 300 to 10,000 ppm.

Basically the code will setup the sensors to measure data from both sensors every 1 second for 10 seconds, then average those values and transmit that average particulate count to the server for further calculations.

For the second phase of the project, I've begun planning for getting a Genesi cloud computer to serve as my Command & Control Server for the system. The Efika MX Smarttop has the following specifications:
  • Freescale i.MX515 (ARM Cortex-A8 800MHz)
  • 3D Graphics Processing Unit
  • WXGA display support (HDMI)
  •  10/100Mbit/s Ethernet
  •  512MB RAM
  •  8GB Internal SSD
  •  802.11 b/g/n WiFi
  •  SDHC card reader
  •  2x USB 2.0 ports
  •  Built-in speaker
  •  Audio jacks for headset 

This computer will host a web server, as well as a database for data logging, and the coding for a visual interface so that a user can easily access sensor zones in the system, and be able to configure various systems to their liking. I plan to use the included Ubuntu Maverick edition that comes with the Genesi computer to further allow the system to be open source and easily reproduceable.

In conclusion from the previous post, I've thrown out the idea of using the SD card for CSS and image hosting for the arduino, because I've decided there will be no web hosting/web server on the arduino other than to transmit/recieve data over the ethernet protocol. So there isnt a need to move forward with that line of thought. I'm trying to following the concept of KISS: Keep It Simple Stupid. I found that coding would not only be complicated to implement a webserver on each arduino sensor module, but it would increase the cost of each module in terms of setup and maintence. (I believe the web hosting was making the Ethernet module consume a lot of power, which in turn heated up the board; I'll test to see if this theory holds.)

The good news is that the Efika has a built in SDHC reader, so I can expand up to 32Gb solid state storage in the future if need be. So only 8Gb of SSD is not so bad; I'm really enjoying the fact that its an Arm-8 processor, this should be interesting.

Stay tuned for updates.

Thursday, April 14, 2011

Arduino Home Management System Update 1

My gas sensors came in as have the Arduino, the Wiznet Ethernet adapter & shield. I've assembled all the kits, and begun programming and testing everything. I was worried because the Arduino wouldnt accept my sketch upload. But after sending some random characters through the serial monitor, the Arduino serial sync reset, thus was able to be programmed. As a result, my preliminary Web Server ran for the first time ever!

So the next major steps are advanced coding of the Web Server, then testing the Gas sensors and calibrating them. I strongly recommend starting out with this code which requires the Arduino Ethernet Library and the PROGMEM Library to work.

In the short term, Im going to try to install my SD card breakout board onto my Sparkfun ProtoScrewShield so that I can access my Web Server files from an SD card. That way the web interface can use some Cascading Style Sheets instead of being a boring white screen page.

Thursday, April 7, 2011

Arduino Home Management System

I'm planning to work on a new project in my free time using Arduino microcontrollers, some sensor packs, and Ethernet communications. Using MQ6 & MQ7 sensors and possible an IR sensor, I'll build an active fire alarm system that will communicate with a central management computer using Ethernet TCP/IP communication. Once I get all the components, I'll try to keep a weekly blog about coding tutorials, stuff I've learned or pictures of various assembly stuff to help others build various parts of this.

The point of this project is to be an active fire detection system. Current smoke alarms detect smoke long after a fire has been developed, which in a lot of cases only warns you to leave the building you're in until the fire department can show up to put out the fire. Fire alarms have little advantage over that, in that they are still passive, but just more sensitive, and more widespread. An active fire detection system would constantly monitor the air for various things that would indicate the beginnings of a fire. Once multiple sensors detect this raised level from some range that is assumed to be the threshold, a siren ought to go off to alert you. This is very critical because it wont just alert you that there's a possible fire igniting somewhere in your home, but it will also indicate where the fire is being detected, so that you can put out the fire immediately, long before fire department crews can come to your rescue. 

Thus, this project intends not only to create an active fire alarm system, which would be open source for all others to give a shot at, but its also a "dry run" of a single module, of an intended much larger system for a Home Management network in my home. Simply, the management network is composed of multiple systems, all monitoring various sensor zones in my home. One example is this active fire detection system. Another can be AC\HVAC controls; another can be smart lighting in my home. Theres a whole ton of projects that could be done, and integrated together to create the smart-home energy efficiency system (SHEES, pronounced cheese ;) ).

So thats the gist of things for this project. Below are a parts list needed for the fire detection module, as well as some pictures of what some of the stuff looks like.

Components Required:

Arduino Uno
Adafruit Ethernet (XPort/WIZnet) shield for Arduino kit (Installation Tutorial)
WIZnet WIZ811MJ Network Module with Mag Jack 
CO (Carbon Monoxide) Gas Sensor MQ-7
LPG (Liquefied Petroleum) Gas Sensor - MQ-6
Gas Sensor Breakout Board

Heres what an Arduino looks like:

And here is what the Wiznet WS811MJ looks like:

Here is what the CO sensor looks like:

Finally, here is what the LPG gas sensor looks like: