Wednesday, December 4, 2013

Remove infrared filter from D-Link DCS-930L

The DCS-930L is a cheap wireless camera that lacks infrared LED:s and has a infrared filter in place to block all infrared light. I googled around and found Microfrost blog (http://www.microfrost.com/2011/06/21/d-link-dcs-930l-infrared-capabilities/) and thought I'd removing the infrared filter from the new composite lens assembly that my camera has. It turns out it's not that hard, see the process in images below.

The camera case pops open quite easily and the camera board is loose inside (no screws)

First I tried unscrewing the lens but it was glued to the lens holder so I just ended up destroying the plastic.

When removing the cover, take care not to break the little snaplocks like I did..

Instead of trying to remove the lens I just removed the whole assemly. It's mounted using some sort of silicone so I just pulled it off with a pair of pliers. The infrared filter is now clearly visible in red.

I removed the filter by pressing a tiny screwdriver along the edges of the filter, shattering it and removing the pieces/dust. (removed pieces of the filter is visible in the picture)

To the right you can se the silicone still left on the PCB where the lens assembly was mounted. After removing the infrared filter I put the lens assembly back in the silicone "holder" on the PCB.

And fastened it with some hot glue.


Unfortunately I ended up with this image. Lots of stains/spots and a very short focus distance. So I removed the lens assembly again and saw that there was alot of tiny dust particles on the image sensor. These could easily be removed. To fix the focus I had to move the lens closer to the image sensor. This meant that I had to carve away some plastic at the bottom of the lens assembly (the part that touches the PCB) with a small knife.

I put the lens back and the focus distance was better and the spots gone. There is a slight blurring in the right hand side of the image due to a small scratch I happend to make in the lens when removing the IR-filter.
That's it, now the camera can see infrared light. You can also add an external infrared illumination source if you want even better visibility. Check Microfrosts post about this: http://www.microfrost.com/2011/06/21/infrared-led-assemblies/

Monday, August 5, 2013

Volvo 945 lambda sensor diagnostic (Arduino ADC data logger / oscilloscope)

If you came here just for the arduino datalogger/oscilloscope you can skip the next section of text.

My Volvo 945 failed the yearly inspection with the comment "engine disturbance, unable to measure exhaust enviromental values". After a tip from a car mechanic and some googling I settled on that the problem must have something to do with the lambda sensor and is probably due to a crack in the exhaust pipe right before the catalytic converter. I have tried to patch it once but it is exposed to intense vibrations from the engine so the patch now has a crack in it. Air gets sucked in to the crack and enters the catalytic converter where the lambda sensor is located, leading it to detect exhaust rich in air and thus falsely making the Engine Control Unit (ECU) think that the engine is running lean and in need of more fuel rich mixture. This makes the engine run rich with sluggish, uneven performance and increased fuel consumption as a result. To make sure that the crack is really the culprit and that the lambda sensor is working OK I decided to record the output of the lambda sensor with an oscilloscope, as suggested on lambda powers site, before and after fixing the crack a second time.

To be able to sample the lambda sensor I searched around for a arduino oscilloscope but found no really good software. The one that came closest was xoscillo but I couldn't make it record long periods (several minutes) of samples and display as a graph. So I decided to put in a couple of hours to code my own "oscilloscope" which is more of a data logger with a graph view. The PC application was done in C# in Visual Studio 2012 and the arduino code was done in the arduino environment. The application features saving and loading of data logs (for later inspection and analysis), a zoomable, scubbable real time graph and exporting of the graph as PNG/JPG/GIF/BMP.

Screenshot of the application.

Since I didn't find any good apps out there to do this I put the code (click here to go directly to instructions on how to download/check out the code) on google code for others to use as a quick starting point to get up and running with data logging from an arduino.

I get around 500 samples per second (sps) at 10 bits per sample and 9600 baud. So the sample rate could probably be increased by several orders of magnitude by increasing baud rate and switching to 8 bit samples but 500 sps was plenty for my purposes.

Hopefully this is useful to someone, enjoy :)

Update: The car successfully passed inspection yesterday! The test-run after patching the exhaust pipe showed beautiful lambda curves so I had high hopes it would indeed pass :)