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
Proto-screw-Shield
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:


Wednesday, August 18, 2010

Green Tips & Tricks

Ive found it rather intriguing to take a look at this Green Energy perception that everyone has been so interested in for the last few years. Ive come across a few facts that might help out in adjusting to the new world.

First, if you get an fluorescent bulb, use it only in places where the light will stay on for extended periods of time, such as a bedroom, or in the kitchen. Don't use it in the bathroom, where you will be going in and out. Those fluorescent bulbs are most efficient when they run for long periods. When you see one turning on, you usually have to wait for the light to reach its peak brightness, and you might even hear a slight buzzing emanating from them. That's when you can start counting the savings in the electricity bill versus your ordinary incandescent bulbs.

Next up is this idea that turning lights off will save you money. This is true only if the lights you have on are incandescent lights. If you have florescent bulbs, your savings wont be very much. In fact, the life of that light will decrease as you turn it on and off. Which is why its a bad idea to turn florescent bulbs off. Ever hear about that at work? They always enjoy turning off the lights there...it doesn't really save money. Its just a symbolic gesture. The HVAC system probably consumes 10 times the electricity that you were planning to save by turning off the lights. Plus, you just cut down the life of your bulbs by a fraction. Trust me, those lights are better off staying lit.

Finally, Id like to cover this notion of green labels for major electrical devices. If your central A/C unit in your attic is labeled "Green" or "Energy Efficient", that's a bunch of nonsense. A single unit probably consumes as much as 5 times the amount of electricity than a single room A/C unit. Why cool the entire house, if you are only using a few rooms of the house? Get room units, and cool portions of the house. You could close off vents for rooms than don't need cooling, but you're still using that huge A/C unit to cool your room, thereby consuming a lot of electricity to cool your room. Doesn't seem very "Green" to me.

Id like to add, as this has been an educational experience for me as well, a note on how to make your home energy efficient to beat the summer heat, and keep your bills down.

I suggest using digital thermostats to control your A/C units, this will save time and money for when you are in the house, and when you're not. Second, get a radiant barrier installed in your attic. It will help to keep the heat out by a lot. The drop in temperature in the attic, will help the A/C unit work less, and save you electricity. Third, get Solar Attic fans: they keep the attic cool, again to save the A/C from working hard, and it will have an effect on keeping your home cool as well. Fourth, make sure you're A/C evaporator (outside) sits in the shade. If it sits in the sun all day, two things will happen. Water will condense on the outside of the cooling fins, and accelerate the rusting process of the evaporator, and the A/C system will have to work harder to keep the house cool. Finally, although it sounds a bit bizarre, I suggest closing all your blinds in the home during the day, especially if you have white blinds, they do act as a radiant barrier to keep the heat out. Ive noticed the temperature on the second floor hovers around 79F with the blinds closed, and can climb as high as 85F with some blinds open, and that's with the weather outside bordering on 105F, and the A/C set to 75F. So it does make a difference.

I hope the advice helps, I know its helped me.

Useful Links:

Discovery News

This Old House

This Old House, New Green Technologies