Skip to content

PCB Manufacture notes and PreAmpV0.2 Died!

Just for future reference (because I always forget), using the naff double sided PCB, 3:30 exposure was enough, but by far and away the most important point was to remember to jam the acetate down to the exposure unit, to the point of stressing the joints. Too many times have I relied on the foam in the lid of the exposure unit only to find that the acetate has warped slightly so I get a blurring after developing. Argh! Never again!

On the preamp front, it died! I dont know why, but I know what could have happened. Today in the lab, I came back from cleaning the “drop chamber”, as I like to call it, plugged it back in and it didnt work. I think it was because there was a DC spike on the output of the hydrophone which then knocked out the amplifier input. Here is my reasoning. I washed the hydrophone in hot water, boiling hot, since its the best way of getting rid of all the contaminants. I think this cause a charge build up in the peizoelectric material (either that or it was still hot, hence a wierd DC value) which then discharged (or stayed the same if it was simply due to the heat) and wiped out the input with a fair amount of voltage.

So next PCB, remember the protection diodes! I didnt put them on this time because I couldnt be bothered, and I didnt think this would happen!

p.s. Also, dont forget to place some text so you know which way round the acetate is supposed to go!  Plus that the text that is to be on the bottom layer should be flipped! Elementary I know, but always forgotten!

New surface tension vs. drop bubble thoughts.

After lots of testing, here is the brief version.  What I have found is that if you lower the surface tension, you increase the longevity and the size of bubbles under, and on top of the water.  If you increase the surface tension, the opposite happens.  You get lots of tiny bubbles.  Neither actually gets rid of bubbles.  (Disclaimer: This could be a coincidence)

Thinking what else could be making the oil work so well in preventing bubble formation is viscosity.  This is the only difference between oil and the rest of the tested liquids.  So I am in the process of making some scientific jelly, but I dont think I’m going to get it quite right to catagorically prove one thing or another (as usual).

The problem I have is the inability to change one single constant.  For example, all the chemicals that are specifically designed for decreasing the surface tension also tend to be quite viscous (although nowhere near oil, and a lot more expensive!) and very very foamy (if that’s a word).  Great for washing machine engineers, bad for scientists.

So in the end, I will still probably end up using oil and although it doesn’t mix,  it does provide good results and its cheap.

Speed test: c++ vs Matlab - Using Multilateration Routines

Quick update, I wanted to try the matlab vs c++ routines again, because from what I can remember, matlab was several orders of magnitude quicker than the c++ program. But I recently found a library in Qt called QVector, which claims to be very quick on the
whole memory front. So I went back and did the test again. (Because for some reason I didnt leave any trail of documentation like I normally do?)

Now notice my shock, suprise and glee when I rewrote the program for Qt 4, put it in release mode instead of debug and opened a large can of groinal kickers on matlab. See the results below.

Programs, settings, etc. __________________________________
Matlab V7.3 (2006b)
Qt V4.3.4 (release mode, default optimisations, single threading, pure c++ (no QVectors etc.)

MATLAB_____________________________________________

x = -0.5; y = -0.24; hydrophoneDepth = -0.3; SoS = 1482; hydrophoneSpacing = 0.5;
T = [1000000*sqrt( x^2 + (y-hydrophoneSpacing)^2 + hydrophoneDepth^2 )/SoS;
1000000*sqrt( (x-hydrophoneSpacing)^2 + y^2 + hydrophoneDepth^2 )/SoS;
1000000*sqrt( x^2 + (y+hydrophoneSpacing)^2 + hydrophoneDepth^2 )/SoS;
1000000*sqrt( (x+hydrophoneSpacing)^2 + y^2 + hydrophoneDepth^2 )/SoS];
tic
for(x = 1:1000000)
SolvePosition(T,hydrophoneSpacing,hydrophoneDepth,SoS);
end
toc
tic
for(x = 1:1000000)
SolvePosition(T,hydrophoneSpacing,hydrophoneDepth,SoS);
end
toc
tic
for(x = 1:1000000)
SolvePosition(T,hydrophoneSpacing,hydrophoneDepth,SoS);
end
toc
tic
for(x = 1:1000000)
SolvePosition(T,hydrophoneSpacing,hydrophoneDepth,SoS);
end
toc

Elapsed time is 18.844249 seconds.
Elapsed time is 18.670732 seconds.
Elapsed time is 18.662103 seconds.
Elapsed time is 18.620391 seconds.

c++_____________________________________________

Starting Test
___Position Solve Speed Test___
This routine tests the speed of c++ vs.
Matlab for our developed Multilateration Algorithm
7015

Starting Test
___Position Solve Speed Test___
This routine tests the speed of c++ vs.
Matlab for our developed Multilateration Algorithm
6985

Starting Test
___Position Solve Speed Test___
This routine tests the speed of c++ vs.
Matlab for our developed Multilateration Algorithm
6969

Starting Test
___Position Solve Speed Test___
This routine tests the speed of c++ vs.
Matlab for our developed Multilateration Algorithm
6984

Note that the c++ program is in ms. It is clear to see that there is a clear speed advantage, not a lot I know, but it is clear. There is also more scope for firstly optimising my code specifically for c++, using more aggressive optimisations in the compiler and also using the fast access libraries included in Qt.

Qt Errors and Answers

This is a post containing all the problems I had installing and using Qt. Most of them can be fixed quite simply.

Qt:__________________________________________________________
Error: Qt does not compile certain programs on Windows Vista (In my case this was qwt)
Error Code: “gcc: installation problem, cannot exec `cc1′: No such file or directory”
Solution:

to solve the problem, you have just to add the following line in the Qt\bin\qtvars.bat :
SET PATH=%PATH%;C:\MinGW\libexec\gcc\mingw32\3.4.2
replace the last number with your actual version of gcc.
giminik-Vista Complie Errors

QDevelop:______________________________________________________
Error: Errors whilst compiling anything.
Error Code: Various
Solution:

Make sure that you have all the executables (GDB and ctags not vital to compile) locations (i.e. locations to the respective exe’s) in the Tools->External Tools menu. Note that the make exe is actually mingw32-make in the mingw32 folder.

Qwt Install:_________________________________________________
Note: For the following instructions please alter the file paths for your installation.
Follow the instructions in the install file. I had to cd to the qwt directory then “qmake qwt.pro” then “make”. Note: I could compile the examples, but I could not run them because they required some microsoft Visual C dll. (For the dll’s see later - they do work)

Once installed copy the file “C:\Qt\qwt-5.0.2\designer\plugins\designer\qwt_designer_plugin.dll” to “C:\Qt\4.3.4\plugins\designer”. Now the new widgets will be available in designer. Second add “C:\Qt\qwt-5.0.2\lib\qwt5.dll” to the “C:\Qt\4.3.4\bin” folder. This will enable your programs to compile correctly.

Finally, add a LIB path in whatever IDE you are using (or just the pro file) to the “C:\Qt\qwt-5.0.2\lib\libqwt5.a” file and add the header include path “C:\Qt\qwt-5.0.2\src”.
Note: The instructions said to add the “include” folder, but there was none so I just included the source folder.

Now if your on vista, then it compiles, but then crashes. This is because it cannot find some microsoft visual c dlls. I believe this is another path problem, so it might work for XP (I will test later). All we need to do is locate all of these dll’s and place them in the bin directory of your program. I had to add:
msvcp80.dll
msvcr80.dll
And also include the normal Qt dlls:
QtCore4.dll
qwt5.dll
QtGui.dll

The MS dlls can be downloaded here:Microsoft Visual C dll’.

Hopefully, finally, all is good. I believe most of these problems lie with Vista, so XP users should be ok.

Long time no see

Haven’t updated in a while. Cracking on with the PhD doing lots of experimental work. Lots of time has been put into experimenting with the new hardware setup, PC->NI DAQ->Single Hydrophone, playing with all sorts of different concoctions. Results have been adequate, but not astonishing. The expected amount of bubble noise is there, masking the instant verification that would have been so nice. The most interesting part is that the bubble creates quite a number of frequencies that span from almost-DC to 10’s of kilohertz’s which means that a simple kill-all-bubble noise filter is not as simple as we first thought. Ive attached images of a control test where droplets of about 2mm are dropped from a hight of approximately 3 meters into a tank of water. The first is a simple plot of the data, and the second is a spectrogram showing the different frequency components at different times.

Plot of Droplets in WaterSpectrogram of Drops in Water

Over the past couple of days I have started trying to filter out the bubbles in software, so I don’t have to put so much emphasis on reducing the bubbles at the source.  I have had some success convolving an average of 10 drop pulses and also using the fact that the drop pulse is very delta-like.  In the frequency domain this can be viewed as a broad spectrum, so taking an average of a FFT will produce a high result and others spurious signals give out a low.

An Interesting Use of Ultrasound

I have thought of things like this in the past, and it looks like someone has taken the time to actually do it:
http://www.gizmag.com/go/7293/
I think that they have gone down the wrong road for the mouse part though…

[ I chose not to make the reasons why it is not appropriate and what can be done to remedy it to be private, since this is a bladdy good idea.  Anyone interested, please email me. ]

Unattended XP install

Once again, for future reference I have found a nice little freeware program that can not only automate a windows installation (xp or vista) you can also change what is installed and what isnt including external drivers and programs, hotfixes and updates. Pretty much everthing you can think of
Nlite

Non Existent Projects?

After months and days of searching I cant find any websites that are developing a hobby based phased array soultion for robots or whatever, so I am very very tempted to get to work on this straight away when I move in, rather than spending time on my robot like I had planned.  Also, another idea for today was to control stuff throught the pretty much redundant lifedrive we have, it is bluetooth and wifi enabled, so these could be utilised to form an advanced remot control?

T610 LCD Info

Just for future reference Ive found some sites with a T610 LCD pinout and some code and stuff. Links:

Quick Zbot IR note

I could mount the IR and the IR rx on the top and bottom of the boards, then I wouldnt have to worry about them interfering with each other!  Cant believe I didnt think of that before! Might not fit with the wiskers on though?

Also, I could add some transistors to make the power output a bit more beefy.