The MaxBotix Inc., MaxSonar sensor line has become a very popular sensor for operation with the Arduino micro-controller. With three simple interfaces, it is easy to connect a MaxSonar to an Arduino.In this article, I will be providing: links to components needed, wiring diagrams for all outputs, and Arduino sketch files for all compatible MaxSonar sensors. With that being said, let’s get coding!
Table of Contents
|Arduino (the Ultimate Starter Kit is a great Choice)||an MB1013 is used for this, |
but any sensor with AN or PW will work
|Arduino Sketch tool installed on a computer||Soldering Iron & Solder|
This section assumes the Arduino Ultimate Starter Kit mentioned in the List of Materials is being used. This kit includes breakaway headers, LED's, a breadboard, a buzzer, jumper wires, an Arduinio Uno, and several other components.
1.) Install the Arduino software to your computer
2.) Solder a 7 pin header to the MaxSonar, I used a 90 degree header found here,
so the sensor faces away from the Arduino.
For instructions on soldering, SparkFun has a great tutorial seen here.
3.) Place the sensor on the breadboard, make sure to leave room for wiring and other components.
3a.) Place a red jumper between the sensor V+ and the + strip on the breadboard.
3b.) Place a blank jumper between the sensor GND and the (-) strip on the breadboard.
4.) Wire the Arduino to the breadboard
4a.) 5V to the + strip on the breadboard (allows power to multiple devices at one time)
4b.) GND to the (-)strip on the breadboard (grounding for multiple devices at once)
4c.) Wire Arduino signal input to the breadboard row with the sensor output signal.
5.) Connect the Arduino to the computer. Please allow time for the computer to install the Arduino Drivers.
|Wiring an Arduino for Analog Voltage||Wiring an Arduino for Pulse Width|