MaxIcon 0 Posted February 9, 2014 This question comes up now and again, so I thought I'd post this write-up. I recently pulled down my last VGA cam (which was the first IP cam I bought) and replaced it with my Dahua HFW2100N, a small 1.3MP bullet. Most of my cams are 2 and 3MP these days, so this was a good use for 1.3MP, since it's a tight shot in a controlled area. Once I got it up, I realized the original 3.6mm lens was too wide angle for this location, and it needed to be zoomed in a bit more. The Dahua's not the friendliest cam for changing lenses on, like many compact bullets, so here's the rundown on how I did it. I started by trying to find a decent lens. I have a set of DealExtreme lenses, but their quality control isn't the greatest (one lens in the set rattles, others have focus problems), so I decided to give m12lenses.com a try. Their prices are a good bit higher than DX, and hopefully that means the quality is higher. At m12lenses.com, going to their Mega Pixel Board Lens section starts you off with a mix of 1/2" and 1/3" sensor lenses, so the first thing to do is select the 1/3" sensor page. They list 2 6.0mm lenses; one is F1.4 and one is F1.8. The F1.4, which gives better low light performance, was out of stock, but the lighting's good in my location, so I went with the F1.8: http://www.m12lenses.com/ProductDetails.asp?ProductCode=PT-0618MP I ordered a 16mm lens for future license plate testing to help split the shipping cost, and the total cost was $36 shipped for 2 lenses. It only took a few days for them to get here. Here are the before and after shots, reduced by 50%. The new lens gives a good view of the door and porch, with lots of details on faces, and not as many wasted pixels as the old lens. Before - Dahua 3.6mm OEM lens After - M12Lenses 6.0mm lens The 2100 needs to be disassembled to change the lens, as there's no removable front lens cover like on larger cameras (or on the newer 4300S). Start by removing 3 2mm screws from the back of the camera. This allows the hood to slide forward, exposing the circuit boards. Here's what the cam looks like; the 3 screws are in the half that the mount is attached to. There's a black rubber gasket between the two halves that provides the weather seal, and you want to be careful with this, as it's not easy to get a replacement if it gets damaged. I'd like to see the manufacturers use standard o-rings for this kind of thing, but the trend is away from that these days. Here's the camera split in 2 halves. You can see the rubber gasket on the left hand side, which also has the sensor board, and the screws that hold the board in place. The sensor/lens board is mounted to the front half, and 3 tiny phillips head screws need to be removed to remove the sensor board so you can get to the lens. Once the sensor board is out, it's attached to the IR board in the front half and the control board in the back half, which makes it hard to handle. Since it needs to be powered up while disassembled to focus the lens, I disconnected the IR board and set the front body half aside to make it easier to handle without damaging anything or shorting the case against one of the boards. The 2100 works fine without the IR board connected, and some people disconnect it as the only way to disable the IR LEDs. Here's the sensor board removed from the front half, with the IR board connector still attached. The 2100 has a lens locking ring, which is an improvement over cams with setscrews for locking the lens, but is still a pain. M12 lenses usually don't fit very tightly into the threads on the sensor assembly, and the amount of lens wiggle is enough to mess up the focus, so you have to focus, then tighten the ring and hope it doesn't shift the focus, which it often does. To remove the lens, loosen the locking ring and unscrew the lens. Sometimes the locking ring is just finger tight, and other times it takes careful use of a pair of pliers to loosen up. Here's the sensor/lens assembly, with the knurled locking ring right below the lens label. To make focusing easier and more repeatable, I removed the locking ring and put a wrap of teflon tape (plumber's tape) on the threads of the new lens. This holds the lens firmly in place, allows for small adjustments with a minimum of force, and keeps the lens from shifting after the camera's together. With the new lens turned in a few turns, the camera needs to be powered up to adjust the focus. You want to focus at about the same distance as what you want to watch, which is about 10' in my case. If you're watching views further than that, you can focus pretty much anywhere that's not too close - 10' should be good out to infinity. I use a Siemens star for focusing, and it usually takes going back and forth a few times to get it dialed in. The lag times on IP cams can make this a bit frustrating, so a bit of patience is handy. Here's where you're most likely to run into trouble. M12 lens standards are loose, and it's common for a lens to run into the IR filter assembly before it's focused, which makes it useless. There's no easy way to know for sure without trying. Fortunately, this lens fit with no problem, though one other lens I tried while it was apart hit the IR filter. Here's a shot of my focus setup, taken as I was measuring the field of view for the new lens. Once focus is as good as you can get, you're ready to re-assemble the camera. The main things to watch for: - Remove power first! It's too easy to slip and fry something. - Be careful of the rubber gasket if this will be used outdoors. Once it's back together, fire it up again, make sure it's good, and mount it up! I'll run the numbers on the before and after field of views later, and update the post with them. Share this post Link to post Share on other sites
MaxIcon 0 Posted February 10, 2014 Here are the FOV calculations for the Dahua 2100 with various lenses. I used the techniques described here: http://www.cam-it.org/index.php?topic=5424.0 I tried a few different lenses I had around for comparison, including a Deal Extreme 3.6mm, an M12Lenses 6.0mm, and an M12Lenses 16mm. The Dahua 2100 has same horizontal resolution in 1.3MP and 720p, so the HFOV will always be the same. Not all cams do this. I round the FOV off to the nearest degree, since these measurements aren't super precise, except on the 16mm lens, where the angles are a good bit smaller. Also, this shows that the D1 image is scaled, and isn't a pixel-by-pixel reduction. If it weren't scaled, the D1 VFOV would be half of the 1.3MP VFOV, or 26 degrees. They scale the image using almost the full sensor, giving a wider FOV at D1. Again, some cams do this, some don't. Dahua 2100 Resolutions: 1.3MP = 1280 x 960 720P = 1280 x 720 D1 = 704 x 480 Dahua HFW2100N Resolution, horizontal FOV, vertical FOV OEM 3.6mm lens - Dahua's original lens 1.3MP, 70 degrees, 52 degrees 720P, 70 degrees, 39 degrees D1, 58 degrees, 39 degrees DX 3.6mm lens, from this set (more on that later): http://dx.com/p/2-8mm-16mm-fixed-iris-lens-set-for-webcams-and-security-cctv-cameras-6-lens-pack-15774#.UvgOOGJLXTo 1.3MP, 78 degrees, 57 degrees 720P, 78 degrees, 42 degrees D1, 63 degrees, 42 degrees M12Lenses 6.0mm lens http://www.m12lenses.com/ProductDetails.asp?ProductCode=PT-0618MP 1.3MP, 47 degrees, 34 degrees 720P, 47 degrees, 26 degrees D1, 38 degrees, 26 degrees M12Lenses 16.0mm lens http://www.m12lenses.com/ProductDetails.asp?ProductCode=PT-1618MP 1.3MP, 15.8 degrees, 12.4 degrees 720P, 15.9 degrees, 9.4 degrees D1, 13.2 degrees, 9.4 degrees This shows a good example of the differences in M12 lenses with the same specs. The Dahua and DX lenses are both 3.6mm, but there's a 10% difference in FOV between them. The DX lens is also much lower quality, which is not unexpected, given the low price. Share this post Link to post Share on other sites
MaxIcon 0 Posted February 10, 2014 Here's a comparison between the Dahua OEM 3.6mm lens and the Deal Extreme 3.6mm lens, which only cost a few dollars. Folks who deal with optics know that good optics cost money, and cheap optics are rarely high quality. You really can't expect a high performance lens for a few dollars, and this is especially apparent at the edges of the lens, where quality drops even on expensive lenses. Here are the views used to calculate the 1.3MP HFOV above, showing the difference between the Dahua lens and the DX lens. The full view has been reduced by half, while the snips from the edges are full resolution. Even taking into account the wider FOV for the DX lens, the DX quality is not good. The shots of the ruler show this clearly, as you compare the legibility of the numbers and where the lines on the ruler blur out. Dahua OEM 3.6mm lens: DX 3.6mm lens: One end of the ruler for the Dahua lens: Same view for the DX lens: Share this post Link to post Share on other sites