Geo:bit Digital Geological Compass
by ancolankreijer in Circuits > Sensors
3924 Views, 42 Favorites, 0 Comments
Geo:bit Digital Geological Compass
Looking for a new geologic compass for our students, we tested and compared a number of cheap and expensive compasses. Size, shape, readability, stability, accuracy, durability, and definitely price, all types have their pro's and con's and none of them matched our preferences.
Digital geological compasses are rare and expensive. Many good, and not so good mobile phone apps have been reported and tested by experts. But no mobile phone has a functional design that allows straightforward understanding of what it is you are actually measuring, which is important in teaching students geology in the field. So why not make your own, ideal, geological compass, matching your own needs. It turns out to be quite as accurate as most affordable geological compasses, (+- a few degrees), easily adaptable (declination, strike/dip direction/dip angle) and it is cheaper than any semi-decent geological compass, with his example costing less than €30,- And last but not least, it is fun to make. Geo:bit is a geologic compass using a micro:bit circuit board. Geo:bit's hardware and software can easily be adapted to suit your preferences.
Downloads
Supplies
Micro:bit (I used the old type)
Power cell, CR2032
Small screws, non magnetic, I used nylon screws, M2.5)
3D printer
Small file or sandpaper
Soldering iron
geo:bit python code for micro:bit
Shape files: STL, print ring twice
Geo:bit Design Choices, Shape Factor
Geo:bit Design choices, Shape factor
I am quite picky when it comes to geological compasses, I prefer a flat lid, that can be placed directly on the strata, it should open completely flat, to allow measuring sub-horizontal layers. I prefer dip direction/dip angle over strike - dip. It should fit in a breast pocket, it should stabilize fast and readability is important also in full sunlight.
Geo:bit is a geologic compass build on a micro:bit circuit board. My prototype weighs exactly 57 grams, with fully charged batteries. It measures 60 * 76 * 24 mm. A first prototype was printed using PLA material, a subsequent model was made in PETG. The casing was designed using Sketchup Pro. External spirit levels are added. The design was tested in the field, and and proved rugged enough for intensive field use, and small enough to easily fit in a pocket.
The Micro:bit is fitted back to front, so that the micro usb port is still reachable, thus button A is on the right side, and button B is left.
A power switch is included in the battery socket, so it only consumes power when in use. The receding position of the switch protects it from unintended use, and still provides easy access. Two spirit levels have been incorporated in the base, allowing to check horizontality when power is off. These are not strictly necessary, as the geo:bit provides an excellent spirit level when powered on.
We should avoid magnetic materials as much as possible, therefore the battery was placed as far away from the sensor as possible, and a plastic hinge was used.
A measuring scale was printed on the side of the casing, in centimeters as well as indicators of 90, 45 and 0 degrees opening angle of the lid.
Design Choices, Electronics
I choose Micro:Bit since it has all needed sensors and a 5 * 5 led matrix on a single board, which makes it more rugged than when all kind of components need to be combined. It operates on a single CR2032 battery batteries for a very, very long time. So far it has not yet run out of power, shile it has been in use for 3 months, obviously switching off after use.
The led display is capable of scrolling text, however, reading scrolling text of three digits is annoying and appears to take ages. So I developed a way for the led matrix to instantaneous show numbers up to 599, we only need 360 degrees max anyway. We have five columns of five leds each. The first column on the left shows 100's, the second and third column show 10's, and the fourth and fifth column show units. It takes a bit of practice, but it can be read quickly, allowing the compass to continuously take measurements while displaying the bearings in real time, see user manual for example.
It is well possible to program a digital compass such that the compass automatically measures its own position (Zobl et al., 2007), and returns dip direction and dip of the plane it is on, without manually orientating it to horizontal, or vertical position, to measure dip direction and dip angle respectively. I deliberately choose to mimic a classic compass, for educational purposes, thus the user sees what they measure, and dip direction and dip angle are not just abstract numbers.
Construction
- Step 1. Print the base, lid, hinge pin and rings of the compass using a 3D printer. Using sand paper and or a small file, remove irregularities and make the hole for the hinge smooth for the pin to easily move. Make sure the lid can be opened a full 180 degrees, otherwise adjust print, the design fits snugly, but actual size may depend on printer settings. Insert pin in hinge and use hot soldering iron to melt the rigs to the pin on each end of the pin.
Connect Mirobit:bit to batteries, I guided the wires through the hole next to GND and soldered them to the back pads. Place the battery in the holder, and solder the wires to GND and 3V of the micro:bit. Make sure to connect the copper pads to the copper rings surrounding the holes, when you solder the wires to the back of the Micro:bit. (https://tech.microbit.org/hardware/powersupply/). You can glue the battery socket in place, but it fits quite snuggly.
- Step 2. Push Micro:bit in place, and fix in place with some nylon screws. Drill some holes corresponding to the centre of each hole of Micro:bit and fasten in place. It should fit exactly. Make sure the Micro:bit is placed correct, the sides of Micro:bit are parallel to the casing, and when placed on a horizontal surface the central led should be on. If not, then adjust mounting, since a good alignment of Micro:bit and casing are essential for accuracy. Push the spirit levels in the corresponding holes, these should fit tighly and need no glue. Lastly, you may attach a lanyard through the holes in the right corner of the base.
- Step 3. Connect your micro:bit to your computer using a usb (data) cable. Open the code in Mu editor (https://codewith.mu/), or any other editor capable of processing micropython for micro:bit. You can adapt the code to your needs if you want. Save a compiled .hex file on your micro:bit, or flash it directly from the Mu- editor. The yellow power LED on the bottom of the micro:bit starts flashing when code is uploaded. When complete the code is executed automatically. When new code was flashed a calibration sequence will automatically start to calibrate the micro:bit's inbuild magnetometer. This requires the user to tilt and rotate the compass in three dimensions to fill the screen. The compass measures the magnitude of the magnetic field in different orientations to calculate a reference model for your specific micro:bit. Calibration can be started at any moment by pressing button A and B simultaneously. When calibration is successful, a smiley ;) is shown and the compass enters level mode. A single led on the 5x5 display is on, mimicking a spirit level. If the micro:bit is horizontal, the central led is lit. Tolerance levels for the horizontality can be adjusted in the programme.
In the micropython code, the following parameters can be modified:
- Brightness: intensity of LED display, default 9 = maximum brightness
- Declination: magnetic declination, default = 0
When power is switched on a short animation will appear indicating the micro:bit is ready.
You will get used to reading measurement on the 5 x 5 led display quickly.
The user manual describes field use of the compass in detail.
Downloads
Testing and Evaluating the Compass
I used a Micro:Bit, since it is easy to programme in microPython, and it is a single board, low voltage, so less batteries, and it has a build-in accelerometer, magnetometer and LED display. The design can be adapted to Arduino, but would require addition of additional components, including magnetometer, a display and an accelerometer.
Field test have been limited so far, but initial tests showed fast response, no need to wait for the compass needle to stop swinging. Good readability of the display, and a decent accuracy. A series of calibration measurements arecompared to a Brunton and a Recta compass. For dip angle, or inclination, the geo:bit is very precise and average error is 0 degree, beating the competition in readability. Accuracy is 3.8 degrees on average for magnetic measurements. A filtering routine taking the average of a number of readings, could further improve this, since the noise is often 2 - 3 degrees. Digital compasses need to calibrate, the algorithm for calibration of micro:bit is open source and has been greatly improved since the first versions. However, sometimes the calibration fails and the readings can be 90 degrees off. This occasionally happens to mobile phones but also to Micro:bit. The good news is that it is always a large error, so you know your compass is off, a recalibration solves the issue, in case of geo:bot press button A and B simultanously.
The graph shows accuracy without filtering. Average error is 3.8 degree, maximum error can be up to 8 degrees. Difference is measured every 5 degrees, and compared to a Brunton Axis Transit compass.
Field testing using a the first prototype, in PLA, proved to be rugged enough, even when the compass was dropped a few times. Battery life is great, two weeks of regular field use on a new CR 2032 battery, with a handfull of measurements every day.
A more rigorous field test will be conducted soon. An assessment of accuracy in comparison to other devises needs to be performed as outlined by Novakova and Pavlis, 2019. Furthermore an assessment of accuracy over time as described by Almendiger et al., 2017 will give insight in the sensitivity to external disturbances.
Modifications
The compass can easily be modified to cater for different needs, including a more rugged, waterproof casing, a rechargeable battery, data logging, or transmission using bluetooth, an e-paper display, spoken measurements, and if you really want, taking strike dip measurements rather than dip - dip direction.
References
L. Novakova and T. L . Pavlis, 2019, Modern Methods in Structural Geology of Twenty-first Century: Digital Mapping and Digital Devices for the Field Geology. In: Teaching Methodologies in Structural Geology and Tectonics (pp.43-54), DOI:10.1007/978-981-13-2781-0_3
R. Almendiger, C. R. Siron, and C. Scott, 2017, Structural data collection with mobile devices: Accuracy, redundancy, and best practices. Journal of Structural Geology 102, DOI:10.1016/j.jsg.2017.07.011