HC-11 and HC-12 transceiver modules

Jeremy Harris

Senior Member
At the moment, the HC-12 tool doesn't return any indication that the programming has completed, other than the button returning from greyed out to normal. The check configuration button will show the actual settings, reading them from the module.

The error messages are internal glitches in the tool, that stop it sending the next command in sequence, unless the error is cleared by clicking "OK". I don't know for sure, but I'm guessing that the tool is parsing the expected return string, say "OK+B1200" as the response from an HC-12 to the command "AT+B1200". If it gets that string, it then sends the next command in the sequence, if it doesn't get that string it halts and flags an error, only continuing when the error is cleared manually.

It's probably fairly straightforward to change the expected strings for the HC-11 to be "OK-", rather than "OK+", I suspect.
 

neiltechspec

Senior Member
Tried that latest version (v4) of the HC-12 config utility.

It fails to communicate with the module - no response at all.

The previous one, Version 2, works ok.

Neil
 

robert.rozee

New Member
Tried that latest version (v4) of the HC-12 config utility.
It fails to communicate with the module - no response at all.
The previous one, Version 2, works ok.
Neil
are you 100% sure you had the SET pin tied to ground? in order to guarantee the module is in AT command mode at 9600 baud, it is necessary to have the SET pin tied low (and to remain so) when power is applied to the module. if the SET pin is grounded after power has been applied, the module will not switch to 9600 baud if a different baud rate has been previously selected. this is detailed in the user manual.

the only real difference in the "Release 4 (25-may-2016)" version of the HC-12 utility is that a 20mS delay has been added between sending out command strings when doing a check or send configuration. this is implemented as a call to the windows SLEEP function, which in theory should not interfere with communications with the module.

the HC-11 utility does indeed expect OK+ instead of OK-. but there is also something else wrong, in that the responses reported should not be a blank <>. i'm still thing about this problem. unfortunately i don't have an HC-11 module to do testing with.


cheers,
rob :)
 

neiltechspec

Senior Member
Of course I had the set pin grounded.

I made no physical changes between attempts.

Version 2 works, version 4 doesn't.

Neil.
 

robert.rozee

New Member
HC-11 and HC-12 transciever modules

try the attached (revision 5). this has the delays between sending commands disabled, and the maximum channel number (when unlocked) bumped up to 254. this will allow the firmware to try to operate the Si4463 transceiver at up to 534.6MHz - no guarantees that it will actually work at this frequency!


cheers,
rob :)
 

Attachments

Jeremy Harris

Senior Member
Release 4 works PERFECTLY for me on an HC-12, no problems at all. I've just checked 5 HC-12 modules, and they all programmed and checked the config OK. As a double check I clicked the "HC-12" logo in the utility and get a pop-up that confirms that the utility is, indeed, release 4 (25th may 2016)

I'm using an old Windows XP netbook with a Sparkfun FTDI Basic as the programming device, as in the photo earlier in this thread. I can confirm that the new version was also working on a Windows 7 desktop with the same lead and adapter when I tried it a day or so ago.
 

neiltechspec

Senior Member
Ok Rob,

Tried your release 5, works fine, as does release 2 of course.
Release 4 still doesn't work for me though.
Haven't tried the higher freq's though. But as I am using 434.6, that doesn't matter for me.

I'm running Windows 7 Ultimate 32 bit.

Neil.
 

robert.rozee

New Member
excellent. now, can someone with an HC-11 module please try the attached new version of the HC-11 utility? timing delays (via SLEEP) have been removed again, although each read from the module has a 300mS timeout, and responses are expected to start with "OK-".

cheers,
rob :)
 

Attachments

Jeremy Harris

Senior Member
excellent. now, can someone with an HC-11 module please try the attached new version of the HC-11 utility? timing delays (via SLEEP) have been removed again, although each read from the module has a 300mS timeout, and responses are expected to start with "OK-".

cheers,
rob :)
Very many thanks Rob, this works PERFECTLY with my HC-11s and the FTDI cable. This test was just run on the only Windows machine I have up and running at the moment, a 64 bit Win 7 desktop, probably around 3 years old.

Very many thanks for the work you've put in to fixing this utility, it's very much appreciated.

Best regards,

Jeremy
 

manuka

Senior Member
Jeremy et.al: Rob is indeed to be applauded! All part of us helpful Kiwis still springing to it when old Blighty calls the Empire of course. Butter then, software now - both readily spread! I've resisted meddling with the WW1 era poster to show an RF IC on the plate.

That channel extension tweak to ~530 MHz may have appeal if the RF internals hold up. At least here in NZ (& hence possibly Australia) diverse UHF SRD (unrestricted Short Range Device) free spots abound, often allowing higher power too. Refer=> https://gazette.govt.nz/notice/id/2016-go446

The edited extract below reveals full HC-12 power of 100mW is allowed in NZ on HC-12's Ch. 95 or 96, with a "paint blistering" 500mW legal on HC-12 Ch. 64. Naturally 500mW is beyond the HC-12 TX power output though!

In NZ at least, changing from NZ's legal 25mW on HC-12 Ch. 1 to 100 mW on Ch.95/96 (a x4 power increase & thus a 6dB system gain),means the working range should effectively be doubled. Stan.
 

Attachments

Last edited:

lbenson

Senior Member
can someone with an HC-11 module please try the attached new version of the HC-11 utility? timing delays (via SLEEP) have been removed again, although each read from the module has a 300mS timeout, and responses are expected to start with "OK-". rob :)
I also have successfully programmed 2 HC-11s with the new version, reporting as V1.9.

Also programmed new HC-12 with older HC-12 version.

From time to time I get "Serial I/O error: CreateFile failed". With one usb/serial adaptor I couldn't get past this. With another, reporting as Prolific but of unknown authenticity, I was able to program both modules but on retrying later again got the "Serial I/O error" with both HC-11 and HC-12 utilities, and couldn't progress.

I'd like to add my thanks for your work on these two very useful utilities.
 

robert.rozee

New Member
From time to time I get "Serial I/O error: CreateFile failed". With one usb/serial adaptor I couldn't get past this. With another, reporting as Prolific but of unknown authenticity, I was able to program both modules but on retrying later again got the "Serial I/O error" with both HC-11 and HC-12 utilities, and couldn't progress.
an interesting result, at that point the code has just attempted to convert the comm port name into an open device handle using a standard windows API call:

CommFile:=CreateFile(DeviceName,
GENERIC_READ or GENERIC_WRITE,
0, Nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, 0);
if (CommFile=INVALID_HANDLE_VALUE) then ...

attached is a version of the HC-12 utility that will print out extended information about the device name - this may be of some help in diagnosing what is going on. my feeling is that most likely the USB to serial bridge is 'dropping off' the bus, either through a problem with the drivers (possibly a 'fake' device being detected) or an intermittent physical connection/damaged connector.

over the years there have been issues with both FTDI and prolific drivers attempting to detect clone/fake hardware and either outright rejecting it, disabling it, or deliberately operating in a flakey fashion. my preferred solution to this is to stick with SiLabs CP2102 or chinese designed CH340G. both seem to have solid drivers, no issues with clones/fakes, and can be obtained on eBay for just a few dollars (including shipping to your doorstep).


cheers,
rob :)
 

Attachments

lbenson

Senior Member
attached is a version of the HC-12 utility that will print out extended information about the device name - this may be of some help in diagnosing what is going on
Thank you for your efforts to debug this problem (which could be unique to me, so I wouldn't spend much effort on it). I tried various combinations of unplugging / moving / replacing the usb/serial module, and was unable to replicate the problem.

All the HC-11 & HC-12 devices which I wanted to program have now been programmed by your utilities, so I have no current problem.
 

PhilHornby

Senior Member
100mW allowed @ 458.5 - 458.95 MHz?

This document (Page 29) implies that up to 500mW can be used (in the UK) between 458.5 MHz and 458.95 MHz (IR2030/2/7). It seems to be known as MPT1329 (ETS 300 220). I found other references here, here and here.

Channel 64 is 458.6MHz and falls in that range, so can I use the HC-12 at full-power if I use that channel? (I suspect I know the answer, but would be good to have it confirmed...)
 

PhilHornby

Senior Member
458.05 - 458.95 MHz

Permitted yes, if the HC11 and HC12 have been tested against and comply with the standard, have they ?
I have no idea. I can find no certification at all for either the HC-12 as a module, or the Silicon Labs IC upon which it is based. The 433.05-434.79 MHz band @ 10mW seems to require compliance with exactly the same standard, so on that basis, I may as well be "hung for a sheep as a lamb" :p (I can't say I've encountered any standards certification for any of the 433MHz modules I have used, or encountered in commercial products...)

On the technical front, how much does the FSK modulation technique alter the frequency by, and if it is enough to take it outside of 458.05 - 458.95 MHz (from the centre freq. of 458.6 MHz), would that be deemed non-compliant?

Incidentally, I'm not looking to communicate over vast distances - I'm looking to get a signal to travel reliably through the 20" rubble-filled walls of a granite cottage. I'm currently using class-2 Bluetooth (4dBm/2.5mW) HC-05 modules. These have a range of only 3m or so, if one of these walls is in the way.
 

MFB

Senior Member
Have you considered using the, admittedly more expensive, LoRa modules for punching through walls?
 

PhilHornby

Senior Member
What? Spend more money than I have to ?!? - I'm a Yorkshireman you know :D

On a serious note: part of the HC-12 appeal, is that I think I can make an adapter to use it as a plug-in replacement for the HC-05. The only hardware changes I'll have to make, seem to be the removal of the level-shifting resistor network on RXD.

I've done some testing, and 8dBm (6.3mW) almost does the job, but still leaves one or two dead spots. Switching to 11dBm (12mW) goes right through the house (3 walls), and way up the garden. Only after entering an outbuilding, did I start to find its limits.
 
Last edited:

Jeremy Harris

Senior Member
Although the power limit is 10 mW, and that is, strictly speaking, the input power to the antenna, the small helical antennas that are supplied with these modules will be pretty poor, so the ERP will be lower than 10 mW with a +11dBm input, I'm sure. Personally I'd not get too wound up about being 1dB over the legal limit, unless it was for a fairly continuous transmission. For just short data bursts I doubt that there would be any problem to any other service.

I've lowered the power on my remote switch from +20 dBm to +11 dBm one end and 8dBm the other and the range still seems to be amazingly good, whereas at +8dBm both ends it drops a great deal, more than a 3dB reduction would seem to suggest. This makes me wonder whether the +8dBm setting is really that accurate, or whether the power is really lower, as the range variation from +20dBm and +11dBm seems about right, but the range reduction from +11dBm to +8dBm seems to be greater than I'd have expected.

One trick I've used on the remote switch is to use the small helical antenna on the small remote unit, at +11dBm, and a 1/4 wave on the larger fixed unit at +8dBm. This works well, and means that the indoor transmitter is unlikely to create any interference, as even though it's 1dBm over the limit, the signal is attenuated through the building, so the field strength outside is a lot lower than that transmit power might suggest. The outdoor unit is fine at +8dBm, well inside the legal limit.
 

neiltechspec

Senior Member
Although the power limit is 10 mW, and that is, strictly speaking, the input power to the antenna, the small helical antennas that are supplied with these modules will be pretty poor, so the ERP will be lower than 10 mW with a +11dBm input, I'm sure. Personally I'd not get too wound up about being 1dB over the legal limit, unless it was for a fairly continuous transmission. For just short data bursts I doubt that there would be any problem to any other service.
That was exactly my thinking as well.

Running 3 X remote transmitters @ +11dbm and 1 local receiver, sending 16 bytes at 9600 baud every 60 seconds.

Neil.
 

manuka

Senior Member
I've been away for some time, & thought the HC-11/12 thread would be livelier by now! Any developments?

Has anyone played with the "all in one" HC-12 USB module (pictured below)? It's approx. twice the price of a bare HC-12, but direct USB linking & inbuilt idiot lights may make it handy for setups. Of course it could suit direct PC or Android (via OTG = "On The Go") display or base device web linking. If no one else has given them a whirl I'll order & report back.

And in response to a local's need for a USB-UART config. converter I ponder this US$3 CP2102 based offering. It's flying leads look to make for versatility ! My recommended HC-12 supplier, SatisfyElectronics, offer similar at under US$2 each (c/w free intl. shipping). Theirs is PL2303TA based however, & although the likes of Amazon user reviews are good,QC soldering woes have been reported. Of course at such near trivial prices counterfeit Prolific chip concerns also arise...

EXTRA: HC-12 spectrum scan attached FYI. This was screen grabbed in haste some months ago, & to my shame I neglected to credit the source... Stan.
 

Attachments

Last edited:

neiltechspec

Senior Member
They are very easy to use, especially with that config utility from Rob Rozee.
I'm quite impressed for the price. £16.75 for 5 HC-12's, arrived quite quickly - 8 days.

Using HC-12's.
I'm currently doing a battery test with them, using different battery set - ups & PICAXE08M2's.
All 3 TX's are using the supplied Helical ant, for the RX i'm using a 1/4 wave whip.

The TX's are running mode FU-3, 9600baud @ +11dbm and also have small cheapo PIR's, send battery voltage every 60 seconds +
any PIR triggers. They are built into old PIR housings. HC-12's are put into SLEEP mode when inactive.

1 - Running off 3 Duracell AA's, started off at 4.74v
2 - Running off a 2600maH 18650 LiPo, started off at 4.14v
3 - Running off a 1430maH new & unused iPhone 4s LiPo, started off at 4.14v

1 & 2 have been running for 12 days now.
1 is down to 4.12v from 4.74v.
2 is down to 3.89v from 4.14v.
3 has only been running for a day (following timing changes with code, reduced the post TX delay to 100ms from 250ms on 1 & 2).

No 1 is in the garage, approx 30m away through 2 brick walls.
No 2 is close to 100m away in a neighbours garden.
No 3 is in the house, probably only about 10m away.

Neil.
 

manuka

Senior Member
Neil: Great, but please let us know the resting & active ( transmitting) current draw too! Is the controlling PICAXE in it's best SLEEP state ?

At first glance these flagging voltages imply quite a solid drain. With ~0.5V fall in 10 days the steady supply drop Duracell AAs may only last another few weeks. You'd really want better than this I'd say, as the setup may be dead just as the local zombies start milling around !

Consider a simple PV charging a rugged 3.2V LiFePO4 instead ? Stan.
 

neiltechspec

Senior Member
HC-12 is transmitting 16 bytes @ 9600 every minute, so awake for approx 200ms in every minute, then Sleep mode for the remainder.
Picaxe is never asleep because it's looking at the PIR and running at 16mhz for reliable 9600 I/O. Yes I could use HSEROUT at 4mhz.

As for current draw when transmitting, I have no idea, as I have nothing that can measure it over such a short period of time.

I'm sticking with LiPo's from Sanyo/Panasonic/Sony as 3.2v is really below the supply threshold for the HC-12 & PIR with their on-board 3.3v LDO regulators.
I never discharge LiPO's below 3.5v per cell.

Just my opinion of course but, LiFePO4 cells don't give very good capacity for size, + all seem to be Chinese, way more expensive and rare in the UK.

I should add, when battery voltage drops to below 3.5, a low battery message is sent then HC-12 & PICAXE both go to sleep.
This is easy enough to monitor for in the RX S/W. Also the regular 60 sec message does contain the battery voltage.

Neil.
 
Last edited:

neiltechspec

Senior Member
Yes, but sufficient time has to be left for actually sending the data and internal housekeeping, otherwise it clips characters (found by trial & error).
 

PhilHornby

Senior Member
So, presumably 20mS (or thereabouts) to load them into HC-12's on-board controller ... but then no real means of knowing when it successfully transmitted them to the far end (or at precisely what baud rate). I guess it wouldn't end well if you send AT+SLEEP before it's completed the whole process...
...perhaps adding a reply message could speed it up?
 
Last edited:

neiltechspec

Senior Member
From the translated data sheet, for FU3, 4-80mS transmission time delay.
So allowing 20ms for serial data then 80ms for HC-12 to process it - I give it 100ms total.
Sending AT+SLEEP does clip characters if you don't allow enough time before entering sleep mode,
then 40ms required after taking SET low to enter command mode, 80ms delay required after exiting command mode.

It soon adds up.

Neil.
 

manuka

Senior Member
UHF CB walkie talkies differ from data modules, but they've similar electronics and receiver sensitivity to modern data modules.

The point is that if you can't get much NZ bush "grassroots" penetration with their higher power then you will probably totally fail with the flea-powered 433MHz data modules.

Trust you are up with logs & dB? Radio theory says that if other things are equal every x4 power boost (6dB) doubles range. A 500mW 470MHz walkie talkie is x20 the power of a 25mW 433 MHz data module.

Although this seems pretty beefy the approx 13dB difference means the walkie talkie may have only about 5 times the range (12 dB would be x2x2= 4 times range )

If you get 100 metres in NZ bush with basic voice walkie talkies you may only get 20 metres with data modules!

A local "walk the talk" verified the sense in this, & gave ~140 metres for 500 mW walkie talkies & approx. 30+ meters for the 25 mW HC-12 (set on max sensitivy & slowest data rate) under the same test conditions.

Even a grunty set of several Watts will only be 100 times more powerful. This is 20 dB so it means double x double x double or approx 8-10 times the range if a 25 mW data module.

Us humans can often "fill in" marginal analog. links while data may be lost entirely. Digital TV is all or nothing these days, while older analog TV could still often be viewed thru the "snow".
The above relates to ongoing e-help for a Kiwi student working on a NZ bush smart rat trap project. He intends using HC-12 but is expecting too much of them I feel. Naturally LoRa&#8482; would be near ideal, BUT the easist LoRa&#8482; modules blow the project's budget &/or his e-skill level ...

Our Kiwi "bush" is far denser than EU/UK/US woodlands & approaches tropical rain forest jungle. (Luckily we've no snakes. bears, monkies. leeches etc to bother us, although insects, rats & possums can however be an eco nightmare.)

This NZ smart rat trap (IoRats?) wireless application is very "grassroots" by it's very nature, but yours may involve punching thru' solid walls of Norman flints, or IoT monitoring a bunkered wine cellar. Whatever- before spending time & energy (on even well priced HC-12 modules) best do a proof of concept with a couple of locally legal modern 440-470 MHz PRS "walkie talkies". Yes the old "Hello mum can you hear me/Testing 1,2,3" routine with a mate at the other end. These handhelds are almost throwaway items now - the remarkably good performance & sensitive Digitech ones pictured cost ~US$20 each.

Summary: What I'm trying to stress -sigh- yet again (particularly to those seduced by 1000 metre range claims) is that low power UHF setups (especially if NOT elevated) in dense vegetation, obstructing buildings or blocking terrain etc may have very short range. Walk the talk & site check first !

Stan.
 

Attachments

Last edited:

manuka

Senior Member
Most of my HC-12 orders here have been via satisfyelectronics, with delivery within 4 days of on line order. This crowd is not only perhaps the cheapest (approx US$10 a HC-12 pair), but they also give free global p&p.

FYI - NZ/China have a free trade agreement that enormously eases import/exports. China is now NZ's largest trading partner. Stan.
 

PhilHornby

Senior Member
Spring is in the air...

Helical antennas can be 'troublesom'e' as they are easily knocked off resonance.
Yes - I just discovered that! ...

I intend replacing the HC-05 Bluetooth modules in an existing project, so my first step was to build a simple 'gateway' device (Completely passive, TX-RX, RX-TX). It worked well in initial testing, but I started to hit problems when I increased the distance between the HC-12 pair. I currently only have 2 HC-12s, which made understanding the issue somewhat difficult, coupled with the fact that I couldn't be in two places at once :p

What was happening, was that data was travelling in one direction, but not the other. I wasted quite a bit of time, assuming it was some sort of timing issue, when it was actually down to the installation of the helical aerial.

My initial feasibility study had used a vertical setup like Jeremy's (See here), whereas most configurations I've come across on the web, have the 'spring' in a horizontal position, like this: Untitled.png

I thought I'd come up with a fantastic, compact arrangement: Prototype.jpg but range definitely suffers. As I mentioned, with only two HC-12s I can't really tell if it's the Transmit or Receive function that is affected, but the problem went away the minute I moved the spring through 180º. (That board is a prototype, and is intended to make the HC-12 pin compatible with the HC-05. My finalised PCBs are apparently in the post).

I'm currently using Channel 64 (458.6MHz @ 11dBm), so no doubt that spring isn't ideally sized. If 20 turns is correct for 433MHz, do I just trim it to 19 (18.9) turns for 458MHz?

I also came across this intriguing product: ANT-458-SP which is ever so slightly wider than my board...£1.51 from mouser.co.uk, but I'm not entirely sure how I'd incorporate it.
 
Last edited:

Goeytex

Senior Member
Both Transmit and receive are adversely affected by the compact arrangement. Having the antenna sitting over the ground plane / board traces is an RF disaster. With the antenna correctly positioned as in the first picture, the ground plane acts as a counterpoise and improves performance. In the compact arrangement the ground plane is acting as a signal killer.

The Linx Splatch antenna is a good performer, however it depends upon a proper board layout/ground plane arrangement . You cannot just solder it up and hope it to work well. The HC-12 board layout is not very well suited to a Splatch.
 

Ga-Retired

New Member
Hi everyone,been following this thread from the git go and gathered a lot of info on tranceivers.Just successfully programmed 2 HC-12's to n1200 baud,lowered the power to 11dbm and kept the default freq. for now for testing using Ron R's great utility.With that said I have a few questions for the "All over it" guys.To start off with, I'm using 08M2's on both ends to control the HC-12's with the testing configuration just for reading temperature one way Tx the temp,Rx the temp. (Transmitter)Using C.1 on the 08m2 to Tx on the HC-12 and C.2 for the Rx on the HC-12.(Receiver) And here's the question,should these be reverse of the Tx connections or keep them the same way? Also if using in the simplex one way setup, should the Rx on the receiving HC-12 be left floating or grounded (0 V)Saw this noted on the spec sheet on rev ed's ERF modules and was wondering if this applied to ERF HC-12 as well.Will eventually be sending both ways and want to make sure I configure both units properly.Thanks everyone once again for your help,these transceivers are so cheap and hope they will end my interference problem.Happy father's day to all you dads out there!Ga-Retired
 

neiltechspec

Senior Member
On my experimental 3 PIR remotes, using 08M2's connected as follows.

HC-12 TXD (data out) not connected
HC-12 RXD (data in) on c.4,idle high
HC-12 SET on c.2
PIR on c.3, when active goes high for approx 2s

The receiving end is running on a 14M2 connected as follows.

HC-12 TX (data out) on b.4
HC-12 RX (data in) on b.3, idle high, so using high b.3
HC-12 SET on pin b.2
c.0 Alarm out 1
c.1 Alarm out 2
c.2 Alarm out 3

Neil.
 
Top