lens – Hackaday https://hackaday.com Fresh hacks every day Mon, 04 Nov 2024 16:52:19 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 156670177 Pi Zero to AR: Building DIY Augmented Reality Glasses https://hackaday.com/2024/11/04/pi-zero-to-ar-building-diy-augmented-reality-glasses/ https://hackaday.com/2024/11/04/pi-zero-to-ar-building-diy-augmented-reality-glasses/#comments Mon, 04 Nov 2024 16:30:00 +0000 https://hackaday.com/?p=732744 [miko_tarik] wearing diy AR goggles in futuristic settingIf you’re into pushing tech boundaries from home, this one’s for you. Redditor [mi_kotalik] has crafted ‘Zero’, a custom pair of DIY augmented reality (AR) glasses using a Raspberry Pi …read more]]> [miko_tarik] wearing diy AR goggles in futuristic setting

If you’re into pushing tech boundaries from home, this one’s for you. Redditor [mi_kotalik] has crafted ‘Zero’, a custom pair of DIY augmented reality (AR) glasses using a Raspberry Pi Zero. Designed as an affordable, self-contained device for displaying simple AR functions, Zero allows him to experiment without breaking the bank. With features like video playback, Bluetooth audio, a teleprompter, and an image viewer, Zero is a testament to what can be done with determination and creativity on a budget. The original Reddit thread includes videos, a build log, and links to documentation on X, giving you an in-depth look into [mi_kotalik]’s journey. Take a sneak peek through the lens here.

[miko_tarik] wearing diy AR gogglesCreating Zero wasn’t simple. From designing the frame in Tinkercad to experimenting with transparent PETG to print lenses (ultimately switching to resin-cast lenses), [mi_kotalik] faced plenty of challenges. By customizing SPI displays and optimizing them to 60 FPS, he achieved an impressive level of real-time responsiveness, allowing him to explore AR interactions like never before. While the Raspberry Pi Zero’s power is limited, [mi_kotalik] is already planning a V2 with a Compute Module 4 to enable 3D rendering, GPS, and spatial tracking.

Zero is an inspiring example for tinkerers hoping to make AR tech more accessible, especially after the fresh news of both Meta and Apple cancelling their attempts to venture in the world of AR. If you are into AR and eager to learn from an original project like this one, check out the full Reddit thread and explore Hackaday’s past coverage on augmented reality experiments.

]]>
https://hackaday.com/2024/11/04/pi-zero-to-ar-building-diy-augmented-reality-glasses/feed/ 24 732744 diy-ar-goggles-1200 [miko_tarik] wearing diy AR goggles
Creating Customized Diffraction Lenses For Lasers https://hackaday.com/2024/08/23/creating-customized-diffraction-lenses-for-lasers/ https://hackaday.com/2024/08/23/creating-customized-diffraction-lenses-for-lasers/#comments Fri, 23 Aug 2024 23:00:13 +0000 https://hackaday.com/?p=701006 [The Thought Emporium] has been fascinated by holograms for a long time, and in all sorts of different ways. His ultimate goal right now is to work up to creating …read more]]>

[The Thought Emporium] has been fascinated by holograms for a long time, and in all sorts of different ways. His ultimate goal right now is to work up to creating holograms using chocolate, but along the way he’s found another interesting way to manipulate light. Using specialized diffraction gratings, a laser, and a few lines of code, he explores a unique way of projecting hologram-like images on his path to the chocolate hologram.

There’s a lot of background that [The Thought Emporium] has to go through before explaining how this project actually works. Briefly, this is a type of “transmission hologram” that doesn’t use a physical object as a model. Instead, it uses diffraction gratings, which are materials which are shaped to light apart in specific ways. After some discussion he demonstrates creating diffraction gratings using film. Certain diffraction patterns, including blocking all of the light source, can actually be used as a lens as the light bends around the blockage into the center of the shadow where there can be focal points. From there, a special diffraction lens can be built.

The diffraction lens can be shaped into any pattern with a small amount of computer code to compute the diffraction pattern for a given image. Then it’s transferred to film and when a laser is pointed at it, the image appears on the projected surface. Diffraction gratings like these have a number of other uses as well; the video also shows a specific pattern being used to focus a telescope for astrophotography, and a few others in the past have used them to create the illusive holographic chocolate that [The Thought Emporium] is working towards.

]]>
https://hackaday.com/2024/08/23/creating-customized-diffraction-lenses-for-lasers/feed/ 3 701006 diffraction-main
Broken Lens Provides Deep Dive Into Camera Repair https://hackaday.com/2024/05/13/broken-lens-provides-deep-dive-into-camera-repair/ https://hackaday.com/2024/05/13/broken-lens-provides-deep-dive-into-camera-repair/#comments Mon, 13 May 2024 23:00:27 +0000 https://hackaday.com/?p=677635 While most of us are probably willing to pick up the tools and void the warranty on just about anything, often just to see what’s inside, many of us draw …read more]]>

While most of us are probably willing to pick up the tools and void the warranty on just about anything, often just to see what’s inside, many of us draw the line at camera gear. The tiny screws, the complex mechanisms, and the easily destroyed optical elements are all enough to scare off the average hacker. Not so for [Anthony Kouttron], who tore into a broken eBay Sigma lens and got it working again.

Now, to be fair, modern lenses tend to have a lot more in them that’s amenable to repair than back in the old days. And it seemed from the get-go that [Anthony]’s repair was going to be more electronic than optical or mechanical. The 45-mm lens was in fantastic shape physically, but wouldn’t respond to any controls when mounted to a camera body. Removing the lens bayonet mount exposed the main controller PCB, which is tightly packed with SMD components and connectors for the flex cables that burrow further into the lens to its many sensors and actuators. By probing traces with his multimeter, [Anthony] found a DC-DC converter on the main PCB with an unknown component nearby. This turned out to be an SMD fuse, and as luck would have it, it was open. Replacing the fuse got the lens working again, and while there’s always the nagging suspicion that whatever blew the fuse the first time could happen again, the repair seems to have worked.

Despite the simplicity of the fix, [Anthony] continued the teardown and shared a lot of tips and tricks for lens repairs, including where he would have looked next if the fuse had been good. One tip we loved was the use of double-sided tape to organize parts as they’re removed; this is particularly important with camera gear where screws or different lengths can make for a really bad day on reassembly.

Feeling the need to dive deeper into lens repair? This step-by-step repair should keep you satisfied.

]]>
https://hackaday.com/2024/05/13/broken-lens-provides-deep-dive-into-camera-repair/feed/ 18 677635 20240307_114752
The F Number On A Lens Means Something? Who Knew! https://hackaday.com/2024/03/18/the-f-number-on-a-lens-means-something-who-knew/ https://hackaday.com/2024/03/18/the-f-number-on-a-lens-means-something-who-knew/#comments Mon, 18 Mar 2024 17:00:37 +0000 https://hackaday.com/?p=669595 The Raspberry Pi has provided experimenters with many channels of enquiry, and for me perhaps the furthest into uncharted waters it has led me has come through its camera interface. …read more]]>

The Raspberry Pi has provided experimenters with many channels of enquiry, and for me perhaps the furthest into uncharted waters it has led me has come through its camera interface. At a superficial level I can plug in one of the ready-made modules with a built-in tiny lens, but as I experiment with the naked sensors of the HD module and a deconstructed Chinese miniature sensor it’s taken me further into camera design than I’d expected.

I’m using them with extra lenses to make full-frame captures of vintage film cameras, in the first instance 8 mm movie cameras but as I experiment more, even 35 mm still cameras. As I’m now channeling the light-gathering ability of a relatively huge area of 1970s glass into a tiny sensor designed for a miniature lens, I’m discovering that maybe too much light is not a good thing. At this point instead of winging it I found it was maybe a good idea to learn a bit about lenses, and that’s how I started to understand what those F-numbers mean.

More Than The Ring You Twiddle To Get The Exposure Right

lose-up of the end of a lens, showing the F-number range
The F-number range of a 1990s Sigma consumer-grade zoom lens.

I’m not a photographer, instead I’m an engineer who likes tinkering with cameras and who takes photographs as part of her work but using the camera as a tool. Thus the f-stop ring has always been for me simply the thing you twiddle when you want to bring the exposure into range, and which has an effect on depth of field.

The numbers were always just numbers, until suddenly I had to understand them for my projects to work. So the first number I had to learn about was the F-number of the lens itself. It’s usually printed on the front next to the focal length and expressed as a ratio of the diameter of the light entrance to the lens focal length. Looking around my bench I see numbers ranging from 1:1 for a Canon 8mm camera to 1:2.8 for a 1950s Braun Paxette 35 mm camera, but it seems that around 1:1.2 is where most 8 mm cameras sit and 1:2 is around where I’m seeing 35 mm kit lenses. The F-stop ring controls an adjustable aperture, and the numbers correspond to that ratio. So that 1:2 kit lens is only 1:2 at the F2 setting, and becomes 1:16 at the F16 setting.

Fighting Too Much Light

A close-up of a 3d printed Super 8 cartridge in a camera, with a Raspberry Pi Zero 2 and a little M12 camera in it.
My Raspberry Pi camera is focused on the focal plane of a Minolta Super 8 movie camera.

My problem is that I’m trying to match a CMOS sensor with a very high sensitivity per unit area against lens systems designed for film, which at the relatively low ISO numbers of 8 mm movie film, has a much lower sensitivity per unit area. 8 mm film is a fantastic medium which provides an aesthetic like no other, but even its most diehard adherent wouldn’t disagree that light levels are of huge importance when using it.

I had some failed experiments with putting the CMOS sensor at the focal point of the camera, but in the end found a far more effective technique of using an M12 screw-in lens as a macro lens to focus on the original focal point from behind. This is great, but has the result that all of that extra light intended for an ISO 50 frame of 8 mm movie film instead lands on a Raspberry Pi sensor designed for a much smaller lens. I need to make it deliver equivalent light to that F number being much higher, but I want my digital cartridge to just drop into an unmodified camera, so I can’t mess about with camera apertures. The solution is to apply a neutral density filter, in effect an attenuator, to the front lens ring. Not ideal, but it’s the best I’ve got.

So this has been my journey into the numbers on the front of a camera lens, and also my journey into understanding how they help me in merging old and new cameras on the cheap. If you’re a seasoned photographer you’ll be wondering how it took me so long, but I hope some of you will have learned something new. If one day I can film a Hackaday report on a vintage Super 8 camera with a digital cartridge, it will all have been worthwhile.

]]>
https://hackaday.com/2024/03/18/the-f-number-on-a-lens-means-something-who-knew/feed/ 59 669595 f-number-featured lose-up of the end of a lens, showing the F-number range A close-up of a 3d printed Super 8 cartridge in a camera, with a Raspberry Pi Zero 2 and a little M12 camera in it.
A 3D Printed Grinder for Printed Lens Blanks https://hackaday.com/2023/11/16/a-3d-printed-grinder-for-printed-lens-blanks/ https://hackaday.com/2023/11/16/a-3d-printed-grinder-for-printed-lens-blanks/#comments Thu, 16 Nov 2023 16:30:32 +0000 https://hackaday.com/?p=640819 When one thinks of applications for 3D printing, optical components don’t seem to be a good fit. With the possible exception of Fresnel lenses, FDM printing doesn’t seem up to …read more]]>

When one thinks of applications for 3D printing, optical components don’t seem to be a good fit. With the possible exception of Fresnel lenses, FDM printing doesn’t seem up to the job of getting the smooth surfaces and precision dimensions needed to focus light. Resin printing might be a little closer to the mark, but there’s still a long way to go between a printed blank and a finished lens.

That gap is what [Fraens] aims to fill with this homebrew lens grinding machine. It uses the same basic methods used to grind and polish lenses for centuries, only with printed components and lens blanks. The machine itself consists of a motorized chuck for holding the lens blank, plus an articulated arm to hold the polishing tool. The tool arm has an eccentric drive that wobbles the polishing tool back and forth across the blank while it rotates in the chuck. Lens grinding requires a lot of water and abrasive, so a large bowl is provided to catch the swarf and keep the work area clean.

Lens blanks are printed to approximately their finished dimensions using clear resin in an SLA printer. [Fraens] spent a lot of time optimizing the printing geometry to minimize the number of print layers required. He found that a 30° angle between the lens and the resin pool worked best, resulting in the clearest blanks. To polish the rough blanks, a lapping tool is made from polymer modeling clay; after baking it dry, the tool can hold a variety of pads and polishing compounds. From there it’s just a matter of running the blank through a range of abrasives to get the desired final surface.

Are the lenses fantastic? Well, they’re probably not going to make it into fine optical equipment, but they’re a lot better than you might expect. Of course, there’s plenty of room for improvement; better resins might result in clearer blanks, and perhaps degassing the uncured resin under vacuum might help with bubbles. Skipping the printed blanks and going with CNC-machined acrylic might be worth a try, too.

]]>
https://hackaday.com/2023/11/16/a-3d-printed-grinder-for-printed-lens-blanks/feed/ 20 640819 printed_lenses
Wooden CNC Sculpture Displays Conway’s Game of Life https://hackaday.com/2023/08/24/wooden-cnc-sculpture-displays-conways-game-of-life/ https://hackaday.com/2023/08/24/wooden-cnc-sculpture-displays-conways-game-of-life/#comments Thu, 24 Aug 2023 11:00:29 +0000 https://hackaday.com/?p=610534 A wooden frame with 64 green LEDs running a Game of Life simulationConway’s Game of Life has been the object of fascination for computer hobbyists for decades. Watching the generations tick by is mesmerizing to watch, but programming the data structure and …read more]]> A wooden frame with 64 green LEDs running a Game of Life simulation

Conway’s Game of Life has been the object of fascination for computer hobbyists for decades. Watching the generations tick by is mesmerizing to watch, but programming the data structure and implementing the rules is also a rewarding experience, especially if you’re just getting acquainted with a new computing platform. Just as rewarding can be creating a nice piece of hardware to run the game on, as [SandwichRising] has just done: check out his beautiful wooden Game of Life implementation.

A set of PCBs implementing an 8x8 LED displayThe main part of his Game is a piece of poplar wood that was CNC routed to produce an 8×8 display adorned with neat chain-like shapes. The display consists of standard 5 mm green LEDs, but they’re not the things you see poking out the front of the wooden frame. Instead, what you’re seeing are 64 lenses made out of epoxy. [SandwichRising] first covered the holes with tape, then poured green epoxy into each one and waited for it to harden. He then took off the tape and applied a drop of UV-cured epoxy on top to create a lens.

All the LEDs are mounted on PCB strips that are hooked up to a central bus going to the main ATmega328P  microcontroller sitting on a separate piece of PCB. Whenever the system is powered on, the game is set to a random state determined by noise, after which the simulation begins. On such a small field it’s pretty common for the game to end up in a stable state or a regular oscillation, which is why the ATmega keeps track of the last few dozen states to determine if this has happened, and if so, reset the game to a random state again.

The source code, as well as .STL files for the PCBs and the frame, are available in the project’s GitHub repository. If woodworking isn’t your thing, there’s plenty of other ways to make neat Game of Life displays, such as inside an alarm clock, with lots of LEDS under a coffee table, or even with a giant flip-dot display.

]]>
https://hackaday.com/2023/08/24/wooden-cnc-sculpture-displays-conways-game-of-life/feed/ 1 610534 Wooden Game of Life A set of PCBs implementing an 8x8 LED display
Making Your Own VR Headset? Consider This DIY Lens Design https://hackaday.com/2023/08/01/making-your-own-vr-headset-consider-this-diy-lens-design/ https://hackaday.com/2023/08/01/making-your-own-vr-headset-consider-this-diy-lens-design/#comments Tue, 01 Aug 2023 18:30:20 +0000 https://hackaday.com/?p=607509 Lenses are a necessary part of any head-mounted display, but unfortunately, they aren’t always easy to source. Taking them out of an existing headset is one option, but one may …read more]]>

Lenses are a necessary part of any head-mounted display, but unfortunately, they aren’t always easy to source. Taking them out of an existing headset is one option, but one may wish for a more customized approach, and that’s where [WalkerDev]’s homebrewed “pancake” lenses might come in handy.

Engineering is all about trade-offs, and that’s especially true in VR headset design. Pancake lenses are compact units that rely on polarization to bounce light around internally, resulting in a very compact assembly at the cost of relatively poor light efficiency. That compactness is what [WalkerDev] found attractive, and in the process discovered that stacking two different Fresnel lenses and putting them in a 3D printed housing yielded a very compact pancake-like unit that gave encouraging results.

This project is still in development, and while the original lens assembly is detailed in this build log, there are some potential improvements to be made, so stay tuned if you’re interested in using this design. A DIY headset doesn’t mean you also must DIY the lenses entirely from scratch, and this option seems economical enough to warrant following up.

Want to experiment with mixing and matching optics on your own? Not only has [WalkerDev]’s project shown that off-the-shelf Fresnel lenses can be put to use, it’s in a way good news that phone-based VR is dead. Google shipped over 10 million cardboard headsets and Gear VR sold over 5 million units, which means there are a whole lot of lenses in empty headsets laying around, waiting to be harvested and repurposed.

]]>
https://hackaday.com/2023/08/01/making-your-own-vr-headset-consider-this-diy-lens-design/feed/ 11 607509 DIY pancake-like lens (2)