trastikata
Member level 1
- Joined
- Apr 28, 2007
- Messages
- 36
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Activity points
- 1,631
USART transmission through OOK RF Module and MCU ADC as noise rejection filter
Hi,
Just wanted to share my project and solution for coping with the noise in OOK RF modules. Not sure if this was discussed before and certainly someone thought of this long before me
but I couldn't find much of information on-line, so it still might be useful to someone.
I had a project that needed an RF transmission (1000 bps) through an OOK module. What I found out is that the receiving modules adjust their gain too fast and start picking noise
when the carrier is off for transmitting two or more consecutive 0s. Where 1s are being received without problem as long as there isn't another transmitter in the immediate proximity.
So instead of reading in the middle of the transmitted bit I coupled the module output to the 12 bit ADC input of the MCU and I read approximately 80% -90% of the bit length. With 5 uSec
acquisition time I can average 16 readings per bit for 1000 bps transmission. So I give an arbitrary threshold value where everything less than it is considered 0s and more than that as 1s.
Since false positive in a "0" is much more probable than a false negative in a "1" you should calculate the value closer to the "1".
In my case this is 780 bits (I invert the module output through a MOSFET for voltage conversion) as it corresponds to 2.5 false negative readings for every "1" transmitted and 13.5 false positive
readings for each "0" in a 12bit ADC.
This of course will require higher speed MCU and better timing synchronization but it is easily achievable with modern MCUs.
In my project I used Lynx Technologies OOK module and PIC MCU.
Tips:
- The subroutines for this are quite fast - and don't require much of a processing time. To avoid division simply accumulate 2n ADC readings and right shift n bits.
- Don't use faster ADC times and/or higher number of ADC readings but spread the readings through the entire bit length so you can have better chance to catch the noise.
- An appropriate preamble and MCU hardware timers give excellent timing
- Instead of an ADC port you can use any digital port and check the state several times but with an ADC port and longer acquisition times you have better chance to pick up
level transitions, hence better chance for noise rejection.
Hope this helps in your projects.
Regards
Hi,
Just wanted to share my project and solution for coping with the noise in OOK RF modules. Not sure if this was discussed before and certainly someone thought of this long before me
but I couldn't find much of information on-line, so it still might be useful to someone.
I had a project that needed an RF transmission (1000 bps) through an OOK module. What I found out is that the receiving modules adjust their gain too fast and start picking noise
when the carrier is off for transmitting two or more consecutive 0s. Where 1s are being received without problem as long as there isn't another transmitter in the immediate proximity.
So instead of reading in the middle of the transmitted bit I coupled the module output to the 12 bit ADC input of the MCU and I read approximately 80% -90% of the bit length. With 5 uSec
acquisition time I can average 16 readings per bit for 1000 bps transmission. So I give an arbitrary threshold value where everything less than it is considered 0s and more than that as 1s.
Since false positive in a "0" is much more probable than a false negative in a "1" you should calculate the value closer to the "1".
In my case this is 780 bits (I invert the module output through a MOSFET for voltage conversion) as it corresponds to 2.5 false negative readings for every "1" transmitted and 13.5 false positive
readings for each "0" in a 12bit ADC.
This of course will require higher speed MCU and better timing synchronization but it is easily achievable with modern MCUs.
In my project I used Lynx Technologies OOK module and PIC MCU.
Tips:
- The subroutines for this are quite fast - and don't require much of a processing time. To avoid division simply accumulate 2n ADC readings and right shift n bits.
- Don't use faster ADC times and/or higher number of ADC readings but spread the readings through the entire bit length so you can have better chance to catch the noise.
- An appropriate preamble and MCU hardware timers give excellent timing
- Instead of an ADC port you can use any digital port and check the state several times but with an ADC port and longer acquisition times you have better chance to pick up
level transitions, hence better chance for noise rejection.
Hope this helps in your projects.
Regards
Last edited: