The Magnetometer using PIC16F688
I found several different magnetometer designs on Internet, but I tend to be very picky. None of those was what I needed – something that is sensitive enough to record the small magnetic field variations where I live (San Jose, California), robust enough to work for long periods of time without constant maintenance, and relatively easy to construct. Since the only place where I could permanently install the sensor away from disturbances is on the patio of our apartment, another important consideration was that it should not be influenced by major changes in temperature or humidity.
My magnetometer is of a torsion design. Torsion magnetometers work as follows: A magnet, attached to a mirror, is suspended from a thread. A laser beam is reflected from the mirror and falls on a detector. Changes in the Earth’s magnetic field turn the magnet and the attached mirror, twisting the torsion thread. The reflected beam changes its position on the sensor, the changes are recorded and plotted on a chart.
This sounds simple enough, but there are some precautions to be taken when designing such magnetometer.
First, the changes of the magnetic field, at least at the latitude of California, are quite small. Sensitivity of the magnetometer can be easily improved to detect those small changes by increasing the distance between the mirror and the detector. High sensitivity, however, comes at a price – any slight disturbance (say, by an air current) will cause tiny movements of the mirror that are enough to completely mess up the data. The mirror must be protected from such disturbances.
Magnetic disturbances abound too. A kid parking her bicycle nearby or a neighbor opening his refrigerator door is enough to set the mirror in motion. Once in motion, the mirror will keep oscillating for quite a while unless there is a way to dampen such oscillations.
Finally, the position of the sensor relatively to the mirror must be stable too. A rock-solid mirror won’t be of any use if the sensor moves this or that way with every slight vibration.
I came up with the following design, constructed out of PVC pipe:
For more detail: The Magnetometer using PIC16F688
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
JLCPCB Prototype: Only $2 for 10pcs 10×10cm, 24 hours Quick Turn, DHL Delivery in 3 days