The Association of Model Submariners.

Would you like to react to this message? Create an account in a few clicks or log in to continue.

* 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 send an email with your name , address and phone number to amstreasure@googlemail.com


For a guide to past events see the "Shows and Events" section.

Papplewick Pumping Station SUBMARINE Day. 31st March - 1st April 2024.

$$$

&&&

::::

Who is online?

In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests

None


Most users ever online was 180 on Tue Nov 05, 2019 6:03 am

Latest topics

» Information on camouflage patterns for German seahund
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyFri Mar 15, 2024 4:36 pm by david f

» WW2 mini sub build
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyTue Mar 12, 2024 1:56 pm by geofrancis

» Not the hobby I expected :)
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptySun Mar 10, 2024 6:30 pm by cat

» 868/915 Mhz as a viable frequency for submarines.
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyWed Mar 06, 2024 4:50 pm by tsenecal

» Sheerline gasket material
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyMon Feb 19, 2024 9:24 pm by Michaelc

» Choice of CAD software and Printer for 3D printing
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyThu Feb 15, 2024 1:53 pm by david f

» Engel Nautlus
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyTue Feb 13, 2024 9:15 am by palmert6

» RF 27/433MHz maximum depth in pools (1-5 ppm chlorine, 6-8pH)
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyThu Feb 08, 2024 2:05 pm by david f

» Arduino proportional control of a piston tank
Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) EmptyThu Feb 08, 2024 1:37 pm by david f

Statistics

Our users have posted a total of 12425 messages in 1980 subjects

We have 1003 registered users

The newest registered user is Stefan Udovenko КПДЮ

2 posters

    Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    david f
    david f
    AMS Treasurer


    Posts : 2395
    Join date : 2010-11-10
    Age : 73
    Location : Cumbria

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  david f Tue Apr 23, 2019 2:52 pm

    Some more Pinger developments which I have been working on over the winter. The whole idea being to find and recover your pride and joy when it has sunk in water you can' t see through. Sadly with model subs it is not IF but WHEN.

    This work adds distance measurement.

    Basic Pinger specification:

    - small size (A 35mm film canister was the original idea which shows how long I have been working on this!)
    - low cost (10% of the cost of the model. £30 say.)
    - self powered.(Not relying on the submarine battery.)

    Where we are at the moment with Pingers?
    -Adequate range – about 30m in reasonably silent water.
    -Ultrasonic sensors (e.g car sensor type) are quite directional so that you can “point” to the lost model. (Directionality was the major improvement in moving to ultrasonic from audio frequencies.)
    -Volume is a guide to the distance from the lost model.

    BUT distance measurement would be very nice to have for easy location e.g from a boat above the sunk model. In cloudy water a miss by 1 metre is a miss by a mile!

    No equipment  currently seems to exist which can do this at the price point we need. Some examples are:

    - an underwater homing beacon used by divers. This one is about $1000.
    http://www.desertstar.com/page/divetracker-scout

    an ultrasonic fish finder. They are quite reasonably priced at about $100 upwards. I have never used one but I would doubt that they have the resolution to detect a model sub lying on a mud bottom. Perhaps a user could comment?
    https://www.lowrance.com/lowrance/type/fishfinders-chartplotters/hook2-12-tripleshot-us-inland


    Theory of distance measurement using “Time of flight.”


    Sound ranging or triangulation.
    The theory is well described here:
    https://en.wikipedia.org/wiki/Artillery_sound_ranging
    Much used by the military. You can't help thinking that if the enemy transmitted accurate time signals it would be much easier! Have a look at “on board clock."

    Transponder.
    The Pinger on the submarine can transmit and receive ultrasonic pulses. The search device sends an ultrasonic pulse. This is picked up by the Pinger which transmits another pulse. When this is picked up the search device the time difference is related to the distance.

    On board clock.

    This is the principle used in the measurement of longitude by marine chronometers and GPS satellites. You need 2 synchronised clocks one in the search device and one in the Pinger. The Pinger sends an ultrasonic pulse triggered by the on board clock. The time delay received at the search device gives you the distance.

    Trials in lake at Barrow (Or what I did this winter!)

    Triangulation.
    The Pinger signal is picked up by 2 or 3 search devices positioned along the pond side. In practice, I used one bat detector with an underwater microphone which I moved consecutively to 3 locations with a range of about 10 to 20m. I used the 1 Hz time signal from a GPS module (NEO -7 or VK2828u7g5lf modules are very easily and cheaply available -about £6 ) as a base signal.

    I displayed this on a Samsung mobile phone using an oscilloscope app (I found that“Sound Oscilloscope version 1.8 was quite good.)

    But I found that it was impossible to get any consistent measurements. You are looking for faint signals only just above the noise levels in the lake. Even if you got 2 or 3 time differences you would have quite a complex calculation to get bearing and range.

    I haven't done any more work on this method.

    Transponder
    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20190410

    This is quite complex in electronic terms and it needs to be physically small to fit into a Pinger. However a surface mount electronic module the HC-SR04 is very cheap (about £3) and easily available. This provides transmit and receive on one circuit board. There is also an excellent online write up on the design of the board:

    http://uglyduck.vajn.icu/ep/archive/2014/01/Making_a_better_HC_SR04_Echo_Locator.html

    I did some experiments on this to modify it for use as transponder. I removed the microprocessor (using a Dremel!) and fitted an Arduino Nano clone in its place.

    This does work and receives and triggers ultrasonic pulses. I have only tested it in air, so far. The range isn't very good and it is a complicated system. So I have put this approach on the “back-burner.”  The software is very prototype but is available here:

    https://github.com/rdforrest/Pinger-model-submarine

    Clock on Board.
    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20190411

    The Triangulation trials had shown what a good time base the GPS modules can be. Unfortunately they don't work underwater. Fortunately DS3231 Real Time Clock modules are available cheaply for about £3. They can provide a 1Hz time signal output and are very accurate. The velocity of sound in water (about 1500 metres per second) means that we need to be able to measure time differences of about a millisecond. They drift by a couple of milliseconds over 2 or 3 hours. (Buy several and pick a good one.)

    The DS3231 module is connected to an Arduino to provide the accurately timed ultrasonic pulse. You need to set a register within the DS3231 using an Arduino sketch to get the 1 Hz output. (The details are in the software comments.)

    The search device uses a bat detector as one input with the pulse from a GPS module as the other. The time delay in milliseconds and the signal strength are displayed on a 16 x 2 LCD screen. I use a 5 position DIP switch to zero the display when you synchronize the clocks. (The photos show the earlier use of a potentiometer for this purpose.)  The software for
    the onboard Pinger and the search device is available at:

    https://github.com/rdforrest/Pinger-model-submarine

    This prototype has been tested at Barrow and gives useful distance measurements over 3 to 4 m at the moment. This looks like the way to go, in my view.


    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20190413

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20190412

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20190413

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20190414


    Last edited by david f on Thu Aug 22, 2019 8:50 am; edited 2 times in total
    david f
    david f
    AMS Treasurer


    Posts : 2395
    Join date : 2010-11-10
    Age : 73
    Location : Cumbria

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Re: Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  david f Fri Apr 26, 2019 4:29 pm

    I have just uploaded the 3 sets of software mentioned above:

    https://github.com/rdforrest/Pinger-model-submarine


    David

    david f
    david f
    AMS Treasurer


    Posts : 2395
    Join date : 2010-11-10
    Age : 73
    Location : Cumbria

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Re: Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  david f Tue Jun 25, 2019 10:13 am

    I can't wait for the clocks to become commercially available:(Only joking but it's the same principle.)

    https://www.space.com/nasa-deep-space-atomic-clock-on-falcon-heavy-stp-2.html
    C-3PO
    C-3PO


    Posts : 95
    Join date : 2018-11-21
    Location : Northamptonshire UK

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Re: Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  C-3PO Mon Aug 05, 2019 6:57 pm

    David - saw this and thought of you

    https://bluerobotics.com/store/sensors-sonars-cameras/sonar/ping-sonar-r2-rp/
    david f
    david f
    AMS Treasurer


    Posts : 2395
    Join date : 2010-11-10
    Age : 73
    Location : Cumbria

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Re: Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  david f Wed Aug 07, 2019 9:12 am

    Thank you!
    All these things are coming along nicely. Still expensive though.

    David
    david f
    david f
    AMS Treasurer


    Posts : 2395
    Join date : 2010-11-10
    Age : 73
    Location : Cumbria

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Re: Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  david f Sun Dec 22, 2019 2:01 pm

    An improvement to the timer controlled Pinger. (Replacing the DS3231 timer module with the DS1307).

    Much smaller.

    Happy Christmas everyone!

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20191212

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20191213


    David
    david f
    david f
    AMS Treasurer


    Posts : 2395
    Join date : 2010-11-10
    Age : 73
    Location : Cumbria

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Re: Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  david f Tue Jan 07, 2020 1:59 pm

    Just posted some new software for the time controlled Pinger and the distance measuring system:

    https://github.com/rdforrest/Pinger-model-submarine

    It is getting there but no test in the "wet" yet. (Only air.)


    Later June 2020 edit: For anyone trying out underwater ultrasonic sensors, I think I can recommend these:

    https://uk.banggood.com/Waterproof-Ultrasonic-Sensor-Module-Integrated-Ranging-Sensor-Reversing-Radar-Measuring-Distance-p-1369915.html?rmmds=myorder&cur_warehouse=CN

    Waterproof Ultrasonic Sensor Module Integrated Ranging Sensor Reversing Radar Measuring Distance

    ID: 1369915

    Neat, waterproof units and still good value even when bought with the electronic module. Seem to be nice and sensitive in air. (No water testing yet for Covid reasons)

    David
    david f
    david f
    AMS Treasurer


    Posts : 2395
    Join date : 2010-11-10
    Age : 73
    Location : Cumbria

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Empty Re: Pinger 3 - Distance measurement (Triangulation, Transponders and Clocks on Board)

    Post  david f Wed Dec 02, 2020 10:43 am

    Some more information on the " new improved" Pinger. (I would still recommend the original Pinger 1. It is audio only and hence less directional but it is much simpler to build. Better any form of Pinger than none at all!)

    The change from an Arduino to a PIC processor means that it is smaller physically and has an improved battery life of about a month. The ultrasonic transducer from Banggood is waterproof and provides a very narrow beam - so that you can home in on the lost model. The very accurate time signal means that you can use the distance measurement system, still under development.

    The smaller physical size means that it fits in a standard "stop end" from B & Q. The grey plastic bulkhead is stuck on the end using "Devcon" and the cable to the sensor is fed through a brass tube with a piece of silicone rubber tubing slid over it to provide a waterproof seal.

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20201113

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20201111

    The electronic innards. The battery pack has a normally closed reed switch attached to allow the unit to be turned off with a magnet. A bright LED pulses every second and the attached optical fibre allows the pulse to be seen through the translucent nylon tube attached for leak testing.

    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) 20201112

    I include the software below because there is a lot of detail in the comments but it is best to download it from my Github site.  https://github.com/rdforrest/Pinger-model-submarine/tree/master (I have also uploaded the Arduino software needed to set up the DS1307 timer for 1Hz output.)

    To receive the Pinger signal, I would build and use the simple bat detector which uses the frequency divider system (Uses LM386N & CD4024 chips) and works well with the Banggood ultrasonic transducer:

    https://pe2bz.philpem.me.uk/Misc/-%20Animals/-%20Bat/D-201-BatDetector/BatDetector.html
    Pinger 3  - Distance measurement (Triangulation, Transponders and Clocks on Board) Batdet10


    You can, of course, use it also to detect bats! Sadly I haven't seen or heard bats in our area for some years. Another loss perhaps?


    /*
    June 2020. Pinger 3 - Ultrasonic pulse timed using a very accurate DS3231 time source.
    * This gives about a 3mS duration pulse (Loop counter at 100)
    * July 2020. Trying with a 12FL501 low voltage PIC
    * Uses 1 Hz output from DS3231 to interrupt pin RA2
    * The 1 Hz output needs to be tapped off from Pin 3 and the output needs to be set in software
    * set using Adafruit library RTClib for DS3231.
    * Output to ultrasonic transducer on RA0,RA1
    * LED on RA4
    * +3.3v pin to + on DS3231. (DS3231 uses 3.3 volts input.)
    * Interrupt input from DS3231 has 4.7k ohm pull-up resistor connected to + 5 volts.
    * July 2020. Current draw about 0.4 to 1.4 mA with DS3231 on 5v without voltage divider resistors.
    * July 2020. Current draw about 4.4 to 5 mA with DS3231 on 3.3v with voltage divider resistors of 1.4k ohmm total
    * Current draw 0.5 to 0.7mA with 3.3v tapped off 3 x 4.7 k ohm resistors.
    * Farnell formula: mAh ÷ mA * 0.7 = estimated hours
    * CR2032 capacity is 225mAh which gives 32 hours at 5mA
    * Jul 2020. Using 12FL501 low voltage PIC at 3v. Built in Weak Pull Ups don't seem to work with interrupt.
    * So LED used instead.
    * Current is about 0.1 to 0.4mA. Battery life about 7 days. Final cell voltage about 2.8v
    * 15k ohm pull-up on RA2 interrupt works OK but now got weak pull-ups working.
    * 3/8/2020 First wet trial at Barrow lake. Works well - very directional
    * and range about 20 feet using the simple frequency divider ultrasound detector.
    * This is with silver transducer with an inductor wired in parallel.
    * Long term battery trial started 3/8/2020- still working 20/8/2020
    * Stopped working about 9/9/2020 at end voltage of 2.36 volts.
    * 13/9/2020.Tested Pinger with waterproof Banggood ultrasonic transducer for receive and transmit. Range using 3v PIC is very low about 0.5m.
    * Moving on to using 5v 12F683 PIC to increase range and perhaps drop the need for a clock module
    * Using sensor from Banggood: Waterproof Ultrasonic Sensor Module Integrated Ranging Sensor Reversing Radar Measuring Distance. ID: 1369915
    * Sept 2020. Pulse interval 1 second. Duration 5.7mS. Frequency 42Khz. 4v Peak.
    * Sept 2020. Current draw from 2.7 to 0.2 mA on 5v.
    * Oct 2020. 330 micro Henry inductors in series with transducer. Range increased. Current draw 1.5 to 0.5 mA.
    * Oct 2020. Battery life with new batteries is from 11.10.2020 to 8.11.2020.So about 1 month, very good. Final cell voltages 1.58 & 1.6
    *
    */


    // PIC12F683 Configuration Bit Settings

    // 'C' source line configuration statements

    // CONFIG
    #pragma config FOSC = INTOSCIO  // Oscillator Selection bits (INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)
    #pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
    #pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
    #pragma config MCLRE = OFF      // MCLR Pin Function Select bit (MCLR pin function is digital input, MCLR internally tied to VDD)
    #pragma config CP = OFF         // Code Protection bit (Program memory code protection is disabled)
    #pragma config CPD = OFF        // Data Code Protection bit (Data memory code protection is disabled)
    #pragma config BOREN = OFF      // Brown Out Detect (BOR disabled)
    #pragma config IESO = OFF       // Internal External Switchover bit (Internal External Switchover mode is disabled)
    #pragma config FCMEN = OFF      // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is disabled)

    // #pragma config statements should precede project file includes.
    // Use project enums instead of #define for ON and OFF.

    #include <xc.h>

    #define _XTAL_FREQ 8000000

    int Countery = 1;

    //Interrupt routine using input on RA2

    void __interrupt() timer_module(void) {
       if (INTCONbits.INTE && INTCONbits.INTF) {
           Countery = 1;
           INTCONbits.INTF = 0; // Clear interrupt
       }
    }

    int main(void) {
       OSCCON = 0b01110101; //Internal Osc set to 8Mhz, Stable and also used as internal clock
       CMCON1 = 0b000000; //all pins to digital mode
       ANSEL = 0b000000; //all pins to digital mode
       TRISIO = 0b000100; // configure RA0,RA1 as an output.RA2 as input.
       OPTION_REG = 0b1100000; //Weak Pull-ups and Interrupt on Leading Edge enabled
       //WPUA, WPUA2; // set weak pull-up on RA2. Next formats also all work.
       //WPUA = 0b000100;      // set weak pull-up on RA2.
       //WPUAbits.WPUA2 = 1;  // set weak pull-up on RA2.
       //WPUA = 0x04;
       WPUA, GP2; //set weak pull-up on RA2.

       while (1) // Go into infinite loop
       {
           // Ultrasonic pulse  
           if ((Countery >= 1)&&(Countery < 250)) // Should be 50. 250  gives about 7mS pulse
           {

               GPIO = 0b000001; // Ultrasonic pulse
               __delay_us(12); // 12 seems like a good value
               GPIO = 0b000010; // Ultrasonic pulse
               __delay_us(12); // 12 seems like a good value
               GPIObits.GP4 = 1; //Put LED on.
               //LATA = !LATA; // Toggle LED
               ++Countery; //Increment Counter
           } else {
               GPIO = 0b000000;
               //LATA = !LATA; // Toggle LED
               SLEEP();

           }

           INTCONbits, INTE = 1; // Enable interrupt on GP2 - needed also to wake from sleep.
           ei(); // Enable all interrupts    

       }
    }

      Current date/time is Tue Mar 19, 2024 2:49 am