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
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
Wed Dec 04, 2024 7:26 am by geofrancis
» Robbe Seawolf V2
Wed Dec 04, 2024 7:17 am by geofrancis
» Futaba -868/915mhz equipment
Tue Oct 29, 2024 4:46 pm by tsenecal
» RC Drift Gyro for pitch control
Sun Oct 20, 2024 2:04 pm by geofrancis
» WW2 mini sub build
Thu Oct 17, 2024 2:34 pm by geofrancis
» sonar data link
Mon Oct 14, 2024 4:31 pm by geofrancis
» ExpressLRS - 868/915 Mhz equipment
Fri Oct 11, 2024 8:58 pm by Marylandradiosailor
» Flight controllers as sub levelers
Fri Oct 11, 2024 8:14 pm by geofrancis
» 868/915 Mhz as a viable frequency for submarines.
Thu Oct 10, 2024 3:21 am by tsenecal