Goldwave 6.21 serial key1/30/2024 ![]() Is this right? Excuse me while I read up on RF signals. In hindsight, I feel silly and suspect that it should not have worked: don't TX modules send out a modulated radio signal that is then demodulated by the RX module? If so, then the input pin of the receiving AVR was just getting some useless analog signal instead (and not a digital one). Unfortunately, this didn't work: the receiving AVR didn't flash its LED in response. So, I tried the next step, although I had no idea if this would actually work at first: I re-connected the TX module and wired it back up to the transmitting AVR, and physically connected the antenna output of the TX module to the input pin of the receiving AVR. So, I just modified the receiving program to flash the LED 3 times instead of just once so I could tell the difference. I had to make a slight change, though: since the two grounds were connected, the receiving AVR's LED lit up at the same time as the transmitting AVR's even with the receiving AVR powered down, since the LED output and the TX/RX pins share PORTC. Looks like my port of the Manchester library was fine, unfortunately (I was hoping it was just something simple I had missed). I connected the output pin of the transmitting AVR to the input of the receiving one, and connected their two grounds, and the test programs I posted above worked exactly as expected. If anyone could suggest possible problems, or has any ideas, I'd greatly appreciate it. Is it possible there is 433Mhz interference from somewhere, so strong that my two devices can't talk even if they're right next to each other? Perhaps it's lack of imagination, but I'm having a hard time figuring out what could be wrong. encode an arbitrary ID of 5 and some other arbitrary number, and then transmit itĮven with the devices only centimeters apart, with 17cm straight antennas, the receiver doesn't seem to pick up anything from the transmitter at all. prepare manchester library for transmitting Uint16_t message // the encoded message to send Uint16_t message // the encoded message we receive ![]() )Īnd the simplest version of the receiving ATmega328's code that doesn't work: #include (And because someone will ask: yes, the batteries were in fact plugged in when I tested this. I'm also using an external 8Mhz resonator, which is hard to see. It's tough to see, but the indicator LED is present on PC0 and there is a 17cm antenna coming straight up out of the RX module. The extra cables at the top of the image just go to my programmer. I'm also reasonably confident that I've ruled out any sort of issues with the physical TX and RX modules themselves, as I have two of each and have tried this with all of them, with no success. I've tried unsuccessfully to get this small project to work with the VirtualWire library (again, a version that I've ported to use direct port manipulation without the Arduino stuff) as well. I've removed the serial debugging for simplicity in the code below. The RX module seems to be working as well, as some seral debugging output has revealed that it sometimes picks up RF garbage (but then ignores it, as it should). ![]() I've previously verified with another LED (not shown in the images below) that the output pin for the transmitting ATmega328 is working, based on the fact that it blinks when it should be sending data to the TX module. It appears either as if the TX module isn't transmitting, or the RX module isn't receiving properly. The transmitting ATmega328's LED flashes as it should, but the receiving ATmega328's does not flash in response. This is a pretty simple task so I'm confident that I've done it correctly.Īs far as I can tell, everything's been set up properly.īut.there's a problem. ![]() Since I'm not actually using the Arduino library, I've ported the Manchester library to something simpler that just uses predefined pins and does the port manipulation directly. I'm currently using the Manchester library to handle the preamble/checksum parts of the RF communications. So, they should flash in sync roughly every third of a second, as seen in the code below. ![]() The LED connected to the transmitting ATmega328 flashes with every byte sent, and the receiving ATmega328 should flash in response. My goal at the moment is to get the "transmitting" ATmega328p to transmit a single byte to the "receiving" one, just to get things started. One ATmega328 transmits and the other receives. I've decided to do this using the 433Mhz RF Kit (WLS107B4B) modules and a couple of ATmega328's. I'm currently working on a project that requires some wireless communications. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |