A micro-electro-mechanical system, MEMS, device comprising: a MEMS sensor (50, 200) comprising: a first mobile element (M1, 190); a second mobile element (M2, 192); a first electrode (S11, S22, 191, 193, 291) arranged to deflect the first mobile element (M1, 190) and the second mobile element (M2, 192) by application of a voltage across said first electrode (S11, S22, 191, 193, 291) and the first and second mobile elements (M1, M2, 190, 192); a second electrode (S12, S21, 195, 197, 293) arranged to deflect the first mobile element (M1, 190) and the second mobile element (M2, 192) by application of a voltage across said second electrode (S12, S21, 195, 197, 293) and the first and second mobile elements (M1, M2, 190, 192); a differential detector circuit comprising a first input and a second input; an input multiplexer circuit comprising one or more switches configured selectively to connect each electrode (S11-S22, 191, 193, 195, 197, 291, 293) to a test voltage source (VPP/CP) to apply a plurality of test voltages across each electrode (S11-S22, 191, 193, 195, 197, 291, 293) and said mobile elements (M1, M2, 190, 192) to deflect the mobile elements (M1, M2, 190, 192) during a test mode of the device, wherein said test voltages comprise a first set of monotonically increasing test voltages and a second set of monotonically decreasing voltages for performing a C sweep to test for stiction of the mobile elements (M1, M2, 190, 192); and an output multiplexer circuit (52, 214) comprising one or more switches (S1-S4) configured selectively to connect the first mobile element (M1, 190) and/or the second mobile element (M2, 192) to a single one of said first and second inputs of the detector circuit during said test mode to detect the deflection of the mobile element caused by the application of said test voltages. a MEMS sensor (50, 200) comprising: a first mobile element (M1, 190); a second mobile element (M2, 192); a first electrode (S11, S22, 191, 193, 291) arranged to deflect the first mobile element (M1, 190) and the second mobile element (M2, 192) by application of a voltage across said first electrode (S11, S22, 191, 193, 291) and the first and second mobile elements (M1, M2, 190, 192); a second electrode (S12, S21, 195, 197, 293) arranged to deflect the first mobile element (M1, 190) and the second mobile element (M2, 192) by application of a voltage across said second electrode (S12, S21, 195, 197, 293) and the first and second mobile elements (M1, M2, 190, 192); a first mobile element (M1, 190); a second mobile element (M2, 192); a first electrode (S11, S22, 191, 193, 291) arranged to deflect the first mobile element (M1, 190) and the second mobile element (M2, 192) by application of a voltage across said first electrode (S11, S22, 191, 193, 291) and the first and second mobile elements (M1, M2, 190, 192); a second electrode (S12, S21, 195, 197, 293) arranged to deflect the first mobile element (M1, 190) and the second mobile element (M2, 192) by application of a voltage across said second electrode (S12, S21, 195, 197, 293) and the first and second mobile elements (M1, M2, 190, 192); a differential detector circuit comprising a first input and a second input; an input multiplexer circuit comprising one or more switches configured selectively to connect each electrode (S11-S22, 191, 193, 195, 197, 291, 293) to a test voltage source (VPP/CP) to apply a plurality of test voltages across each electrode (S11-S22, 191, 193, 195, 197, 291, 293) and said mobile elements (M1, M2, 190, 192) to deflect the mobile elements (M1, M2, 190, 192) during a test mode of the device, wherein said test voltages comprise a first set of monotonically increasing test voltages and a second set of monotonically decreasing voltages for performing a C sweep to test for stiction of the mobile elements (M1, M2, 190, 192); and an output multiplexer circuit (52, 214) comprising one or more switches (S1-S4) configured selectively to connect the first mobile element (M1, 190) and/or the second mobile element (M2, 192) to a single one of said first and second inputs of the detector circuit during said test mode to detect the deflection of the mobile element caused by the application of said test voltages.