Electronics notes/Movement sensing

From Helpful
Jump to navigation Jump to search

⚠ This is for beginners and very much by a beginner / hobbyist

It's intended to get an intuitive overview for hobbyist needs. It may get you started, but to be able to do anything remotely clever, follow a proper course or read a good book.

Some basics and reference: Volts, amps, energy, power · batteries · resistors · transistors · fuses · diodes · capacitors · inductors and transformers · ground

Slightly less basic: amplifier notes · varistors · changing voltage · baluns · frequency generation · Transmission lines · skin effect

And some more applied stuff:

IO: Input and output pins · wired local IO · wired local-ish IO · ·  Various wireless · 802.11 (WiFi) · cell phone

Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Noise stuff: Stray signals and noise · sound-related noise names · electronic non-coupled noise names · electronic coupled noise · ground loop · strategies to avoid coupled noise · Sampling, reproduction, and transmission distortions

Audio notes: See avnotes

Platform specific

Arduino and AVR notes · (Ethernet)
Microcontroller and computer platforms ··· ESP series notes · STM32 series notes

Less sorted: Ground · device voltage and impedance (+ audio-specific) · electricity and humans · power supply considerations · Common terms, useful basics, soldering · landline phones · pulse modulation · signal reflection · Project boxes · resource metering · SDR · PLL · vacuum tubes · Multimeter notes Unsorted stuff

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · JY-MCU · DMX · Thermal printer ·

See also Category:Electronics.

Accelerometers and gyroscopes

An accelerometer measures linear force, in one or more directions.

And, since gravity is a force in a fixed direction, any slow-moving system (fast acceleration might saturate the sensor) can have at least some idea of its orientation - think pitch and roll (but not yaw).

While small, convenient, and cheap, they are neither the most sensitive or the lowest-noise. As such, they are often mostly useful for stronger motion, and most are specced for at least 1g.

Now typically MEMS designs: microelectromechanical - a tiny weight in a chip.

A gyroscope measures rotation,


This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

A 3-axis accelerometer.

Speaks both I2C or SPI (1.6MHz or less) though breakout boards may expose only one.

Minimal pins:

  • Gnd
  • Vs (2.5V)
  • Vddio (1.8V)
  • 2/3 pins for I2C, 3/4 pins for SPI


  • INT1 and INT2 - can be used to signal:
    • DATA_READY - watermark interrupt, signalling that the FIFO is full (in relevant FIFO modes)

Data output - there's a FIFO with a few modes:

  • bypass mode: FIFO not used
  • FIFO mode
    • stops storing samples and waits for user to empty. Interrupt Tap/freefall detection still works.
  • stream mode:
    • overwrites oldest continuously
  • trigger mode:
    • only starts sampling when told to - behaving like FIFO mode.
    • to reset,

Reading data from DATAX, DATAY, DATAZ registers (two bytes each) ...in FIFO, stream, or trigger mode

A watermark bit signals whether the FIFO is full (stream or FIFO mode). Can be configured as an interrupt.


This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


3-axis gyroscope and 3-axis accelerometer plus a processor that does sensor fusion

Can also accept compass data into its sensor fusion(verify)

speed/precision tradeoff is configurable for both gyroscope and accelerometer

MPU-9150 - essentially a MPU-6050 plus an 3-axis magnetometer compass (AK8975).

...which can be used to reduce yaw drift.



Seismological equipment

Variant naming comes largely from sensitivity (often in units of Volts/(meter/second)).

From geophone (relatively local) to local geologic seismographs to teleseismographs (world-scale) are factors of (very) roughly ten.


A geopheone is essentially a voice coil, i.e. coil on an thing that can move, mounted to sense movement.

Many have a significant response peak, because of a spring that holds them and makes it a resonator. They may have a relatively flat response curve in a wider band around that.

Since they're often used for earthquake detection, these frequencies are on the order of 5Hz, 10Hz, 15Hz. This type of design is impractical to design for below ~1Hz, though.

Hobbyists can get a decent signal quickly by connecting them directly to a (differential) ADC. More serious uses would build an in-amp circuit, probably with bandpass.

DIY note: A torn woofer can be made into a geophone with some creativity, see e.g. https://zeidigital.wordpress.com/2015/08/14/base-for-earthquake-detector-geophone/


Potentially designed to detect as low as hundredths of a Hz





This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Effectively a motion sensor based on radar doppler (at ~3.1GHz).

Default sensitivity should work decently up to 8m, can be reduced.

Works through thin materials.

Unpopulated board positions:

  • CDS - you can attach a cadmium disulphide sensor, which will pull that same line down when it is light
useful for 'turn light on only in the dark' use
  • R-CDS - add photoresistor to only work at low light
  • C-TM - add capacitor to extend trigger time from default ~2s
  • R-GN - add resistor to lower sensitivity(/distance)
default is ~7m, adding 1M resistor makes it 5m(verify)