├── Macros for decoding wav File.xlsm ├── README.md ├── .gitattributes ├── .gitignore └── Garage_Door_Opener └── Garage_Door_Opener.ino /Macros for decoding wav File.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorsIot/Garage-Door-Opener/master/Macros for decoding wav File.xlsm -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Garage-Door-Opener 2 | Clone of a Garage Door Opener using Arduino and AD9850 3 | 4 | These two files are used in a project presented on YouTube: 5 | https://youtu.be/LE1CvGWqSsw 6 | 7 | The Excel file contains macros to read and demodulate a wav file generated from SDR# SDR radio. It is just an example and needs tweaking. 8 | 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /Garage_Door_Opener/Garage_Door_Opener.ino: -------------------------------------------------------------------------------- 1 | /* Creator Andreas Spiess 2 | 9.2.2016 3 | Revision 8.11.2021 4 | Clone of a Garage Door Opener using a AD9850 module 5 | Based on work of https://zissisprojects.wordpress.com/2014/02/10/all-digital-fm-modulation-w-arduino-ad9850/ 6 | 7 | */ 8 | 9 | 10 | #include 11 | 12 | 13 | #define FREQ 1397970960 14 | 15 | bool v[] = {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0}; 16 | 17 | unsigned long entry; 18 | 19 | uint32_t tword; //tuning word 20 | byte W[5] = {0, 0, 0, 0, 0}; 21 | 22 | 23 | void setup() 24 | { 25 | DDRB = B10000000; //define PORTB PD7 as output, PD7 is pin 7 (FU_UD pin) 26 | PORTB = B00000000; 27 | SPI.setDataMode(SPI_MODE0); // mode 0 seems to be the right one 28 | SPI.setClockDivider(SPI_CLOCK_DIV2); // this is pretty fast 29 | SPI.setBitOrder(LSBFIRST); // AD9850 wants LSB first 30 | SPI.begin(); 31 | 32 | } 33 | 34 | void loop() { 35 | /* 36 | for (byte i = 0; i < 80; i++) { 37 | entry = micros(); 38 | if (v[i]) tword = FREQ + 85900; //calculating the high freqency tuning word for AD9850 39 | else tword = FREQ - 85900; //calculating the low freqency tuning word for AD9850 40 | W[0] = (byte) tword; 41 | W[1] = (byte) (tword >> 8); 42 | W[2] = (byte) (tword >> 16); //convert it to bytes 43 | W[3] = (byte) (tword >> 24); 44 | W[4] = 0; //phase is zero 45 | //start sending with spi interface 46 | PORTB = B10000000; 47 | PORTB = B00000000; //pulse FU_UD 48 | for (int j = 0; j < 5; j++) 49 | { 50 | SPI.transfer(W[j]); //send the word 51 | } 52 | PORTB = B10000000; 53 | PORTB = B00000000; //pulse FU_UD 54 | while (micros() - entry <500); // wait till 500 uS are gone 55 | } 56 | */ 57 | 58 | tword = FREQ - 85900; //calculating the low freqency tuning word for AD9850 59 | W[0] = (byte) tword; 60 | W[1] = (byte) (tword >> 8); 61 | W[2] = (byte) (tword >> 16); //convert it to bytes 62 | W[3] = (byte) (tword >> 24); 63 | W[4] = 0; //phase is zero 64 | //start sending with spi interface 65 | PORTB = B10000000; 66 | PORTB = B00000000; //pulse FU_UD 67 | for (int j = 0; j < 5; j++) 68 | { 69 | SPI.transfer(W[j]); //send the word 70 | } 71 | PORTB = B10000000; 72 | PORTB = B00000000; //pulse FU_UD 73 | while(1); 74 | } 75 | --------------------------------------------------------------------------------