TX Switch Activated Lost Model Alarm

by JUSS10 | December 11, 2017 | (1) Posted in Projects

I recently joined the local RC club. It’s a great flying field with great people. One thing about the field though, its surrounded by corn fields. Early spring and late fall that’s not an issue, but in the middle of flying season the corn is tall, very tall, and the odds of finding a downed plane is slim to none at times. Currently we may take a quad up with a camera or all go through the field in a line hoping someone will find the downed plane. 

The other night while at a club members house, we were talking about combat for next year and how lucky they were to never permanently lose any planes to the corn but that it would only be a matter of time. I recalled hearing about beepers that are built in to quads to help find a lost quad but never heard of any for planes. I got thinking, that shouldn’t be that hard to make and I think I have a cheap way to make a beeper that can be activated by a spare channel on the receiver when a plane goes down. 

Below is what I came up with. I think this is a great low cost option that could help find that lost plane and potentially save you hundreds of dollars and the gut-wrenching feeling of coming home empty handed.  

This beeper is only made up of a few cheap parts that can be sourced online. It does require some Arduino code but I’ll do my best to walk through it bit by bit. 

First these are the components:

Digispark board: https://us.banggood.com/Wholesale-Warehouse-Digispark-Kickstarter-Micro-USB-Development-Board-For-ATTINY85-Arduino-wp-Usa-1038088.html?rmmds=cart_middle_products

5v beeper (I usually just buy the 5 pack): https://us.banggood.com/Wholesale-Warehouse-5-PCS-Super-Loud-5V-Active-Alarm-Buzzer-Beeper-Tracker-95_5mm-for-Racing-Drone-wp-Usa-1117207.html?rmmds=search

Servo cable. I just cut one off a bad esc or servo. Could also cut one off servo extension. 

So that's it. Only three pieces. 

Next step is to get some software. If you don’t already have Arduino IDE, you can either get it from the windows or mac app store or just go online here: https://www.arduino.cc/en/Main/Software

Current version is 1.8.5 and that is working fine for me.

After installing, open the Arduino IDE. We need to add some board info so it knows the digispark board we plan to use. Go to: File>Preferences. A window will open up. Near the bottom of the window, there is a line where you can paste URLs that will allow the software to download all the data needed for the digispark board. Its called “additional boards manager URLs”. If there are already URLs in there, that’s fine, just add a “,” at the end and paste the link below. If its empty, just paste the link.

http://digistump.com/package_digistump_index.json

Now hit ok. Next we will go to Tools>Board>Boards Manager. In that window, once it loads, there is a drop down menu on the top left, click the down arrow and select “contributed”. That should filter all the board files. Next look for one that says “Digistump AVR Boards” click on it, and then on the right it will ask to install. Click install, wait for the progress bar to complete and that’s done. Close the window. 

Next, if you use a PC, you have to download drivers (Yeah for PC!) Here is a link to a zip file that contains the drivers: https://github.com/digistump/DigistumpArduino/raw/master/tools/micronucleus-2.0a4-win.zip

Unzip it and there is an “install.exe” file, run that and go through all that fun stuff that PCs do 😊

Great! We are getting closer. That seemed a bit complicated but now lets flash some code!

So first lets open up the Arduino IDE, when first opened, it should look like this:

Next download the sketch file that I have provided here: 

https://drive.google.com/file/d/12Ek3HAiFyRaiIPKHX6ePw5LNQKC2U9uf/view?usp=sharing

Save it somewhere you can find and then go File>Open>then find the file “digispark_switch_alarm” where ever you saved it. That sketch should now open in a new window. Save the sketch just so it will make a folder. If it asks where to save it, its up to you, but there should be a folder called “arduino” in your documents and that’s usually where I put the files. 

With the code open in the window, go to Tools>Board and select Digispark from the list. I use the default 16.5mhz and that works just fine. Now, before uploading the code, click the verify button near the top right of the IDE window (it’s a little check mark). Doing that will compile the code and just make sure everything is working like it should. It should say done compiling at the bottom of the window along with some other info. 

The digispark board is a bit different than most Arduino boards. Its awesome because the USB plug is built right in to the board so you can just plug it in to your computer without a cable. That said, when flashing, you actually don’t plug it in till prompted by the software. At this point, if all worked well, click the download button (Right facing arrow near the top of the window) and the code will compile then download. Do all this with the digispark UNPLUGGED, it will prompt at the bottom when to plug it in. when it asks, do so and it should finish loading the code. It should say 100% complete and done uploading if done successfully. 

If at this point you struggled with getting here, never fear there is a lot of useful info on the net to help out. I strongly suggest checking out the wiki page on this microcontroller as it has very good step by step details on how to install and load your first code. You can find it here: https://digistump.com/wiki/digispark/tutorials/connecting

Finally the fun part, wiring it all up and testing it out. There are just a few simple solder connections to make here. 

First take the servo lead and separate the wires. White (yellow) is the signal, black (brown) is the ground, and red is the 5v power. On the digispark board there is a row of 3 holes on one side, and 6 on the other. On the 3 holes there is a 5v and GND. Solder the red wire from the servo cable to 5v and the black wire to GND. Finally solder the white wire to P0. Now grab the beeper. Solder the positive lead of the beeper to P1 and then the other lead to the GND hole with a jumper wire. Make sure all the wires are isolated and don’t touch off on any other connections on the board, this could fry the board or possibly damage your receiver. 

I would recommend testing the beeper with a servo tester and BEC before connecting it to your receiver. That way if something went wrong, it wont damage the receiver. At this point I added some heat shrink to cover the whole thing to protect it. 

Now all that’s left is to attach it to an open channel, assign a switch to that channel on your transmitter and you are good to go! 




A few final notes. This will only work on a receiver that is running at 5v or less. If you are running a high voltage BEC, it may damage the ardunio board. 

Also, the code is pretty well commented so if you wish to tweak it, its pretty easy. Things such as on/off time as well as the pulse value can be tweaked to your liking. 


COMMENTS

gloobnib on January 2, 2018
Sorry for the delayed reply. Yeah, they work for planes and for quads. You have to solder the header pins onto the board, which I'd never done before. Still I manged to get 10/10 working on the first try, so its not THAT hard. Then you just run a M-M servo lead to the RX.

Anytime the RX signal is "high" (above 20 on a scale of -100 to 100) the beeper goes off. Or at least thats how it worked on 9/10 of them. One of them works mostly like that, but occasionally also beeps at random times; I haven't figured out why yet.

Re: Planes and Quads - there is a 5 pin header. If you use a plane RX, you just wire up +/-/Signal like any servo. For quads there are another two pins (buzzer + & - I think).

Oh - and I really did like the detail of the article. I got started using audrinos like 8 years ago when I made a signal processor to flash spotlights based upon which piece of my drum kit I hit while on stage. Love what you can do with those things!
Log In to reply
gloobnib on December 25, 2017
Good article. However, you may want to check these out: https://www.getfpv.com/matek-lost-model-beeper-fpv-fc-5v-loud-buzzer.html

Like you, I spent a good amount of time trying to find a lost model alarm that works on planes (as opposed to using the beeper function of a quad board). I bought two different types from HK, and neither one worked exclusively based upon RX output. One just seemed to go off whenever it wanted during flight, another worked when triggered but also had an inactivity alarm that would go off if you didn't send it a different output every 30 (or maybe 60) seconds.

I had given up until I saw these in a sidebar on GetFPV. BangGood has them too, but they are cheaper from GetFPV.
Log In to reply
JUSS10 on December 25, 2017
I saw those. Do those work hooking up right to your receiver? I thought they only worked for quads by connecting to the FC. I built this more for plane use and it can be connected right to a receiver.
Log In to reply

You need to log-in to comment on articles.


TX Switch Activated Lost Model Alarm