Welcome Anonymous
Fledgling
Fledgling
It is currently Tue Sep 19, 2017 4:34 pm

All times are



Post new topic Reply to topic  [ Array ] 
Author Message
PostPosted: Thu Mar 30, 2017 9:22 pm 
Offline
Fledgling
Fledgling
User avatar

Joined: Mon Oct 13, 2014 12:14 pm
Posts: 23
Hi, a good friend of mine, who has been teaching me the secrets of camera trapping, loaned me one of his audio calls for one of my sets and it has been working very good. I have gotten some coyotes and Mountain Lion footage where I had only been getting deer and elk so far. This got me thinking about building my own. Below is what I came up with for my audio call project requirements. I am almost done with my build and thought I would share it for anyone else to use as well. If you see any potential fatal flaws please let me know, or if the programming could be improved to improve efficiency.


CamTrap_Audio Call:

Project and Requirements: Make a relatively inexpensive DIY flexible audio call for camera trapping.

The call should contain the following features:
1. K.I.S.S. (the most important requirement)
2. Allow the user to program any sounds to the system as desired.
3. Capacity to hold more than 5 audio files.
4. User selectable audio files and easily selectable in the field.
5. User selectable day/night/24hr operation.
6. Volume control.
7. Software selectable audio play time, either random play time or fixed. (Default random)
8. Software selectable delay between audio plays, either random delay of fixed. (Default random)
9. Have the ability to play two separate audio files. Allows the user to play audio during day that would not attract humans to keep system hidden.
10. Small enclosure for easy transport and concealment.

Cost (after build): Approximately $35-$40 (depending on what you already have vs need to buy, what enclosure you use and what power set-up you use)

Parts List:
1ea - 4-8ohm speaker – Water proof or resistant (anything other than paper cone) (I got my speaker from an old audio player I found at GoodWill for $1.50, and now have a spare)
1ea - Adafruit Audio FX Mini Sound Board 2mb flash - https://www.adafruit.com/products/2342 (also have a 16mb version)
1ea - Adafruit Mono 2.5W class D audio amp - https://www.adafruit.com/products/2130 (modified to add large external volume control)
2ea – L7805 5V Voltage regulator
1ea – FQP30N06L MOSFET
2ea - 1kohm 1/4W resistor
2ea - 10kohm 1/4W resistor
1ea - 470ohm 1/4W resistor
1ea – 1N4733A 5.1V 1W Zener diode
1ea - 10k potentiometer
1ea – Mini Photocell - https://www.sparkfun.com/products/9088
1ea - SPST switch (on/off)
1ea - ATTiny85 chip (you will need a programmer if you don’t have one https://www.sparkfun.com/products/11801)
1ea - 8 pin DIP socket
1ea - Three pin Male header
1ea - Two pin Female header
2ea – P2N2222A NPN transistors

Note: Adafruit has several different boards that are suitable for this build and could be drop in replacements. I selected the two boards above based on lowest cost and smallest size for my needs.

Case:
Pelican 1010 (clear) – mask area for photocell if camouflaging for access to ambient light.

Note: You can likely compress everything into a smaller enclosure. I don’t like to fight space constraints with my wires and batteries, the 1010 case seemed to fit everything nicely.

Power:
2ea 18650 in series ~ 8.4V – This can be any voltage source above 5V.

More Details:
The program is set-up to run day and night (24hrs) and configured so you can run two different audio files (one for day and one for night) if desired. If you do not want the audio to play during the day leave the day audio pin disconnected. The board will hold up to 8 audio files wav or ogg format. Which file plays is user selectable by switching the pin positions on the board. The 8 audio files are downloaded through standard usb connection. It works just like a normal flash drive.

Side note: Originally I was going to use a single line for the day pin and a 10 position switch for the other files. The switch was just too big and was pushing me to a larger enclosure. I was then going to use a 8 position DIP switch for the night audio file. I abandoned the DIP as this limits the day file to only one position. I considered using a different chip and reconfigure the program and board to run all the files from software and DIP switches. This also was pushing one of my KISS requirements. Therefore I ended with two wires the user can move to the desired file keeping it simple and flexible at the same time.

The program is set-up to run a specific (user selected) audio file during the day and switch to a second file at night. You can also set-up to run the same file day and night; you would just have to download the same file twice to the board so it would take up two file locations. When powered on the selected audio file will run once and then the loop will start. This is done so the user can hear the file selected at power up (if you forget which file is at what location) and then the board will enter the standard program off time. To hear the day vs night audio call either cover or leave clear the photocell when switching the unit on.

Once in the loop, the off time is random from ranging from 1 to 5minutes (this can easily be changed in software to whatever the individual wants) either random or a fixed time interval. When audio is played the audio clip is auto looped for a random time which is currently set from 5-20sec (also easily changed in software).

The program cycles the ATTiny85 chip through sleep modes to reduce power consumption. The sleep mode timing can be increased to keep the board asleep for longer periods to conserve even more power. I am currently using a 4 second sleep loop. In this configuration I am currently testing the battery longevity with 2ea rechargeable 18650’s. I have not done any calculations to see exactly how much power it is drawing while in low power mode and while running. I’m sure there are easier/better/more efficient ways to do it, but it works and it was easy to build. If you have suggestions please respond to the thread.

Audio files I have put on my board are set-up to play continuously while the board is powered. The way the audio file behaves is a function of the file name.

I did not hardwire the three boards together in the event one is damaged it is easily replaced without a lot of extra soldering work.

The only holes that were required to be drilled in the case were for the speaker. I wanted to keep any leak points to a minimum. The battery case is held down with double sided 3M foam tape (the same kind they use for GoPro mounts). After tack gluing the speaker to the case I will finish it off with a bead of silicone around the edge for waterproofing. For the board and volume control mount I cut a piece of 1/8” thick Delrin I had laying around in the garage. To secure the board to the 1010 case I used 4 breadboard standoffs and epoxied them to the case. They are screwed to the Delrin in the event I need to fix something I can take all the boards out at the same time. After securing all the boards and wiring I adjusted the photocell to sit very close to the door surface without contacting.

Just need to paint it up and it will be ready to deploy.
Attachment:
IMG_5183.JPG

Attachment:
IMG_5184.JPG

Attachment:
Schmatic.JPG

Attachment:
Board Layout.JPG



Set-up and Use:

A. Install Audio Files:
1. Plug in micro usb connector to audio board and computer. (do not power the call the board will auto power from the usb)
2. Access folder for audio board.
3. Transfer/copy wav/ogp audio files onto the audio board. (reference the Adafruit audio board datasheet for proper file naming conventions)

B. Field Set-up:
1. Select audio file to be played.
a. Purple wire day file (leave disconnected for Night only operation).
b. Gray wire night file (leave disconnected for Day only operation).
c. To play same audio day and night you will need the same audio file downloaded to two positions on the board.
2. Switch on.
3. Let it do its thing!

Program:
/******************************************************************************
CamTrap Audio Call
Day/Night Audio Call for Camera Trapping.

Creator: Jason Craig
March 3, 2017

PhotoCell indicated day/night operation. Daytime operation on channel 0 (Bird Song)
Nighttime operation based on presed channel 1-7.
Day and night time operation occurs every 2min.

Includes sleep mode with watchdog to reserve battery power.

Version 1.2 - Add global counter for time out between audio activations.
Version 1.3 - Add random off time and play time, remove LED test

Development environment specifics:
Arduino 1.6.8
******************************************************************************/
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <avr/interrupt.h>

#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif

unsigned int counter = 1; // Counter for audio off time, counter set at 1 to run loop once on start-up.
unsigned int randomCount = 0; // Initialize random counter varaible.
unsigned int Audio_On = 0; // Initialize audio on time variable.

volatile boolean f_wdt = 1;

const int LIGHT_PIN = A1; // Pin connected to voltage divider output pin 6
//const int LED_PIN = 4; // LED as dark indicator
const int DAY_AUDIO_PIN = 0; // Pull to ground for birdsong
const int NIGHT_AUDIO_PIN = 1; // Pull to ground for preset call 1-7
const int AUDIO_PWR_PIN = 3; // Mosfet control for audio board power

const float VCC = 5; // Measured voltage of power line to PIC

const float DARK_THRESHOLD = 300.0; // Set this to the minimum value required to turn an LED on (1023/VCC*sensorV)

void setup()
{
//pinMode(LED_PIN, OUTPUT);
pinMode(LIGHT_PIN, INPUT);
pinMode(DAY_AUDIO_PIN, OUTPUT);
pinMode(NIGHT_AUDIO_PIN, OUTPUT);
pinMode(AUDIO_PWR_PIN, OUTPUT);

//digitalWrite(LED_PIN, LOW);
digitalWrite(DAY_AUDIO_PIN, LOW);
digitalWrite(NIGHT_AUDIO_PIN, LOW);
digitalWrite(AUDIO_PWR_PIN, LOW);

setup_watchdog(8); // Setup watchdog to go off after 4sec
}


void loop()
{
if(counter > randomCount) // Random off time between loops ~4.5sec/loop
{
int lightADC = analogRead(LIGHT_PIN); // Read the ADC, and calculate voltage and resistance from it

if (lightADC >= 0)
{
if (lightADC >= DARK_THRESHOLD) // If resistance of photocell is greater than the dark threshold setting run night mode
{
night_mode(); // Run night mode loop
}
else
{
day_mode(); // Run day mode loop
}
}
}

system_sleep(); // Go to sleep!
}

void system_sleep()
{
cbi(ADCSRA,ADEN); // Switch Analog to Digitalconverter OFF

set_sleep_mode(SLEEP_MODE_PWR_DOWN); // Sleep mode is set here
sleep_enable();

sleep_mode(); // System sleeps here

sleep_disable(); // System continues execution here when watchdog timed out
sbi(ADCSRA,ADEN); // Switch Analog to Digitalconverter ON
}

//*************Watchdog Timing******************
// 0=16ms, 1=32ms,2=64ms,3=128ms,4=250ms,5=500ms
// 6=1 sec,7=2 sec, 8=4 sec, 9= 8sec
void setup_watchdog(int ii)
{
byte bb;
int ww;
if (ii > 9 ) ii=9;
bb=ii & 7;
if (ii > 7) bb|= (1<<5);
bb|= (1<<WDCE);
ww=bb;

MCUSR &= ~(1<<WDRF);
WDTCR |= (1<<WDCE) | (1<<WDE); // start timed sequence
WDTCR = bb; // set new watchdog timeout value
WDTCR |= _BV(WDIE);
}

//******************************************************************
// Watchdog Interrupt Service / is executed when watchdog timed out
ISR(WDT_vect)
{
f_wdt=1; // Set global flag
counter++; // Count for audio timeout
}

void day_mode()
{
Audio_On = random(5,15); // Set Audio on variable for play time
digitalWrite(AUDIO_PWR_PIN, HIGH); // Turn on power to audio board and amp
delay(100);
digitalWrite(DAY_AUDIO_PIN, HIGH); // Select audio file ground pin 0
delay(Audio_On*1000); // Power audio board for 5-15sec
digitalWrite(DAY_AUDIO_PIN, LOW); // Open to stop play on audio file
digitalWrite(AUDIO_PWR_PIN, LOW); // Turn off power to audio board and amp
counter = 0; // Reset counter
randomCount = random(13,67); // Assign random off time of 1-5 minutes
}

void night_mode()
{
Audio_On = random(5,15); // Set Audio on variable for play time
digitalWrite(AUDIO_PWR_PIN, HIGH); // Turn on power to audio board and amp
delay(100);
digitalWrite(NIGHT_AUDIO_PIN, HIGH); // Select audio file ground user selected
delay(Audio_On*1000); // Power audio board for 5-15sec
digitalWrite(NIGHT_AUDIO_PIN, LOW); // Open to stop play on audio file
digitalWrite(AUDIO_PWR_PIN, LOW); // Turn off power to audio board and amp
counter = 0; // Reset counter
randomCount = random(13,67); // Assign random off time of 1-5 minutes
}


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 30, 2017 10:12 pm 
Offline
King
King
User avatar

Joined: Sat Sep 18, 2010 10:52 pm
Posts: 487
Location: Brookston, TX
Awesome project! I did something similar a few years ago. Designed my own circuit boards and used a PICAXE micro controller that activated a small audio playback module that could hold two different recorded sounds. It had day night detection and everything. Really enjoyed that project. This brought back good memories.


Sent from my iPhone using Tapatalk


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 30, 2017 10:18 pm 
Offline
King
King
User avatar

Joined: Sat Sep 18, 2010 10:52 pm
Posts: 487
Location: Brookston, TX
Custom Squeaker Build

https://r.tapatalk.com/shareLink?share_ ... are_type=t


Sent from my iPhone using Tapatalk


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 30, 2017 10:21 pm 
Offline
Gentoo
Gentoo

Joined: Tue Jul 03, 2012 6:42 pm
Posts: 205
Nicely done and very well put together! I'm doing a similar build and have reached many of the same conclusions. 18650 for the energy density can't be beat! I chose to go with an arduino based control board and WTV020 for the sound module. Haven't added an amplifier in but I bet yours is pretty loud. I'd love to see a video to see how loud the sound is when you get it going.

Curious to know when you do your estimated run times how long you expect it to go for. It looked like in your schematic that you use a transistor to cut power to the sound module while not in use? Also curious if you considered adding a megaphone shape around the speaker area to increase sound. Just something I had considered. Beautiful build, can't wait to see the photographic results!! Thanks for sharing.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 31, 2017 6:01 am 
Offline
Emperor
Emperor
User avatar

Joined: Thu Feb 09, 2012 11:33 am
Posts: 1797
Location: Northcentral PA
Great idea, but it sure doesn't seem simple to someone like me who's electronically illiterate. Here's a link to a caller build I did with a Trap Bait Caller and a solar light controller -- viewtopic.php?f=5&t=11144

It's simple, cheap and easy to build with readily available items.

_________________
http://forestandfield.blogspot.com/


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 31, 2017 7:25 am 
Offline
Fledgling
Fledgling
User avatar

Joined: Mon Oct 13, 2014 12:14 pm
Posts: 23
greengrass wrote:
Nicely done and very well put together! I'm doing a similar build and have reached many of the same conclusions. 18650 for the energy density can't be beat! I chose to go with an arduino based control board and WTV020 for the sound module. Haven't added an amplifier in but I bet yours is pretty loud. I'd love to see a video to see how loud the sound is when you get it going.

Curious to know when you do your estimated run times how long you expect it to go for. It looked like in your schematic that you use a transistor to cut power to the sound module while not in use? Also curious if you considered adding a megaphone shape around the speaker area to increase sound. Just something I had considered. Beautiful build, can't wait to see the photographic results!! Thanks for sharing.



Thanks, yes I'm using a FET on the ground side to power off the board when not playing. I was warned I may have leakage issues by using the ground instead of switching the power line. However if I use the FET on the power side I think I would need some diode/cap setup for the drain. I wasnt having any noticeable leakage issues when I mocked the circuit an my breadboard so I just went with it.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 31, 2017 7:29 am 
Offline
Fledgling
Fledgling
User avatar

Joined: Mon Oct 13, 2014 12:14 pm
Posts: 23
Woody Meristem wrote:
Great idea, but it sure doesn't seem simple to someone like me who's electronically illiterate. Here's a link to a caller build I did with a Trap Bait Caller and a solar light controller -- http://camtrapper.com/viewtopic.php?f=5&t=11144

It's simple, cheap and easy to build with readily available items.


Ha, I am certainly not a sparky. I just know enough to be dangerous. I like your simple caller build looks like it would work well.

I wanted something a little more field flexible to select audio on the fly and put new files on easily to try new set-ups.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ Array ] 

All times are


Who is online

Array


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group