Hello All, I built a small gadget that measures volatile organic compounds in the atmo= sphere. I request you to have a look at the following video. http://www.youtube.com/watch?v=3DIfEomgkK31M The gadget glows green if the atmosphere is relatively clean and red if "po= lluted". I have attached a picture along with this mail. I have also attached a snap= shot of the schematic and a picture of the gadget at this link: http://mechatronicscraze.wordpress.com/my-air-gadget/ The problem is that the gadget shown in the left side of the attachment pic= ture.jpg, when assembled into the enclosure on the right, the gadget seems = to behave weird.=A0 The gadget interfaces a sensor and an LED that is operated via I2C interfac= e. The problem is that the LED does not glow according to the instructions = via I2C interface when assembled into the enclosure. Its behavior becomes e= rratic after assembling into the enclosure. It plays the default script of = the LED and obeys instructions from the microcontroller on certain instance= s. The microcontroller that is being used is a PIC AXE microcontroller. Someti= mes, the LED gets stuck in a particular color and does not glow properly. W= hen I take the circuit to the breadboard, I am not able to reproduce the pr= oblem. I also observed the output on the I2C interface and there is definit= ely data being sent as the gadget works properly on certain instances. My theory for the LED getting stuck in a particular color is that the contr= oller is getting reset and that this is happening due to the absence of cap= acitors in the circuit. I am considering adding capacitors across the LED a= nd the microcontroller and at the input. My theory for the LED playing the = default script is that the current draw for I2C communication interface is = low. I am using a 1K pull up resistor on the SCL and SDA lines. I read an a= rticle that it should be at least 1.8K. But I am not able to prove it as th= e gadget works sometimes for 1K resistance. I would like to hear your thoughts on the erratic behavior of the enclosure= when operated using a battery and mounted inside an enclosure. Regards, Sai --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .