What safety requirements are there when designing an electronic device to go inside the cabin of an airliner? I am considering designing and building an automatic air-sampling unit that can be placed in the cabin of an airliner and left unattended for an extended period of time.  The device will use an electronic air sensor and (small) processor so that it can detect and sample fume events without crew intervention, will be battery powered using a small battery of a known-reliable type (i.e. not Lithium-Ion :), will not have any functions that intentionally emit RF, and will be packaged in an enclosure (either plastic with internal shielding or metal).

What EMC and electrical-safety requirements/specifications must this device meet in order to avoid posing a hazard to the aircraft it is placed on, and how do I ensure that this box is not mistakenly considered a security threat to the aircraft?
A document called RTCA DO-160 defines the testing for a number of environmental requirements. Within each test standard is normally a number of different test conditions. The level of required testing is normally defined by the customer of the device, who has the task of showing the regulating body (FAA, EASA, etc) that this is sufficient to ensure the aircraft meets all regulatory requirements.
In addition, DO-254 gives guidance for electronic hardware and DO-178 handles software. There are other legacy documents like MIL-specs that define testing as well.