Arduino based LPG detector

Flammable gases are dangerous and if leakage is not detected in time this could lead to explosion. So if you are dealing with such gases like propane, butane or hydrogen, you should have a gas detector near by. Praveen has built an Arduino circuit that detects presence of any of those gases with MQ2 sensor. This is an SnO2 based gas sensor which works by heating gas to oxidation level which then is sensed with resistor which resistance drops when heat rises up.


Sensor output is directly measured by Arduino analog input. And once dangerous level of gases are detected, a buzzer is sound and relay activated, which can switch of the valve of device using the gas. The percentage of gas is also displayed on LCD. Of course you cannot take readings blindly. For serious operations it should be tested in controlled environment and then calibrated. Anyway this is a great project to server as first line of warning means.


Cheap LED matrix display uses MAX7219

LED matrix displays are often used where bright text of simple graphical messages need to be dynamically displayed. You can get 8×8 LED matrix blocs really cheap in Chinese shops. Bajdi found that ones that are interfaced with MAX7219 – serially interface 8 digit LED display driver work really well even if they are non genuine MAXIM chips.

He bought 8 of those display bricks and connected them in to long 8 x 64 display. Then he used Arduino to drive them. It only needs three wires for serial interface. H also used Parola Arduino library on Codeplex to make scrolling text effects. In order to make display longer, he built several additional PCBs by modifying a bit original files found on Parola website. Since messages are running, next step is to add some interactivity with Bluetooth and Android app.


Keep cat away from unwanted areas with cat protector

Cats are sneaky pets that don’t like to obey the rules. If you are nearby, then you can keep an eye and chase away. Normally your voice does the trick. But when you are not at home, cats can do what ever they want. Lucky resistor decided to put end to cats domination at home and started a new project called “Cat Protector”. It’s a device which once placed on some area, prevents it from cats visit. Device simply detects cat movement and then speaks recorded phrases with owners voice.


Before building a final product, he first of all made a prototype, to see if this is efficient way to control the cat. After confirming, this works 100%, he finished it with portable enclosure and other elements. “Cat Protector” is based on Arduino Uno. Cat motion is sensed with Panasonic motion sensor AMN32111 which connects to Arduino with three pins. Masters audio is recorded in to SD card which is accessed with Data-Logging shield. Audio is played back through Microchip MCP4821 DAC interfaced to Arduino via SPI. Audio the is amplified on low power amplifier and then played with small 0.2W speaker. There is also a dual color LED used to indicate operation of device. Once built, it can be placed on any surface and hope that cat obeys voice disapproval commands all the time.


Using switches on microcontrollers – obvious, but…

Switches and buttons are common way of user interaction to embedded system. Normally we are used to connect pull-up (or pull-down) resistor for a switch and then check for its value. There is nothing wrong with such circuit, but speaking of power efficiency, this design can cause some problems. Since resistor is constantly connected to VCC while switch is closed, it constantly draws significant current. What if there are tens of switches – circuit starts drawing lots of current. For battery circuits this is in-acceptable.


One simple way would be to select higher pull-up resistor values. In many cases it might work well, but there is always a limit how much you can rise its value. First of all microcontroller input have its threshold current to work reliably. But most importantly due high resistor values and small currents noise signals can start triggering the inputs. Also keep in mind, that switches also require some minimal current ratings. So you should select pull-up resistor with common sense. Other option is to use smarter circuit. If microcontroller have enough pins, you can use I/O pin instead of VCC. This way you can apply “1” signal as VCC when ever you need. Simply turn it “on” when checking its value and then turn “off”. This method is called polling. IF you would use 10K resistor then checking every 10ms current consumption would be around 1.6uA. Comparing to hard VCC connection current consumption is 300uA. You will be amazed how much this ads once you implement this in your next battery powered project.