# What is the ideal method of sensing whether 4 points on the bottom of a device are all depressed to indicate contact?

I am trying to place a sensor or switch on each corner of some desktop PCs so that if they are lifted an event is triggered like locking the computer or encrypting it.

So far I have considered small round load sensors mounted with adhesive between the bottom of the case and the rubber feet that would be on the bottom to help with vibration and avoiding skidding. If the PC were lifted at least one of the load sensors would so indicate this and a small Arduino or similar would be triggered to cause the event on the PC.

I have also considered buying over-sized rubber hemisphere feet carving out space inside for simple momentary tactile switches so that the tip of the actuator sticks out enough through the bottom of the feet that the actuator plus rubber discs attached to the switch points would be present and thus with the four feet wired in series as NO would disconnect if lifted, again triggering an event for defense from the same kind of board.

I've mostly ruled out tilt sensors just because it allows for someone possibly carefully lifting the PC and keeping it level while doing so to dodge the trigger and avoid the security event.

The load sensors are a bit pricey and require a bit more configuration and testing to ensure they're functioning properly if more than a handful of PCs are modified in this way so while I think it would work, I would prefer to find a less expensive and simpler arrangement.

The momentary tactile switches seem the most promising, but I'm not entirely sure how much weight they can realistically support.

My question is, is there another method I am missing to ensure the PC can detect whether it is in contact with a surface at all four points that I have not considered that might be more likely to hold the weight (these are not like full ATX machines, more microATX, but it's still a good deal of weight for the actuators on the tactile switches) but not require quite so much expense and configuration?

Edit: Thanks to everyone who has offered help so far. It's been remarkably helpful already and if there's more to come so much the better. I did upvote, but it won't show because I don't have sufficient reputation yet.

• I've mostly ruled out tilt sensors just because it allows for someone possibly carefully lifting the PC and keeping it level ... why should pressure sensors be different? ... someone could slide something under the PC and lift it May 8 at 5:00
• What stops someone from pulling the power cord (or turning off the circuit breaker) before they move the PC? Assuming it doesn't have an internal battery or something, you won't have any way to encrypt files. May 8 at 5:58
• @user4574 Encrypted file system will prevent that. Files on disk are encrypted, or the whole disk is encrypted. So the PC is essentially a brick when you turn it on, unless you give a password to load OS or access your files. May 8 at 7:48
• Have you done a realistic threat and risk assessment, or are you just designing a technical solution to a wildly improbably event? If your PC is so valuable that you need to go to crazy lengths, I'm just going to slide in a table mimic (magnet for reed switch and all), or at the very extreme, cut the table out from beneath it with some clamps to hold it all together. Maybe just use the standard physical attachment locks that pretty much all PCs have to prevent theft is a better solution? May 9 at 0:12
• This question could be greatly improved by describing the exact attack scenario you are trying to protect against. Without that information, this is de-facto an XY problem, which is an especially bad thing when security is the topic (because it’s very easy to miss some issue in your theoretical solution). That said, asking about the attack scenario directly is probably out of scope here and likely better done on security.stackexchange.com. May 9 at 1:31

Limit switches might be better options than momentary make push buttons, as they can have longer travel and usually require less force to depress. They are extensively used in things like industrial automation to detect contact in a very similar way to your application

Alternatively I can think of perhaps using a sensitive IMU (but this may have issue of false alarms) or maybe some type of sticker that you can stick to the surface, which completes a circuit with spring contacts on the bottom. The sticker approach can potentially be safer as its harder to bypass using methods like sliding something underneath the device. It will be incredibly hard to fool if you include some sort of cryptographic element on the sticker, so that its signals cannot be cloned.

(Edit, I just remembered the name) People have made similar "secure computer" to what you are designing, it might be worthwhile to take a look at their solution. https://www.crowdsupply.com/design-shift/orwl

• I considered limit switches for the reasons you mentioned, but I couldn't seem to find a way to (relatively) simply include them under the bottom of the case without having a very exaggerated height from whatever would be used for housing. Perhaps I should reconsider and see how small a limit switch I can obtain and maybe swap the tac switches out in favor of these. May 8 at 9:38
• Such switch can be combined with one of PC case's leg. The case should have legs, attached to its bottom through holes. Then it is not hard to make a leg having some millimetres of vertical freedom in such a way that it presses the switch, secured inside via a piece of metal corner for example. This way seems most simple and less visible. May 10 at 13:55

Security sensors need specs for a baseline for reliability expectations such as conditions that cause a false positive and true negative, then design around these probabilities to choose a true positive and false negative solution. This is also true for biometric sensors.

Every solution has a reliability problem unless it is defined and mitigated. e.g.

• Any electrical conductive contacts need to be dust-free and gold-plated as low current demands non-oxidizing dust-free metal contacts.

• A digital scale seems like the most sensitive method to filter if you can interface to it and reliability depends on your design and test verification.

• Photo interrupters are also very sensitive but could be bypassed easily unless you detect multiple edges with a narrow pair for each, one which is blocked and the other barely unblocked, both concealed by black daylight blocking the window with very narrow deep apertures using a unique pulse-pattern for each channel with IRDA Rx and a PIC decoder. (this signature pattern recognition worked well for me and was low cost but takes time to develop)

• a power failure needs to be avoided if you can guarantee that

• an electrical disturbance can be created to cause the process to block your poison pill or reset. ( millions of users and black hats have used these security flaws, DOS, Sat-TV cards

• the cost of the security needs to be commensurate with the lost value of the service or other financial gains and the detection accuracy. ( I learned this designing pay-TV descramblers in a proposal for Telcom / cable TV companies long ago.

## Personal experience

I find that my laser mouse is extremely sensitive to motion or vibration to wake up my PC from sleep mode. I just have to make the slightest motion on the table or couch and the PC wakes up. (equivalent to moving the pointer a few pixels) But that's a different mode of use.

• I actually like the idea of using mouse hardware because it could probably interface directly to an internal USB port on the PC without an additional processor board. Also, the PC likely already has a lot of software support for it. May 8 at 6:17
• But pulling the plug disables your covert reaction. May 8 at 6:32
• Encrypted home directories and fully encrypted disks or file systems do exist. Pulling the plug means the PC shuts down and it's basically a brick unless you enter a password to boot up or access the disk or files. May 8 at 7:20
• Encryptions systems are not locked by some trigger, THey are inherently protected by some aomw authentication method. It takes a long time to reformat the data and pulling the plug can prevent that. Is this idea well-thought out ? May 8 at 11:52
• @TonyStewartEE75, I think they're thinking about the encryption keys for full disk encryption. They have to be kept in memory while the system is used, and wiping them from memory, or wiping the master keys from the drive itself doesn't take that long. Then again, I guess cold-boot attacks would still be a thing. May 8 at 14:55

An near-infrared LED can be paired with a phototransistor. They will work behind a plastic panel or inside a plastic foot or or potted in an epoxy foot. And most common plastics and epoxies are visible opaque but IR transparent.

• As an extension to this, IR sensor modules that measure distance do exist, if some sort of calibration or tolerance is required, instead of just on/off information. May 8 at 7:23
• This is a fantastic idea. I hadn't even considered just using light, but that would simplify things considerably. May 8 at 9:29

You could use an accelerometer placed inside the PC case. The accelerometer could be used to detect if someone moved the unit more than a certain amount. Essentially integrate acceleration to find motion.

Obviously, all accelerometers have some noise and bias which will cause your distance integral to randomly drift a little, even when the unit is perfectly still. To get around this, you can do a few things.

1. Keep a running measurement of the average acceleration of the unit (including gravity) over a long time and subtract that from your measured values when computing the integral. This should basically cancel out any constant drift in the measured distance due to pretty much any factors that might affect it, so long as they change slowly enough.

2. To clean up any remaining errors from step 1 multiply the computed distance vector by some number less than 1 (like 0.999999...) at each time step. This will cause the integral to slowly decay toward zero over a long long time.

With an accurate enough accelerometer, you could ensure that someone would have to move impossibly slow to avoid being detected. Possibly so slow that it would take them many hours or days to just lift up the unit.

• I think it might be tricky to set a threshold such that things like putting a heavy box down on the desk, or wheeling a chair into it, doesn't cause a nuisance event, while still picking up careful movement. You'd need more filtering on the input to deal with short sharp accelerations May 9 at 8:53
• The accelerometer would work. I am not sure your exact recommendations for algorithm are correct but it can definitely be tuned to reliably detect people picking up the PC. May 9 at 15:46
• @ChrisH Integrating the acceleration to check for a certain minimum distance would by itself act as a low pass filter and would keep many small noise events from triggering the alarm. May 9 at 18:23

If what you actually want to achieve is ensuring that the computer cannot be taken away from the desk without encrypting the hard drive, this will work at minimal cost:

1. Enable BitLocker with a pre-boot password.
2. Use a short power cord.
• Short power cord won't help with this: wiebetech.com/products/hotplug-field-kit
– filo
May 9 at 18:45
• Delete #2 and replace it with an auto-lock policy after 1min of no user interaction. This is now OP's solution.
– J...
May 10 at 0:03
• @J... this mostly works! if the attacker is quick, the auto lock can be defeated with a "mouse wiggler" dongle May 10 at 1:20
• @filo - I've just had a look at the video for hotplug. That thing's lethal!
– SiHa
May 10 at 15:26

If you select a momentary-contact pushbutton with an extra few millimeters of travel (before the contact disengages), you can arrange so that with the PC on the surface, the button is not fully depressed. This way, the PC is not actually resting on the button but just keeping is sufficiently depressed.

Would you consider a base, permanently attached to the desk top? In this case, you could simply have a metal strip in the base which connects two contacts in the PC case. As soon as the PC is lifted off of the base, the contact opens.

• It's funny you ask, but to align with a small reed switch with its matching magnet to avoid anyone trying to dodge the bottom sensors/switches I was intending to have a low 3D printed bottom profile surround to make it very easy to keep the magnet aligned. Altering that or just adding a bottom to the surround could make this work quite well too. May 8 at 9:35

If you want to prevent your PCs from being stolen, just use Kensington-style locks. To prevent somebody stealing data, use 2 factor authentication with something like a smart card or a yubikey that users need to take with them.

If you're concerned with how much weight a tactile button can hold, and a limit switch is too big, you could:

• mount the button on a base plate,
• add a middle plate with a hole for the button onto that,
• add a top plate onto that with a protrusion to push the button -- but not too deep.

The thickness of the middle plate and the height of the protrusion of the top plate would need to be calibrated to your button, but then the weight of your PC case would be held by the plates, not by the button.

I think you could get down to 5mm thickness of that whole stack. Access to a 3D printer may help here.