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

Saturday, January 30, 2010

Green Cement & Drywall

People when they hear green, they dont usually think of Cement and Drywall. They think of renewable energies, natural constructed homes, and recycled materials. Well all that is going to change when a number of new Green Technology companies will start selling their Green materials to the public.

In an article from C&En News dated January 25, 2010, "Seeking to Cement a Green Future," by Melody Voith, I was amazed at how creative people are with the idea of Green Technology, and how they are developing new, more efficient, processes for making materials that we use everyday.

Traditionally speaking, concreate is made by heating limestone in a kiln to about 2500 degrees Fahrenheit. This releases CO2 during the evaporation of water in the limestone. The material leftover is called clinker, which is then ground up. Gypsum, water, sand and other aggregates are added to the Clinker producing concrete mix. When it is rehydrated, an exothermic reaction takes place, hardening the mix.

The Greener way to do this is to reduce the CO2 footprint, or get rid of it entirely. This is what 3 new start-up companies- Calera, Serious, and CalStar- claim to achieved with the making of Cement and Drywall. During Calera's process for cement manufacture, industrial waste CO2 is bubbled into a mineral rich tank of seawater (also referred to as Hard Water). Calcium and magnesium carbonates settle and are removed. These two carbonates are transformed into two concrete ingredients: synthetic limestone aggregate and an amorphous calcium carbonate with "cement-like properties". The process is very similar to what coral reefs do naturally: producing carbonates from seawater in order to build their habitats. Calera estimates this process will not only reduce CO2 production, but in fact absorb up to 1,000 lbs of CO2 (per year). In the article, Calera states that the traditional process generates more than 500 lbs of CO2 (per year).

The company says that they plan to use a low-energy electrochemical process to add alkalinity to the water, in order to create the high pH in the water. The ideal situation calls for a power plant to generate CO2, the concrete mixing facility, and a desalination plant to remove the salts from the water generating raw material for the electrochemical plant.

At Serious Materials, drywall is being re-made with waste materials from metal casting. Gypsum-based drywall for decades has been made my grinding gypsum into powder, heated to 350 degrees Fahrenheit, rehydrated again and spread between layers of paper to create the hardened drywall boards. This process tends to be energy intensive because of the heating stage. The new greener process uses slag, which is a "mixture of nonmetallic components removed from iron ore during steel making". This slag is often composed of calcium and aluminum silicates and mineral oxides. Serious then adds various agents and catalysts to "produce an exothermic reaction which then hardens the material". So the process is very similar to making traditional cement, except that the material used is usually waste material from steel making and is never used. The process also consumed much less energy and CO2 as compared with the traditional process of making drywall. The process for this new drywall, called EcoRock, is estimated to emit 80% less CO2 than the traditional process.

The final company, CalStar, is designing a new process for making greener bricks. Traditionally, bricks are fired for 24-48 hours in an energy guzzling kiln at 2000 degrees Fahrenheit. According to CalStar, the new bricks "require 90% less energy and contain 40% post-industrial recycled materials". The new bricks are made of fly-ash, a waste material from coal-fired power plants, and is mostly composed of lime. The new process takes advantage of the lime composition, so when water and additives are combined with the fly ash, the mix hardens in a chemical reaction, without the need of firing in a kiln.

This material, however, has its downside, which CalStar says is not a problem. The fly-ash, unlike steel slag, contains trace metals, such as mercury, barium, chromium, and selenium, all of which are deadly and toxic, especially when combined together. According to CalStar, "multiple tests have shown that the metals are bound in a crystalline matrix and do not leach in amounts high enough to cause concern for health or the environment". I'm sure this process will have to be looked over and refined several times before it is released to the public. Actually considering a material that contains toxic metals for use in the industrial is a bit unnerving, so I believe the company is going to struggle a bit in the green-building market until they either verify the materials' safety, or find a safer material to use.

So here I talked about 3 companies that are currently researching and developing new processes for creating materials that are used in construction today. One of the three companies, Serious Materials, intends to release their product to the American market sometime this year. I expect that this will be very expensive starting out, and most people will be reluctant to make the switch, but after some good media exposure, people will see that this is a viable product. As for the cement process, that is currently in the works near Monterey, California, but Calera has yet to announce a date when they will release their Green cement to the market.

I hope by summarizing the article, I can inform people of whats new in the Green Markets, and what they can look forward to in the coming year.

Source: Chemical & Engineering News, published by the American Chemical Society. The article is featured in the January 25, 2010 magazine on page 20. The article is called "Seeking to Cement a Green Future", and is written by Melody Voith, from C&N Washington.