This is the revision A version of the Sonar6 module.

Sonar6 Module (Revision A)

Table of Contents

1. Introduction

This controls up to 6 ultrasonic sonar devices with either a 2-wire or 1-wire interface. For the 2-wire interface, one wire is a trigger and the other returns a pulse whose width is correlated to object distance. For the 1-wire interface, these two signals are multiplexed onto one wire. The following list is a partial list of modules work with the Sonar6.

2. Programming

The Sonar6 module manages up to 6 sonar modules. Only one sonar module at a time is triggered. Each sonar module can be assigned a priority between 0 (highest) and 5 (lowest). The priority specifies how frequently each sonar is triggered. For example, the sonars at the front of a robot might be assigned a priority of 0 whereas the one at the rear might be assigned a priority of 5. A priority of 6 means that the sonar is triggered under program control and a priority of 7 means that the sonar is disabled.

In addition, each sonar has a distance threshold. When two consecutive distance readings on the same sonar exceed the distance threshold, the sonar priority is temporarily decremented by 1 towards 0. Thus, when rapid motion occurs near a sonar module, it will temporarily increase its trigger frequency until the motion near it calms down.

The the overall frequency at which sonars are visited is under program control. For example, the robot is motionless, the sonars can be slowed down or shut off. When the robot is moving, the scan frequency can be increased.

Command
Name
Bit Action Description
8 7 6 5 4 3 2 1 0
Raw Read 0 0 0 0 0 0 0 0 s Send Return the pulse length as hhhh hhhh llll llll × .2microSec.
0 h h h h h h h h Receive
0 l l l l l l l l Receive
Centimeter_Read 0 0 0 0 0 0 0 1 s Send (Unimplemented) Return the distance for senosr s as dddd dddd centimeters.
0 d d d d d d d d Receive
Millimeter_Read 0 0 0 0 0 0 1 0 s Send (Unimplemented) Return the distance for senosr s as dddd dddd millimeters. A return result of 1111 1111 means that the distance exceeds 254 millimeters (=10.45 inches)
0 d d d d d d d d Receive

3. Hardware

The hardware consists of a circuit schematic and a printed circuit board.

The parts list kept in a separate file -- sonar6.ptl.

3.1 Circuit Schematic

The schematic for the Sonar6 module is shown below:

Sonar6 Schematic

3.2 Printed Circuit Board

The printed circuit board files are listed below:

sonar6_back.png
The solder side layer.
sonar6_front.png
The component side layer.
sonar6_artwork.png
The artwork layer.
sonar6.gbl
The RS-274X "Gerber" back (solder side) layer.
sonar6.gtl
The RS-274X "Gerber" top (component side) layer.
sonar6.gal
The RS-274X "Gerber" artwork layer.
sonar6.gml
The RS-274X "Gerber" mask layer.
sonar6.drl
The "Excellon" NC drill file.
sonar6.tol
The "Excellon" tool rack file.

4. Software

The following files are available:

sonar6.ucl
The µCL source code for the Sonar6 module.
sonar6.asm
The Sonar6 module assembly code file.
sonar6.lst
The Sonar6 module listing file.
sonar6.hex
The µCL Sonar6 Intel® Hex file.

5. Issues

The following fabrications issues came up:


Copyright © 2007 by Wayne C. Gramlich. All rights reserved.