In The Ever lasting Chain Of Experiments The Next Project, ultrasonics, part 4

In The Ever lasting Chain Of Experiments The Next Project, ultrasonic anti-fouling for boats.

OK, Got the push pull drive working, The cycle by cycle current limit reacts, will wind a current transformer. I use .5 us dead time, a bit more than the .2us I think they use in their design, as driving the IRLZ34N directly from a PIC output is not that fast. It is all easily specified in hardware in the PIC, Specified a range of 10 frequencies between 20 kHz and 40 kHz to within a few Hz. with similar timing as in the siliconchip article. In fact I can have up to a hundred frequencies if must be, as all is done by PIC hardware. Only the delays between switching frequencies is in software delay loops. This could be done in interrupt, but wft. So the waiting is now for the transformer core and transducers, will write some nice OLED status display code.

Maybe I should say bye to these siliconchip guys and now start looking for online papers for how to attack algae and other life forms, I am sure somebody did research on that, and then chose my frequencies accordingly.

Reply to
Jan Panteltje
Loading thread data ...

In The Ever lasting Chain Of Experiments The Next Project, ultrasonic anti-fouling for boats.

So wrote the soft, could just make a number of inceasing freuencies with fixed times.. Here I will try to explain the principle of linked list to you new progrummers. I like linked list because, well, you can do many things with it. Slightly more difficult to progrom than just increasing counters etc, but so much more versitile.

After reading some papers on the effect of ultrasonics on lifeforms in the water, and especially on boat huls, it seems to me that there are as many opinions, tests, and different results, as experiments.

Now would it not be nice to be able to specify a list of frequencies excecuted in any order you want for any duration you want! And it should be possible to change that in a simple way, in this case I chose RS232 at 4800 Bd serial link (something to do with NMEA but that is an other story).

And in asm of course.

So this morning while watching Alaska survival race or something on what was it channel, why do it to yerself, but OK, gave me courage to finish the code now one hour exactly after that. This is the asm:

formatting link

This is the help menu (type h for it)

Panteltje (c) anfo-0.2 Commands DnnnnnENTER set day, range 0-65535 EnnNTER select entry number in linked list to program, range 0-39, default 0 GnnnnnENTER set clock speed calibration, timer0 reload for 100 ms, default 59285 HnnENTER set hour h help (this) LnnENTER set cycle by cycle current limit, range 0-31, default 16 MnnENTER set minute NnnENTER set pointer to next entry for selected entry, range 0-39, default 1 RnnnENTER set number of 100 ms waits between frequency changes for selected entry, range 0-255, default 3 (300 ms) FnnnENTER set frequency in kHz for selected entry, range 0-100, default 20 kHz v print status Z1234ENTER enter test mode, default off z disable test mode

Below is the status report if you type 'v'

Now here you can see the idea of the linked list:

The program starts at entry 0 at the top, send 20 kHz for 600 ms, then jumps to entry 1.

entry 1 sends 30 kHz for 200 ms, then jumps to entry 2

entry 2 sends 40 kHz for 300 ms and then (here comes the versatility - non linearity) jumps to entry 4

entry 4 sends 70 kHz (no idea if these transducres like that) for 500 ms, and then jumps to entry 0 again, and it all starts over again.

You can specify any entry and it parameters and where it jumps to, so any sequence, or even jump to itself for just one frequency.

All settings saved in EEPROM.

Got the idea?

clock calibration 59285 current limit 16 days 0

0:1.40 test mode n selected entry 2 0 : 20 kHz 6 1/10 s next 1 1 : 30 kHz 2 1/10 s next 2 2 : 40 kHz 3 1/10 s next 4 3 : 255 kHz 255 1/10 s next 255 4 : 70 kHz 5 1/10 s next 0 5 : 255 kHz 255 1/10 s next 255 6 : 255 kHz 255 1/10 s next 255 7 : 255 kHz 255 1/10 s next 255 8 : 255 kHz 255 1/10 s next 255 9 : 255 kHz 255 1/10 s next 255 10 : 255 kHz 255 1/10 s next 255 11 : 255 kHz 255 1/10 s next 255 12 : 255 kHz 255 1/10 s next 255 13 : 255 kHz 255 1/10 s next 255 14 : 255 kHz 255 1/10 s next 255 15 : 255 kHz 255 1/10 s next 255 16 : 255 kHz 255 1/10 s next 255 17 : 255 kHz 255 1/10 s next 255 18 : 255 kHz 255 1/10 s next 255 19 : 255 kHz 255 1/10 s next 255 20 : 255 kHz 255 1/10 s next 255 21 : 255 kHz 255 1/10 s next 255 22 : 255 kHz 255 1/10 s next 255 23 : 255 kHz 255 1/10 s next 255 24 : 255 kHz 255 1/10 s next 255 25 : 255 kHz 255 1/10 s next 255 26 : 255 kHz 255 1/10 s next 255 27 : 255 kHz 255 1/10 s next 255 28 : 255 kHz 255 1/10 s next 255 29 : 255 kHz 255 1/10 s next 255 30 : 255 kHz 255 1/10 s next 255 31 : 255 kHz 255 1/10 s next 255 32 : 255 kHz 255 1/10 s next 255 33 : 255 kHz 255 1/10 s next 255 34 : 255 kHz 255 1/10 s next 255 35 : 255 kHz 255 1/10 s next 255 36 : 255 kHz 255 1/10 s next 255 37 : 255 kHz 255 1/10 s next 255 38 : 255 kHz 255 1/10 s next 255 39 : 255 kHz 255 1/10 s next 255

Yes there is an hour counter too, days, hours is difficult... I disabled the OLED driver code in the asm isting as the OLED is not connected yet (else get error messages from i2c driver), and same for the cycle by cycle current limit as I am still waiting for transformer cores. But this is just to explain linked lists to you new progrummers.

As you can see no need for C, BASIC, snakes, or whatever crypto or dangerous animals, just simple asm.

The video:

formatting link
hard to see the .5 uS dead time beween the two push pull drive signals, but it is there.

ASM is cool, fast, simple ~/compile/pantel/anfo_pic # jppp18 -i anfo.hex -e -p -Y parport_data=0x378 Loading hex file: Program 7574 bytes at address 0x000000 ID 0 bytes at address 0x200000 Config 14 bytes at address 0x300000 EEPROM 0 bytes at address 0xf00000 Erasing chip. Writing program space. Writing config space. Verifying program space. Verifying config space. Ready.

7.5 kB (yes kilobyte)

Maybe I should add some more default frequenies, already much better than whatever else is available I think. Anyways the linked list in EEPROM saves you from reprogramming the chip if new research shows different freqencies.

Just a snapshot, need coffee now.

Reply to
Jan Panteltje

On a sunny day (Sun, 08 Nov 2015 12:31:30 GMT) it happened Jan Panteltje wrote in :

PS, note that there is nothing in 'main', everything happens in hardware in the PIC and in the interrupt by the timer0 100mS tick. This is contrary to the philosophy once used, was it some UK fighter? where no interrupts were allowed. I allow nothing in main. works much better.

Reply to
Jan Panteltje

On a sunny day (Sun, 08 Nov 2015 12:48:45 GMT) it happened Jan Panteltje wrote in :

The easy of programing.

You may have thought oops, linked lists, and now how to enter all those freqwuencies in that EEPROM via the menu.

Well, Linux,, bash, serial link...

All ye have to type is ./set_list /dev/ttyUSB1

This is the script 'set_list', in it set yer frequencies and tone durations. YES the avid reader will have noticed you can play music with this, up to 40 notes in a loop, with selectable duration.

#!/bin/bash

if [ "$1" == "" ] then echo "Usage: set_list device_name" echo "Example: set_list /dev/ttyUSB1"

exit 1 fi

device_name=$1

function set_entry { echo -en "E$entry\r\n" > $device_name sleep 1 echo -en "F$frequency\r\n" > $device_name sleep 1 echo -en "R$duration\r\n" > $device_name sleep 1 echo -en "N$next\r\n" > $device_name sleep 1 } # end function set_entry

stty -F $device_name 4800

entry=0 frequency=20 duration=2 next=1 set_entry

entry=1 frequency=21 duration=3 next=2 set_entry

entry=2 frequency=22 duration=4 next=3 set_entry

entry=3 frequency=23 duration=3 next=4 set_entry

entry=4 frequency=24 duration=3 next=5 set_entry

entry=5 frequency=25 duration=1 next=6 set_entry

entry=6 frequency=26 duration=2 next=7 set_entry

entry=7 frequency=27 duration=3 next=8 set_entry

entry=8 frequency=28 duration=4 next=9 set_entry

entry=9 frequency=29 duration=5 next=10 set_entry

entry=10 frequency=30 duration=6 next=11 set_entry

entry=11 frequency=31 duration=7 next=12 set_entry

entry=12 frequency=32 duration=4 next=13 set_entry

entry=13 frequency=33 duration=2 next=14 set_entry

entry=14 frequency=34 duration=7 next=15 set_entry

entry=15 frequency=35 duration=6 next=16 set_entry

entry=16 frequency=36 duration=5 next=17 set_entry

entry=17 frequency=37 duration=4 next=18 set_entry

entry=18 frequency=38 duration=3 next=19 set_entry

entry=19 frequency=39 duration=6 next=20 set_entry

entry=20 frequency=40 duration=7 next=0 set_entry

echo "Ready" exit 0

Of course you (most people) cannot hear that high, but add some carrier say 60 kHz peizo... Or you could muddify the source.

It is also easy (I used that with frequency counter

formatting link
) to check the frequencies, also a simple script, now we loop at the first entry:

./set_one 40 sets output to about 40 kHz

#!/bin/bash

if [ "$1" == "" ] then echo "Usage: set_one device_name frequency_in_kHz (range 16-255)" echo "Example: set_one /dev/ttyUSB1"

exit 1 fi

device_name=$1

function set_entry { echo -en "E$entry\r\n" > $device_name sleep 1 echo -en "F$frequency\r\n" > $device_name sleep 1 echo -en "R$duration\r\n" > $device_name sleep 1 echo -en "N$next\r\n" > $device_name sleep 1 } # end function set_entry

stty -F $device_name 4800

entry=0 frequency=$2 duration=20 next=0 set_entry

exit 0

So fun fun fun, the first script takes about 2 minutes to run, because I added all the sleep 1 (one second waits) to give the PIC time to program an EEPROM location. A shorter sleep would likely work too, in C usleep... So nuf progging for the day.

Reply to
Jan Panteltje

design, as driving

few Hz.

I am really confused. My impression is that ultrasonic transducers hove a pretty high Q and are only effective at the resonate frequency. Not only t hat but the mechanical load needs to be resonate at the same frequency. An d the best way to drive an ultrasonic transducer is to use a circuit that adjusts the drive frequency to the resonate frequency.

Now I realize that the Jaycar unit uses a number of frequencies and you are more or less following the Jaycar unit which in turn is based on even more expensive systems to suppress marine growth. So I am not confused about w hat you are doing, but do not understand the general concept of using ultr asonics to suppress marine growth.

Is there a website that explains the idea of multiple frequencies in this a pplication?

Dan

Reply to
dcaster

On a sunny day (Mon, 9 Nov 2015 08:58:17 -0800 (PST)) it happened " snipped-for-privacy@krl.org" wrote in :

You make a very good point there. I think(tm) that it is possible that loading the transducer with the boat hull and water contact causes damping that extends the bandwidth considerably. I am not driving in resonance, but think of it as a speaker. I did a similar experiment with piezo speakers some years ago, posted about it here, to chase away unwanted life forms (at about 22 kHz IIRC).

But I had the same question after reading the siliconchip article and looking at several commercial units, some sweeping between 20 kHz and 100 kHz with similar small transducers. If you look at the construction of these transducers, it is just some piezo material between iron. The piezo WILL change thickness given enough power, and that enough power (60 W here) is the point.

I searched and found some papers, and it seems everybody tries different frequencies, it seems to me that to resonate at the right frequency is different for some algae and different again for some other sort of life forms that grow on boats.

So that is why I now have a linked list where I just can enter frequencies. There is a lot of papers and commercial specs online if you google. Did some more coding today, now at 9032 bytes... think most of it is in there now. As always the proof is in eating the pudding, but it is a fun project.

If I understand it right then the idea is to break the cell wand of the algae, those being at the bottom of the food chain, no algae no other life forms attracted, but it is likely more complicated. Higher life forms will be annoyed and hopefully even more so from endless frequency changes than from a constant beep. And exprementing is fun :-)

Reply to
Jan Panteltje

.

I would be inclined to place one transducer near the bow and the other one near the stern. And then use variable frequencies on one and the resonate frequency on the other. And observe any differences, if any , in how effective the system is.

Dan

Reply to
dcaster

With the transducer firmly fixed to the hull, the resonant frequency will be determined by the whole mechanical system - the preferred frequency of the transducer itself is mostly irrelevant when you have strong coupling.

My interpretation of the need for a sweep is that because the drive electronics is not smart enough to measure the resonant peaks, it just sweeps so as to hit resonance at some point(s). Once the system resonates, it doesn't need to do it for very long to take effect. But that means that for most of the sweep, it's doing nothing except deafening the dolphins.

Clifford Heath.

Reply to
Clifford Heath

Speaking of higher life forms, years ago I worked at a tiny company producing high frequency, high power ultrasound equipment*. The most common unit was 250 Watts continuous at 660kHz, we also had a 1000 Watt pulsed unit. Once built a 4000 watt unit with 64 sq inches of transducer area. Oh ya, higher life forms, I transitioned into a fish monger position, well shrimp seller, with lots of charter boats around me. The problem the charter boats had were dolphin, the dolphin love to snack on the fish as the are being reeled in. They listen for the boats as they head out into the gulf and say ah, it's snack time. The charter captains sometimes find a recreational fishing boat and take time to let there dolphin followers spy a fish at the recreational boat, then off they go. So they all wanted some type of ultrasonic repellent to scare of the dolphin. It's probably not legal to purposely target that higher life form, but a mis-aimed boat defouler...

Mikek

  • Aimed at treating chemicals, enhancing chemical reactions, pollution remediation, anything a customer wanted to try. The question at trade shows, what is the application? I guess we never found it, no longer in business. Fun while it lasted though!
Reply to
amdx

On a sunny day (Tue, 10 Nov 2015 10:08:27 +1100) it happened Clifford Heath wrote in :

It seems to me, that finding the resonance frequencies (there may be more than one) of the hull will be detectable by lower? currents (higher Q) in the transducer?

In the circuit diagram I published you will note the small current transformer that measures the drive current, and I use that with a 1:50 ratio to drive a 1 V into the PIC (hardware) comparator for cycle by cyle current limiting.

There are several ways I could measure that signal and get an idea where the resonances are, store these and use only those (automatically). So you just gave me a cool idea of something to try.

In fact this was what I was playing with last night, soft added, these are the current menu options (via RS232) note the arrow:

Panteltje (c) anfo-0.3 Commands BnnnnnENTER set low battery cutoff in mV, range 0-65535, default 11000 DnnnnnENTER set day, range 0-65535 EnnNTER select entry number in linked list to program, range 0-39, default 0 FnnnENTER set frequency in kHz for selected entry, range 0-100 GnnnnnENTER set clock speed calibration, timer0 reload for 100 ms, default 59285 HnnENTER set hour h help (this) LnnENTER set cycle by cycle current limit, range 0-31, default 16 (=1.024 V)

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.