loading

Build a low cost simple wireless mesh using arduinos and long range APC220 radio modules. Wireless mesh networks can handle individual nodes not working and are tolerant to environments such as forests and hills where data may not be able to go directly from one point to another.

Step 1: How the Mesh Works

This is a wireless mesh with a range of up to 1km between nodes. There are 16 nodes in each mesh, and all nodes use the same frequency. Each node can sample two analog voltages and shares these with the mesh. The mesh is tolerant of faults with individual nodes, and data takes multiple paths to get to the destination. Nodes can also interface to the internet, and to other meshes that that been set up for a different frequency. Individual nodes may only be able to talk to a few nearby nodes.

One problem with building meshes is complexity. This mesh simplifies things by using a synchronised clock, and much of the mesh protocol revolves around getting the clock working. Each node exchanges the time with nearby nodes. If a node receives time data from a nearby node it notes the number of the node, and the number of the last node it received a time from, and takes the lower of the two. If node zero is in the mesh, then all the nodes ultimately synchronise to node zero's time. If node zero is shut down, then node 1 will take over this function.

Nodes flash a led in time with their clock, and within a minute or so, all the nodes will be flashing in synch. Once this is working, each node transmits only during its allocated time slot. This avoids data clashes and minimises errors.

Each node collects its own data and adds a time stamp to this. When a node transmits, it transmits the data for the entire mesh, including the time stamps. Any node that hears this data looks at the list, looks at its own list, and replaces any old data with newer data.

This way, new data propagates through the mesh.

There are 16 nodes and each node has two analog values, making a total of 32 integer values to share through the mesh. The number of nodes and the number of analog values per node is limited by the time needed to cycle through the entire network. Each node has 4096ms to transmit all its data (9600 baud), and so it takes 65 seconds for all the nodes to transmit in turn and for new data to move through the mesh.

Read world data that can be shared are temperatures, tank levels, stock trough levels, rainfall, humidity, dam levels, local battery data if a node is solar powered, and other data that needs to be shared over a large distance and where time is not so critical.

Scois: WHOA THERE on high power modules - at 433 MHz Kiwis & Aussies (you seemingly are in Brisbane?) are allowed just 25 milliWatts transmitter e.i.r.p. ( effective isotropic radiated power)... Stan.
<p>Dr_A: Long time no hear! Did you consider Semtech's wonderful LoRa devices ? LoRa ranges are typically an order of magnitude BETTER than similar 433 MHz modules. Yes - km instead of 100s of metres &amp; great punch thru' bush &amp; timber buildings. See =&gt; https://www.instructables.com/id/Introducing-LoRa-/</p><p>Aside from these darlings, Chinese sourced HC-12 transcievers have fast tending THE peferred 433 MHz module, especially when compared with classic ASK. Prices are under US$5 (with free p&amp;p), &amp; config. via a Kiwi sourced GUI makes their use a breeze. Regards- Stan. ( &quot;Manuka&quot; from PICAXE Forum)</p>
<p>Hi Stan,</p><p>I am new to the wonderful world of Lora and have found your Lora Instructable very useful. I read it at least once a week and discover something new each time. Do you mind if I ask you a few questions regarding Lora? Better here or on the article? Or maybe a new Instructable?</p><p>Just want to make sure that I am not missing something. The HC-12 transceiver is not using Lora technology? In your &quot;Introducing LoRa&trade;&quot; article it appears that you are quite fond of the Dorji DRF1278DM module. Is this still the case?</p>
<p>Scois: Modest blush - glad those pages were helpful! Happy to help BUT you really need to roll up your sleeves &amp; get some UHF RF hands on I'd say. For this the HC-12 modules ( which most certainly are NOT LoRa) are ideal.</p><p>Chinese firm Chengdu EBYTE offer a E32-TTL-100s1 TTL friendly LoRa module that may be superior &amp; cheaper that Dorji's. I have some here but have yet to explore d features. See =&gt;</p><p>https://cdebyte.en.alibaba.com/product/60459293814-803162175/E32_TTL_100S1_3km_SX1278_LoRa_433MHz_wireless_rf_transmitter_and_receiver_module.html</p><p>Where are you ??? Regards- Stan. ( Wellington, NZ)</p>
<p>Agree 100% on the hands on (still a noob) - I have order a few of the HC-12 Modules to play around with. </p><p>I also had a look at the E32-TLL-100S1 on Alibaba and have contacted them. The charge around US$58 for 3 of these modules (which include US$25 courier). For that price it might be a better options to go for 2 E32-TTL-1W (range 7km) for AU$67?</p><p>My problem is my limited knowledge. A site like eBay is flooded with various LoRa modules making all sorts of claims. I don't know what to look for. Do I only look at range? And then there are modules ranging from a few km's to 10's of km range.</p><p>But before I get carried away I'll play around. I've got a few 433MHz LoRa SX1278 long range RF wireless module DRF1278F. It uses SPI to connect, but I started working through the various libraries last night to see what is going on under the hood. I also think I have to spend some time on Symtech's SX1272/73 datasheet.</p><p>There is company here in Brisbane that developed the Talks2 Whisper node. Although not Lora is looks very promising.</p><p>I'll go and have another ready through your 'Introducing Lora&quot; Instructable again tonight.</p>
<p>Hi Stan. Looks like something to check out. I've had this running for 18 months now and it seems pretty reliable. At the moment the data hops about five times to get from the top of a hill, then through a valley, then some trees. So if can do it in one hop would certainly make things easier! I'll go check it out :)</p>
Awesome project. Is it still up and running?
Very much so! The wireless data has to go over a hill and through trees so no direct line of sight. Could have used high power radio, but with low power and short range and multiple hops there is no interference to the neighbours. Data used to go to xively but they are subscription, so instead goes to Thingspeak. Data is here http://www.smarthome.jigsy.com/ Some minor tweaks to the software along the way, now have 32 nodes instead of 16, and also every node has a display - this uses more power, but it makes debugging a lot easier. I like to see each node talking to at least two others, so there are multiple data paths and the system then can handle a few nodes not working.
<p>Oh, I've got so many questions. </p><p>\I am trying to achieve what you have already accomplished. I am playing around with building a sensor network for a farm. I want to use rf as gsm is not available. You mention that you could have used high power radio. This will obviously increase the distance between the nodes. Do you have an example of a high power radio you have considered? What was your reasons for picking the APC220 radio modules. I see there range are up to 1000m, but they seem to be a bit pricey ($40+). What do you think about lora?</p><p>I am amazed at what you have done with Thingspeak. I am going to have a look at it in more detail. What advantages does Thingspeak have for you?</p><p>How do you measure the water level in your tanks? Floaters?</p><p>My apologies for all the questions. I have been playing around with arduino for a few months now and are still a noob.</p><p>Thanks</p><p>Scois</p>
<p>Hi Scios, sorry about the delay replying. Re different radio modules, see Manuka's comment from yesterday. He is a guru when it comes to radio links and always has access to the best modules, as he mentions, LoRa. I'm pretty happy with the APC220 modules, as I like the idea of multiple data paths for a true mesh, so one node can go offline (eg when a koala chews the power wire, and yes, that seriously did happen!). Thingspeak lets you log in once you have a pile of data and change the type of graph, averaging and other parameters. Two catches on an arduino. First, stick a small heatsink on the ethernet chip, and second, it sometimes doesn't reset when the power is cycled so I brought out the reset button to a big button on the front of the box. Transducers - farnell or radiospares, MPX5050 which is 5V = 5metres, and MPX5500 which is 5V = 50 metres. I've been running these transducers for years, much more reliable than float switches (spiders go and build nests in the float switch mechanism). </p>
<p>I though I scared you off with all my questions. How do you used the transducers? How are using them? Outside of the tank or sitting on the bottom?</p><p> I though about using an ultrasonic sensor but it there appears to be a few issues with these. I've got a few on order from China (estimated delivery 14 to 3,243 days) will give them a go. </p><p>Thanks for telling me about Manuka. I have read his Lora Instructable article a few times and pick up something new every time. </p><p>Is it possible to setup a mesh using Lora? </p><p>I came across Talk2 Whisper Node, developed by a company here in Brisbane. Appears very promising. </p><p>What other sensors are you using?</p>
<p>Sensors are outside the tank. Tank =&gt; tap =&gt; T piece and put a blank end in the T. I use 4mm black garden hose and barbed connector eg the one at the top of the page http://www.irrigationwarehouse.com.au/category243_1.htm and trim the barb off one side with knife, then drill a 4mm hole in the blank that goes into the T and glue it in with araldite. There probably is another way to go from 4mm pipe up to (say) 40 to 50mm that is on a tank. The 4mm garden pipe fits nicely on the MPX5050 sensors. Other sensors - LDRs, LM35 temp sensors for the pool, the pulse output of a 3 phase power meter (to measure solar power). Anything that can convert to 0 to 5V</p>
<p>Thank you very much for all the info. Now I have to go a build something usefull.</p>
Hi Scios, your message from 17/2 appeared on my email feed but it isn't coming up on this comment page - something not working at Instructables. Maybe send me an email moxhamj@internode.on.net
<p>Nice project. I like your code.</p>
<p>Hi. I am building a similar project and ran into the same issue with power consumption. I moved the radio and the temperature sensor to an digital pin. Set up the pin on the temperature sensor to go high every 10 seconds. If something changes the pin the radio is getting its power from goes to high. The radio only transmits if something changes. The rest of the time the arduino sleeps using the narcoleptic library. I don't have screen on transmitter. By making these little changes the arduino nano pulls 8 milli amps most of the time.</p>
<p>Hi Dr. I went through this project, but I dint understood the actual purpose of this project. Are we increasing the range of wifi router in this project? Please dont feel offended if you think that my question is silly. Guide me in the proper direction. Thanks in Advance.</p>
<p>Good question! Well initially I was building wifi router extenders, but found they have limited range, decent range needs large antennas (1 meter dishes) and use a fair bit of power. So this mesh was a way of sending simple data further distances with less power. But of course, the data is very limited and certainly can't do pictures and video etc.</p>
<p>The ESP8266 chip uses a heck of a lot of power setting up and looking for other networks servers and clients . Seems about 40% of its memory is this stuff then yours goes in too.Power supply seems to be the failing and even with ESP.deepSleep() it still seems to eat batteries in days. So if you are considering the work involved in switching I would address the battery problem first.</p>
<p>Agree with those comments. I initially had the idea of a mesh of wifi routers, each acting as a bridge, but a typical router is 5 to 12 watts, plus the power of the ESP8266 modules. Hence this design that uses APC220 modules to do the long haul data comms, and just have one point in the network where it links to the internet. Also 433Mhz is better than 2.4Ghz for going through trees and over hills. The whole &quot;Internet of Things&quot; tends to gloss over the fact that a router is part of the system and really is not something that can be battery powered. Even arduino's out in the field are borderline for battery power. 100mW still tends to need large panels and large batteries to cover a worst case scenario of clouds for a week.</p><p>One thing though with the comment about ESP8266 power supply failing, I agree, and I have had good results putting a beefy capacitor like 4700uF across the ESP8266 supply. </p>
<p>Wow, really interesting!</p>
<p><strong>helena's graduation 24/06/2015</strong></p>

About This Instructable

45,332views

281favorites

License:

More by Dr_Acula:Wireless Mesh with Graphics LCD Simple Arduino Wireless Mesh Worldwide microcontroller link for under $20 
Add instructable to: