Pages

Sunday, 18 February 2024

Serial Data Transmission with RF - Improved Hardware and Range Testing

A better receiver is justified. 

The build quality of these super regenerative receivers, like most of the Aliexcrement or Crapbay stuff from China, is woeful and I have little confidence will work on an extended basis. I had two receivers. After getting them working due to manufacturing faults one stopped working again very quickly. The second unit works but appears to suffer from dry joints because the performance is inconsistent.

During development I discovered that the receiving module is a super-regenerative type. I was able to confirm, as expected, that it generates noise on 433.2MHz which prevents multiple receivers from being located close together. But the biggest concern I have is temperature stability. While it doesn't matter so much when located in-side a house, it does have implications for being located outside. As ambient temperatures change, say from 0 Celsius to 35 Celsius, the frequency to which the receiver is tuned will shift. That will reduce the sensitivity since the transmitter is in comparison stable. So not only do receivers need to be physically spaced apart they also need to be in a relatively stable temperature. 

Search for 433MHz receiving modules on your favourite site and there will be plenty to chose from. Get one with a crystal like this one and you should be far better off for the few extra cents.

 


However, not all modules work. The one pictured above was purchased from LCSC. A mediocre datasheet did not help get it working. A typical decoded data stream is shown below:



I gave up trying to work out why these didn't work when the second one I pulled from the packet had an aerial that was swinging in the breeze.  My suspicion is the data rate was too fast for the receiver chip.

I trawled my junkbox and found another receiver module. The MPN was RX520. Like the module discussed above, the output also tended to idle in a high state. So I altered my code slightly to account for this.

Then, in a real twist, I discovered that the for this second superheterodyne module the first pulse following the start pulse is slightly longer than you would expect. Perhaps an artifact of AGC action since logging strong pulses and weaker pulses showed a clear difference. This is not an ideal situation. However, adjusting the 1/0 threshold allowed range testing to begin.

A preliminary range test was made. The transmitter used a vertical antenna, but no ground plane, and was located on the ground. The receiver used a 13cm piece of wire. Neither was ideal. But this combination would work reliably at 35m line of sight when no interference was present. The interference was evidenced by the flashing led cycling on and off correctly for up to 4 seconds, then it would "freeze" for a random length of time before working again. 

On balance I'm satisfied with the result. I have a list of further potential enhancements which might improve the robustness of a link. My first real application may not require them so I'll push on with that application.



Monday, 12 February 2024

Testing Anko CR2032 cells in Joule Smasher Led Flasher - Update 1

 

It's now been 3.5 days and the Anko CR2032 cells appear to be a good purchase. The cell voltage has dropped to 3.073V. The used cell hit this voltage after 2.1 days and went on to last for 104 days. 

Since the worst of the no-name rubbish from Crapbay lasted 21 days I'll leave it a till then before publishing a further update. At that stage the graph comparing the 4 tested CR2032 cells should be striking.

However, initial results are so good that I today installed one of these cells in the car remote. I'd been holding off because car remotes are not designed to be popped apart too often.

4 Pack Button Cell Batteries - CR2032 - Kmart

Sunday, 11 February 2024

Serial Data Transmission with RF - Range Testing


To recap, I now have a receiver with very little noise on the data out pin between actual packets. I have a transmitter alternatively sending two characters 500ms apart. And I modified the receiver board to toggle a LED depending on which character was received.

My thinking was that I could walk away from the transmitter and watch for the LED to start blinking erratically or cease blinking at all. Then I could make some changes and see if the range got better or worse.

I had done something similar with nRF24L01 modules some years ago and that had convinced me 2.4GHz wasn't suitable because in real life the range was too short to be useful.

My initial test showed a range of only 11m across the workshop. The decoding was reliable right up to the doorway. The following day I put the TX unit on the ground near the door and the RX unit back on the bench to look at the data stream. Rock solid. So I iteratively moved the transmitter out of the workshop. At the property boundary it was now, according to Google Maps, 27m from the receiver and down a decline. But still in a direct line through the doorway.

The blinking was steady indicating no errors. 

 

What is noticeable is that as the signal strength drops with increasing range the pulses get narrower. 

The edge of range was when the transmitter was about 32m from the receiver and now screened by the workshop wall. At this point the light began blinking erratically. Looking at the received data stream it was obvious why this was. 


The pulses were getting so narrow that either the start pulse is outside the allowed range weak or, as seen from the second last pulse above only just hitting 2V, the pulses are not hitting a logic high level.

A quick check: Assume Vcc=3.7V. Logic high for the micro is say 70% of Vcc or 2.59V. The LM358 can swing to perhaps 1.2V of Vcc, or 2.5V. So logic high is not being met. 

At 5v the problem goes away. 

Three possible fixes: 

  1. Replace the LM358 with a R2R output opamp.
  2. Add a pull-up resistor to the data line.
  3. Use two LiPo batteries and the onboard regulator.

The third option is expedient for range testing purposes but adding a pull up resistor is no harder and maybe relevant to a battery powered receiver.

I added a 10k resistor from the data line to Vcc and the high logic level is now being met. I didn't persist with this because the following day when I went to do the range testing the noise was again present. Given the hardware issues with this receiver model I decided to suspend work since I now have a better receiver board.

 

 

Footnote for those landing here via Google Search:

My suspicion is that a lot of people trying to get these receivers to work on a LiPo battery had issues with this. This problem is exacerbated when both the ATMega and Rx unit are running at 3.3V. So if you landed here trying to work out why your Arduino project isn't working now you have a hardware issue to consider.