Pmod MAXSONAR Reference Manual
The Digilent Pmod MAXSONAR (Revision A) is an ultrasonic range finder with a resolution of 1 inch up to 255 inches away.
Download This Reference Manual
- Ultrasonic range finder with effective detection range of 6 in - 255 in (15 cm - 648 cm)
- Detect object distance with 1.0 in (2.54 cm) resolution up to 20 ft away
- Continuous measurement (free run) operation
- Three options for sending range data: UART, analog and PWM
- 6-pin Pmod port with UART interface
The Pmod MAXSONAR utilizes the MaxBotix® LV-MaxSonar®-EZ1™ sonar range finder to provide accurate information about the proximity of nearby objects. Range data is acquired by the module sending thirteen 42 KHz beams of varying widths, allowing for more accurate detection. Under free-run operation, range readings can be taken every 50 milliseconds.
Interfacing with the Pmod
The Pmod MAXSONAR communicates with the host board via the UART protocol, analog output, and PWM timing. The module requires 250 milliseconds to power up and then will perform a self-calibration if the Receive Data (RX) pin is left at floating or logic level high voltage. The calibration will take 49 ms, and after an additional 100 ms of waiting time, the module will be able to take measurement readings every 49 milliseconds.
The UART protocol is configured with a baud rate of 9600, 8 bits, no parity, and a single stop bit. When the RX pin is left floating or held at a logic level high voltage, 5 bytes will be sent out over the Transfer Data (TX) pin beginning with the capital ASCII character 'R', three ASCII digits representing the detected distance, and a carriage return character (ASCII character 13).
An analog signal representative of the measured distance of the object in front of the Pmod MAXSONAR may also be read. The output itself has nine bits of resolution, so with a power supply at 3.3V each inch is equivalent to ~6.4 mV. Users that are measuring the incoming analog signal with a popular 10-bit ADC will have to divide their measured value by 2 before calculating the reported distance.
The Pmod MAXSONAR also provides distance data through a pulse-width modulation signal. Every 147 uS that the pin is measured at a logic level high voltage state is equivalent to 1 inch away. If the signal is measured to be high for 2.205 milliseconds, then the detected object is 15 inches away from the front of the Pmod MAXSONAR. The maximum measured pulse time of 37.5 milliseconds indicates that there is no object within 255 inches of the Pmod.
Pinout Description Table
|5||GND||Power Supply Ground|
|6||VCC||Power Supply (3.3V/5V)|
Any external power applied to the Pmod MAXSONAR must be within 2.5V and 5.5V; however, it is recommended that Pmod is operated at 3.3V.
The pins on the pin header are spaced 100 mil apart. The PCB is 0.875 inches long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header.
As the Pmod MAXSONAR is produced by MaxBotix®, Digilent does not offer the schematics of the Pmod MAXSONAR. Additional information about the sonar portion including communication modes and specific timings of the chip can be found by checking out the MaxBotix datasheet.
Example code demonstrating how to get information from the Pmod MAXSONAR.
If you have any questions or comments about the Pmod MAXSONAR, feel free to post them under the appropriate section (“Add-on Boards”) of the Digilent Forum.