HC-12 Help required.

ericgibbs

Joined Jan 29, 2010
21,442
Morning Les,
Mo, has done the HC12 SET status check. all OK, post #2. He can also change the Channel etc.
I being to think it could be a problem in terminal software.?

If he cannot get it working, I will try to duplicate his set up, see if I get the same problem.

So far all the HC12's I am using work OK.

E
 

ericgibbs

Joined Jan 29, 2010
21,442
hi Mo,
You posted while I was posting, so the check I had planned is no longer required.
You said you had some more HC12's on the bench, are you going to try them out.?
E

OT:
Salgótarjáni Acélárugyár
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Okay guys, I tried the other pair. They work flawlessly!
I am confused. I did everything the same way with these modules (except the antenna which is on the top of the module now but that not counts I think) but these work for the first time. Interestingly, I tried the new ones with the bad ones mixed, but it seems like that both are bad. It is a coincidence?

Thank you for your help guys, especially Eric!
 

ericgibbs

Joined Jan 29, 2010
21,442
hi Kon,
Although I have been lucky buying the low cost HC12's, I have had some bad experiences with other modules.
Sometimes when I order 6 units, at least one or two are defective, I guess its one way they get rid of their rejects.

Good Luck with your project.;)
E
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi Eric,

Thank you.
Since I last posted here, I successfully implemented the HC-12s in my project :). Oh God, if these modules worked for the first time.... Now, I am having a fight with an e-bay seller who sent me wrong modules, after several e-mails now he is willing to resend me 2 modules. I also ordered a pair from Aliexpress, because I am so excited that it is working now.

If you don't mind, I tell you about my project in nutshell.
I am making a wireless thermometer for my girlfriend. The transmitter is a DS18B20 thermometer + HC-12 + an ATMega328P on a self-created PCB. It is an Arduino program but since it will run on a battery (18650) I had to eliminate every unneccesary power consumption - that's why I created an "Arduino minimal" PCB board. The receiver is a DS18B20 thermometer + HC-12 + an ATMega328P on a self-created PCB + 16x2 LCD screen. So, on the LCD screen she will see the inside and outside temperature. I was experimenting with cheap 433MHz modules but they were not stable at all. Now I am making the boxes for the transmitter and the receiver. The system is nicely working on a breadboard :).
 

ericgibbs

Joined Jan 29, 2010
21,442
hi K,
Pleased to hear the project is working OK.
Regards the power usage, you could try reducing the TX power draw, providing that you can still get the TX to RX distance required.

I use a PIC 184520 at the outdoor transmitter, Temp, Hum etc, thats received indoors with a HC12 and Arduino Nano.
A RTC DS3231 which adds the real time and indoor Temp and retransmits the combined data string on anther HC12 [different channel] to a HC12 receiver and a data logger for my PC.

E
AA1 17-Sep-18 08.11.gif
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi again Eric,

Thank you for the info about transmitting power.

Now, I finished the transmitter circuit. Since the transmitter will work on a battery, I set both the HC-12s to FU2 mode, which is using 80uA as idle power which is more than great for me. I tested the modules, but in FU2 mode the transmission distance is only about 1m (LOS). I am using the helical antenna that came with it.

Could you help me please?
 

ericgibbs

Joined Jan 29, 2010
21,442
hi Kon,
Check out this datasheet clip, I think you will have to use FU1 to get the Tx/RX range.
This means 3.6mA in standby.
E
AA1 24-Sep-18 07.59.gif
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi,

No, I only tried FU2 because power consumption was so unbelievably low. I didn't try any other thing. I will test FU1 mode this afternoon.

Actually, I have another idea regarding the power consumption: putting HC-12 into sleep mode. My Arduino code for the transmitter is quite simple so I hope it will not cause any problem to put HC-12 into sleep mode via AT commands. I only have PIC code of sleep mode but hopefully I can adapt that into Arduino.
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi Eric,

Sorry, I think you misunderstood me.
I already know how to put Arduino to sleep mode. What I want to achieve is how to put HC-12 into sleep mode.
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi Eric,
No problem at all :)

Thank you, that is the (PIC)code that I was talking about. I think it is not that difficult to convert it to Arduino code :)
I have to add one more pin-socket to my already-manufactured PCB, but it is not that big deal.

I will let you know about the test results.
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi Eric,

I set to FU1, 9600. The range is better in LOS, but still not good enough. Unfortunately, I didn't have much time yesterday to experiment. I think I will return to default settings (FU3 etc.) Since I will put the module in sleep mode it actually not a problem to use FU3 mode. By the way, default mode worked the best so far for me.
 

ericgibbs

Joined Jan 29, 2010
21,442
hi Kon,
As you know the HC12 has a number of frequency channels, check that the one you are using is legal within your area.
Also check the RF power rating.
E
 

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi Eric,

Thank you for your help.
Power is at maximum and now i use default FU3 mode with sleeping the module.
Now Arduino and HC-12 gives me 0.2mA current in sleep mode and 52mA for 2 seconds when it is transmitting. It is okay for me.

I will experiment with the channels some more later.
 

ericgibbs

Joined Jan 29, 2010
21,442
hi Kon,
It sounds an interesting project, when its finished, perhaps you could consider writing it up as a document for the Completed Projects Forum.?
I am sure others will find it helpful.
E
 
Last edited:

Thread Starter

Koncipappa

Joined Aug 27, 2018
22
Hi Eric,

Thank you.
I was thinking about making an instructable or something like that if the project works ok. Now, the receiver side is still on breadboard, so I will have to finish that first.

Another thing: I am having my breadboard project (receiver) on my table where my PC is on the top of the table, plus I have my HI-FI system next to the table. Maybe that causes some interference when testing the wireless communication? I have not done big research about RF433 systems just read some articles about it.
 
Top