In The Ever lasting Chain Of Experiments The Next Project, ultrasonic anti-fouling for boats.
The asm looks like this, ; Panteltje (c) anfo.asm (anti fouling) Copyright Jan Panteltje 2015-always ; driver code for ultrasonic based anti-fouling for boats. ; ; this ideas is based on the Siliconchip article from October 2000, and the Jaycar kit based on that. ; That kit is expensive, ebay has the transducers for about 15 $, ; and a couple of IRLZ34N MOSFETS and a LM317 with 2 (yes TWO) transducers and a 5 $ transformer, ; some junkbox parts should do it all for about than 50 $. ; Got some nice waterporrof boxes from ebay too. ; See below for my take on the software. ; ; 32 bit signed integer math copyright PETER HEMSLEY ; the rest is copyright Jan Panteltje ; and released under the GPL. GPL violaters will be procecuted. If you use ; this code, you are required to release SOURCE CODE.
; This program is free softlware; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version.
; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details.
; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; ; This code is assembled with gpasm in Linux. ; This code likely will not assemble without changes in Microchip mplab.
; **** set TABS to 4 to read any of this ****
; This source file was assembled with gpasm-0.13.5 beta. ; Not tested on mplab
; CHANGES: ; ; 0.1: ; This is a first release, test code
; ; This is from the original siliconchip / jaycar text, found with google: ; Specifications: ; 12 Vdc ; Suitable for power or sail ; Works with aluminium and fibreglass boats (not suitable for timber, ferro cement or fibreglass foam sandwich construction) ; Could be powered by a solar panel / wind generator ; Output frequency range: 19.08 kHz - 41.66 kHz in 14 bands with 200 ns steps. ; Frequency sweep in each band: 12 frequencies ranging from 80 Hz spacings at 20 kHz to 344 Hz steps at 40 kHz ; Signal burst period: 600 ms at 20kHz, 300 ms at 40 kHz (12000 cycles / burst) ; Output drive. 250 Vac ; Supply Voltage. 11.5 V to 16 V maximum ; Current drain: 220 mA average at 12 V driving a 3 nF load ; The large ultrasonic transducer is driven with high-frequency signal bursts ranging from 19.08kHz up to 41.66kHz. ; ; Me, Panteltje: ; It Seems To Me (tm) that this is just how it turned out to be in their PIC programmaticaly, ; nothing to do with the physics of killing lifeforms on the boat's hull. ; Sure using bursts of different frequencies may help resonate things here and there where they otherwise would not. ; spread spectrum, will your fishfinder still work? will your boat shake apart? ; will it chase away or attract sharks? ; Will you be pulled down by an angry huge octopussy? ; There is only one way to find out. ; So we can likely do our own thing, and I do not have the kit neither can I find their asm or hex code for their PIC online, ; found the circuit diagram, and transformer specs, also some waveforms, ; will use a LM317 to make 5 V and this PIC 18F14K22, maybe add some stuff, display, what not, let's see where it goes.
; Sanity check on their story: ; # wcalc ; Enter an expression to evaluate, q to quit, or ? for help: ; -> t20 = 1 / 20000 ; t20 = 5e-05 ; -> 12000 * t ; = 0.6 t40 = 1 / 20000 ; t40 = 5e-05 ; -> t40 = 1 / 40000 ; t40 = 2.5e-05 ; -> 12000 * t40 ; = 0.3 20000 / 12 ; = 1666.67