* 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

Looking forward to 2018. In the meantime have a look at the "Photos of events sections" for those memories of last summer!

.

.

. .

.

.

.

,

Who is online?

In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None


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

Latest topics

» openLRS and 2.4 Ghz and Submarines
Tue Oct 10, 2017 9:25 am by david f

» Model Boats Magazine October 2017
Thu Oct 05, 2017 1:50 pm by david f

» U32 (class 212A submarine) in swimming bath at Langwedel
Thu Oct 05, 2017 1:40 pm by david f

» Bournville Sep 2017
Mon Sep 18, 2017 10:28 pm by timgarrod

» Model Sub Related Events for 2017
Fri Sep 08, 2017 9:00 am by david f

» Haydock Park 2017
Wed Sep 06, 2017 12:08 pm by david f

» Going Brushless?
Tue Sep 05, 2017 3:55 pm by david f

» Barrow in Furness MBC regatta and sub day
Mon Sep 04, 2017 3:46 pm by david f

» Model Boat Convention, Haydock Park, 26,27 August
Mon Aug 14, 2017 9:27 am by david f

Statistics

Our users have posted a total of 10335 messages in 1675 subjects

We have 734 registered users

The newest registered user is LenaMax24


    Pinger 2 - Ultrasonic

    Share
    avatar
    david f
    AMS Treasurer

    Posts : 1892
    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 : 1892
    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 : 71
    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 : 1892
    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

    Sponsored content

    Re: Pinger 2 - Ultrasonic

    Post  Sponsored content


      Current date/time is Thu Oct 19, 2017 12:44 am