proposed license plate camera hack.

So you are 100% certain of that?

I wouldn't recommend trying with the front lens, but it's not too difficult to find a reasonable lens for the rear camera of an A129 Pro, as long as you are not worried about fitting it into the case.

Well, it remains to be seen. It will depend on if he purchased a lens to adequately match the Starvis IMX291 rear camera sensor on the A129 Pro. It will also depend upon if he can resolve the mismatched BFL issue. Depending upon the lens even a lens extension tube may not work properly to accommodate the lens if it still keeps the BFL out of range. Some members who've tried M12 lens mount extensions report them being too deep to work with certain lenses; the opposite of the problem they were trying to resolve in the first place.

Additionally, as I've previously explained, it can be more challenging to fit a telephoto to a rear camera. Depending on the design of the chosen lens, and where one mounts the camera, if it protrudes too far out of the original housing it can risk touching the rear windscreen glass when mounted. Not sure how that may or may not work with the rake on a Tesla Model 3 rear window.
 
Last edited:
So you are 100% certain of that?

I wouldn't recommend trying with the front lens, but it's not too difficult to find a reasonable lens for the rear camera of an A129 Pro, as long as you are not worried about fitting it into the case.
The lens will definitely stick out. I fully expected that, focal length is about 10mm longer than the original lens, so it will stick out by about 10 mm.

The spacer is a lot of work, but not hard to make. I will have to find some longer screws. I think they are 2-56 screws. They are slightly less than 2mm in diameter, but M2 screws are too big to fit.

I think the hardest part of this will be getting the camera focused properly. I can only view the video on the main cameras screen which is much lower resolution than the camera sensor. I think it will be a lot of back and forth recording video, playing it back on my computer then tweaking the focus. Repeated many times.
 
I think the hardest part of this will be getting the camera focused properly. I can only view the video on the main cameras screen which is much lower resolution than the camera sensor. I think it will be a lot of back and forth recording video, playing it back on my computer then tweaking the focus. Repeated many times.
As long as the lens rotates smoothly, it is fairly easy to rotate it back and forth across the ideal focus point, then judge the centre point fairly accurately. If you use the wifi, app, and a tablet/phone/etc screen then you get a good enough view for focusing. Maybe do a little fine tuning after, but you will be pretty close. With only the camera screen you can still get quite close, although I recommend using the wifi. You can also use a laptop and rtsp, or http streaming, not very good resolution, but you do have a bigger screen, and it is only FHD resolution to start with.
 
think the hardest part of this will be getting the camera focused properly. I can only view the video on the main cameras screen which is much lower resolution than the camera sensor.

Your A129 Pro (DUO) has an AV-out port. If you connect your camera to a suitable monitor or flat screen TV you will have a much easier time focusing your new lens than with the camera screen. Most TVs have RCA inputs. I believe this should work for your rear camera but I don't own a A129 Pro, so I'm not 100% sure. Personally, I use a small 7 inch LCD TV/monitor for this purpose unless I am installing a lens on a Mobius which provides web cam mode. Of course, the AV-out is low resolution too but with this method you will have a much better experience when you do the focusing process. Aim the camera at a well lit high contrast scene, preferably one with some specular highlights. You'll need to peg the focus at the proper distance for your dash cam needs and preferences as well as determine the optimal hyperfocal distance during the focusing process.

https://www.amazon.com/gp/B08V1SV8BL

EDIT: This device and adapter cable will allow for an analogue AV to HDMI connection. It may be too much to spend if one only plans to use it once though.

https://www.amazon.com/gp/B0856WDDJB

https://www.amazon.com/gp/B096DVP5Z6
 
Last edited:
As long as the lens rotates smoothly, it is fairly easy to rotate it back and forth across the ideal focus point, then judge the centre point fairly accurately. If you use the wifi, app, and a tablet/phone/etc screen then you get a good enough view for focusing. Maybe do a little fine tuning after, but you will be pretty close. With only the camera screen you can still get quite close, although I recommend using the wifi. You can also use a laptop and rtsp, or http streaming, not very good resolution, but you do have a bigger screen, and it is only FHD resolution to start with.
Wifi is not working. The app goes to the setup page, I connect successfully to the camera, go back to the VIOFO app, and it only allows me to go back to the setup page. Stuck in a loop, WiFi is connected to the camera, but the app won't recognize it.

This project is delayed by a few days. None of the screws I have on hand will work to attach the spacer to the camera mount. (necessary to ensure the spacer has the same base footprint as the original mount).
I have ordered some 2-56 screws, but these might not be right since this is a rather common screw size, and I should have those in my tin of random screws.
I don't know for sure what size screws I need because the thread pitch gauge I have only goes down to 44 threads per inch, and while my metric thread gauge goes smaller, none of the metric threads match.
I also only have taps down to M3 or 4-40, so I can't us them as thread gauges either.
I ordered some smaller taps for metric or borked screw sizes, but they won't be here for a while either.
If these screws are some oddball size, I can either re-tap the holes with a standard size, or drill them out, and use nuts on the far side.

Dashmellow: Thank you for the suggestion about the AV output. I had looked at the camera for an HDMI output, did not find one and assumed there was nothing. At best that output will be only 480p (more likely 480i). That would be better than the main cameras display, but still insufficient for focusing the camera. I probably have the appropriate cable around somewhere, left over from some other piece of equipment. Should be able to use my receiver to convert composite video to HDMI. I will still use the record to memory card, look at on the computer, rinse and repeat method. But that is probably still a week away.
 
Dashmellow: Thank you for the suggestion about the AV output. I had looked at the camera for an HDMI output, did not find one and assumed there was nothing. At best that output will be only 480p (more likely 480i). That would be better than the main cameras display, but still insufficient for focusing the camera.

This may work better than you think. Not ideal for sure but I've done it many times and it will facilitate focusing your lens if you follow the methodology I mentioned above. (bright light, high contrast subject matter, specular highlights)


focal length is about 10mm longer than the original lens, so it will stick out by about 10 mm.

I'm afraid that is not how focal length works. Focal length is an optical term that refers to the distance between the point of exact focus inside the lens barrel and the plane of your sensor. It varies with each lens design. It really has liitle or nothing to do with the physical length of the lens, although telephoto lenses are indeed physically longer than wide angle lenses

focal_length.jpg

I'd be curious to know which lens you purchased for this project. Please post a link.

the mounting screws on this one are 19mm apart, and the only ones available from Amazon are 18mm, or 20mm.

Finally, I have some thoughts about the lens holder on your camera. While it is quite possible that you do indeed have one that has screw holes that are 19mm apart, I have NEVER seen or heard of one that size nor can I find one from any of my usual sources. They are usually 18, 20 or 22mm for M12 lenses. I did find one that was 17.5mm but that's the only one like it I've ever seen. I would suggest double checking your measurements as I suspect it may actually be 20mm. If that proves true it will save you a lot of hassle and provide a better path to success with your project as there are many 20mm variations to choose from as 20mm in the most common size available.
 
Last edited:
I took another look at the screws under a microscope with the metric thread pitch gauge. Unfortunately on the thread gauge I have, the smallest pitch threads are not very well defined, but under the microscope, it appears that the threads line up with the 0.35 mm pitch thread gauge.
That narrows it down to M1.6, M1.7, or M1.8. M1.8 appears to be very uncommon. I measured the OD of the threads, and got 1.58mm which lines up with M1.6 which is specified to have an OD of 1.581mm.
I ordered a kit of screws: https://www.amazon.com/gp/B093YV68P3
As for the lens I bought, it is this one: https://www.amazon.com/gp/B082TSDNW1
I had measured the screw hole spacing twice before and gotten 19mm. I was very careful because all amazon sells is 18mm and 20mm, so I made sure it was 19mm. Just because you asked, I measured again and got 19mm center to center on the holes.
The fact that I could not buy a replacement is why I am making the spacer.
 
There is a problem however the lens, having a longer focal length, does not focus until it is about half a millimeter beyond the end of the mounting tube.
It might be worth trying an M12 thread extension as Nigel suggested, however with just 0.5mm gap you may find the recess within the extender is not deep enough, pushing the lens too far from the sensor. I'd still recommend buying one though to try, as it might save you a bunch of time working on the spacer.
 
It might be worth trying an M12 thread extension as Nigel suggested, however with just 0.5mm gap you may find the recess within the extender is not deep enough, pushing the lens too far from the sensor. I'd still recommend buying one though to try, as it might save you a bunch of time working on the spacer.
I don't think an extension would work unless I trimmed some of the existing mount. I prefer not modifying the existing mount as it is the only one I have, and mounts with 19mm screw hole spacing are unavailable.
Making the spacer is not a problem. the only thing stopping me at this point is the lack of longer screws. I need the screws anyway to attach the mount+spacer to the circuit board. I think it will only take a few hours of filing to get the spacer shaped properly once I have the screws.
 
I think it will only take a few hours of filing to get the spacer shaped properly once I have the screws.
Make sure the inside is not reflective, because the light from the lens will hit it and bounce around making quite a mess of the image. There is a good reason the standard lens bits are matt black! The light from the lens doesn't form a neat rectangle that is sensor sized.

And if painting it, remember it needs to cope with 100 degrees C long term.

Also, don't get any metallic filing debris in the camera, always wash the spacer with detergent after every time you work on it.
 
I don't think an extension would work unless I trimmed some of the existing mount. I prefer not modifying the existing mount as it is the only one I have, and mounts with 19mm screw hole spacing are unavailable.
Making the spacer is not a problem. the only thing stopping me at this point is the lack of longer screws. I need the screws anyway to attach the mount+spacer to the circuit board. I think it will only take a few hours of filing to get the spacer shaped properly once I have the screws.

You could trim the extension tube instead of the existing mount. They are usually cheap enough that you can buy several in case you screw one up. I usually use a 1 inch bench mounted belt sander for projects like this. Takes a few seconds. Also, you can buy different depth extension tubes if you purchase from a lens specialist.
 
You could trim the extension tube instead of the existing mount. They are usually cheap enough that you can buy several in case you screw one up. I usually use a 1 inch bench mounted belt sander for projects like this. Takes a few seconds. Also, you can buy different depth extension tubes if you purchase from a lens specialist.
Trimming the extension tube would not help. The extension tube threads inside the existing mount tube, then expands out for the threaded portion of the extension. This expansion takes a non-zero length of tube. Since the new lens tends to focus around 0.5mm beyond the end of the original mount, this falls right in the middle of the area that the extension tube needs to transition from the part that goes into the existing tube and the extended part of the tube. The only way to use an extension tube is to move that transition away from where the lens needs to be, and the only way to do that would be to trim the original mount which I can't replace and don't wish to modify.
Screws are scheduled to arrive on Tuesday, I will be able to continue work on the spacer then.
 
Make sure the inside is not reflective, because the light from the lens will hit it and bounce around making quite a mess of the image. There is a good reason the standard lens bits are matt black! The light from the lens doesn't form a neat rectangle that is sensor sized.

And if painting it, remember it needs to cope with 100 degrees C long term.

Also, don't get any metallic filing debris in the camera, always wash the spacer with detergent after every time you work on it.
Any suggestions for paint? Try searching for flat black paint on Amazon, they show you ALL black paint. Amazon only knows how to search for keyword1 OR keword2 when I always want to search for keyword1 AND keyword2.
I may try asking at a hardware store. Needs to be black, needs to be flat, and needs to stick to aluminum.
 
Trimming the extension tube would not help. The extension tube threads inside the existing mount tube, then expands out for the threaded portion of the extension. This expansion takes a non-zero length of tube. Since the new lens tends to focus around 0.5mm beyond the end of the original mount, this falls right in the middle of the area that the extension tube needs to transition from the part that goes into the existing tube and the extended part of the tube. The only way to use an extension tube is to move that transition away from where the lens needs to be, and the only way to do that would be to trim the original mount which I can't replace and don't wish to modify.
Screws are scheduled to arrive on Tuesday, I will be able to continue work on the spacer then.

I don't know what it is you are trying to say here. It doesn't make sense. And what the hell is a "non-zero length of tube"? I get the impression you don't understand how these lens extensions function other than the fact that you've seen some photos of them. Have you actually tried it? Since you rejected the suggestion to purchase a lens extension, or modify one, apparently not, so you are merely theorizing from the sound of it.

A week ago, you didn't even know what an M12 lens was and now you're explaining to us what will or won't work for properly mounting one and getting it to focus properly? As someone who has been modifying dash and action cams with alternative lenses for almost ten years I'd need to see a more plausible explanation and / or demonstration for your theory of why a lens extension won't work. Indeed, it's not exactly clear what the issue is with the exisitng lens holder. Are you saying that the threaded lens tube is too short or too long when you say that "the new lens tends to focus around 0.5mm beyond the end of the original mount"?

In any event, the real problem here is that you didn't buy an appropriate lens for your project in the first place. If you had, you wouldn't be having to go to all this trouble attempting to get it to work.

To make matters worse, the vendor you purchased from is not a lens specialist, but instead sells general random merchandise and parts and they just happen to have a selection of M12 lenses in stock. The result is they don't provide any of the necessary specifications for a knowledgeable buyer to make an informed decision. They even describe the lens as "wide angle", "panoramic" and "macro", none of which are correct. (It is in fact a fairly significant telephoto but they don't mention that at all). They also describe the lens as designed for a 1/3" sensor format while also describing it as 1/2.5" format. (which it is). So, aside from the lens not having a suitable BFL for your camera's module the lens is designed for a sensor with a diagonal measurement of 7.19 mm. The sensor in your camera has a diagonal measurement of 6.46 mm so the result here is that the already high magnification telephoto lens you purchased will behave like an even longer focal length telephoto lens which in my opinion is overkill and an impractical EFL for what you're trying to accomplish with this dash cam mod.

I would suggest returning the lens if possible and perhaps purchasing the 8mm lens they also sell. It will provide a more suitable AOV, be less prone to vibrations in your images and you might even get lucky and receive a lens with a viable BFL. You might also ask the vendor before purchasing and see if they can provide the information you need about what sort of lens holder your new lens requires.

I would also suggest installing an IR-cut filter on your lens, whichever one you use. If you do you will need a UV cement pen to properly and safely mount it on your lens.

Typically a good vendor specializing in lenses will provide all the relevant specifications for the lens you are purchasing so you know what you are buying.
specs_8mm.jpg
 
Last edited:
Any suggestions for paint? Try searching for flat black paint on Amazon, they show you ALL black paint. Amazon only knows how to search for keyword1 OR keword2 when I always want to search for keyword1 AND keyword2.
I may try asking at a hardware store. Needs to be black, needs to be flat, and needs to stick to aluminum.

You could use THIS STUFF! :)
 
I don't know what it is you are trying to say here. It doesn't make sense. And what the hell is a "non-zero length of tube"? I get the impression you don't understand how these lens extensions function other than the fact that you've seen some photos of them. Have you actually tried it? Since you rejected the suggestion to purchase a lens extension, or modify one, apparently not, so you are merely theorizing from the sound of it.
Since you can't follow simple text descriptions of the problem, I drew you a picture. This is a sketch of the cross section of the mount+extendertube+lens in case you don't find that obvious. The relative dimensions of the lens mount and lens are accurate as well as the approximate position the lens needs to be to be in focus. The dimensions of the extender tube are an educated guess, knowing how it must work.
Screenshot from 2022-09-10 23-42-29.png
The lens will bottom out in the extender tube before it will be focused. No trimming of the extender tube will fix this problem, only trimming the original mount will allow the lens to focus when using an extender tube, which I do not wish to do.

At $12 per lens, I can afford to buy quite a few different lens focal lengths to try.

If after testing this setup, I decide I need a IR cut lens, I will buy one with an IR cut filter. This stuff is cheap, I don't have any need to get it right on my first attempt.

I decided to match your insulting tone with this reply. I really could do with out your attitude. If you don't like what I am doing, no one is forcing you to read this thread.

If you can't drop your condescending tone, please don't here post again.
 
Any suggestions for paint? Try searching for flat black paint on Amazon,
You could try searching for blackboard paint, or stove paint, both of which tend to be very matt black, and the stove paint heat proof. Doesn't solve your Amazon two word issue, but you could try ebay!

I think the standard stuff is anodized rather than painted, but I don't expect a home anodization kit would achieve good results for matt black, it would probably produce faded shiny black. You don't want it shiny.

An alternative would be to line the inside with something like matt black felt tape, but what you stick it on with needs to be heat proof and not stop the lens holder sitting perfectly flat on the PCB.
 
Since you can't follow simple text descriptions of the problem, I drew you a picture. This is a sketch of the cross section of the mount+extendertube+lens in case you don't find that obvious. The relative dimensions of the lens mount and lens are accurate as well as the approximate position the lens needs to be to be in focus. The dimensions of the extender tube are an educated guess, knowing how it must work.

I find your feeble attempt at insulting me to be pretty laughable as I found your self-described "simple text descriptions of the problem" to be inarticulate and unintelligible.

However, I do find your little graphic useful as it confirms that you still don't understand how these lenses function but at least you do seem to be answering my simple question from above where I asked "Are you saying that the threaded lens tube is too short or too long when you say that "the new lens tends to focus around 0.5mm beyond the end of the original mount"? It would have been so easy to simply answer that question rather engaging in gratuitous insults or wasting so much time creating a more or less worthless graphic.

And did you actually purchase a lens extension and measure it or are you "imagining" how things work once again? As I tried to explain above, the problem is the lens you purchased, not the original lens holder or the extender.


Even though you came into this a week ago not even knowing what class of lenses are used in dash cams you have rejected or ignored every piece of advice everyone has attempted to provide to you. Instead, you put your frail ego on display complaining you are being condescended to when in fact it's been an attempt to help steer you towards a successful outcome.

In all of the interesting lens modification threads I've been involved with over the years here on DCT it is common for members new to the world of DIY dash cam lens mods to ask questions and solicit advice before proceeding. Soon, other members always jump in with helpful answers, tips, resource and materials suggestions, along with a helpful dose of encouragement.

Not you! You've made it clear that you have no interest in learning the concepts or terminology involved that would help you make an informed choice of lens for your project or even listening to anything anyone has to say.


For example, you have no interest in trying suggested methods for focusing a new lens on a camera of this type from others who have had a lot of experience. You immediately just dismiss it out of hand even though the suggested methodology is quick and simple to try. And it works if performed as suggested!

And, you've shown zero interest in matching a lens purchase to the sensor in your camera or learning how to choose a lens that will focus properly.

You have no interest in learning about how optical functions work in lenses. So when you posted your completely misinformed notion that, "focal length is about 10mm longer than the original lens, so it will stick out by about 10 mm", and then when it was explained and demonstrated to you that this is not how focal length works, you ignored this information and skipped right along to your next uniformed remarks.

Nowhere is this sort of thing more on display than your most recent stated plan:


At $12 per lens, I can afford to buy quite a few different lens focal lengths to try.

Good lord! The idea that you plan to keep purchasing lenses in the vague "hope" that you might eventually find one works in your camera rather than simply learning how to purchase an appropriate lens in the first place is just harebrained! You could end up buying quite a few random lenses and still find none of them work for you. That's simply more of the crap shoot approach that led you to buy an inappropriate lens in the first place. And you've shown no interest in finding a knowledgeable lens vendor who will stand behind the products they sell, instead buying questionable mystery spec lenses on Amazon. :rolleyes:

So, I bid you adieu at this juncture and wish you the best of luck in what I believe at this point is an ill-fated and potentially expensive venture.
 
Screws have arrived. I have finished shaping the spacer. I have verified that I can get the lens to focus with this setup.
I have also verified that the really short reverse camera cable I got from the third party vendor linked above works just fine.
Image is a bit pink due to the lack of an IR filter, but that is fine for reading license plates.
I still need to paint the spacer black, and do a final job of focusing before re-assembling the camera and mounting it in my car.DSC07703.JPG
 
Image is a bit pink due to the lack of an IR filter, but that is fine for reading license plates.
Your car windows may have decent IR cut filters built in, in which case best to focus it inside the car with the windows closed. The lens probably won't focus properly in unfiltered daylight.

Looking neat, definitely wants some black on the inside
 
Back
Top