PROJECT 8 – ANALOG DISTANCE SENSOR TO LCD DISPLAY

Analog distance sensor, which are mainly use to measure the distance of an object. The advantage of this sensor is the accuracy of sensor can measure the object distance up to centimeter(cm). In this project, we going to interface this sensor to Arduino Deuemilanove and display the value it Arduino LCD Keypad shield.

———————————————————————————————————————————————————-

COMPONENT NEEDED

———————————————————————————————————————————————————-

CONNECTION

———————————————————————————————————————————————————- Analog distance sensor have 3 pins which is VDD, GND, Vout. Connect the Vout to analog pin-1, GND to ground and VDD to 5V.

1-Vout 2-GND 3-VDD(+5V)

———————————————————————————————————————————————————-

ADDITIONAL INFORMATION

———————————————————————————————————————————————————- Referring to the chart above are the output voltage(V) versus distances(cm) of the analog distance sensor. By plotting the output voltage versus inverse number distance (1/cm), we can get the linear relation such as in figure below.

The linear equation is y = 20.99x + 0.19, where y is voltage output and x invert distance. Notice that the trusted output voltage are about 0.4 to 2.8 V.

———————————————————————————————————————————————————-

CODE OVERVIEW

———————————————————————————————————————————————————-

Vout = (range*500000)/1024; Get the ADC value and apply formula where to make the value in voltage with larger value. E.g: adc_value = 1022, ~ if using adc_value*5/1024, Vout = 4 ~ if using adc_value* 500000/1024 Vout = 499023

Related Posts

Nowadays, most hobbyist like to use RC servo motor to control their robot or others than that which need a precise position while a cheapest price. For this project, we are going to discover how to control 2 RC servo motor together using Arduino Duemilanove with Arduino Input Shield.

Introduction Good day, The Advanced Auto-Calibrating Line Sensor (LSA08) is capable to operate in three different modes: digital, analog, and serial. In this tutorial, I am going to show you how to make a line following robot using LSA08 in serial mode with Arduino Uno board.

Ever watch knight rider movie? The car (KITT) have a very cool light bar in front and where most people like to have one of it. Here, we are going to make one of it using Arduino Duemilanove interfacing with 8 LEDs. Enjoy..

The Bluetooth Bee (BTBEE) is an easy to use Bluetooth Serial Port Profile (SPP) module compatible with existing XBEE sockets, designed for transparent wireless serial connection setup. Using UART interface, BTBEE only can be use as a slave and communicate with host like computer, bluetooth handphone, SKKCA and other bluetooth devices. Bare in mind that communication between 2 BTBEE is not working. Bluetooth BEE is compatible with XBEE starter kit board (SKXBEE-BOARD) and UC00B, so you may use them for BTBEE communication.

By using USBasp, we are able to download the program directly to the Arduino Duemilanove board or others AVR microcontroller without pre-program bootloader. AVR USBasp is a USB in-circuit programmer and it can use to program most of the ATmel AVR controllers. It simply consist of an ATMega8 and a couple of passive components such as resistors, capacitors, LEDs and ect. The programmer uses a firmware-only USB driver and there is no special USB controller is needed. In this tutorial, we will show how to modified the Arduino Software so that you can use it to program AVR microcontrollers without pre-program bootloader.

In this project, we will use Ethernet shield and Arduino to create a simple web server. Using the Ethernet library, the device will be able to answer a HTTP request with the Ethernet shield. After opening a browser and navigating to the Ethernet shield’s IP address, the Arduino will respond with just enough HTML for a browser to display the data.

In this tutorial, we are going to built an advanced line following robot. Why I say advanced? Because normal line follower will only respond with specified/predetermined speed, however with a little trick, we can make the robot changes its speed depending on the line position.