Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

Cave mapping with Raspberry Shake

10 February 2025 at 18:03

Accurate maps of intricate cave systems help improve the safety of intrepid divers. In issue 150 of The MagPi, Rosie Hattersley hears about Raspberry Shake’s contribution.

Richard Wylde describes himself as “a sort of physicist and engineer living between the business and academic worlds” whose passion for cave diving is “closer to an obsession than a hobby”. He is co-founder of Terahertz, an advanced engineering company which, among other impressive achievements, developed remote sensing instruments for the European Space Agency’s EarthCARE mission. Richard is also one of several experienced cave explorers involved in mapping the subterranean network of cenotes [sinkholes] in Yucatan, Mexico. “The caves are stunningly beautiful and [mapping them] is technically difficult,” he says. “A lot of effort goes into staying alive.” Acoustic and magnetic mapping can help plot the location and direction of these unexplored passageways, improving safety for all who visit them — an endeavour made more robust using Raspberry Shake, a Raspberry Pi-based device more commonly used to detect earthquakes. 

Cave measurements are made manually underwater using a compass and tape measure

The maps are also useful for dive guides keen to show off the speleothems (mineral deposits such as stalactites and stalagmites), and for developers to know whether building on a particular area is possible and permissible. Their dives also reveal the effects of developments such as golf courses, which are built by clearing jungles, use nitrates to maintain their greens, and may also be drawing water from the aquifers. 

Distinguished company 

Richard often dives with renowned cave explorer Fred Devos in Mexico’s Quintana Roo region, which has no overground rivers. Mapping its subterranean cave network is “incredibly dangerous and physically challenging”. 

Team Raspberry Shake’s kit, including a Raspberry Shake acoustic seismograph, oxygen tanks, and maps of remote and barely accessible stretches of cave systems

Exploring the caves involves following taut lines of string with knots every ten feet to mark the way, just like Theseus in the Greek myth. Richard mentions the trust and focus needed to accurately read a compass and count out distances travelled ten feet at a time based on how many knots you’ve passed. Visibility and human physical resilience are all factors too — if you’re exhausted from a lengthy dive, you probably aren’t noticing arrows or counting knots accurately. “It’s milk of magnesia down there when the bubbles hit the ceiling.”  

Richard explains the process: “We mark the depth, the distance and the azimuth, and the angle to the next station” — often simply where the line is wrapped around a rock. Painted arrows help ensure divers don’t get lost, but some caves have more than one entrance, or arrows pointing in more than one direction. 

Richard Wylde, Fred Devos, and colleagues published a booklet mapping the cave system at Actun Koh

The maps are written on specially printed paper and include geographical features such as cave openings, changes in cave and water depth, and height. Relating this information to the outside world requires a way of referring it to the surface and getting a GPS position from it. “The map is linked to an absolute position by taking the line out of the cave entrance and accessing a GPS coordinate in an area with few obstructions to the sky,” says Richard. “In caves which have more than one entrance, it is possible to ascertain and correct for the build-up of errors by taking GPS measurements at the entrances. Programs such as Ariane [a widely used mapping tool] can then be used to distribute the correction through the map.”

Instrumental improvements

The team previously used a fluxgate magnetometer to match above-ground and subterranean locations at the Sagitario cenote. In the summer of 2024, Richard and his cave-mapping colleagues trialled a new means of confirming their findings, using both the Raspberry Shake 1D vertical motion seismograph and a far more sensitive acoustic magnetometer. Getting to the site after hacking through the jungle, the Raspberry Shake and acoustic magnetoscope were placed directly above where divers believed the cave was located. 

Golfing greens are treated with nitrates that poison the cenotes with algae

“Raspberry Shake helped confirm our findings and add a degree of accuracy that was not previously possible,” says Richard. The results were promising enough that the team ordered an RS3D three-axis model for their planned return trip in early 2025. This time, the Raspberry Shake will be placed in an IP67 waterproof box, and the team hopes the additional measurements will allow direction to be determined from the relative amplitudes of the disturbance in the X, Y, Z frames. 

Richard, Sam, and Chris embark on a cave dive at Actun Koh

The post Cave mapping with Raspberry Shake appeared first on Raspberry Pi.

Raspberry Pi Pico MIDI Gesture Controller

8 January 2025 at 16:57

Extracting an arresting array of sounds from a guitar became a mission for keen coder Gary. In the latest issue of The MagPi, he tells Rosie Hattersley how he built a Raspberry Pi-based expression pedal.

The MIDI Gesture Controller is a sort of musical expression pedal that rotates and rolls around a ball joint, providing six degrees of freedom

Guitarist and keen coder Gary Rigg says he always thought floor-based controllers — particularly expression pedals — should have a more prominent role. They are usually operated by pressing your foot down for a subtle or more obvious wah-wah or delay effect, but only in a single direction, also known as one degree of freedom (DOF). 

You use your foot to “control the pitch of the pedal, and the pitch determines the parameter value.” Gary reasoned that adding degrees of freedom such as yaw (rotation around an axis) and roll to an expression pedal could extend its pitch parameters. He began pondering what new sounds could be achieved by redesigning how the humble foot pedal was operated. The result is the MIDI Gesture Controller, a Raspberry Pi Pico-based expression pedal that can control three parameters, “which ought to lead to more control while playing live.”

The Gesture Controller can be plugged into a PC as a MIDI control device and works with synthesizers and samplers

New musical direction

Gary hit upon a ball and socket setup, since these move through three or more planes of motion in multiple directions. He soon settled on a desk-based rotating puck design, realising that since the expression pedal did not necessarily need to be foot-operated, it could have several additional uses: “it works as well as a hand controller as a foot controller, so could be used for DJs or in a studio.” Camera controllers, stage lighting, and other non-musical applications also came to mind. Gary points out that MIDI is simply a protocol and could be swapped for something else, such as an HID controlling gameplay, for example. Sensor values are sent down a serial line, so the Gesture Controller could theoretically be used in “any situation needing a multi-axis controller.”

Give it a try

Gary uses Python regularly for his job as a software developer for websites and mobile devices. In “paid work land” he’s used Raspberry Pi for IoT projects to control lights and smart devices, in fire alarm panels, and alongside NFC cards and in MQTT Edge devices. As a hobbyist, Gary has created Raspberry Pi-based retro games consoles, set up sensors, and designed a Ghostbusters PKE Meter, so he is fairly confident with prototyping and seeing diverse projects through to completion.

Prototyping the MIDI Gesture Controller with Raspberry Pi Pico, which runs CircuitPython code

He made use of Adafruit’s MIDI library, and says programming in CircuitPython using Thonny IDE on Raspberry Pi Pico made a lot of sense: “an incredible bit of kit as a low-cost microcontroller, and being in Python-land feels like home.” He also found it to be the best value for money, and the most reliable board for his project. Other components — including the 6DOF AHRS IMU sensor, arcade joystick ball, 3D printer, and neoprene rubber for grip — were bought from The Pi Hut and other stores. The wiring setup was straightforward enough, with the IMU (inertial measurement unit) and yaw reset button connected to Raspberry Pi Pico.

Despite Gary’s years of experience as a computer scientist and software engineer, the MIDI Gesture Controller project took him several weeks to complete and provided plenty of challenges. Getting a smooth motion on the ball joint was particularly difficult. Having designed the casing in CAD software, Gary says he must have 3D-printed nearly 20 variants to get it right. Another challenge involved getting actual pitch, yaw, and roll values from the IMU. “It took a bit of effort, as did calibrating the ranges and limits of minimums and maximums.”

Gary’s YouTube video amply demonstrates the extra sound possibilities his Gesture Controller can generate

Having first contemplated a multi-DOF expression pedal a few years ago, the MIDI Gesture Controller is now up and running, and Gary continues to tweak and improve it, planning to add a few extra features. He always likes to have a project on the go, is unafraid to try things, and is a big advocate for experimenting with designs in Tinkercad. A few years ago, he launched a Raspberry Pi-based Wi-Fi blocker that caught the press’ attention. The Kickstarter campaign wasn’t successful, but it was a fun project, and he still owns the trademark for a Wi-Fi ‘notspot’.

The MagPi #149 out NOW!

You can grab the new issue right now from Tesco, Sainsbury’s, Asda, WHSmith, and other newsagents, including the Raspberry Pi Store in Cambridge. It’s also available at our online store, which ships around the world. You can also get it via our app on Android or iOS.

You can also subscribe to the print version of The MagPi. Not only do we deliver it globally, but people who sign up to the six- or twelve-month print subscription get a FREE Raspberry Pi Pico W!

The post Raspberry Pi Pico MIDI Gesture Controller appeared first on Raspberry Pi.

DEC Flip-Chip tester | The MagPi #147

29 October 2024 at 16:58

A brand new issue of The MagPi is out in the wild, and one of our favourite projects we read about involved rebuilding an old PDP-9 computer with a Raspberry Pi-based device that tests hundreds of components.

Anders Sandahl loves collecting old computers: “I really like to restore them and get them going again.” For this project, he wanted to build a kind of component tester for old DEC (Digital Equipment Corporation) Flip-Chip boards before he embarked on the lengthy task of restoring his 1966 PDP-9 computer — a two-foot-tall machine with six- to seven-hundred Flip-Chip boards inside — back to working order. 

DEC’s 1966 PDP-9 computer was two foot tall
Image credit: Wikipedia

His Raspberry Pi-controlled DEC Flip-Chip tester checks the power output of these boards using relay modules and signal clips, giving accurate information about each one’s power draw and output. Once he’s confident each component is working properly, Anders can begin to assemble the historic DEC PDP-9 computer, which Wikipedia advises is one of only 445 ever produced.

Logical approach

“Flip-Chip boards from this era implement simple logical functions, comparable to one 7400-series logic circuit,” Anders explains. “The tester uses Raspberry Pi and an ADC (analogue-to-digital converter) to measure and control analogue signals sent to the Flip-Chip, and digital signals used to control the tester’s circuits. PDP-7, PDP-8 (both 8/S and Straight-8), PDP-9, and PDP-10 (with the original KA processor) all use this generation of Flip-Chips. A testing device for one will work for all of them, which is pretty useful if you’re in the business of restoring old computers. 

The Flip-Chip tester uses Raspberry Pi 3B+, 4, or 5 to check the signal and relay the strength of each Flip-Chip by running a current across it, so restorers don’t attach a dud component

Rhode Island Computer Museum (RICM) is where The MagPi publisher Brian Jepson and friend Mike Thompson both volunteer. Mike is part of a twelve-year-project to rebuild RICM’s own DEC PDP-9 and, after working on a different Flip-Chip tester there, he got in touch with Anders about his Raspberry Pi-based version. He’s now busily helping write the user manual for the tester unit. 

Warning!
Frazzled Flip-Chips


Very old computers that use Flip-Chips have components operating at differing voltages, so there’s a high chance of shorting them. You need a level shifter to convert and step down voltages for safe operation. 

Mike explains: “Testing early transistor-only Flip-Chips is incredibly complicated because the voltages are all negative, and the Flip-Chips must be tested with varying input voltages and different loads on the outputs.” There are no integrated circuits, just discrete transistors. Getting such an old computer running again is “quite a task” because of the sheer number of broken components on each PCB, and Flip-Chip boards hold lots of transistors and diodes, “all of which are subject to failure after 55+ years”.

Anders previously used Raspberry Pi to recreate an old PDP-8 computer

Obstacles, of course

The Flip-Chip tester features 15 level-shifter boards. These step down the voltage so components with different power outputs and draws can operate alongside each other safely and without anything getting frazzled. Anders points out the disparity between the Flip-Chips’ 0 and -3V logic voltage levels and the +10 and -15V used as supply voltages. Huge efforts went into this level conversion to make it reliable and failsafe. Anders wrote the testing software himself, and built the hardware “from scratch” using parts from Mouser and custom-designed circuit boards. The project took around two years and cost around $500, of which the relays were a major part. 

This photo from the user manual shows just how huge the PDP-9 could get

Anders favours Raspberry Pi because “it offers a complete OS, file system, and networking in a neat and well-packaged way”, and says it is “a very good software platform that you really just have to do minor tweaks on to get right”. He’s run the tester on Raspberry Pi 3B, 4, and 5. He says it should also run on Raspberry Pi Zero as well, “but having Ethernet and the extra CPU power makes life easier”.

Although this is a fairly niche project for committed computer restorers, Anders believes his Flip-Chip tester can be built by anyone who can solder fairly small SMD components. Documenting the project so others can build it was quite a task, so it was quite helpful when Mike got in touch and was able to assist with the write-up. As a fellow computer restorer, Mike says the tester means getting RICM’s PDP-9 working again “won’t be such an overwhelming task. With the tester we can test and repair each of the boards instead of trying to diagnose a very broken computer as a whole.” 

The MagPi #147 out NOW!

You can grab the new issue right now from Tesco, Sainsbury’s, Asda, WHSmith, and other newsagents, including the Raspberry Pi Store in Cambridge. It’s also available at our online store, which ships around the world. You can also get it via our app on Android or iOS.

You can also subscribe to the print version of The MagPi. Not only do we deliver it globally, but people who sign up to the six- or twelve-month print subscription get a FREE Raspberry Pi Pico W!

The post DEC Flip-Chip tester | The MagPi #147 appeared first on Raspberry Pi.

❌
❌