The fragility of SD cards is the weak link in the Raspberry Pi ecosystem. Most of us seem to have at least one Pi tucked away somewhere, running a Magic Mirror, driving security cameras, or even taking care of a media library. But chances are, that Pi is writing lots and lots of log files. Logging is good — it helps when tracking down issues — but uncontrolled logging can lead to problems down the road with the Pi’s SD card.
[Erich Styger] has a neat way to avoid SD card logging issues on Raspberry Pi, he calls it a solution to reduce “thrashing” of the SD card. The problem is that flash memory segments wear out after a fairly low number of erase cycles, and the SD card’s wear-leveling algorithm will eventually cordon off enough of the card to cause file system issues. His “Log2Ram” is a simple Unix shell script that sets up a mount point for logging in RAM rather than on the SD card.
The idea is that any application or service sending log entries to /var/log will actually be writing them to virtual log files, which won’t rack up any activity on the SD card. Every hour, a cron job sweeps the virtual logs out to the SD card, greatly reducing its wear. There’s still a chance to lose logging data before it’s swept to disk, but if you have relatively stable system it’s a small price to pay for the long-term health of a Pi that’s out of sight and out of mind.
One thing we really like about [Erich]’s project is that it’s a great example of shell scripting and Linux admin concepts. If you need more information on such things, check out [Al Williams’] Linux-Fu series. It goes back quite a way, so settle in for some good binge reading.
[Enginoor] is on a quest. He wants to get into the world of 3D printing, but isn’t content to run off little toys and trinkets. If he’s going to print something, he wants it to be something practical and ideally be something he couldn’t have made quickly and easily with more traditional methods. Accordingly, he’s come out the gate with a fairly strong showing: a magnetic Maxwell kinematic coupling camera mount.
If you only recognized some of those terms, don’t feel bad. Named for its creator James Clerk Maxwell who came up with the design in 1871, the Maxwell kinematic coupling is self-orienting connection that lends itself to applications that need a positive connection while still being quick and easy to remove. Certainly that sounds like a good way to stick a camera on a tripod to us.
But the Maxwell design, which consists of three groves and matching hemispheres, is only half of the equation. It allows [enginoor] to accurately and repeatably line the camera up, but it doesn’t have any holding power of its own. That’s where the magnets come in. By designing pockets into both parts, he was able to install strong magnets in the mating faces. This gives the mount a satisfying “snap” when attaching that he trusts it enough to hold his Canon EOS 70D and lens.
[enginoor] says he could have made the holes a bit tighter for the magnets (thereby skipping the glue he’s using currently), but otherwise his first 3D printed design was a complete success. He sent this one off to Shapeways to be printed, but in the future he’s considering taking the reins himself if he can keep coming up with ideas worth committing to plastic.
Of course we’ve seen plenty of magnetic camera mounts in the past, but we really like the self-aligning aspect of this design. It definitely seems to fit the criterion for something that would otherwise have been difficult to fabricate if not for 3D printing.
Have you heard it said that everything in Linux is a file? That is largely true, and that’s why the ability to manipulate files is crucial to mastering Linux Fu.
One thing that makes a Linux filesystem so versatile is the ability for a file to be many places at once. It boils down to keeping the file in one place but using it in another. This is handy to keep disk access snappy, to modify a running system, or merely to keep things organized in a way that suits your needs.
There are several key features that lend to this versatility: links, bind mounts, and user space file systems immediately come to mind. Let’s take a look at how these work and how you’ll often see them used.
Continue reading “Linux Fu: File Aliases, Links, and Mappings”
[GregO29] had a 10″ GoTo telescope but at 70lbs, it wasn’t really portable. And so he did what any self-respecting CNC enthusiast would do, he put his CNC skills to work to make an 8″ Newtonian reflector, semi-Nasmyth mount telescope of his own design. It also gave him a chance to try out his new Chinese 6040 router/engraver with 800W water-cooled spindle.
What’s all that fancy terminology, you say? “Newtonian reflector” simply means that there’s a large concave mirror at one end that reflects a correspondingly large amount of light from the sky to a smaller mirror which then reflects it toward your eye, preferably along with some means of focusing that light. “Semi-Nasmyth mount” means that the whole thing pivots around the eyepiece so that you can keep your head relatively still (the “semi” is because the eyepiece can also be pivoted, in which case you would have to move your head a bit).
We really like the mechanism he came up with for rotating the telescope in the vertical plane. Look closely at the photo and you’ll see that the telescope is mounted to a pie-shaped piece of wood. The curved outer circumference of that pie-shape has gear teeth on it which he routed out. The mechanism that moves these teeth is a worm screw made from a 1″ spring found at the hardware store that’s on a 3/4″ dowel. Turn the worm screw’s crank and the telescope rotates.
Continue reading “CNC-Telescope With Semi-Nasmyth Mount”
[Michael] has been working on projects involving lucid dreaming for a long time. The recurring problem with most projects of this nature, though, is that they often rely on some sort of headgear or other wearable which can be cumbersome to actually sleep with. He seems to have made some headway on that problem by replacing some of the offending equipment with a small camera that can detect eye movements just as well as other methods.
The idea behind projects like this is that a piece of hardware detects when the user is in REM sleep, and activates some cue which alerts the sleeper to the fact that they’re dreaming (without waking them up). Then, the sleeper can take control of the dream. The new device uses a small camera that dangles in front of an eye, which is close enough to monitor the eye’s movement. It measures the amount of change between each frame, logs the movements throughout the night and plays audio tracks or triggers other hardware when eye movements are detected.
[Michael]’s goal is to eventually communicate from inside of a dream, and has gone a long way to achieving that goal. Now that this device is more comfortable and more reliable, the dream is closer to reality. [Michael] is looking for volunteers to provide sleep logs and run tests, so if you’re interested then check out the project!
There’s a slew of apps out there for tracking your bike rides. If you want to monitor your ride while using the app, you’ll need it securely affixed to your bike. That’s where [Gord]’s No Dropped Calls build comes in. This aluminium mount was hand milled and anodized, which gives it a professional finish.
The mount consists of 3 parts which were machined out of stock 6061 aluminium. The plans were dreamt up in [Gord]’s head, and not drawn out, but the build log gives a good summary of the process. By milling away all of the unnecessary material, the weight of the mount was minimized.
Once the aluminium parts were finished, they were anodized. Anodization is a process that accelerates the oxidization of aluminum, creating a protective layer of aluminium oxide. [Greg] does this with a bucket of sulphuric acid and a power supply. Once the anodization is complete, the part is dyed for coloring. If you’re interested, [Gord] has a detailed writeup on home anodization.
The final product looks great, puts the phone within reach while biking, and prevents phone damage due to “dropped calls.”
[Seandavid010] recently purchased a 2004 Volvo. He really liked the car except for the fact that it was missing some more modern features. He didn’t come stock with any navigation system or Bluetooth capabilities. After adding Bluetooth functionality to the stock stereo himself, he realized he would need a secure location to place his iPhone. This would allow him to control the stereo or use the navigation functions with ease. He ended up building a custom iPhone mount in just a single afternoon.
The key to this project is that the Volvo has an empty pocket on the left side of the stereo. It’s an oddly shaped vertical pocket that doesn’t seem to have any real use. [Seandavid010] decided this would be the perfect place to mount his phone. The only problem was that he didn’t want to make any permanent changes to his car. This meant no drilling into the dash and no gluing.
[Seandavid010] started by lining the pocket with blue masking tape. He then added an additional lining of plastic wrap. All of this was to protect the dashboard from what was to come next. He filled about half of the pocket with epoxy putty. We’ve seen this stuff used before in a similar project. He left a small opening in the middle with a thick washer mounted perpendicular to the ground. The washer would provide a place for an off-the-shelf iPhone holder to mount onto. [Seandavid010] also placed a flat, wooden paint stirrer underneath the putty. This created a pocket that would allow him to route cables and adapters underneath this new mount.
After letting the epoxy putty cure for an hour, he removed the block from the pocket. The stick was then removed, and any gaps were filled in with putty. The whole block was trimmed and smooth down for a more streamlined look. Finally, it was painted over with some flat black spray paint to match the color of the dashboard. An aftermarket iPhone holder allows [Seandavid010] to mount his cell phone to this new bracket. The cell phone holder allows him to rotate the phone into portrait or landscape mode, and even is adjustable to accommodate different sized phones.