My goal is to make a schematic and code, which together will be able to alert when the box the project is housed in, is moved out of it's place. I have to use some kind of a sensor to measure the movement of the project box down to centimeters. I am thinking of using one of the cheap accelerometers bought on Ebay. But maybe another sensor would be better (Gyro, tiltsensor etc.?) to measure that kind of movement? - I don't know, this is why i am asking ;-)

One of these would be triggered even if you just nudge your box so they should be able to detect movement but they will not measure movement:http://www.electrodragon.com/?product=vibration-switch-sensor-hdx-2

You can't find position with accelerometer (unless using dead reckoning). Will you need to know the x y coordinate of the box after it's moved or will "box is moved" is enough? You can have an accelerometer or a vibration sensor to detect movement is made and have an optical sensor to tell whether the box is put back to its original position.

Liudr:I won't use the x y coordinate of the box after it's moved, so they doesn't matter. It is enough for me if i can get the Arduino to toggle a few pins, when "box is moved" in any matter, out of it's place.

PeterH:I thinked about using a mercury tilt switch, but if i use such, i think i will be able to move the box very slowly, without activating the tilt switch??

Hazardsmind:I mean moved as in moved in any direction, tilted, picked up etc. all movement of the box should set a few pins high

HazardsMindWould it be possible to use the accelerometer to detect slight bumps and nudges? - i played with a vibration switch before (look at my referral for PeterH ^^) , and i was able to move my box slowly, without the vibration switch getting activated.Thanks for your help

Would it be possible to use the accelerometer to detect slight bumps and nudges? - i played with a vibration switch before (look at my referral for PeterH ^^) , and i was able to move my box slowly, without the vibration switch getting activated.

If the vibration sensor wasn't able to detect the box moving then an accelerometer definitely won't. May your sensor didn't have a high enough threshold, I don't know.What about maybe a pressure sensor on the outside that can detect if someone touches the box?

The vibration sensor wasn't able to detect the movement of the box, if i moved the box very slowly. About the pressure sensor, i don't think that would be a good idea, because it will be a option to move the box without touching it (pulling the cables etc.)

About the pressure sensor, i don't think that would be a good idea, because it will be a option to move the box without touching it (pulling the cables etc.)

Well thats where the accelerometer comes in, when it's slightly tilted. Pressure/touch sensor would work when someone physically touches it. A proximity sensor will work if someone gets close to it. What about maybe a VERY sensitive microphone hidden within the box, that can detect the sound of the box sliding across a surface. (given if the surface is not silk or very smooth)

i was able to move my box slowly, without the vibration switch getting activated.

Can you give more detail about where the box will be placed, and what sort of movement you are trying to detect? I mean, for example, if somebody is willing to spend a month moving it a thousandth of an inch without setting the alarm off, is that a problem? Well, probably not. What I'm getting at is that you aren't actually trying to detect absolutely all conceivable movement - that would be fundamentally impossible. What sort of movement are you trying to detect? Is there any possibility of attaching anything under the box? For example if you glued a conducting pad to the surface under the box and put a pair of contacts on the bottom of the box, arranged so that they weren't visible or accessible while the box was in place, then any movement which took a contact off the pad could be detected. Is that a feasible approach?

I only provide help via the forum - please do not contact me for private consultancy.

PeterHThe thing is, that the box will be connected to a laptop with a kensington lock cable. I want to detect the movement of the box being picked up from the surface/tilted/shaked, and if that happens continuous within 4 seconds then it will activate a alarm. If not then do nothing. So i am trying to detect lift/tilt/shake.

It is not possible to attach anything to the underside of the box.

Hazardsmind:As i am seeing it right now, all i need is really a accelerometer? - it should be able to detect movement of the box (let's say, move the box a meter away from it's place) even if you do it very slow, i should be able to detect the tilts also, is that correct

I have an accelerometer myself that I could try. I know that even when an accelerometer is not moving, the readings will still vary. So if you can monitor the readings as it is still, and set a range based on those reading, then maybe it will work. But I don't want to say yes, only to find out that it is inconsistant.