Introduction: Distance Finder Using ARM Cortex-M4

Picture of Distance Finder Using ARM Cortex-M4

This is a breadboard based project which uses ARM Cortex-M4(Texas Instruments EK-TM4C123GXL) to find the distance using Ultrasonic Sensor. The output can be obtained in "cm" on both 16x2 LCD Screen and Serial Monitor of Energia IDE, Tera Team, Keil uVision or any other virtual terminal software.

We can also use 16x2 LCD Screen or Serial Monitor at the single time, means one thing is optional. During the measurement of distance, a RED LED of EK-TM4C123GXL shows the status of measurement and microcontroller. The whole circuit is powered by +5V (VBUS) and +3.3V of EK-TM4C123GXL..bin file of c99 code is attached with the provided link at the end of this tutorial. .bin file can be uploaded to the microcontroller using LM Flash Programmer.

Step 1: Requirements

The following things are required to get this project done:

1- Texas Instruments EK-TM4C123GXL

2- Potentiometer (eg 5K) (optional)

3- LCD 16x2 (optional)

4- Ultrasonic sensor

5- LM Flash Programmer (software on PC)

=> If you don't know how to use and install LM Flash Programmer, then please check out my previous Instructable, or click on the following links:

Downloading LM Flash Programmer

Upload .bin or .hex File Using LM Flash Programmer

Step 2: Pin-outs & Wiring

Picture of Pin-outs & Wiring

The Pin-outs & Wiring of ARM Cortex-M4 (Texas Instruments EK-TM4C123GXL) and other peripheral is attached with this step and also given following:

=================
TM4C123GXL => LCD

=================

VBUS => VDD or VCC

GND => VSS

PB4 => RS

GND => RW

PE5 => E

PE4 => D4

PB1 => D5

PB0 => D6

PB5 => D7

+3.3V => A

GND => K

========================

TM4C123GXL => Potentiometer

========================

VBUS => 1st pin

GND => 3rd pin

================

Potentiometer => LCD

================

2nd pin => Vo

=> You can set contrast using Potentiometer

==========================

TM4C123GXL => Ultrasonic sensor

==========================

VBUS => VCC

PA6 => Trig

PA5 => Echo

GND => GND

Step 3: Upload the .bin File

Picture of Upload the .bin File

Upload the attached .bin file with this step to ARM Cortex-M4(Texas Instruments EK-TM4C123GXL) using LM Flash Programmer.

Step 4: Get Your Output

Picture of Get Your Output

After uploading .bin file to ARM Cortex-M4(Texas Instruments EK-TM4C123GXL), you can get your output in "cm" on 16x2 LCD Screen or any of your desired terminal e.g. Energia IDE Serial Monitor, Keil uVision and Tera Team Virtual Terminal etc or both.

Comments

About This Instructable

127views

3favorites

License:

Bio: I'm Electrical Engineering Student, Coffee Lover, Automated System designer, Programmer and Security System Designer.
More by Adeel Ijaz:Traffic Light Controller Using ARM Cortex-M4Traffic Light Controller Using ArduinoLaser Tripwire Using ARM Cortex-M4
Add instructable to: