Go Down

Topic: RF communication (Read 102 times) previous topic - next topic

gerald1234

So i have made a very simple arduino rf transmitter and receiver and they are working fine but the result fluctuates. In the image i want it to be the light blue line not the dark blue line is there a quick and easy fix.

Thanks,
Harvey

Paul_KD7HB

So i have made a very simple arduino rf transmitter and receiver and they are working fine but the result fluctuates. In the image i want it to be the light blue line not the dark blue line is there a quick and easy fix.

Thanks,
Harvey
I think you left a few very important facts. Try again to explain what you are doing and what is showing on the graph. Perhaps the problem is in whatever created the graph.

Paul

Geek Emeritus

investigate debounce

get an assortment of capacitors. try an .01 pf, a 1 pf, a 10 pf across the output.... see how that trends
All PMs will be deleted unopened due to arrogant argumentative pot stirring Malfoys.
 If you have not read "How to use this forum - please read", in particular: "7. If you are posting code or error messages, use "code" tags":  expect rude responses

gerald1234

I am using the 433m transmitter and receiver and they are just wire to the Arduinos with no resistor and I am just using Serial.println(analogread(A9)) on a mega

DrAzzy

#4
Apr 01, 2019, 10:23 pm Last Edit: Apr 01, 2019, 10:31 pm by DrAzzy
433MHz receivers - assuming you're talking about the OOK/ASK ones like those cheap green ones - give digital output, and the signal you're listening for needs to have approximately 50% duty cycle on/off when transmitting (over timescales of a few milliseconds). Those devices use automatic gain control to adjust the gain and threshold to have an approximately 50% dutycycle on the output, and if you leave the transmitter on or off for more than a few milliseconds at a time, the AGC adjusts to where it's amplifying noise so it gets a 50% duty cycle. This also means you need a recognizable pattern sent, that the receiver can pick out when it comes with a background of noise on either side. Often OOK transmission schemes will use a "training burst" of 50% duty cycle at the start of a packet, resend the packet repeatedly - most often both. And the receiver code needs to be clever about interpreting the signal - you end up with something akin to morse code, plus a checksum.

For sending data via those type of modules, use a library like RadioHead, which has done all this hard work for you - don't try to reinvent the wheel from scratch, especially not if you're new, which it sounds like you are.

Personally I made my own scheme for transmitting using them, but I don't recommend that except as an academic exercise. Initially I didn't balance the duty cycle well, sure enough, certain bit patterns would break it.

Also, as I've said here ad nauseum - get the RXB12 or RXB14 receiver modules off ebay if you're going for long range. They're under $2/ea, and get much better range than the cheap green receivers, and work at 3.3v (you would otherwise treat them identically to the green ones - they just get about 10x the range)
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up