![]() |
Forum Index : Microcontroller and PC projects : New HC12 modules...
![]() ![]() |
|||||
Author | Message | ||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2139 |
Just grab some HC-12s and start playing is the best bet. forgot to mention... if you want super long range, have a look at LoRa. Quite a bit more expensive than HC-12s but will do amazing distances and even further if you drop the baud rate right down - which shouldn't be a problem for a small packet exchange network. LoRa also has a global network of internet connected "hotspots" so the LoRa radio just does the last mile with the internet performing the trunk haul - google LoRaWAN. If you are in range of a hotspot, you can quite easily get global radio! - if not, make your own hotspot and add it to the community so everyone benefits. have fun |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9492 |
All my current HC12 networks are one-way Star. There is a central HC12 used only as a receiver, and it listens for calls from any of the nodes. The beautiful Micromite COM port buffer auto-queues the messages for me, and all I have to do, is process one message, then check the buffer. If there is another one there, process that, and loop-de-loop till the buffer is empty. ![]() But back to the HC12's - the master receiver and all the nodes have both TX and RX connected, so with firmware updates, I could make it two-way between any node and the base, or any node and any other node. But that adds a level of complexity that I don't currently need. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1636 |
Grogster, How do you handle collisions? Are the remotes synchronised somehow that they don't talk over one another or do some corrupted messages not matter? Bill Keep safe. Live long and prosper. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9492 |
I used the KISS approach, and did not bother worrying about collisions at all. If they happen, they are ignored. The nodes retry automatically till the security guard reset them, so if the first message is missed, the second one will work. I know, I know - false logic perhaps, but the system has been in operation for about five years now, with no collision detection, and no problems reported. Technically, to get a collision, you would have to have two or more nodes that transmit at EXACTLY the same instant, which is highly unlikely. The duty cycle of the system is something like 1% or less, so most of the time the nodes are just monitoring things and not sending messages, so that also inherently prevents most collisions. There is a garbled message detector in the code, and if a message is not valid, it is simply discarded. The event is logged, but the garbled message is essentially dropped. When the node retries again the message will eventually make it through. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
BrianP Senior Member ![]() Joined: 30/03/2017 Location: AustraliaPosts: 292 |
There's another principle in place here also - IIABDFI - (if it ain't broke don't fix it) ![]() |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2139 |
+1 ![]() |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1636 |
Thanks Grogster, I understand how it works for you. My whole working life was involved with SCADA (Supervisory Control And Data Acquisition) for electricity substations and I struggle with the concept of one-way communications. Especially without the use of a CRC. To me, the message sender MUST know if the message has been received, understood and acted upon if necessary. If a message is not valid then it will not be responded to and will trigger a timeout and a re-transmission or will cause an exception message. Bill (Dismounting from my hobby horse) Keep safe. Live long and prosper. |
||||
Quazee137![]() Guru ![]() Joined: 07/08/2016 Location: United StatesPosts: 586 |
Here is some info that might be useful for LadyN and others too. two esp8266 communication talk each other. I know that its not using the HC-12's. But using a MM170 and HC-12 can do this. There is this link just below the mesh star hybird wireless basic infrastructure topology That I found useful in explaining this to a few clients. I ran across it while searching for P2P ESP8266 direct linking no internet connection. I just want what one ESP8266 sees at its inputs to be copied by a second one. Where they only talk to each other. Fun stuff and smaller than my old tool box sized radio with its monster antenna. Then again it did let me chat to the world in the 1960's. Well thats what we use the internet for now. LOL Hope this is useful. |
||||
LadyN![]() Guru ![]() Joined: 26/01/2019 Location: United StatesPosts: 408 |
Quazee137, that was extremely helpful! Have you built a/the mesh software? |
||||
Quazee137![]() Guru ![]() Joined: 07/08/2016 Location: United StatesPosts: 586 |
I have a working concept for a client that has greenhouses clustered around hills. My first test was to have a MM170 and HC-12 with relays and sensors at a group of four greenhouses talking to two HC-12's as a repeater then a HC-12 to a PC. They will be adding more of the MM170/HC-12's to other greenhouse groups. The basic idea is to have the PC sent a request to the repeaters then they forward message to the others. When each MM170/HC-12 gets its id and command it can then operate on the command. They are still working out the commands. As some will work on all greenhouses where others will be for clusters of greenhouses and then some for a single greenhouse. The area is very hilly and gets windy at times. They are looking for a system that is cheaper. No monthly/yearly cost for cell service. That was pitched before they talked to me. They like MMBasic and the 170's as they can easily make it on their own. One thing they did was to add an MM170 + SD to the repeaters to store and forward. Best of all they are having fun at this. |
||||
LadyN![]() Guru ![]() Joined: 26/01/2019 Location: United StatesPosts: 408 |
I don't dislike paying cellular connection fees to transfer data because it significantly reduces the complexity of the system. A few startups have come up that offer less than $1/mo for these cellular connections which are a great deal! My frustration with most current offerings is that they are mainly 2G/3G based systems that are going to be phased out in 5 years or so requiring redesign after that. I would REALLY have liked LTE based boards and those that do offer LTE are $50+ compared to the less than $10 for the 2G/3G based boards. With the HC12 based mesh networks I now have to worry about batteries because I have to have more of these nodes to improve coverage (which the LTE satellites solved for me already) in addition to building the mesh network software. I am on the lookout for mesh network software/firmware that has already been developed and tested, probably opensource already so that I don't make the same mistakes someone already did and fix those mistakes already. An interim solution might be to purchase some LTE capable Android phones from China and use those as relays for a cluster of nodes. This does mean I will now have to learn Android development though and I would rather be working on an opensource mesh network firmware instead with that time. I will keep reading about this topic so please keep posting! |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |