Convert Drafix (QuickCAD) CAD file to DWG

Recently I had to convert a CAD file to DWG for a surveyor. I opened the CAD file up in a text editor and the third line read ‘Drafix Windows CAD’. I searched the web for the Drafix software and everyone had the same problem. Drafix CAD was no longer able to be purchased or downloaded from anywhere.

Further reading online, I found that Autodesk AutoSketch may be able to read these CAD files, so I borrowed a copy from my friend and who had AutoSketch 9. It managed to install successfully on my Windows 7 x64 machine, but I had problems running it. I used the inbuilt Windows Program Compatibility tool (search ‘compatibility’ in the start menu). I ran the tool and pointed it to the AutoSketch 9 install. Amazing it worked and I managed to read my CAD file perfectly. I then saved it to various different formats.

Export Android contacts contacts2.db to vCard vcf on Windows

The other day I need to restore some contacts on an Android phone, I had Titanium Backup files, though restoring the contacts through there didn’t seem to work.

I searched for a solution but there wasn’t really anything for Windows to restore the contacts so I developed my own VBA script.

I will assume you already have a backup contacts2.db file, it is found the zip file com.android.providers.contacts.

Firstly, download SQLite Manager add-on for Firefox, run it, Connect Database contacts2.db. Under Tables, right-click data table and chose Export Table click OK and save as data.csv.

Download convert-contacts2.db data-to-vcard-vcf.xlsm, open, and enable macros if necessary. Run the macro convertDatatoContacts and select the data.csv file.

You should now have a list of contacts, delete any contacts that you don’t want to import by deleting the whole row. When done run the macro and a vCard.vcf file will be created in the same folder as the Excel WorkBook.

Copy vCard.vcf to the root  directory of your Android phone. On the phone enter Contacts, Settings, Import/Export and Import from storage. The contacts will be imported.

 

Remove Hyundai Tucson MP3-01 radio with removal tool

I recently upgraded my factory default radio on Hyundai Tucson 2005, radio model MP3-01, to an aftermarket head-unit with Bluetooth.

To remove the unit requires a special tool which is described as “Tool for removal of radio in Hyundai Terracan, equivalent to part 99260-426-0”. Below are details on the tool’s dimensions, I used 0.5mm aluminum which was easy to work with, but not very strong, it did the job though.

Download a printable template of the tool.

Histogram with normal distribution overlay in Excel

This tutorial will walk you through plotting a histogram with Excel and then overlaying normal distribution bell-curve and showing average and standard-deviation lines.

To produce my random normal samples I used VBA function RandNormalDist by Mike Alexander. I created samples with a mean of 100 and standard deviation of 25, function RandNormalDist(100, 0.25).

The actual mean and standard deviation was 100.84 and 27.49 respectively.

Normally distribution

The samples can be checked to confirm normally distributed by comparing the mean, median and mode which should all be equal.

Mean 100.84
Median 99.5
Mode 89

Histogram

The first thing to do is produce the histogram. This is done by creating bins of a certain width and counting the frequency of the samples that fall in each bin.

Start by calculating the minimum (28) and maximum (184) and then the range (156). Using Sturges’ formula the number of bins is 9, using the square root method the number of bins is 15.

To get a bin width, divide the range (156) by the number of bins (9) which results in 17.33, round this up to an even 20 to produce nice round bin widths.

Set up the bins starting at the minimum and ending at the maximum, using the Excel FREQUENCY function to determine frequency in each bin. The FREQUENCY Function must be entered as an array (ctrl-enter).

Bin Frequency
0 0
20 0
40 1
60 12
80 32
100 56
120 51
140 28
160 19
180 0
200 1

Using a column chart a histogram can be produced.

Histogram using standard column chart

Histogram using Scatter Chart

Overlaying a normal curve is a little trickier, firstly, the above column chart can’t be used and the histogram must be produced using a scatter chart.

Select the data and produce a scatter chart with smooth lines.

Scatter chart as histogram

Select the chart and click on the ribbon menu, Layout, then Error Bars and then More Error Bars Options. Select Display Direction Minus, End Style No Cap and Error Amount Percentage 100%.

Scatter chart as histogram format error bars

This will produce a scatter chart with the following error bars.

Scatter chart as histogram with error bars

Increase the Line Style Width so that it starts looking like a histogram with no gaps.

Scatter chart as histogram using error bars

Finally, remove the scatter chart line.

Scatter chart as histogram using error bars finished

Normal Curve

For the normal curve the points need to be created first. The bell curve looks nice when it covers the full 6 standard deviations. 100 points will be created for a nice smooth curve.

Multiply the standard deviation (27.49) by 6 to get 164.96, divide by 100 to get an increment of 1.6496. Starting at minus 3 standard deviations (equal to the mean minus 3 standard deviations (18.36)) increment the value by 1.6496 all the way up to positive 3 standard deviations(183.32). There will actually be 101 total points.

Now for each of those points the normal distribution shall be calculated using Excel’s NORMDIST function. The first parameter is the values we calculated, the second the mean, the third the standard deviation and the last should be FALSE as we don’t want cumulative (NORMDIST(Q1,100.84,27.49,FALSE)).

If you plot the data you will notice a very short normal distribution curve, barely visible as a bell curve due to differences in scale. For our sample of 200 points with bin width of 20, each sample represents a square of 20 by 20. So the total area of our histogram is 200 by 20 which is 4000. The normal distribution has a total area of 1, so the normal curve must be scaled by 4000. And this produces a nice bell-shaped normal curve over the histogram.

Scatter chart as histogram with normal curve

Histogram correction

You may notice that the histogram and bell curve is a little out of sync, this is due to the way the bins widths and frequencies are plotted. If you have a bin width of 20, and the bin value is 40, the corresponding frequency is all values between 20 and 40. When you plot this value on a scatter chart, the centre of the bar is at 40 and the bar width being plus and minus half the bin width (10), which is 30 to 50 respectively. That’s why the histogram looks shifted to the right.

To fix this, create a temporary fixed bin that has half the bin width (10) subtracted from it and use this when plotting the histogram.

Bin Frequency Corrected Bin Frequency
0 0 -10 0
20 0 10 0
40 1 30 1
60 12 50 12
80 32 70 32
100 56 90 56
120 51 110 51
140 28 130 28
160 19 150 19
180 0 170 0
200 1 190 1

Scatter chart as histogram with normal curve corrected

Mean and Standard Deviation

Since it is a scatter chart, it is possible to add additional indicators including mean and standard deviation lines.

Simply produce a single line segment from 0 to the height of the bell curve using the previous NORMDIST function.

-3sigma 18.35943 0
18.35943 0.644784
-2sigma 45.85295 0
45.85295 7.855081
-1sigma 73.34648 0
73.34648 35.20403
mean 100.84 0
100.84 58.04164
1sigma 128.3335 0
128.3335 35.20403
-2sigma 155.827 0
155.827 7.855081
3sigma 183.3206 0
183.3206 0.644784

Scatter chart as histogram with normal curve, mean and standard deviation

Tidying up the colours results in the following final histogram with overlaid normal curve and mean and standard deviation indications.

Scatter chart as histogram with normal curve, mean and standard deviation final

Download the Excel workbook here.

Convert a Clipsal 30PBL to momentary for a wall mount Nice Flor remote

Another little project of mine, I needed a wall mounted remote for my Nice brand automatic gate, I couldn’t find anything suitable, so I decided to make my own.

Converting the Clipsal 30PBL from latching to momentary

I was looking for wall push buttons, and came across the Clipsal Impress range with a push button version. The advantage of the Clipsal range is it blends with existing wall lighting switches.

I purchased the simple single gang push button with no LED (model 30PBL) from eBay for $18 including postage.

Clipsal 30PBL latched push button

On receipt, I opened up the push button mechanism, thinking there would be an easy way to convert from latching to momentary. Unfortunately, Clipsal had a very simple design that toggled from one contact to the other on each press, so it wasn’t straight forward.

Terminals of the Clipsal 30PBL push button
Inside the Clipsal 30PBL push button

I decided to take a different approach and embed a push button into the Clipsal push button. I found a compatible push button for $5, and removed as much of the unneeded plastic in the Clipsal mechanism. The button was mounted with its standard supplied nuts.

Simple momentary push button
Push button installed in Clipsal 30PBL
Clipsal 30PBL top
Clipsal 30PBL complete
Clipsal 30PBL inserted in bezel

Creating the Nice Flor wall remote

Now with the wall mounted push button sorted, I simply used an old Nice Flor-s remote, soldered some wires to the PCB and connect this to the Clipsal switch. Once installed, the remote was hidden in the wall mounted electrical box.

Nice Flor- s remote
Solder two wires to the button contact on the Nice Flor-s remote
Connect the push button to the Nnice Flor-s remote
Completed Clipsal 30PBLl push button connected to Nice Flor-s remot

HP MicroServer N40L and Gigabit HD 6450 horizontal flickering line

I recently purchased a HP MicroServer N40L and half-height Gigabit Radeon HD 6450, after installing Windows 8 I noticed that a third from the screen was a flickering white horizontal line, noticeable when playing movies in full screen or moving the mouse around the right start bar.

The problem doesn’t lie with the MicroServer of Windows 8 (or even your monitor), it is the Gigabit Radeon HD 6450 at fault here. Luckily, there is a relatively easy fix, a BIOS update.

  1. Download Easy Boost (about half way down the page)
  2. Download the Easy Boost manual
  3. Install Easy Boost
  4. Follow the “VBIOS backup” procedure, you will also find your BIOS type either F1# or F2#, mine was F21
  5. Download the correct BIOS (F11 if you have F1# or F22 if you have F2#), you can also see the BIOS offers “Fixed screen flicker problem”
  6. Follow the “Flash VBIOS” procedure.
  7. Reboot

Thanks to this RedFlagDeals post for the procedure.

Replace the hinges and LCD screen on an ASUS F3J laptop

Today I will be walking you through a laptop hinge replacement on an ASUS F3J laptop. As usual I purchased the replacement hinges from eBay for $11 including shipping to Australia. You can only buy a pair of left and right hinges, so you can choose to replace both.

The standard ASUS F3J replacement hinges

I also purchased a pair of plastic hinge covers from eBay for a relatively expensive $14 including shipping to Australia, I could have probably saved some money and used my existing ones with a bit of glue since the clips had broken.

First a photo of the damaged hinge, you can see the right hinge sheared off completely which is quite dangerous as the associate cables should easily be damaged further. Further, you will notice that there is no plastic hinge cover. The left hinge was fine and still holding the screen in place, but I suspected it may have been weakened by the rotational torque so replaced it as well.

The severed right hinge on the laptop

Replacing the hinges are fairly straight forward, first remove two sets of screws on the back of the back of the laptop as per the photo below.

Remove the two screws from the back rear of the laptop

Turn the laptop upside down and remove a screw holding the left hinge in place from the bottom.

Turn the laptop back to its normal position and open the screen to an obtuse angle exposing the plastic hinge covers. Remove these by slightly compressing them and pulling on the back side first.

Once these are removed the hinges are visible. This was already the case for my broken right hinge.

Remove the two screws holding the hinges to the laptop, once removed you should be able to remove the LCD screen from the laptops base completely, be careful though as the data cables would still be connected. You can easily disconnect these cables, this frees the LCD screen a little more except for a single pair of wires which doesn’t seem to look like it was easy to disconnect.

Disconnect the hinge and the cable plug

Now with the screen removed from the base, remove the eight rubber screw caps exposing the screws. With a Philips screwdriver remove the eight screws.

Remove the eight screw caps and screws around the LCD bezel

With the eight screws remove the surrounding plastic bezel can be removed exposing the LCD screen.

From here remove another set of four screws holding the LCD screen assembly on the plastic backing.

Remove the four screws holding the LCD to the plastic housing

Finally, remove four small screws from either side of the LCD screen.

Remove the four screws on each side of the LCD holding the hinges

You should now have the two hinges removed. This is the same procedure if you want to replace the LCD screen. Install the new hinges by following the above instructions in reverse.

The replaced broken right hinge

To reinstall those rubber screw caps a drop of glue may be required to hold them in place.

Once the hinges are installed, installed the plastic hinge covers and you’re done.

Pop the plastic cover on to cover the hinges

Replace noisy ASUS F3J laptop CPU fan

Here is a quick post on how to replace a noisy CPU fan on an ASUS F3J series laptops, the replacement is so easy that it really doesn’t need a how to guide.

I purchased the new fan on eBay (as usual) for $7.70 including postage.

The new ASUS F3J fan purchased from eBay for 7.70

Remove the following seven screws as circled, the circled blue screw is a unique extra long screw.

The back of the ASUS F3J laptop

The exposed old existing fan, to remove unscrew three screws.

The existing fan, remove the three screws

The air-hole when the old fan is removed.

The old fan removed

Finally, the new fan inserted and screwed into place.

The brand new fan inserted in the ASUS F3J