I spent some time investigating how the proposed TinyAPRS protocol would work and remembered Bob (WB4APR) wrote a BASIC program to simulate channel throughput in regard to the ALOHA concept. For the TinyAPRS protocol with Power Nodes, I would like to have a Net Cycle time of around 60 seconds. Since the node count is low (e.g. 5 nodes) this should be possible. Bob's simulation assumes each node randomly transmits. For regular APRS, this is NOT the case that I have seen. The packets occur regularly at some rate (e.g. 5min, 30 mins, etc) within +/- 1 second each time. The only exceptions are mobiles that use proportional beacon mode.
I used Bob's simulation and selected only 5 nodes (stations) and a period of around 10 seconds. I ran the simulation by using DOSBox and a QBASIC on my Windows 7 system. This is really cool since he wrote this stuff over 10+ years ago and there are tools like DOSBox that can bring them back to life.
With the random simulation all nodes achieved a Net Cycle Time of 45 seconds (I was looking for about 60 seconds- good!).
I was interested in how this would work out if the nodes did not transmit randomly, but repeated at a constant interval. I had each node transmit with a slightly different rate. I wrote this simulation using BASIC256 like my other simulation. With approximately the same period I got a 100% success in 30 seconds. I plotted the packets below. The RED dots are packets that collided and the WHITE ones did not collide. Bob's simulation is more fancy, he counts each nodes good packets, etc but mine is a good exercise.
My simulation does not stop when good packets from all nodes is achieved and you can see how the packets slip in to collisions and then out again.
I plan to implement TinyAPRS with a random transmit cycle, but most likely a regular cycle would work just as well with micro-controllers since even if you started them at the exact time they would slip in an out of sync. It will also be interesting to see the effects of digipeating which will add more traffic to the channel.
Sunday, December 29, 2013
Sunday, December 22, 2013
TinyAPRS for Power Node Mesh Network
I have done some experiments with the small 433 Mhz RX and TX modules with the Arduino using the VirtualWire library and I am impressed. With just a short piece of wire as an antenna I could get coverage all over the house. These wireless modules may be suitable for the Power Node I am working on to communicate.
Above is the RX connected to a UNO Arduino with LCD displaying the packet count.
I using my Teensy 2.0 that was setup for 3 volts and the TX module still had plenty of range.
The protocol I am considering would be similar to APRS but simplified since the VirtualWire library only supports a maximum packets size of 27 bytes. This TinyAPRS would only use single byte node addresses thus only supporting a maximum of 254 nodes and would not contain call signs for node addresses like APRS but would use many of the other methods. Below are some of my ideas so far...
Above is the RX connected to a UNO Arduino with LCD displaying the packet count.
I using my Teensy 2.0 that was setup for 3 volts and the TX module still had plenty of range.
The protocol I am considering would be similar to APRS but simplified since the VirtualWire library only supports a maximum packets size of 27 bytes. This TinyAPRS would only use single byte node addresses thus only supporting a maximum of 254 nodes and would not contain call signs for node addresses like APRS but would use many of the other methods. Below are some of my ideas so far...