As you might have read I claim the ultimate goal of the robot to be to navigate through the garden with an ultrasonic positioning system. I thought about navigation and positioning since the beginning of the build, but just recently something came up my mind that I think of as an realistic solution: sound
Sound moves rather slow compared to the speed a microcontroller can process data, thus making precise distance measurement easy. There's a great chance you actually used one of these at some point:
This is a HC-SR04, a cheap (~5€) ultrasonic distance sensor widely used by hobbyists. The principle is fairly simple: One of the round thingies is an ultrasonic speaker, that transmits a short ultrasonic burst into the world. Eventually this sound reaches an object and gets reflected on its surface (echo). The other round thingy listens for that echo. The delay between transmit and the receive is what the module sends to your microcontroller which can then easily calculate the distance from that.
Now I want do take this principle one step further:
The master is the robot and has an ultrasonic transmitter as well as an ultrasonic receiver. The nodes are small circuits with microcontrollers and equipped with transmitters and receivers as well. For the master to calculate its position it needs to:
- Know the nodes
- Know the distance to each node
- Know the nodes position
Know the nodes
That's an easy one: just tell the robot the nodes ID via the web interface
Know the distance to each node
Here the ultrasonic sound comes in: The master sends a few bits encoded as ultrasonic bursts, including the nodes ID it wants to know the distance to. The nodes react accordingly, here's a diagram on that:
Of course this is just some concept to present the basic idea. In reality it might come in handy to add unique message IDs to cancel out echos etc.
Know the nodes position
In theory the network could calibrate the node positions itself by measuring the distances between the nodes (master sends command like: "node 2: measure your distance to node 4 and report it to me!"). After measuring various distances it should be possible to populate relative coordinates for each node. Even if this doesn't work well in reality, I'd be happy with putting in the positions by hand (into the web interface).
Remember that this is just a concept that rumours in my head. Also making the robot itself work properly and building a battery changing station are to be done first.