Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›MaxBotix LV-MaxSonar-EZ, HRLV-MaxSonar-EZ, XL-MaxSonar-EZ

Component guide · Intermediate · 5 min read

MaxBotix LV-MaxSonar-EZ, HRLV-MaxSonar-EZ, XL-MaxSonar-EZ, I2CXL, ParkSonar

ProxSonar and USB-MaxSonar Sensors

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors isMaxBotix LV, HRLV and XL-MaxSonar-EZ sensors pinoutWiring the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

MaxBotix MaxSonar-EZ sensors are high-quality ultrasonic rangefinders with three outputs at once: analog voltage, pulse width and serial. The LV series reads in inches up to 6.45 m, the HRLV in millimetres up to 5 m, and the XL series in centimetres up to 7.65 m with strong noise rejection. EZ0 has the widest beam and EZ4 the narrowest. USB models plug straight into a PC.

Key specs at a glance

Range
6.45 m (LV), 5 m (HRLV), 7.65 m (XL)
Resolution
1 inch (LV), 1 mm (HRLV), 1 cm (XL)
Outputs
Analog, pulse width, serial (RS232 or TTL); I2C on I2CXL; USB on USB models
Supply
2.5 to 5.5 V (LV), 2.5 to 5.5 V (HRLV), 3.3 to 5.5 V (XL)
Beam
EZ0 widest to EZ4 narrowest
Rate
About 10 to 20 Hz

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1MaxBotix MB1000 LV-MaxSonar-EZ0 Ultrasonic Sensor Module – 645cm Range, 20Hz Read Rate₹2,439
  • Option 2MaxBotix MB1010 LV-MaxSonar-EZ1 Ultrasonic Rangefinder Module₹2,809
  • Option 3MaxBotix MB1020 LV-MaxSonar-EZ2 Ultrasonic Distance Module – 645cm Range, Analog/PWM/RS232 Output₹2,509
  • Option 4MaxBotix MB1030 LV-MaxSonar-EZ3 Ultrasonic Sensor – Narrow Beam, 254″ Range₹2,809
  • Option 5MaxBotix MB1040 LV-MaxSonar-EZ4 Ultrasonic Sensor Module₹2,499
  • Option 6MaxBotix MB1003 HRLV-MaxSonar-EZ0 Ultrasonic Rangefinder Module₹3,789
01

What the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors is

MaxBotix MaxSonar EZ sensors (MB1000 to MB1040) are ultrasonic rangefinders that give distance as analog voltage, pulse width and serial output, for robots and drones.

Pick the beam by the job: EZ0 or EZ1 for detecting people, EZ3 or EZ4 to measure a specific target without side echoes.

The serial output on most EZ models is RS232-style inverted logic; invert it in software or use the TTL models (T suffix). The I2CXL answers at address 0x70: write 81 to start a reading, wait 100 ms and read two bytes in cm.

02

MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors pinout

The pins on the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors and what each one does.

PinFunction
GND, +5Power
ANAnalog output
PWPulse width output
TX, RXSerial out and range start
BWChaining / output mode
PinFunction
GND, +5
Power
AN
Analog output
PW
Pulse width output
TX, RX
Serial out and range start
BW
Chaining / output mode
03

Wiring the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors

Connect the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors like this.

MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors pinArduino UnoESP32
+55 V3.3 V
GNDGNDGND
ANA0GPIO 34
PWD3GPIO 27
+5
Arduino Uno:
5 V
ESP32:
3.3 V
GND
Arduino Uno:
GND
ESP32:
GND
AN
Arduino Uno:
A0
ESP32:
GPIO 34
PW
Arduino Uno:
D3
ESP32:
GPIO 27
04

Example code

A minimal sketch to check the part works.

Read analog and pulse outputs · Arduino C++Verify & upload in Electrolark
// LV-MaxSonar: analog Vcc/512 per inch; XL-MaxSonar: Vcc/1024 per cm; HRLV: Vcc/1024 per 5 mm
const int AN = A0, PW = 3;

void setup() { Serial.begin(115200); pinMode(PW, INPUT); }

void loop() {
  int raw = analogRead(AN);                // 10-bit at Vcc reference
  float hrlv_mm = raw * 5.0;               // HRLV: 5 mm per step
  unsigned long us = pulseIn(PW, HIGH);    // HRLV pulse: 1 us per mm; LV: 147 us per inch; XL: 58 us per cm
  Serial.print("Analog "); Serial.print(hrlv_mm, 0);
  Serial.print(" mm  Pulse "); Serial.print(us); Serial.println(" mm");
  delay(200);
}
05

Setup and tuning

Supply

run on 2.5 to 5.5 V.

Outputs

AN gives analog (Vcc/512 per inch), PW gives pulse width (147 µs per inch), TX gives serial.

Beam

pick EZ0 for wide beams and EZ4 for narrow beams.

Range

about 6 to 254 inches (15 cm to 6.45 m); objects closer than 6 inches read as 6.

Noise

power from a clean supply; add a capacitor and resistor filter.

06

What you need

Shop this list20 of 20 found in our store · ₹59,365

  • MaxBotix MB1000 LV-MaxSonar-EZ0 Ultrasonic Sensor Module – 645cm Range, 20Hz Read Rate: the part this guide coversMaxBotix MB1000 LV-MaxSonar-EZ0 Ultrasonic Sensor Module – 645cm Range, 20Hz Read Rate₹2,439
  • MaxBotix MB1010 LV-MaxSonar-EZ1 Ultrasonic Rangefinder Module: another version this guide coversMaxBotix MB1010 LV-MaxSonar-EZ1 Ultrasonic Rangefinder Module₹2,809
  • MaxBotix MB1020 LV-MaxSonar-EZ2 Ultrasonic Distance Module – 645cm Range, Analog/PWM/RS232 Output: another version this guide coversMaxBotix MB1020 LV-MaxSonar-EZ2 Ultrasonic Distance Module – 645cm Range, Analog/PWM/RS232 Output₹2,509
  • MaxBotix MB1030 LV-MaxSonar-EZ3 Ultrasonic Sensor – Narrow Beam, 254″ Range: another version this guide coversMaxBotix MB1030 LV-MaxSonar-EZ3 Ultrasonic Sensor – Narrow Beam, 254″ Range₹2,809
  • MaxBotix MB1040 LV-MaxSonar-EZ4 Ultrasonic Sensor Module: another version this guide coversMaxBotix MB1040 LV-MaxSonar-EZ4 Ultrasonic Sensor Module₹2,499
  • MaxBotix MB1003 HRLV-MaxSonar-EZ0 Ultrasonic Rangefinder Module: another version this guide coversMaxBotix MB1003 HRLV-MaxSonar-EZ0 Ultrasonic Rangefinder Module₹3,789
  • MaxBotix MB1013 HRLV-MaxSonar-EZ1 Ultrasonic Sensor – 5m Range, 1mm Resolution, Analog/PWM/Serial Output: another version this guide coversMaxBotix MB1013 HRLV-MaxSonar-EZ1 Ultrasonic Sensor – 5m Range, 1mm Resolution, Analog/PWM/Serial Output₹2,279
  • MaxBotix MB1023 HRLV-MaxSonar-EZ2 Ultrasonic Sensor – Pulse, Analog & Serial Output: another version this guide coversMaxBotix MB1023 HRLV-MaxSonar-EZ2 Ultrasonic Sensor – Pulse, Analog & Serial Output₹2,349
  • MaxBotix MB1604 HRLV-EZ0T Ultrasonic Rangefinder – High Sensitivity Wide Beam Sensor: another version this guide coversMaxBotix MB1604 HRLV-EZ0T Ultrasonic Rangefinder – High Sensitivity Wide Beam Sensor₹2,699
  • MaxBotix MB1634 HRLV-ShortRange-EZ3T Ultrasonic Distance Sensor – Pulse/Analog/TTL Output: another version this guide coversMaxBotix MB1634 HRLV-ShortRange-EZ3T Ultrasonic Distance Sensor – Pulse/Analog/TTL Output₹2,589
  • MaxBotix MB1200 XL-MaxSonar-EZ0 High-Performance Ultrasonic Sensor Module: another version this guide coversMaxBotix MB1200 XL-MaxSonar-EZ0 High-Performance Ultrasonic Sensor Module₹3,619
  • MaxBotix MB1210 XL-MaxSonar-EZ1 Ultrasonic Sensor – 25-765cm Range, Pulse/Analog/RS232 Output: another version this guide coversMaxBotix MB1210 XL-MaxSonar-EZ1 Ultrasonic Sensor – 25-765cm Range, Pulse/Analog/RS232 Output₹3,429
  • MaxBotix MB1220 XL-MaxSonar-EZ2 Ultrasonic Distance Sensor: another version this guide coversMaxBotix MB1220 XL-MaxSonar-EZ2 Ultrasonic Distance Sensor₹2,824
  • MaxBotix MB1230 XL-MaxSonar-EZ3 Ultrasonic Rangefinder – 20cm to 765cm Range, Analog/Serial/PWM Output: another version this guide coversMaxBotix MB1230 XL-MaxSonar-EZ3 Ultrasonic Rangefinder – 20cm to 765cm Range, Analog/Serial/PWM Output₹3,649
  • MaxBotix MB1240 XL-MaxSonar-EZ4 High-Performance Ultrasonic Sensor Module: another version this guide coversMaxBotix MB1240 XL-MaxSonar-EZ4 High-Performance Ultrasonic Sensor Module₹3,039
  • MaxBotix MB1260 XL-MaxSonar-EZL0 Ultrasonic Sensor Module: another version this guide coversMaxBotix MB1260 XL-MaxSonar-EZL0 Ultrasonic Sensor Module₹5,339
  • MaxBotix MB1340 XL-MaxSonar-AE4 Ultrasonic Sensor Module: another version this guide coversMaxBotix MB1340 XL-MaxSonar-AE4 Ultrasonic Sensor Module₹2,759
  • MaxBotix MB1242 I2CXL-MaxSonar-EZ4 Ultrasonic Sensor Module: another version this guide coversMaxBotix MB1242 I2CXL-MaxSonar-EZ4 Ultrasonic Sensor Module₹3,869
  • MaxBotix MB1009 ParkSonar-EZ144 Ultrasonic Sensor – Logic/RS232 Output: another version this guide coversMaxBotix MB1009 ParkSonar-EZ144 Ultrasonic Sensor – Logic/RS232 Output₹1,959
  • MaxBotix MB1034 LV-ProxSonar-EZ3 Ultrasonic Sensor – Proximity & Range Detection, RS232/Logic Output: another version this guide coversMaxBotix MB1034 LV-ProxSonar-EZ3 Ultrasonic Sensor – Proximity & Range Detection, RS232/Logic Output₹2,109
07

Alternatives and when to choose them

  • ✓MaxBotix WR sensors: outdoor housings.
  • ✓HC-SR04: cheap, needs trigger timing.
  • ✓US-100 and SRF05: low-cost alternatives.
08

Common mistakes to avoid

  • !Expecting readings under 6 inches.
  • !Running multiple sensors without chaining.
  • !Noisy supply.
  • !Wrong scale factor.
09

Frequently asked questions

Which output should I use with Arduino?

Analog output is simplest with analogRead; pulse width with pulseIn gives finer resolution.

What do EZ0 to EZ4 mean?

They set the beam width, from the widest EZ0 to the narrowest EZ4.

Why does it read 6 inches at close range?

Anything closer than about 6 inches (15 cm) is reported as 6 inches by design.

Can two sensors run together?

Yes, chain them with the RX pin to avoid interference.

Why are readings noisy?

Supply noise is the usual cause; add a 100 Ω resistor and 100 µF capacitor filter on VCC.

Parts for this guide

  • MaxBotix MB1000 LV-MaxSonar-EZ0 Ultrasonic Sensor Module – 645cm Range, 20Hz Read Rate
    ₹2,439View
  • MaxBotix MB1010 LV-MaxSonar-EZ1 Ultrasonic Rangefinder Module
    ₹2,809View
  • MaxBotix MB1020 LV-MaxSonar-EZ2 Ultrasonic Distance Module – 645cm Range, Analog/PWM/RS232 Output
    ₹2,509View
  • MaxBotix MB1030 LV-MaxSonar-EZ3 Ultrasonic Sensor – Narrow Beam, 254″ Range
    ₹2,809View
  • MaxBotix MB1040 LV-MaxSonar-EZ4 Ultrasonic Sensor Module
    ₹2,499View
  • MaxBotix MB1003 HRLV-MaxSonar-EZ0 Ultrasonic Rangefinder Module
    ₹3,789View
  • MaxBotix MB1013 HRLV-MaxSonar-EZ1 Ultrasonic Sensor – 5m Range, 1mm Resolution, Analog/PWM/Serial Output
    ₹2,279View
  • MaxBotix MB1023 HRLV-MaxSonar-EZ2 Ultrasonic Sensor – Pulse, Analog & Serial Output
    ₹2,349View
  • MaxBotix MB1604 HRLV-EZ0T Ultrasonic Rangefinder – High Sensitivity Wide Beam Sensor
    ₹2,699View
  • MaxBotix MB1634 HRLV-ShortRange-EZ3T Ultrasonic Distance Sensor – Pulse/Analog/TTL Output
    ₹2,589View
  • MaxBotix MB1200 XL-MaxSonar-EZ0 High-Performance Ultrasonic Sensor Module
    ₹3,619View
  • MaxBotix MB1210 XL-MaxSonar-EZ1 Ultrasonic Sensor – 25-765cm Range, Pulse/Analog/RS232 Output
    ₹3,429View
  • MaxBotix MB1220 XL-MaxSonar-EZ2 Ultrasonic Distance Sensor
    ₹2,824View
  • MaxBotix MB1230 XL-MaxSonar-EZ3 Ultrasonic Rangefinder – 20cm to 765cm Range, Analog/Serial/PWM Output
    ₹3,649View
  • MaxBotix MB1240 XL-MaxSonar-EZ4 High-Performance Ultrasonic Sensor Module
    ₹3,039View
  • MaxBotix MB1260 XL-MaxSonar-EZL0 Ultrasonic Sensor Module
    ₹5,339View
  • MaxBotix MB1340 XL-MaxSonar-AE4 Ultrasonic Sensor Module
    ₹2,759View
  • MaxBotix MB1242 I2CXL-MaxSonar-EZ4 Ultrasonic Sensor Module
    ₹3,869View
  • MaxBotix MB1009 ParkSonar-EZ144 Ultrasonic Sensor – Logic/RS232 Output
    ₹1,959View
  • MaxBotix MB1034 LV-ProxSonar-EZ3 Ultrasonic Sensor – Proximity & Range Detection, RS232/Logic Output
    ₹2,109View
  • MaxBotix MB1043 Ultrasonic Sensor – USB Interface, 5m Range, 1mm Resolution
    ₹2,659View
  • MaxBotix MB1403 HRUSB-MaxSonar-EZ0 Ultrasonic Sensor – USB Interface
    ₹4,169View
  • MaxBotix MB1413 HRUSB-MaxSonar-EZ1 Ultrasonic Sensor – USB Interface
    ₹3,419View
  • MaxBotix MB1414 USB-ProxSonar-EZ1 Ultrasonic Sensor – USB Interface
    ₹4,109View
  • MaxBotix MB1423 HRUSB-MaxSonar-EZ2 Ultrasonic Sensor
    ₹4,148View
  • MaxBotix MB1443 HRUSB-MaxSonar-EZ4 Ultrasonic Sensor – USB Interface
    ₹4,169View
  • Digilent Pmod MAXSONAR MaxBotix Ultrasonic Range Finder Module
    ₹2,879View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • 0.96" OLED Display 128x64
    ₹139View
  • HC-SR04 Ultrasonic Range Finder Sensor Module for Arduino
    ₹69View
Shop Ultrasonic Distance & Ranging Sensors

Keep learning

Component guideIntermediateMaxBotix Weather-Resistant MaxSonarMaxBotix WR sensors put MaxSonar electronics in an IP67 PVC housing with a 3/4 inch pipe thread for outdoor and industrial use.6 min read · SensorsComponent guideBeginnerHC-SR04 Ultrasonic SensorThe HC-SR04 measures distance from about 2 cm to 4 m by sending a 40 kHz ultrasonic pulse and timing the echo.3 min read · SensorsComponent guideBeginnerUS-100, HY-SRF05, RCWL-9620, Grove Ultrasonic RangerThese are alternatives to the HC-SR04 for 2 cm to 4.5 m distance measurement.4 min read · Sensors

Sources

  • MaxBotix LV, HRLV and XL-MaxSonar-EZ datasheets

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensors isMaxBotix LV, HRLV and XL-MaxSonar-EZ sensors pinoutWiring the MaxBotix LV, HRLV and XL-MaxSonar-EZ sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide8 items · ₹22,447

MaxBotix MB1000 LV-MaxSonar-EZ0 Ultrasonic Sensor Module – 645cm Range, 20Hz Read Rate · MaxBotix MB1013 HRLV-MaxSonar-EZ1 Ultrasonic Sensor – 5m Range, 1mm Resolution, Analog/PWM/Serial Output · MaxBotix MB1023 HRLV-MaxSonar-EZ2 Ultrasonic Sensor – Pulse, Analog & Serial Output · MaxBotix MB1604 HRLV-EZ0T Ultrasonic Rangefinder – High Sensitivity Wide Beam Sensor · MaxBotix MB1634 HRLV-ShortRange-EZ3T Ultrasonic Distance Sensor – Pulse/Analog/TTL Output · MaxBotix MB1200 XL-MaxSonar-EZ0 High-Performance Ultrasonic Sensor Module · MaxBotix MB1220 XL-MaxSonar-EZ2 Ultrasonic Distance Sensor · MaxBotix MB1230 XL-MaxSonar-EZ3 Ultrasonic Rangefinder – 20cm to 765cm Range, Analog/Serial/PWM Output

Run itChange the inputs and watch the output

HRLV-MaxSonar: 5 mm per ADC count on the analog pin, and 1 us per mm on the pulse pin.

Serial monitor115200 baud
Analog 1195 mm  Pulse 1198 mm

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question