HC-12 vs nRF24L01 modules

Thread Starter

Robin66

Joined Jan 5, 2016
275
Hi circuiteers

I'm wondering if anyone has any insights of HC-12 vs nRF24L01. I have extensive experience of the former and none of the latter (although I've skimmed thru the datasheet). From what I've just researched:
  • Range of HC-12 is better (owing to lower frequency)
  • Similar size pcbs but nRF24L01 is a *lot* cheaper and has better datasheet.
  • nRF24L01 is more bare-bones. HC-12 has wrapped up config access via commands.
  • HC-12 has in-built power-saving modes (AT+FU2) whereas these would need to be implemented by the user for nRF24L01
Re. the last point, I noticed that FU2 mode is implemented as a 500ms pulsed check-in. The same could be done for nRF24L01 by waking from PowerDown every 500ms and listening to Rx briefly.

Are there any other draw-backs to nRF24L01 vs HC-12? I'm considering dipping into nRF24L01 so I can tailor the pulsed operation to my requirements but I'm sure other people have experience of both so can give better perspective. Any tailored pulsed operation of HC-12 is not viable due to the long delay required to wake from SLEEP, whereas nRF24L01 wakes from PowerDown in 1.5ms.

I've already seen this thread. yes the range of HC-12 is great thru walls to a shed at the end of the garden. I don't know how nRF24L02 would fair in this scenario though https://forum.allaboutcircuits.com/threads/hc-12-or-nrf24l01-pa-lna-module.137414/
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Robin,
I did try using the NRF24 on my project, the limited range was very disappointing, tried various antenna's, to no available.
It would not reliably operate thru one single brick wall over a range of ~5mtrs.
IMO programming it is an absolute pain for the getting a simple job done.

So I decided to use the HC12 and its been running for over 2 years with minimal problems.

E
Check this AAC link
https://www.allaboutcircuits.com/search?q=nrf24

Read page2 of this PDF,
 

Attachments

Last edited:

Thread Starter

Robin66

Joined Jan 5, 2016
275
Oh wow, dropping out thru 1 brick wall and a few metres doesn't place it in the same league as HC-12 in terms of range. That's a shame. I assume you were using the highest power setting. Thanks for the pdf too.
 

Thread Starter

Robin66

Joined Jan 5, 2016
275
This is an interesting case study. The OPer doesn't say if the 150yard range finally achieved is still in a house/office environment. It'd be a very big house/office if so.

https://forum.allaboutcircuits.com/...lification-power-anything-else-to-try.118829/

The thing that I find frustrating with the HC-12 is that the minimum ping time is 60ms (30ms each leg), and the minimum packet size of 16bytes (discovered by monitoring the tx current consumption while varying the string length). This means the airwaves quickly become congested if I have lots of peripherals regularly sending info back to a hub. If I already have code to do acknowledgement and auto-retry then swapping out a HC-12 module with nRF24 is just a matter of config. eg. HC-12 might have a 99% hit rate thru the house, but even if nRF24 has a 5% hit rate and a 2ms ping, if I have to retry 20 times that still beats HC-12.
 

Janis59

Joined Aug 21, 2017
1,834
I havent any experience with HC12, but I know the nRF and LORA, both well going about 100 m afar intra-facory environment (many walls, many heavy machines etc) and about 1 km in free field (Lora 3 km with 3 element Yagi). The crucial difference is that with our battery one is working about 2 years and another near to 5 years, sending a packet once a minute. But the battery must be paralleled with supercap, because the pulse current demand is rather high.
 

Thread Starter

Robin66

Joined Jan 5, 2016
275
100m in that enviroment is very impressive. I don't understand why @ericgibbs could only manage 5m thru 1 brick wall. I've bought some modules on amazon and am trying for myself. I'll report back when I've got it working. I'm translating a mikroc library to xc8 at the mo
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Robin,
When you are ready, I would be interested in seeing the results you get with NRF24.
I suppose it it is just possible the 6 off NRF's I bought from China, may not be upto specification.?
E
 

Thread Starter

Robin66

Joined Jan 5, 2016
275
yeah it's possible. I've been stung by dud HC12 modules before. I'll report back when I have a link working. Realistically I hope it'll be mid-next week
 

Janis59

Joined Aug 21, 2017
1,834
Robin, the Lora is most mighty of through-beating except the lower freq bands. We installed the monitoring system in certain plant where megawatt-scale power generators are mounted into metal-sheet wagons. I said - it never will work, there are clear Faraday cage with no gaps. And I was untrue, yet signal was so low as 1 in scale of 10, but smallest gaps for cable inlets and door knobs was enough to work rather OK in nearest 10 meters distance where we mounted the repeater module gathering from all 4 wagons, each full of multiple sensors. And it all by very very far from ideal S-form pcb omni-antenna. Cannot tell by whole sure, but I think that multiple reflections into the cage gets a least hole, what is so turning to become a secondary radiator.
 

Thread Starter

Robin66

Joined Jan 5, 2016
275
@ericgibbs, I've got a simple Tx Rx pair working now, picture below. The Tx pcb is static in my office and transmits a single packet "abcde" every 100ms. The Rx pcb is mobile and constantly listens on the same channel/address. If it picks up a message that exactly matches "abcde" it will turn on an LED for 90ms. Therefore if I get 100% of packets I see a 10Hz flicker with a 90% duty cycle. I've turned off the auto-ack and auto-retry logic.
These are my findings:
  • On the lowest power level (RF_PWR=0) the link is good ~100% within the same room (4*4metres) and it's good through a 2 course brick wall within 2 metres. It drops off quite rapidly if it get away from the room.
  • On the highest power level (RF_PWR=3) I can't quite reach the end of my garden thru a 4 course brick wall. It seems to cut out at around 20metres
  • The success rate is highly dependent on positioning. At 20metres I'd get nothing at all in one position, then move the pcb 10cm to the left and get ~100%. However I couldn't get anything at all at 30metres regardless of positioning
  • Noise on Vdd will kill the link. For my Rx pcb I started with a +3.3v boost converter so I could use a single AA battery. However the reception was very poor (<5% success) even on the same desk. I checked the ripple on the +3.3V output and it was ~50mV even with large caps. I could have tried an RC filter but instead I switched to 2*AA giving ~3V and it fixed the issue.
You can see that I just got the modules with a pcb antenna. They also sell the same chip but with a low-noise amp and a proper antenna. I'm tempted to get one of these for the static pcb and try again. I expect this to reach the end of my garden easy.
nRF24L01.jpg
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Robin,
Thank you for posting those results, interesting effect, when comparing a light ripple supply against a battery supply.
Regarding position moving a module 10cms giving good/bad RX results, I observed a similar effect.
Sometimes as I was just moving myself within the same room, the RX would give good/bad results.

Pleased to hear that you have a workable project, what is the application.?

Eric
 

Thread Starter

Robin66

Joined Jan 5, 2016
275
Home alarm with remote motion and temperature sensors, talking to a central hub. I'm hoping to hook more and more peripherals to it to expand it's functionality to control the central heating and things like that.
 

Thread Starter

Robin66

Joined Jan 5, 2016
275
The nRF24L01+PA arrived today and as expected it has fixed the range issue. I only swapped out the module for the static tx unit. The mobile rx was still using the basic nRF24L01. I can now pick up ~50% of packets at the end of my garden, so that's 30metres + a thick wall. It is still dependent on positioning but less so than before.
nRF24L01+PA.jpg

I got some HC-12's from AliExpress that I'm playing about with. These boards look good quality. In the past I have definitely got HC-12's talking to the end of my road, so that's ~80 metres + several brick walls. But I can't achieve that with the new batch of HC-12s. I'm only managing ~10-20 metres and a couple of walls. But I can't remember if I was previously using a 17cm wire antenna or the helix antennae (I've read a few places that the latter a waste of time if you want range).
 
Last edited:
Top