Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 18:02 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : HC-12 not receiving????

Author Message
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 07:04pm 06 Jun 2017
Copy link to clipboard 
Print this post

Anyone tell me where I'm going wrong here?

All my MM's have ESP-01's & HC-12's.
Wifi on the console, 433mHz on Com1.

All working OK & even the dodged up breadboard experiments were fine,
but the one pictured below is giving me grief.

Wifi is fine on it. but the HC-12's not receiving.
If I remove the Wifi module it receives....

Voltages are fine. 3.33 & 5.02, & the ESP has it's own AMS1117-3.3.
0.1µF on input & output & also a 100µF on the 3.3V out.

The HC-12 just gets it's power from the E100, but has 0.1µF across Gnd & Vcc.





The similar thing I made for the CGMicro 64+ works fine, & I don't think it's the 2 transmitters being close, as I tried the moving the HC-12 to flyleads & still the same.




My other E100 has both modules on a Proto board making a 3 layer sandwich & it's fine...

Have checked both E100's, swapped ESP-01's & HC-12's around & all modules work fine elsewhere. Even tried jumping a 1000µF electro across the HC-12, no change.

Got to be something dodgy with my power...
Any suggestions?

Thanks

Phil.



Edited by Phil23 2017-06-08
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9083
Posted: 09:18pm 06 Jun 2017
Copy link to clipboard 
Print this post

You aren't accidentally pulling the SET line on the HC-12 low via your prototype board somehow are you? That will put it in config mode, and it will totally ignore anything you send to it.

If it works by removal of the ESP board, then I would think that there is possibly an error in the way you have your data-lines wired up. I assume that BOTH modules are on SEPARATE COM ports, yes? Standard serial ports do NOT support parallel devices normally. IE: You can's run the ESP and HC-12 on the same COM port - they will fight each other.


Smoke makes things work. When the smoke gets out, it stops!
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 09:45pm 06 Jun 2017
Copy link to clipboard 
Print this post

I'm actually totally tearing my hair out;

But....
Maybe the Set line is floating & going low!
Good thought.
The other one is on the E100 Proto Board you did with me.
(One we missed the dimensions on.....).

It uses the same pin outs, is minus the 1k & diode, (WIP),
but works just fine on both E100's.

Yes, both modules are on separate ports;

The ESP-01 is on the console, via the plug at the bottom left.
The HC-12 is on Com1; pins 24 & 88; & must be the right way around cause it receives data is I remove the ESP-01.

If I pull the ESP out while powered, it starts receiving coms,
AND if I plug it back in, it keeps receiving coms UNTIL the Wifi establishes a connection.

I've got my coms packets flying about every 1 second (140 byte packets),
I'm running it really excessively ATM just for the sake of testing & trying to break things & deal with collisions etc.

Might go & try Welding the Set pin high; that could be an issue.

And as far as the one on the Arduino Shield goes, it works fine on both CGM's.

Thanks

Phil.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1995
Posted: 09:45pm 06 Jun 2017
Copy link to clipboard 
Print this post

Hi Phil.

Maybe they are on different "channels"? the HC12 isbit more refined than the cheapy 433MHz transceivers and has a number of different channels (128 I think). I find that they are in an indeterminate state when you first use them and if you can't be bothered with the config, then on a bench, simply short the set line to GND, power it on, remove the short then power off - this sets the default to channel 0 and FU3(?) which is max power (can be >100mA so watch your power!). This is a simple way to get them all on the same channel - try it then.

I had the same problem early on and this fixed it - I now routinely do this to all my HC12s before I use them and haven't had any troubles (and they are all on the same channel anyway so to receive broadcasts in my DIY protocol)

hth

update: just saw you last post - this probably isn't the problemEdited by CaptainBoing 2017-06-08
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 09:49pm 06 Jun 2017
Copy link to clipboard 
Print this post

Just tied the Set Pin on the HC-12 high; no different.

Pull the ESP-01; coms come to life.
Put it back in; coms die.

Repeat a few times & always the same....
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 09:57pm 06 Jun 2017
Copy link to clipboard 
Print this post

  CaptainBoing said   Hi Phil.

Maybe they are on different "channels"?


I haven't checked the actual config on each module, only a few.

BUT I have swapped them about & all work anywhere except on this particular board I'm plugging onto the E100.

And, taking the Wifi out fixes the issue, proving they are all on the same channel.

Worse still, I have Six HC-12's; but only one of these..................

Not enough to warrant pouring over the thing......






 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9083
Posted: 09:59pm 06 Jun 2017
Copy link to clipboard 
Print this post

My guess at this point would be to say that the ESP module is radiating harmonic noise which is smack on the frequency of the HC-12. The fact that you can unplug the ESP, and the HC-12 starts receiving, means this is a distinct possibility.

What happens if MOVE the ESP module away from the HC-12 by a good half a meter or so?

This does not exactly explain why your other 3-board sandwich works OK, but perhaps there is a little more shielding in that arrangement, that is just enough to stop any harmonic or spurious noise upsetting the HC-12 module.

Do you happen to have access to a spectrum analyser at all?
Smoke makes things work. When the smoke gets out, it stops!
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 10:11pm 06 Jun 2017
Copy link to clipboard 
Print this post

Tried this;





which is way better separation than the other E100 OR the Arduino shield, but still no fix.

I have 5 other HC-12'ss chatting, it's just this one that won't, and the common denominator when I swap stuff about is that board I built....

Only other thing that comes to mind is the ESP's proximity to the Display/E100.

But at any rate the ESP works fine; I can get to the console;
Load code with no retries in the Xmodem, all that part is fine.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9083
Posted: 10:13pm 06 Jun 2017
Copy link to clipboard 
Print this post

Are your HC-12's on the default settings, or have you changed their frequency and power settings etc with the likes of Rob's HC-12 config utility?
Smoke makes things work. When the smoke gets out, it stops!
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1995
Posted: 10:49pm 06 Jun 2017
Copy link to clipboard 
Print this post

Have you got some stand alone solution using HC12s (or set one up using two on your PC with a couple of USB-Serial modules) that you can bring into closer and closer proximity to the ESP?

It will tell you if interference is the problem or if you have to search elsewhere.

faxed you some more beer.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:02am 07 Jun 2017
Copy link to clipboard 
Print this post

  CaptainBoing said   Have you got some stand alone solution using HC12s (or set one up using two on your PC with a couple of USB-Serial modules) that you can bring into closer and closer proximity to the ESP?[/quote]

Have one USB HC-12 that I plug in & fire up Tera Term to see what's going on in the air. It sees all the coms floating about on the default channel.

I have a TV USB dongle that can run as a spectrum analyser;
Only other stuff it sees is the power monitor blip every minute or so & a couple of El cheapo wireless thermometers.

That & the remote gate opener when I press the button....


[Quote]faxed you some more beer.


Hmmm,

Not sure if the FAX is actually plugged in these days,
If you can PM me I could give you details to upload the Beer to Google or OneDrive.

200Gig of OneDrive could surely handle a whole carton....

Or, alternatively, you could post it somewhere;
I click on the link & choose save or OPEN.....

Lol.

Phil.Edited by Phil23 2017-06-08
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 08:02pm 07 Jun 2017
Copy link to clipboard 
Print this post

Still tearing hair out here on this; ignored it until 5 minutes ago.

Just put the Wiz BangGood DSO138 scope the TX pin of the HC-12.

Can see the pin sitting at 5v & spiking low when data is received with the ESP unplugged.

Plug it in & IF the ESP connects to the AP, it drops to 3v & stops swinging all the way low.

Only dips down about 0.25 V from it's high state.

IF I unplug the cable in the bottom left of the first photo (6 Pin), the Coms signal out of the HC-12 returns to normal.

That plug just has the 3 wires for the console connection to the ESP-01, it plugs onto Con6 of the E100, just using 3 of the 6 pins, Gnd, Tx & Rx.

Can't see how that could possibly be holding the HC-12's Tx high.

It's all wired fine. no 3.3v goes near the HC-12 & I've lifted the diode that clamps it, even shorted the 1k series resistor in the Tx line.

Just cant find a wiring fault.....

The console connection works fine regardless of what the HC-12 is doing....

 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 08:17pm 07 Jun 2017
Copy link to clipboard 
Print this post

Could it be something dodgy with the way I've setup the AMS1117 to power the ESP-01?

I've got a 0.1µF on In & Out to Gnd & 100µF electro across the output.

Pretty obvious what's going on now, just don't understand why?




What happens as I disconnect the console cable.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 09:24pm 07 Jun 2017
Copy link to clipboard 
Print this post

It's actually connecting the Rx line (Pin89) of the console,
that Pulls the Tx line of the HC-12 low;
the Rx Pin for Com1 (Pin 88).

It's got to be something to do with me running the ESP on it's own 3.3 reg & the HC-12 on the E100's 5V rail.


Does any of this make sense?

And like I mentioned above this 2nd E100 is fine if connected to the other proto board that's usually on the other E100.

Phil.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 10:30pm 07 Jun 2017
Copy link to clipboard 
Print this post

  Phil23 said  And like I mentioned above this 2nd E100 is fine if connected to the other proto board that's usually on the other E100.


Might renig on the above,

I may not have connected the console lead when I swapped the Proto board between E100's, I didn't connect the console fly lead.

Was more interested in seeing the HC-12 work at that stage.


Problem solved now!

Short between pins 88 & 89 on the 2nd E100.

Bit of a scratch about between them with a pin & it's now working fine.

Did think I'd stuffed things for a moment when at first the code didn't run, & no data on the display.....

Had just not plugged the RTC back in & it was crashing at that point.


Cheers

Phil.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024