Successful change of 1/3" Dahua lens from 2.8mm to 25mm

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
So, like a lot of people who buy kits, I was initially concerned with seeing my entire property and surrounding area rather than focusing on the important areas. Having found this forum, I was quickly concerned that I had badly spent my money on cameras that weren't going to be able to help me recognize nor identify suspicious persons. DORI, as it turned out, is VERY important!

I purchased a Dahua NVR and 10 identical 4MP cameras, model IPC-HFW2431S-S-S2. This is a lower-end Dahua POE camera. 1/3" sensor and all the cameras came with 2.8mm lenses. Quickly, I realized that I was going to need to make some changes.


There's a couple threads on here about changing lenses with some success and some frustration:



Looks easy enough, right? Well, it turns out it's not that hard but is a bit involved and requires a steady hand. I took a camera apart that I hadn't mounted yet and the patient survived the surgery. I disassembled the camera, separated the lens board from the main assembly, removed the lens (removing the glue holding the lens is the most difficult), screwed the lens back on and reassembled the camera. A dry run and the only damage was to the connector for the IR LED which wasn't going to be used in the desired location anyways.

So, I ordered some M12 lenses off of Amazon. A 25mm lens and two 8mm lenses. I decided to do the 25mm first as it would be the most difficult, being a few MM physically longer than the factory 2.8mm lens. If there was going to be an issue, it would be the new lens being longer; and a bit of a problem it was, however not insurmountable.

I won't go into all the details about how to disassemble the camera but it was easy enough. Different models will have different methods so I won't waste our time, particularly since this is a lower-end unit.

The main assembly removed. There are three connectors (including the ribbon cable) between the board mounted deeper inside the body and this assembly. Disconnecting the connectors gives a bit more room to work but I only disconnected the ribbon cable this time. Visible is the package to absorb any moisture that may get inside the unit.

IMG20221221125405.jpg

This is the new, 25mm lens. It's a few mm longer in physical length than the 2.8mm lens that it replaced. I don't have an exact measurement but I'd saw about 4mm longer.

The lens is spec'ed for 25mm 1/3" (same size as the sensor in the camera) 5MP (so not to lose any visual clarity on the 4MP lens). Retails for about $15 USD on Amazon.

IMG20221221125658.jpg

After removing the old lens by unscrewing it, I screwed the new one back in. Same standard M12 thread but it was hard to turn. Ended up using a pair of needle-nose plyers to get a better grip. Even with a soft cloth, I still did a bit of damage to the outside of the lens. But this is purely cosmetic.

A pain to focus trying to hold the camera together with it plugged in. I suspect I'll have to refocus it once it's mounted which will be an even bigger challenge.

As predicted, the new lens being longer proved a bit problematic. There's a visible gap between the two pieces of the main assembly where the screws are. This didn't exist with the original lens. Fortunately, the screws were long enough to catch the thread and I was able to give them a couple turns to bring the two pieces together.

But the question was: will I be able to seat the main assembly properly again when I put the camera back together?

IMG20221221132807.jpg

As I suspected, the main assembly wasn't fitting properly into the body once I got was ready to close up the camera. After some poking and prodding, I found that bundle of wires from the larger connector was causing the issue. Once I was able to move them to the side as I seated the assembly, it all came together again.

IMG20221221133413.jpg

The main assembly seated fully in the body and I was able to put in the torx screws which old it in place. Once that's done, it was a simple snapping on of the cover. And here it is back together and ready for a final test.

IMG20221221134033.jpg

In the pictures, the damaged wires for the IR LED harness was visbile. This happened the first time I disassembled the camera but, again, this camera, now having a focal length of 25mm, won't have the IR on. If anything, I'll have to add an IR illuminator should it be necessary. The camera will be mounted approximately 30m from the area that I want to monitor. It's not absolutely critical but since I have the camera just sitting around, it won't hurt to mount it.

So, the slightly out of focus before picture:

cap_NVR_ch15_main_20221221124716_20221221124718_00:00:01_01.jpg

And the slightly out of focus after picture:

cap_NVR_ch15_main_20221221134528_20221221134542_00:00:12_01.jpg

Looking at the after picture again, I'm sure I'll have to dial in the focus once the camera is mounted in it's desire position. Not looking forward to that even though I'll have the luxury of being on a flat roof. But I think it will be worth it.

So, to summarize, a bit of a job but I know now that the other two cameras I will be switching from 2.8mm to 8mm will be a bit easier since the 8mm lens actually appears to be shorter than the original 2.8mm lens. The real pain is getting the glue off that holds the lens in place. Takes a sharp blade (in one of the other threads, someone is used a dental pick) and a bit of patience.

The result is worth it. Even though this is a lower-end camera (having a 1/3" lens), a $15 investment saved me from buying another camera. I'll post again with the results of the cameras being switched from 2.8mm to 8mm. That project I'm looking forward to as it's not just the lenses, but changing the coverage of a sidewalk in front of my property. It will allow me better face coverage as the cameras will be mounted in a "cross-fire" position.

Just throwing out a big thank you to all the members who contribute. There's some great minds on here and I've learned a LOT in the past couple months. I wish I'd found this forum before buying my system but with a few tricks, like swapping lenses, I'm able to make the best of what I bought.
 

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
That is awesome. Thanks for sharing! Someone needs to try this on the 4K-T camera LOL.
Thank you! Coming from someone who is a "go-to" source on this board, I'll take that as the highest compliment!

To change the lens on the 4K-T camera requires two things:

1) A properly lens (looks like a board-in lens which would be tricky to find), and
2) A big set of cojones!

But, seriously, what focal length are you looking for? Maybe Andy can help you find the proper lens!
 

tigerwillow1

Known around here
Joined
Jul 18, 2016
Messages
3,849
Reaction score
8,519
Location
USA, Oregon
M12 lenses are cheap and easy to find. The 1/1.8 sensor cameras need a M16 lens which I found impossible to find in a focal length longer that what you can buy the cameras with. I'd expect the situation to be even tough with a 1/1.2 sensor.
 

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
M12 lenses are cheap and easy to find. The 1/1.8 sensor cameras need a M16 lens which I found impossible to find in a focal length longer that what you can buy the cameras with. I'd expect the situation to be even tough with a 1/1.2 sensor.
Yeah, I was surprised how easy it was to find M12 lenses of various qualities and focal lengths. Amazon has some manual M12 varifocal lenses like this these:



I'm almost sure that these wouldn't fit but they'd be a good substitute for a temporary rig cam if one doesn't want to invest in a varifocal camera.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,028
Reaction score
48,788
Location
USA
Thank you! Coming from someone who is a "go-to" source on this board, I'll take that as the highest compliment!

To change the lens on the 4K-T camera requires two things:

1) A properly lens (looks like a board-in lens which would be tricky to find), and
2) A big set of cojones!

But, seriously, what focal length are you looking for? Maybe Andy can help you find the proper lens!
LOL - yeah I have replaced on cheaper and older cams, but a new one, I will let someone see if they can find a lens for it lol.
 

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
15,634
Reaction score
22,891
Location
Evansville, In. USA
I think once you adjust the settings in the camera, you may find that it's not that far out of focus as it now appears. You've currently got a lot of the picture blown out.
Thanks for the tutorial.
 

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
I think once you adjust the settings in the camera, you may find that it's not that far out of focus as it now appears. You've currently got a lot of the picture blown out.
Thanks for the tutorial.
Another wise man! Thank you!

Yeah, looking at the pics again, I think dialing some stuff down will really help. Just left everything on auto as this camera has never been mounted permanently.

Really happy with how this went. In January I'll be changing two cameras to 8mm, as I mentioned in the post. Thanks to guys like you and @wittaj, I've learned a LOT. I mean tonnes. My cameras would probably still all be on auto settings with WDR @ 50 if I hadn't found this forum.

* EDITED *

There's tonnes of other knowledgeable, helpful folks on this board. Thanks to all of you!
 
Last edited:

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
I did lens swap on another camera. 2.8mm to 8mm. Image looks so much better. May be a higher quality lens despite costing me less than $10 USD for two lenses!

Although, after I finished, I noticed that the new lens is for a 1/2.5" sensor and the camera has a smaller 1/3" sensor. So I'm losing a bit of the image but worth the effort.

Just under 20 minutes start to finish. That included scraping off the glue holding the original lens in position. What slows me down is trying to get the ribbon cable into the connector and closing the connector. Need another hand.

20221222_141446.png
20221222_141525.png
 
Last edited:

Phil.g00

Pulling my weight
Joined
Apr 4, 2023
Messages
134
Reaction score
105
Location
Ireland
@CanCuba, I read this thread with interest.
I may be able to get multiples of new old-stock of this camera in 3.6mm. (below) A focal length that doesn't interest me.
A bit of time on the web, and I see (5MP) M12 lenses 16mm, 25mm, 35mm & 50mm. ( sometimes for a slightly larger sensor).
I am thinking of buying one camera as a test subject, I just would like your opinion on whether a 25mm+ lens is even worth trying to fit.
Or is there a camera model that is known to have lots of room for a longer focal length?
1683554446757.png
 

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
@CanCuba, I read this thread with interest.
I may be able to get multiples of new old-stock of this camera in 3.6mm. (below) A focal length that doesn't interest me.
A bit of time on the web, and I see (5MP) M12 lenses 16mm, 25mm, 35mm & 50mm. ( sometimes for a slightly larger sensor).
I am thinking of buying one camera as a test subject, I just would like your opinion on whether a 25mm+ lens is even worth trying to fit.
Or is there a camera model that is known to have lots of room for a longer focal length?
View attachment 162263
The 25mm barely fit. If you look at the circle in this picture, you can see the gap between the two sections. It didn't exist with the 2.8mm lens.

Screenshot from 2023-05-08 11-29-02.jpg

I was lucky I managed to get the camera back together again! lol I put a little silicone sealant outside the body where the camera comes apart as there seemed to be a bit of a gap.

You'd have to ask @EMPIRETECANDY about a camera that would be able to fit a longer lens. I'm a hobbyist and far from being a pro.

The camera with the 25mm lens does work but this lens was really pushing it. The 25mm lens was maybe 3mm longer than the 2.8mm lens. The main issue is that it focuses differently and so it didn't thread in as far as the 2.8mm lens did.
 

Phil.g00

Pulling my weight
Joined
Apr 4, 2023
Messages
134
Reaction score
105
Location
Ireland
Thanks for the reply.
It would seem you might gain another mm or 2 with longer screws.
I am guessing about M3 x 15mm should do it.
 

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
Thanks for the reply.
It would seem you might gain another mm or 2 with longer screws.
I am guessing about M3 x 15mm should do it.
Longer screws would work but I doubt the camera would go back together afterwards. Didn't get a good pic but the way the camera comes apart longer screws would create an issue when putting the lens and lens board assembly back into the body. There would be a gap where anything could get in.

A potential solution would be to 3D print something to fill the gap. I've never designed or printed anything in 3D but I'd imagine that it would be possible. But you'd have to use a material that could withstand the elements. I'd imagine direct sun would warp the more common 3D printing materials.

But something to consider.
 

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
I prefer to keep things simple. So I'll try the 16mm and the 25mm when I get around to playing with this.
Once you have it open, you'll see what else you can manage. The 2431s that I modified are a smaller bullet cam. Is the camera you're planning on using a turret? That may raise some issues of its own as not all turret versions can offer the same factory lens configurations as the corresponding bullet cams due to size and shape of the turret.
 

CanCuba

Known around here
Joined
Dec 9, 2020
Messages
1,128
Reaction score
3,393
Location
Havana, Cuba
I finally got this thing mounted. The pics on my phone will be uploaded later. The camera that was used to monitor this section of the street was mounted less than perfectly but I could make out traffic and people walking. I just need the section of street that is in the middle at the bottom of the frame.

Here's a pic from a few days ago of a storm rolling in:

20230726_102416.png

And this is the view with the 25mm lens installed. Same model camera (2431 bullet variant).

20230728_184818.png

So the 25mm lens was a bit of an overshoot but I can make it work. Need to get the wife to help me align it and touch up the focus a bit.

But this experiment with an $80 cam with a $5 aftermarket lens gave me what I wanted and a bit more.

And I left the cam up that was mounted there and turned it bit to get a bit of an ocean view. Will be nice to see what the weather is like from bed without opening the curtains in the morning. Yes, there's a small slice of ocean there. lol

20230728_190337.png
 

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,675
Reaction score
3,505
That is awesome. Thanks for sharing! Someone needs to try this on the 4K-T camera LOL.
I must admit I'd rather see a 5442 style zoom lens fitted - the 2.8-12mm should suit most people's needs. Probably would need to be a different lens because of sensor size. I'd also like so see a slightly smaller aperture to increase dof, say f1.6.

It would affect light gathering but I'm sure software could counter this given the software improvements to the 5442's, the latest models of which boast almost the same low light ability as the 4kt's on a 1/1.8".

The 4kt's are still a bit beta as well and n my opinion need a stronger processor and maybe more memory amongst other fixes to bring them up to the 5442's in reliability..
 

silencery

Pulling my weight
Joined
Oct 6, 2015
Messages
223
Reaction score
153
Just a quick note to add about removing the original lens and Dahua cams.

I've had very good success removing the glue simply by blasting it for 30 seconds with a heat gun.
If you don't have a heat gun, a hairdryer will work. It will just take a few minutes instead. Once the glue is warmed, the lens unscrews right off.

Try to focus the heat on the glue itself to avoid heating the rest of the components.
 
Top