HC-12 Help required.

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hello everyone!

I also ordered 2 pairs of HC-12. I am struggling with them, unfortunately. I use them with two Arduino UNO-s but cannot make them work (software serial). As a last step, I connected the HC-12-s to USB to Serial converter and connected them to my PC. Still not working. Although, when I connected the USB to Serial converter's TX and RX pins via wire to each other, communication was successful. I have a feeling that my HC-12 modules are faulty. The AT commands are being accepted, I also get response from the modules when typing AT commands.

Many tutorials don't require an external power supply when testing these modules and also don't require capacitor and diode. I am using them with 5V from USB to Serial converters.

Any idea?

I got the connection from here:
 

ericgibbs

Joined Jan 29, 2010
18,872
Hi,
OK, that means the HC12 is being read OK and the settings are the same.
Remove the low on the SET pins, [ they have internal pull ups] so they will assume a high state.
Move the TX HC12 about 1 mtr away from the RX HC12.
Send a simple message from the PC via the USB to RS232 converter, say, Hell0<crlf>.
Read the RX HC12 output into another RS232 to USB into the PC, which has a Serial program running.

I use Termite its a free download, allows TX and RX from the USB ports.
https://www.compuphase.com/software_termite.htm

Post the result of that test.
E
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Okay. By the way, I am using the modules with the helical antenna provided with them.

Now I am at my workplace, so I can only reply after 4PM GMT+1 from home.
Thank you for your help so far!
 

ericgibbs

Joined Jan 29, 2010
18,872
hi,
I also use the spiral antenna, works well about 30mtr range thru 3 brick walls.
If you get no RX, swap the two HC12's over as a further check.
I assume you have never used a supply voltage greater than 5v?
E
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi,
Yes, I never ever used greater voltage than 5V. And never used modules more than couple of minutes at a test session.
 

ericgibbs

Joined Jan 29, 2010
18,872
Hi,
OK,
Did you swap the two HC12 over from TX to RX, to check if a transmitter section had failed.?
Please post a sketch showing the interconnections to the USB , HC12.
Where did you buy the HC12's.?

E
BTW: I have a 22uF cap across the power pins close to the HC12 PCB
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi,
I tried sending data from both modules to each other. I am using Prolific PL2303 (ebay) and they work well via cable connected.

I bought HC-12-s from E-bay.

I also have a 16V 100uF cap soldered by myself. Positive terminal to HC12 VCC and negative terminal to HC12 GND.
 

ericgibbs

Joined Jan 29, 2010
18,872
hi,
I also use the Prolific driver.
Its puzzling that you can serial communicate OK with the HC12 when you are checking the Status.
Can you check that the SET pin is High when disconnected, making sure there is an onboard pull up.?
E
@AlbertHall
 
Last edited:

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
How to check SET pin is high when disconnected?
By the way, it seems okay, because when SET is connected go GND it goes to AT mode and accepts AT commands and replies to them. If I disconnect SET from GND, it is surely not in AT mode anymore.
 

ericgibbs

Joined Jan 29, 2010
18,872
If I disconnect SET from GND, it is surely not in AT mode any more.
hi,
If there is an internal pull resistor on the HC12 PCB, it will pull high, but I would check using a volt meter that SET is really High when disconnected.
I have bought HC12 from Amazon and eBay, they work OK.

As a test have you tried to change the HC12 settings, using SET mode, say make them both channel 010.

I guess that you are not located in the UK.?
E
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi,
Okay, I will test set them to another channel.

I can test with voltmeter when I get gome.
I am located in Hungary.
 

ericgibbs

Joined Jan 29, 2010
18,872
hi,
OK, lets know how it goes.
E
BTW: if your location was UK I do sometimes get projects sent to me for fixing/checking. F.O.C.;)
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
hi,
Changing channel not working either :(
I am using coolterm with default settings, only changed terminal to line mode.
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
By the way, I originally wanted to order from Banggood, and someone said in comments that one of the modules were faulty and he spent a lot of time experimenting with it when he got this conlusion. Maybe one of the modules is faulty. I have ordered 4 alltogether, so maybe I should try the other 2 modules.
 

ericgibbs

Joined Jan 29, 2010
18,872
hi Kon,
I understand that you are using coolterm on your PC to communicate with the HC12's, via USB to RS232 converters, with Prolific drivers.?
Can you confirm that coolterm can support two prolific ports connected as TX and RX on two serial ports on the same PC.
You should be able to see in the Device Manager window, two ports assigned as Prolific USB to Serial Com Port (Comx) and (Comy)

You could try using a Desktop PC to drive one HC12 and for a test, say a Laptop for the other HC12 and then check for TX and RX.

E
 

LesJones

Joined Jan 8, 2017
4,191
As a follow on from Eric's post #18 just have one of the HC-12s connected via the usb to serial converter and on the other one connect the TX and RX pins together. You should then see the characters you type displayed on the screen if the link is working. You can confirm this by breaking the link between the TX and RX pins and you should no longer see the characters that you type. This is an alternative to using two PCs.

Les.
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi Eric,

Yes, coolterm can open 2 windows at the same time with 2 different COM ports in the device manager.
I tried using it with a separate laptop and a PC but no luck.
 
Top