Archive for June 21, 2011

Wide Angle / Fisheye Lenses

I wanted to expand the field of view of my D-Link DCS-930L cameras, which have a horizontal field of view of 45.3°.  I scoured forums for decent wide angle / fisheye lenses that aren’t too bulky or expensive.  Two top contenders are both available from DealExtreme.

First up, the Jelly Lens Wide Angle/Fish Eye Filter.  This is just a low-quality plastic lens, but as Dan says, never mind the quality, feel the price!  At just $2.63 each, I had to try one out for myself.

I quickly realized that the jelly material was not strong enough to hold the lens for long.  I wanted a more permanent adhesive, but didn’t want to risk damaging the surface of my cameras.  So, I punched a hole in the middle of a piece of 1.88 inch wide clear tape cut to 1.25 inches long, and positioned it over the lens area of a DCS-930L in landscape orientation so it didn’t block the microphone hole.  I then removed the lanyard and jelly from the lens, thoroughly cleaned it, positioned it over the camera’s lens area, and used hot glue to secure it to the tape.  It held firmly, but it can still be removed quickly and cleanly.

Even though the DCS-930L is only 640×480 resolution, there is a noticeable degradation in image quality with the lens in place, especially in the corners.  Still, for surveillance areas such as the dog house, I think it’s worth it to get the wider field of view (approximately 60° horizontal).  For more important areas, a better lens is in order.

Enter the 15mm Detachable 180-Degree Wide Angle Fish Eye Lens, also marked as an “FE-12.”  This is a surprisingly high quality glass lens for $16.75.  The metal casing has a built-in magnet at the base, and two metal rings with adhesive on one side are included with each lens.  The idea is that you stick a ring to a camera permanently, but only stick the lens to the ring when it’s needed.

Like the jelly on the jelly lens, the adhesive on the rings proved too weak to hold the heavy lens long-term.  A ring and lens stuck to the front of a DCS-930L slowly slid downwards over the course of a few days.  I once again made a rectangle out of tape and punched a hole in the middle, but this time I just stuck it over the ring to give it more support.  Even though this created a gap between the magnet and the ring, it did not seriously affect the holding strength.

A DCS-930L’s horizontal field of view increased to an impressive 90° with the FE-12 lens (no, not the claimed 180°).  This is the perfect angle for a corner-mounted camera, since minimal resolution is wasted on the walls.  Compared to the jelly lens, only a very slight decrease in image quality was apparent in the middle.  However, the corners were a bit worse, probably due to the more aggressive curvature of the lens.

The FE-12 lenses are conveniently skinny enough at the base to fit through the center of an Infrared 35-LED Illuminator Board Plate for 6mm Lens CCTV Security Camera mentioned here, allowing for a compact lens-board-camera sandwich.

Update (11/26/2011): DealExtreme now carries a Detachable 185-Degree Wide Angle Fish Eye Lens for Cell Phones and Digital Cameras, also marked as an “FE-18.”  The price is a fair bit steeper than the FE-12 lens at $24.30, but it brings the DCS-930L’s horizontal field of view to 117°.

I now have 3 jelly lenses, 6 FE-12 lenses, and 1 FE-18 lens.

D-Link DCS-930L Infrared Capabilities

The DCS-930L is not designed for low-light usage.  D-Link offers the DCS-932L Wireless N Day/Night Home Network Camera for that application.  Unfortunately, it’s about $50 more than the DCS-930L from Newegg.  Since I already had some IR LED assemblies, I wanted to see if I could make a DCS-930L infrared capable.

A quick test with a bright IR source proved that barely any IR was reaching the sensor, indicating a filter was in place.  I pried the camera’s case apart by sliding a guitar pick between the front and back halves and began hunting for the filter.  I was hoping it was attached to the front of the case and could be easily removed, but the case just has an open hole in front of the lens.

The lens was threaded onto the sensor assembly and secured with threadlocker.  I unscrewed it with it pointed towards the ground to prevent loosened threadlocker from falling onto the sensor.  The lens thread seems to be M5.5×0.35, and the threaded section is about 3 mm long.

Fortunately, the IR filter was immediately visible as the last (innermost) lens element.  Using a hobby knife, I pried at the edges of the filter.  It was glued all around its circumference.  It eventually chipped and cracked, but this actually made it easier to pry out.  I blew all the little glass shards out of the lens barrel, removed as much threadlocker from the threads as I could, and screwed the lens back into the sensor assembly.

When I powered the camera back up, it was clear that the filter removal was a success.  The sensor is now very responsive to infrared light, which appears blue with a lot of ambient visible light, or white without (probably due to automatic white balance and color correction).  As expected, some colors look unusual, such as green grass appearing light purple, or dark fabric appearing nearly white.  The sensor is so sensitive to the IR range of the spectrum that some colors in the visible range are overpowered, and some materials are IR transparent.  You’ll occasionally see reviewers complaining about infrared-capable cameras having washed-out colors for this reason.

An added bonus of breaking the lens threadlocker free is that the focus can be adjusted to suit the camera location.  I just powered up the camera with the front of the case still removed and rotated the lens until I was satisfied.

I’ve removed the IR filters from most of my cameras.  Coupled with IR LED assemblies, they are now working quite well in both day and night.

Update (11/26/2011): The last two DCS-930L cameras I ordered came with different lens/sensor assemblies.  Rather than being threaded, the lenses are an integral part of the sensor assembly.  Therefore, the simple IR modification above is not possible, and the focus cannot be changed.  Intrepid folks might be able to dislodge the entire assembly from the PCB and perform a similar modification, but I am not going to try it.

Update (12/04/2013): Lars Englund was up to the challenge. Check out his blog post. User eljonco provides an alternative solution in his comment below.

Update (01/03/2017): I finally decided to try Lars Englund’s method for removing the lenses from the newer DCS-930L cameras I had ordered. When I opened one camera, the round front part of the lens assembly reminded me enough of the older threaded ones that I decided to try unscrewing it again. It worked. Apparently the threadlocker was just much stronger on the newer cameras than the older ones, once upon a time. Age and/or heat loosened it up enough that I was able to easily remove both cameras’ lenses. For a brand new DCS-930L, I wonder if applying gentle heat would be helpful, or if it would be sufficient to use two pairs of pliers, one to secure the square base, and one to twist the lens.

Infrared LED Assemblies

My old composite video surveillance cameras have 6 IR LEDs built in.  The LEDs are small, and are only useful up to a few feet away from the cameras.  One particularly shoddy camera would overheat and shut down after being plugged in for a few minutes, so I had to disable its LEDs altogether.  Eventually, I decided to explore stand-alone IR LED assemblies.

My first purchase was a weatherproof, pod-shaped InfraRed Illumination Light for Night Vision (DC 12V 500mA)pod with 48 LEDs from DealExtreme.  All the LEDs are mounted directly perpendicular to the PCB, and right up against it, so the pod acts like a spotlight.  That’s not very useful for illuminating a large area.  Repositioning the LEDs isn’t a great option because of how recessed they are within the pod.  So, I unscrewed the front of the pod and secured a piece of wax paper to the inside of the glass cover to act as a diffuser.  This works fairly well, but is still not ideal.  The pod gets quite warm to the touch, so warm that the wax paper has melted onto the glass.  I keep an old computer fan pointed at the pod in an attempt to extend its lifespan a bit.

For more freedom to reposition the LEDs, I decided to try a bare IR LED assembly next.  I chose an Infrared 35-LED Illuminator Board Plate for 6mm Lens CCTV Security Camera from DealExtreme for a mere $3.84.  It is sold as a replacement for inside a security camera housing, but I intended to just stick it to the front of one of my cameras with foam tape.  Thus, I only had to worry about the size of the inner circular cutout, which is listed as 18 mm.  A word of warning: it’s actually 16.3 mm, so it does not fit my two oldest cameras.

To power the board, I got an AC to DC 12V 1A Power Adaptor with 5.4mm DC Plug – US Type (110~240V) from DealExtreme for $4.31.  It came with a barrel connector, but the LED assembly had a small header.  So, I cut off the barrel connector, unsoldered the header, and soldered the wires directly to the pads on the LED assembly.

Stock, the IR LED assembly had a beam much like the weatherproof pod.  However, I was able to wet the solder on the LEDs’ legs, raise them off the PCB a bit, and bend them outward.  I bent the 21 LEDs in the outer ring to approximately 20°, and 7 of the 14 LEDs in the inner ring to approximately 10° (I kept 7 in their original places to maintain good coverage directly to the front).  Now the beam is a little over 45° wide, which works well for my old composite video cameras, and my new D-Link DCS-930L cameras after a modification.

D-Link DCS-930L Preliminary Review

I’ve been gradually building a collection of DCS-930L Wireless N Network CamerasNewegg has had them on sale regularly for $59.99 to $76.12.

The camera sports a typical noisy 640×480 CMOS sensor, but includes some nice features such as streaming audio, motion detection, dynamic DNS support, FTP and SMTP image uploads, and free streaming access through the mydlink service.

I like the camera enough to keep buying more, but there are some drawbacks.

  • The power cord is only about 4 feet long, so I’m generally stuck with wall warts dangling halfway down my walls.
  • The audio feed pops loudly if there’s not enough bandwidth to keep it streaming continuously, and there’s a bit of high-pitched noise.
  • Even at very high sensitivity, the motion detection takes about 1 second to kick in, so fast action is sometimes missed entirely.  High sensitivity increases the likelihood of false positives due to the sensor’s noise.
  • I had to get 1 of my 8 cameras replaced because the wireless reception was awful.  It indicated 50% to 70% lower signal strength than other cameras for a given location.

I tried out the mydlink service, but ended up just connecting to my cameras directly through my router.  A word of caution: if you register a camera with mydlink, and then unregister it, the camera becomes unreachable, even locally, until it is reset to the factory defaults.

For mobile access from an Android phone, I use tinyCam Monitor.  There are free and paid versions.  The free version prohibits recording to the phone, supports fewer screen layouts, and limits audio to a 1 minute demo.  I use the paid version daily to keep an eye on my dog while I’m at work or out for long periods of time.

Two of my DCS-930Ls are mounted outdoors.  One is hanging under my porch in a way that makes it unlikely to get much exposure to the elements.  The other is hanging on a wood post in a corner of my yard, mounted inside a polycarbonate food storage container.  It might be possible for rain to reach the cameras if the wind is really strong, but based on this video, I’m not too concerned.

Take a cue from the DCS-930L web administration interface’s Helpful Hints, and only select Image Setup > Image Settings > Enable Anti Flicker if you find it’s necessary.  When it’s enabled, the cameras produce completely washed-out images if they’re outside, or even pointed towards outside.

I’m quite pleased with my DCS-930Ls, especially compared to my old composite cameras that required me to run wires to a video capture card in my PC.

D-Link DIR-655 Preliminary Review

I recently purchased a D-Link DIR-655 802.11b/g/n Xtreme N Gigabit Router from Newegg for $54.99.  It is hardware version B1, and it shipped with firmware version 2.00NA.  Before setting it up, I flashed the latest available firmware, 2.01NA.

The DIR-655 replaced my Linksys WRT54G v2.2.  It had issues when streaming media wirelessly from my main PC to a PS3 (using PS3 Media Server).  Seeking was almost useless, even at DVD resolution, because there was barely enough bandwidth available to play at normal speed.  In addition, the connection would drop approximately once per hour.  I have had no such issues so far with the DIR-655.

The DIR-655 can also stream 10 FPS 640×480 video from all 8 of my D-Link DCS-930L Wireless N cameras simultaneously.  This requires approximately 2.5 to 3 MB/sec.  The WRT54G could only manage 0.3 to 5 FPS.  The camera farthest from the router indicates 65% signal strength.  It is approximately 67 feet away, and the line of sight is through 3 interior walls and 1 exterior wall at a 16° angle.

Setup was relatively easy, but quite time consuming because many settings require 20 or 60 seconds to take effect.  Because I have an assortment of old and new devices, I am using the mixed b/g/n wireless mode, with 20/40MHz automatic channel width.  Some reviewers have noted poor performance unless the DNS Relay function disabled in Network Settings > Router Settings.  I disabled it from the start and have been pleased so far.

It’s only been 4 days since I started using the DIR-655, but so far, so good.

Update (11/26/2011): See part 2 of my review here.

VxWorks 5.5.1 Memory Coalescing

In VxWorks 5.5.1, there is apparently a bug in the way blocks of freed memory are coalesced.  I’ve found that performance of new and delete calls can be extremely poor unless the delete calls are made in opposite order of the new calls, i.e.

  1. new A
  2. new B
  3. new C
  4. delete C
  5. delete B
  6. delete A

The performance hit from calling new and delete in order doesn’t become noticeable until dozens or hundreds of the calls are performed per second.  This problem may apply to other versions of VxWorks as well.

Renaissance

I finally installed WordPress.  No more manually editing 20th-century HTML for me.  Now begins the slow, painful process of tweaking the appearance, and adding actual content.