Close
0%
0%

Arduino based sonar tower

The goal is to make an arduino based sonar tower which scans and displays the direct enviroment.

Similar projects worth following
The goal is to take distance readings from a point and map them to pixels on a screen so a map of the area will be displayed.

To accomplish the goal detailed in the description we had to learn the following:

  • How to control a stepper motor (and driver).
  • How to use a display.
  • How to use the ultrasonic sensor.
  • How to write the code for all of these.

We completed the project itself in 8 hours (485 minutes to be exact).

The final pinout on the Arduino Uno:

Clips made while doing this project:

https://imgur.com/a/M8viiuX

In the end the distance measurements taken by the ultrasonic sensor left much to be desired but by doing multiple measurements for each step I was able to get the precision to a point where I was happy with the result.

SonartorenScript.zip

Final arduino script for the tower

x-zip-compressed - 1.55 kB - 03/05/2019 at 17:00

Download

Tower_Files.zip

3D models for the tower

x-zip-compressed - 1.72 kB - 03/01/2019 at 19:46

Download

SonarPinlayoutTest.zip

A test script with all sensors and actuators

x-zip-compressed - 1.61 kB - 02/13/2019 at 21:09

Download

stepper.zip

A simple stepper script

x-zip-compressed - 709.00 bytes - 02/13/2019 at 19:41

Download

  • 1 × Arduino Uno
  • 1 × TFT screen
  • 1 × Ultrasone sensor
  • 1 × Stepper motor
  • 1 × Stepper driver

View all 6 components

  • Writing the report

    Vincent Dankbaar04/11/2019 at 12:46 0 comments

    Writing the report took up approximately 6 hours of our time. Spread out over multiple weeks whenever we had time.

  • 20-2-2019

    Vincent Dankbaar02/20/2019 at 20:55 0 comments

    Finalised the arduino script for the tower, combining all the previous test scripts.

    Time: 55 minutes

  • 17-2-2019

    Vincent Dankbaar02/17/2019 at 16:55 0 comments

    Used Autodesk Tinkercad to create an adapter for the shaft of the stepper motor.

    Time: 20 minutes

  • 13-2-2019

    Vincent Dankbaar02/13/2019 at 19:17 0 comments

    All the parts for the stepper assembly arrived.

    1 hour: Setup and soldering

    30 minutes: Connecting the parts and running a simple test script

    //Test script
    
    // defines pins numbers
    const int stepPin = 3; 
    const int dirPin = 4; 
     
    void setup() {
      // Sets the two pins as Outputs
      pinMode(stepPin,OUTPUT); 
      pinMode(dirPin,OUTPUT);
    }
    void loop() {
      digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
    
      // 200 pulses = full rotation
      for(int x = 0; x < 200; x++) {
        digitalWrite(stepPin,HIGH); 
        delayMicroseconds(1000); 
        digitalWrite(stepPin,LOW); 
        delayMicroseconds(1000); 
      }
      delay(1000);
      
      digitalWrite(dirPin,LOW); //Changes the rotations direction
      // 400 pulses == 2 rotations
      for(int x = 0; x < 400; x++) {
        digitalWrite(stepPin,HIGH);
        delayMicroseconds(1000);
        digitalWrite(stepPin,LOW);
        delayMicroseconds(1000);
      }
      delay(1000);
    }

    The correct color order left to right with the pot on the left side is: Red-Green-

  • Bringing the log up to speed

    Vincent Dankbaar02/11/2019 at 15:53 0 comments

    The project was started before I added it to hackaday, this is our progress thus far:

    4-2-2019, Marco & Vincent, 2 uur, Building distance to coordinate mapping algorithm

    7-2-2019, Vincent, 2 uur 45 min, Converting the algorithm to C++ for the arduino

    8-2-2019, Marco & Vincent, 50 min, Testing the Ultrasone sensor

    9-2-2019, Vincent, 1 uur 30 minuten, Writing a script to make the ultrasone sensor more usable

    10-2-2019, Vincent, 1 uur, Research into stepper motors

View all 5 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates