Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Autofocus for the 16mm Telephoto Lens Mounted on the Raspberry Pi HQ Camera (lemariva.com)
94 points by lemariva on Dec 31, 2020 | hide | past | favorite | 47 comments


As a maker, this is very impressive. Custom builds with gears and motors sourced from various sites is very, very tricky. Matching bores and tooth pitches is hard enough, but mountings can really take a lot of physical trial-and-error.

I tend to default to ServoCity ActoBotix because there is great interoperability, but the tolerances are shaky.


I've found the easiest way to work with gears is to 3d print my own. That way you can (semi-)easily match them to the shaft diameters and to each other, and you can sometimes make them integral to the things they're driving, if those things are 3d printed too.


That's on my list to try!

I made a rotational-to-linear translator with adjustable linear depth using 1/4" HDPE and a gigantic OMAX waterjet cutter. The pitches were perfect to within 0.0001", but the design was five layers of gears, some were planetary, others slid on cams. Trying to connect planar gears is very effing hard when you can't use a pass-through collet (e.g., the pinion has to be FLUSH but yet allow rotation).


I doubt you can get 0.1 thou tolerance out of a water cutter.


Sorry, I was off by one decimal place.

http://info.omax.com/precision

Average of ±0.003" (±0.08 mm) and up to 0.001” (±25 µ)

About the same as a laser cutter.

You set it to cut very slowly and it angles the head to account for motion and material deformation (you need to program the type of material).


I would suspect GP is referring to precision as amplified through the gear chain


I print a lot of 3d gears too, but the one I couldn't manage was a fine pitch worm gear (I purchased the worm, and tried to print the gear) to drive a heliostat. Technically, I was able to print it and mount it, but tiny imperfections led to accuracy problems. I've had excellent results with larger herringbone gears.


By the way, maybe this is a slight off-topic (but parallel topic) -- will availability of cheaper Lidars make autofocus an easier / better solved problem some time in the future? Or is this not such a problem to bother with the expense of a Lidar?

If you know exactly the distance to something you want in focus, and it no longer has to be "solved" by phase detection, or edge sharpness? Or is this even already being used with phones having Lidars built in? I guess if your lens isn't perfectly distance calibrated then it fails though.


Sony and Canon both have phase detection on the sensor. it's fairly accurate and would serve the same purpose as lidar, get really close to perfect focus so contrast detection af can bring it to perfect focus fairly quickly.


Wondering why the autofocus couldn’t be done by the Pi itself, rather than an M5Stack. Does the Pi not lend itself to real-time applications?


That can be also done. The pins are there (as you can see on the board design). I just wanted to separate the threads. It was easier to control the steppers with the M5Stack.


How did a 16mm lens become a "telephoto"? That sounds like a fish-eye focal length to me.


Telephoto has little to do with focal length, other than that it is often used in longer lenses to keep them smaller. It is a way of constructing a lens where the physical length of the lens is shorter than the focal length.


Not sure why this gets down voted, it is the correct definition of "telephoto" (i.e. "the physical length of the lens is shorter than the focal length").


Eh, no? It's based on the field of view, not on the physical length of the lens.

Fuji's 27mm pancake lens is only 23mm tall. A telephoto lens it is not.


It's the original/technical definition. In common parlance telephoto means small field of view.

The commonly used meaning has drifted from the original/technical definition. The same has happened with other things. 'Lens' for example, is technically one single element; the whole assembly is technically an 'objective'. But in photography the latter is what is commonly referred to as 'lens'.

Language isn't always precise and often context dependent (I don't always like that but there's not a lot I can do).


GP was more correct in that it's the construction (using a telephoto group) that makes it shorter. Being shorter does not in itself make it telephoto.


It depends on the sensor size. 16mm in this case is not the 35mm-equivalent.


I once attended a music festival where they banned attendees from bringing in telephoto lenses. Trouble was, they didn't specify it as "35mm-equivalent", so my PowerShot SX40 was allowed in - at 840 mm equivalent for the highest zoom. It was funny, kinda spurred me to get some nice closeups of artists performing.


That’s kinda misleading. DSLR lenses have been quoted at 35mm equivalent focal lengths forever because that’s what makes sense to photographers.


Actually, they haven't? All Canon EF-S lenses (so aps-c only) are marketed solely by the actual focal length and not the FF equivalent. To the best of my knowledge, it's the same in other brands, even in micro 4/3.


See here

https://support.usa.canon.com/kb/index?page=content&id=ART14...

The confusion comes from the equivalence of the actual focal length of the lens and the 35mm focal length on a full frame sensor.


So, wait... are you telling me that my Nikkor 105mm f/2.8 macro lens is really acting like a ...uses 35mm equivalent calculator... 160.65mm f/4.28 on my D3400?

Edit: updated to clarify exactly what calculation I was doing.


It has the same (approximate) field of view on your D3400 as a 160.65 mm lens would have on a full frame camera, yes. 157,5 mm come to think of it actually: as far as I know the crop factor on Nikon crop cameras is 1.5. On a medium format camera you would need an even longer lens to get the same field of view.

I'm not sure about the aperture equivalent. Aperture influences both exposure and depth-of-field, and I don't think they vary in the same way between crop cameras and full frame cameras.


The focal length is a property of the lens and as such irrespective of which camera it is attached to.


I know that. 35mm equivalent focal length tells you about the image area and effective aperture.


I’m pretty sure EF-S focal lengths are 35mm equivalent. They just project a smaller image circle and the rear element is closer to the sensor (so will likely crash the mirror on a full frame camera).


I just had a look at EF-S lenses at https://www.bhphotovideo.com. I didn't see anyone that used the 35 mm equivalent focal length in its name. For example, the first is called "Canon EF-S 24mm f/2.8 STM". The details mention "38.4mm (35mm Equivalent)", so 24 mm really is the real focal length, not the 35 mm equivalent one.


APS-C is a 1.6 crop. If you put a 24mm lens on a full frame 5D and a 24*1.6=38.4 mm lens on a APS-C 7D you will see the same angle of view.

The focal length numbers printed on an EF or an EF-s lens are the same thing for consistency. The crop factor isn’t included. So if you take a photo on a full frame 5D and also an APS-C 7D and crop accordingly to account for the difference in sensor size you get the same thing.

So what do the numbers printed on the lens correspond to? It’s hard to find but this canon page suggests it’s 35mm equivalent:

https://support.usa.canon.com/kb/index?page=content&id=ART14...


> The focal length numbers printed on an EF or an EF-s lens are the same thing for consistency. The crop factor isn’t included. So if you take a photo on a full frame 5D and also an APS-C 7D and crop accordingly to account for the difference in sensor size you get the same thing.

No, that seems to be a misunderstanding. The focal lengths on the lenses are the real focal lengths, not the 35mm-equivalent ones. For example, have a look at the EF-S 24mm f/2.8 STM [1] The name says it's focal length is 24mm; that 24mm is also printed on the lens. The description says "a 35mm equivalent focal length of 38mm". So clearly its 35mm-equivalent focal length is 35mm, and its real focal length is 24mm.

[1] https://www.usa.canon.com/internet/portal/us/home/products/d...

> So what do the numbers printed on the lens correspond to? It’s hard to find but this canon page suggests it’s 35mm equivalent: https://support.usa.canon.com/kb/index?page=content&id=ART14...

What that page indicates is the crop factor for each camera (i.e. the ratio of its sensor size to a 35 mm sensor, equal to the factor you have to multiply the real focal length with to get the 35mm-equivalent focal length). For the 7D, the table says that the 35mm-Equivalent Focal Length is "Approximately equivalent to 1.6 x the lens focal length". Let's apply that to our 24mm-lens above. 1.6 x 24mm = 38.4mm, which is essentially the same as the 35mm in the description (focal length specifications are not very precise anyways).

So it checks out: the number on the lens is the real focal length; to get the 35-mm equivalent focal length you can either look it up in the specifications or simply multiply with the crop factor.

I'm not very familiar with Canon, but as I presume you can put EF lenses on APS-C cameras (I know the equivalent of that works in the Nikon world). If you compare an EF 50mm lens and an EF-S 50mm lens on the same APS-C camera, you'll notice both have the same field of view. Because the focal lengths are the real focal lengths, they behave the same when placed on the same camera.

But if you compare an EF lens on a APS-C camera with that same lens on a full frame camera, you'll see that it has a wider field of view on the full frame camera (because the full frame camera has a sensor that's 1.6x the size).

When reading about focal lengths, always make sure to understand what reference the author uses; it's often not explicitly mentioned. For example, people often say a "normal" lens (i.e. a lens with a field of view that appears natural for us humans) is a 50mm lens. But that's only true for full frame sensors. For other sensors (or films) you need the equivalent: for APS-C (or Nikon DX) it's around 35mm, for medium formats it's 75mm or larger depending.


I get that, I’ve been shooting for twenty years.

The confusion is that the true focal length and the full frame 35mm focal length are used interchangeably. The Canon link doesn’t make it clear other than to suggest it doesn’t really matter once you use 35 mm as your reference point.


It's a 5.6 crop factor, so 90mm equivalent.


would be cool to pair this with AI to snap photos of specific animals or birds. As a trail camera or a bird feeder camera. For example record only Blue Jays or Cardinals. If it could spin around to capture action that would be great too.


The AI part is working (I am actually training a model to identify different birds). The spin around could be a next update. :)



Uh, so I have no choice in cookie preferences? Just suck it up and accept it?


I would prefer sites that don't actually comply with the rules to go the whole hog and not notify me.


You probably know about www.i-dont-care-about-cookies.eu, but just in case.


Interesting that we have to install a massive privacy leak to deal with privacy protection.


problem solved, I updated the plugin and it was misconfigured


Just don’t click “save” - you can still read the article.


The cookies get added to your browser as soon as the page loads, regardless of whether you consent.


that's actually illegal in the EU


You can close the site and not consume the content.


Which is unlawful if your users are in Europe (and also possibly of they're just from Europe?). You are obliged not to discriminate against users who choose not to be tracked (or whatever).


So, theoretically speaking - because I'm not from the EU - if I choose to not comply with that law, is it my responsibility to figure out a technical manner to block EU users from accessing my content, in this global Internet world?


Do you have a a link? If you're based in the EU I assume so, but the EU doesn't regulate the world. (At least directly, if you comply with GDPR you're likely to port that over to other regions to avoid possible legal issues)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: