* THE FORUM FOR ALL THOSE INTERESTED IN BUILDING AND OPERATING MODEL SUBMARINES *



Join the AMS - Registered Forum users can become members of the AMS and it's free ...... To join register on the forum first then follow the forum link to our membership form which is on our website


For further details of any events shown here also see the "Shows and Events" section on the forum

Let us know of your plans for 2018 and we will promote them on this Forum

.

,
.
.

. ,

,

.Norwich MBC Weekend 28,29 July 2018
.Model Boat Convention, Haydock Park, 25,26th August
.

.Bluewater, Dartford, Chantry Model Boat Club, Sunday 2nd September

. Bournville MBC, Birmingham, Sunday 2nd September

,The Model Show,Poynton, Stockport (with swimming pool) 15,16th September 2018

.Barrow in Furness MBC, Sub Day and Regatta,Sunday 23rd September 2018. (DATE CHANGE!)

Who is online?

In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests :: 1 Bot

None


Most users ever online was 37 on Sun Mar 13, 2011 11:27 am

Latest topics

» Control yoke
Tue Jun 19, 2018 9:18 pm by RCSubGuy

» Pinger 2 - Ultrasonic
Tue Jun 12, 2018 5:53 pm by timgarrod

» the SAS ballast sub-system
Tue Jun 12, 2018 1:47 pm by merriman

» The Model Show - indoor swimming pool sailing - Poynton,Stockport 15,16th September 2018
Mon Jun 11, 2018 1:35 pm by david f

» Barrow in Furness MBC Regatta and Submarine Day 2018
Mon Jun 11, 2018 1:32 pm by david f

» 3D printed pumps
Sat Jun 02, 2018 12:58 pm by BuxtonRob

» Sub wanted
Thu May 31, 2018 2:31 pm by dgp1957

» model submarine test tank on the cheap
Sat May 26, 2018 8:45 pm by merriman

» engle piston tank convert to servo control
Fri May 25, 2018 5:48 pm by timgarrod

Statistics

Our users have posted a total of 10566 messages in 1732 subjects

We have 768 registered users

The newest registered user is Carl F

Similar topics


    Pinger 2 - Ultrasonic

    Share
    avatar
    david f
    AMS Treasurer

    Posts : 1960
    Join date : 2010-11-10
    Age : 67
    Location : Cumbria

    Pinger 2 - Ultrasonic

    Post  david f on Tue Apr 19, 2016 12:54 pm

    Some details of the new ultrasonic Pinger which I have been working on recently.

    The old Pinger did a very good job and saved quite a few subs over the years (mostly mine!) It had good battery life (about a month) and the hydrophone and amplifier were reasonably simple to obtain or construct.

    The main limitation (which people commented on) is that it isn't directional. You have to locate the sub by how loud the ping is. This is because the Ping is an audio signal at the relatively low frequency of about 3000Hz.

    At the time of development, ultrasonic transducers were large and expensive and Arduino microprocessors were not around. I knew that Ultrasonic Pingers would be much more directional from some helpful contact with Loughborough University:

    http://www.lboro.ac.uk/enterprise/case-studies/aquamark100/

    That has all changed now. Ultrasonic car parking sensors are cheaply available (the ones specified run at 40kHz) and the Arduino is a lovely processor for rapid prototyping.

    So here it is!

    Please treat this is a work in progress, have a go and let me know how you get on. (And you can also detect bats!)

    The prototype Pinger is a bit bigger than it needs to be and it has only had one outing in my Type XXI. On this occasion the Pinger range ( a couple of hundred feet) was greater than my openLRS r/c system (Ouch and see my separate post!)

    The directional effect was very pronounced just by rotating the transducer plugged into the Bat Detector.

    CR2032 battery life at this stage of development is a few days.

    You need to do a little bit of trimming on the Arduino board to remove a power LED to reduce the current draw even more.




    The Pinger has two outputs one audio and the other ultrasonic. The audio one makes it backward compatible with hydrophones and lets you know when it is turned on.

    A reed switch and magnet turn the device off (So for safety sake it is normally on - as with the Pinger 1). The short section of brass tube is for leak detection using my trusty inflated balloon.





    A handful of the waterproof ultrasonic transducers (I have cut one in half to investigate its innards.


    Supplier list:

    I recommend Stevie (Scooterboy101) for supply of Arduinos. He was very helpful for supply and support.

    Waterproof Ultrasonic Transducers:

    2PCS 18MM 40KHZ Waterproof Ultrasonic Sensor Receiver Transmitter 1R+1T
    ( 111151241872 )

    1 item sold by sister1252010

    Arduino Pro Mini 3.3 v 328:

    5x Arduino compatible Pro Mini 3.3 Volt ATMEGA328 3.3v TESTED UK STOCK
    ( 161795041342 )

    1 item sold by scooterboy101

    Bat detector kit: (From Magenta Electronics)

    http://www.magenta2000.co.uk/acatalog/Bat_Detector_Mk_2.html

    Arduino Sketch:

    /* Ultrasonic Pinger routine for underwater search.

    * David Forrest, 5 April 2016
    * Not to be used for commercial gain
    * With grateful thanks to Steven Cowie (Scooterboy101 on Ebay) for power minimisation  routines (by Donal Morrissey) and provision of Arduinos

    *  modified
    * LED 13 commented out
    * Power LED scratched out
    * Current consumption about 0.1mA (sleeping) to 5 mA
    * But 2 x CR2032 only lasted for 6 days (16/4/2016)
    */

    #include <avr/sleep.h>
    #include <avr/power.h>
    #include <avr/wdt.h>

    //#define LED_PIN (13)

    volatile int f_wdt=1;

    /*when watchdog times out*/

    ISR(WDT_vect)
    {
    if(f_wdt == 0)
    {
    f_wdt=1;
    }
    else
    {
    Serial.println("WDT Overrun!!!");
    /*only executes if main loop takes too long to complete
    versus the watchdog timeout value*/
    }
    }


    void enterSleep(void)
    {
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    sleep_enable();

    /* Now enter sleep mode. */
    sleep_mode();

    /* The program will continue from here after the WDT timeout*/
    sleep_disable(); /* First thing to do is disable sleep. */

    /* Re-enable the peripherals. */
    power_all_enable();
    }



    void setup()
    {
    Serial.begin(9600);
    Serial.println("Initialising...");
    delay(100); //Allow for serial print to complete.

    //pinMode(LED_PIN,OUTPUT);

    /*** Setup the WDT ***/

    /* Clear the reset flag. */
    MCUSR &= ~(1<<WDRF);

    /* In order to change WDE or the prescaler, we need to
    * set WDCE (This will allow updates for 4 clock cycles).
    */
    WDTCSR |= (1<<WDCE) | (1<<WDE);

    /* set new watchdog timeout prescaler value */
    WDTCSR = 1<<WDP0 | 1<<WDP3; /* 8.0 seconds */

    /* Enable the WD interrupt (without it causing resets). */
    WDTCSR |= _BV(WDIE);

    Serial.println("Initialisation complete.");
    delay(100); //Allow for serial print to complete.
    }

    void loop()
    {
    if(f_wdt == 1)
    {
    /* Commands to execute when WDT brings processor out of sleep
    in this example toggles the LED on or Off on each wake cyle
    */

    //digitalWrite(LED_PIN, !digitalRead(LED_PIN));

    // Ultrasonic output on Pin 3 for 1.5 seconds by DF
    tone(3,40000);
    delay(1500);
    noTone(3);

    Serial.println("Ultrasonic tone complete.");
    delay(100); //Allow for serial print to complete.

    // Audio tone output on Pin 4 for 1.5 seconds by DF
    tone(4,3000);
    delay(1500);
    noTone(4);

    Serial.println("Audio tone output complete.");
    delay(100); //Allow for serial print to complete.

    /* carried out our commands clear the flag. */
    f_wdt = 0;

    /* flag cleared go back to sleep till next time */
    enterSleep();
    }

    else
    {
    /*do nothing*/
    }
    }


    Source files:

    If you would like a complete Arduino skech file you can download from our website:

    http://associationofmodelsubmariners.com/files.php
    avatar
    david f
    AMS Treasurer

    Posts : 1960
    Join date : 2010-11-10
    Age : 67
    Location : Cumbria

    Re: Pinger 2 - Ultrasonic

    Post  david f on Thu Nov 24, 2016 4:29 pm

    I've just been doing some tweaks to the Ultrasonic Pinger Software.

    Some pond trials showed that you were better off having a longer ultrasonic pulse to enable you to sense the direction of the Pinger (attached to the lost sub) by rotating the sensor connected to the bat detector.

    So I have set the ultrasonic pulse length to 4 seconds. The audio pulse is only really there to let you know that the Pinger is switched on, so I have set this to 0.5 seconds to minimise power consumption.

    I also now just clip the Pinger to the keel of the sub externally. You don't notice any drag and it means you don't need to find any internal "wet" space.

    Revised code follows:


    /* Ultrasonic Pinger routine for underwater search.

    * David Forrest, 5 April 2016
    * Not to be used for commercial gain
    * With grateful thanks to Steven Cowie (Scooterboy101 on Ebay) for power minimisation  routines (by Donal Morrissey) and provision of Arduinos

    *  modified
    * LED 13 commented out
    * Power LED scratched out
    * Current consumption about 0.1mA (sleeping) to 5 mA
    * But 2 x CR2032 only lasted for 6 days (16/4/2016)
    * Increased ultrasonic tone length to 4 seconds and reduced audio tone to 0.5s to improve direction finding by scanning hydrophone without increasing power consumption too much(24/11/2016)
    */

    #include <avr/sleep.h>
    #include <avr/power.h>
    #include <avr/wdt.h>

    //#define LED_PIN (13)

    volatile int f_wdt=1;

    /*when watchdog times out*/

    ISR(WDT_vect)
    {
    if(f_wdt == 0)
    {
    f_wdt=1;
    }
    else
    {
    Serial.println("WDT Overrun!!!");
    /*only executes if main loop takes too long to complete
    versus the watchdog timeout value*/
    }
    }


    void enterSleep(void)
    {
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    sleep_enable();

    /* Now enter sleep mode. */
    sleep_mode();

    /* The program will continue from here after the WDT timeout*/
    sleep_disable(); /* First thing to do is disable sleep. */

    /* Re-enable the peripherals. */
    power_all_enable();
    }



    void setup()
    {
    Serial.begin(9600);
    Serial.println("Initialising...");
    delay(100); //Allow for serial print to complete.

    //pinMode(LED_PIN,OUTPUT);

    /*** Setup the WDT ***/

    /* Clear the reset flag. */
    MCUSR &= ~(1<<WDRF);

    /* In order to change WDE or the prescaler, we need to
    * set WDCE (This will allow updates for 4 clock cycles).
    */
    WDTCSR |= (1<<WDCE) | (1<<WDE);

    /* set new watchdog timeout prescaler value */
    WDTCSR = 1<<WDP0 | 1<<WDP3; /* 8.0 seconds */

    /* Enable the WD interrupt (without it causing resets). */
    WDTCSR |= _BV(WDIE);

    Serial.println("Initialisation complete.");
    delay(100); //Allow for serial print to complete.
    }

    void loop()
    {
    if(f_wdt == 1)
    {
    /* Commands to execute when WDT brings processor out of sleep
    in this example toggles the LED on or Off on each wake cyle
    */

    //digitalWrite(LED_PIN, !digitalRead(LED_PIN));

    // Ultrasonic output on Pin 3 for 4 seconds by DF
    tone(3,40000);
    delay(4000);
    noTone(3);

    Serial.println("Ultrasonic tone complete.");
    delay(100); //Allow for serial print to complete.

    // Audio tone output on Pin 4 for 0.5 seconds by DF
    tone(4,3000);
    delay(500);
    noTone(4);

    Serial.println("Audio tone output complete.");
    delay(100); //Allow for serial print to complete.

    /* carried out our commands clear the flag. */
    f_wdt = 0;

    /* flag cleared go back to sleep till next time */
    enterSleep();
    }

    else
    {
    /*do nothing*/
    }
    }
    avatar
    John Wrennall
    AMS member

    Posts : 157
    Join date : 2011-11-16
    Age : 72
    Location : Leyland

    Re: Pinger 2 - Ultrasonic

    Post  John Wrennall on Tue Nov 29, 2016 12:59 pm

    Hi David.

    Found this link for a "Sound Origin Direction Finder"

    http://www.best-microcontroller-projects.com/sound-origin-direction-finder.html

    Possibly a nice enhancement for your pinger if you can make sense of it, the article gave me a headache on the 1st read.

    John
    avatar
    david f
    AMS Treasurer

    Posts : 1960
    Join date : 2010-11-10
    Age : 67
    Location : Cumbria

    Re: Pinger 2 - Ultrasonic

    Post  david f on Wed Nov 30, 2016 8:37 am

    Hi John,

    An interesting approach, basically combining transducers and indicator lights on a "sort of indicator board."

    Using several transducers increases complexity and cost, though and you may as well make a small array of transducers - easier to lower into a pond and the indicator lights don't disappear into murky water (Alright I'm joking!)

    I am experimenting with putting my single transducer into a tube to increase the direction finding effect. Though it is not bad just "dangling" it in the water.

    Thanks!

    David
    avatar
    david f
    AMS Treasurer

    Posts : 1960
    Join date : 2010-11-10
    Age : 67
    Location : Cumbria

    Re: Pinger 2 - Ultrasonic

    Post  david f on Tue Jun 12, 2018 3:39 pm

    A bit of an update on the ultrasonic Pinger which you clip on the underside of your sub to enable location:



    Basically putting it in a rather neater sealed enclosure (a PVC stop end from B & Q)

    The LHS is the standard ceramic buzzer which produces  the audio tone (and indicates that it is switched on).

    In the centre is the Arduino Pro Mini which produces the audio and ultrasonic tone. Fed by 2 x CR2032 batteries in line with a reed switch so a magnet turns if OFF. One of the tiny LEDs on the Arduino is removed (by scraping it with a hobby knife) to reduce the current draw. You can't see it but I also enclose a bit of ballast to make it less buoyant. (About 30g wrapped in clingfilm.)

    On the RHS is the ultrasonic "parking" type of transducer. This is glued to the end cap using "Devcon". The plastic tube provides the ability to leak test using air. I hope you like the 3D printed support for these 2 items!

    The dunking ultrasonic sensor is shown below:




    The software is available from my GitHub site:

    https://github.com/rdforrest/submarine-proportional-pistontank

    You want the file named:

    Pinger_May_2018_copy.zip

    I think that the best bat detector to use with this is still the Magenta ones the assembled Mk 4 for £61 or the Mk 2 kit for £38.

    I had reason to do a bit of a revamp because my latest model (The British World War 1 submarine E11) got stuck on the bottom of the Bournville pond at the recent sub day.

    I went through the usual palpitations:

    - Where is it?
    - This is a very big pond to search before I go home!
    - Why is the water so cloudy?
    - Why did I forget to press the button on the openLRS module to set the failsafes!  etc etc.

    I brought out the trusty hydrophone amplifier and the bat detector with the dunking ultrasonic sensor and went all the way round the pond. No signal!

    Fortunately at this point the model  surfaced at the other end of the pond, having presumably unstuck itself from the mud.

    Relieved, I went home and tried to discover the cause of the problem.

    Basically, over familiarity had drifted in and I hadn't checked the equipment for some months.

    Both the ultrasonic sensors (transmitter and receiver had failed) They are not made very well, I think.

    I should have checked the range. You should be able to hear the ultrasonic pulse at about 10 feet distance in air.

    David

    timgarrod
    AMS Website Webmaster

    Posts : 211
    Join date : 2013-04-23
    Age : 37

    Re: Pinger 2 - Ultrasonic

    Post  timgarrod on Tue Jun 12, 2018 5:53 pm

    cheers David,

    Been using Scooterboy101 for long time. not the cheapest on ebay but least you can know the board all work and normally get them in a day or two.

    Sponsored content

    Re: Pinger 2 - Ultrasonic

    Post  Sponsored content


      Current date/time is Fri Jun 22, 2018 4:14 pm