Difference between revisions of "Autonomous Ultrasonic Wi-Fi Arduino Robot"

Line 10: Line 10:
 
==Bill of Materials==
 
==Bill of Materials==
  
*<sdr item id=1713>IG32 Mecanum Vectoring Robot</sdr item> Options:
+
*<sdr item id=1713>IG32 Mecanum Vectoring Robot</sdr item>
**<sdr item id=2316>PWM Motor Controller 16A</sdr item>
+
**Options:
 +
**<sdr item id=2316>PWM Motor Controller 16A</sdr item> (qty 4)
 
**<sdr item id=1292>Arduino Mega 2560 R3</sdr item>
 
**<sdr item id=1292>Arduino Mega 2560 R3</sdr item>
 
**<sdr item id=1440>Programmable Wifi Custom Control Interface Package</sdr item>
 
**<sdr item id=1440>Programmable Wifi Custom Control Interface Package</sdr item>
Line 19: Line 20:
 
*<sdr item id=1419>SDR Custom Arduino Mega Shield</sdr item>
 
*<sdr item id=1419>SDR Custom Arduino Mega Shield</sdr item>
 
*<sdr item id=1274>HRLV-MaxSonar-EZ4 Ultrasonic Range Finder</sdr item> (qty 2)
 
*<sdr item id=1274>HRLV-MaxSonar-EZ4 Ultrasonic Range Finder</sdr item> (qty 2)
*<sdr item id=184>HS-422 Servos</sdr item> (qty 2)
+
*<sdr item id=184>HS-422 Servo</sdr item> (qty 2)
 
*<sdr item id=1644>MaxBotix Sonar Servo Arm Bracket</sdr item> (qty 2)
 
*<sdr item id=1644>MaxBotix Sonar Servo Arm Bracket</sdr item> (qty 2)
 
*IP pan and tilt camera
 
*IP pan and tilt camera
Line 25: Line 26:
 
*Weight: Approximately 8-lbs in the default configuration
 
*Weight: Approximately 8-lbs in the default configuration
  
== Arduino Board ==
+
==Arduino Board==
 
We knew we wanted to use the <sdr item id=1292>Arduino Mega</sdr item> because of its strength and ease to use. Along with this, we knew we needed an <sdr item id=2025>Ethernet Shield</sdr item> to receive drive commands over wifi. This Ethernet shield will be attached to a router that will do the broadcasting. After attaching the Arduino's Ethernet shield, we found it was difficult to reach the pins we planned to use this project. We decided to use our <sdr item id=1419>SDR Custom Arduino Mega Shield</sdr item>. This allowed us to have access to the pins we wanted to use while thinking ahead about wire management.
 
We knew we wanted to use the <sdr item id=1292>Arduino Mega</sdr item> because of its strength and ease to use. Along with this, we knew we needed an <sdr item id=2025>Ethernet Shield</sdr item> to receive drive commands over wifi. This Ethernet shield will be attached to a router that will do the broadcasting. After attaching the Arduino's Ethernet shield, we found it was difficult to reach the pins we planned to use this project. We decided to use our <sdr item id=1419>SDR Custom Arduino Mega Shield</sdr item>. This allowed us to have access to the pins we wanted to use while thinking ahead about wire management.
  
== Ultrasonic Sensors ==
+
==Ultrasonic Sensors==
 
We decided at an early stage that [[Ultrasonic Distance Sensor|ultrasonic sensors]] would be the best for our robot. They are a cheaper alternative to other proximity sensing tools. An ultrasonic sensor works just like how a bat detects what is around it. It shoots out a sound wave and waits for a reflection of that wave. The amount of time it takes for the wave to come back determines the distance from the object you are.  
 
We decided at an early stage that [[Ultrasonic Distance Sensor|ultrasonic sensors]] would be the best for our robot. They are a cheaper alternative to other proximity sensing tools. An ultrasonic sensor works just like how a bat detects what is around it. It shoots out a sound wave and waits for a reflection of that wave. The amount of time it takes for the wave to come back determines the distance from the object you are.  
  
Line 37: Line 38:
 
There are several different types of sonar sensors with a difference of range, width and precision of the reflect signal. Here is our list of <sdr category id=107>Ultrasonic Range Finders</sdr category>.
 
There are several different types of sonar sensors with a difference of range, width and precision of the reflect signal. Here is our list of <sdr category id=107>Ultrasonic Range Finders</sdr category>.
  
== Servos ==
+
==Servos==
Now that we have sonar sensors, we need a way to make them move. This is to allow two sensors to see 360 degrees around the robot. They can(and have) been programmed to sweep different sides of the robot.This movement was accomplished by using two <sdr item id=184>HS-422 Servos</sdr item>. This allowed for a 180-degree rotation but you can customize your servo purchases for different projects. This is our list of <sdr category id=60>Servos</sdr category>. To mount the sonar sensors to the servos, we need a Single Maxbotics Sonar Servo Arm Bracket.To mount the servos to the chassis you will need [https://www.superdroidrobots.com/shop/item.aspx/servo-standoff-mounting-hardware/399/ Servo Standoff Mounting Hardware]
+
Now that we have sonar sensors, we need a way to make them move. This is to allow two sensors to see 360 degrees around the robot. They can(and have) been programmed to sweep different sides of the robot.This movement was accomplished by using two <sdr item id=184>HS-422 Servos</sdr item>. This allowed for a 180-degree rotation but you can customize your servo purchases for different projects. This is our list of <sdr category id=60>Servos</sdr category>. To mount the ultrasonic sensors to the servos we used <sdr item id=1644>Maxbotics Sonar Servo Arm Brackets</sdr item>. We used <sdr item id=399>Servo Standoff Mounting Hardware</sdr item> to mount the servos to the chassis.
 +
 
 +
The servos expect power, ground and a signal to work properly. The input signal needs a pulse every 1500 usec. The servo knows to spin when this pulse frequency is changed. The acceptable frequency is 800 usec to 2200 usec without 800 usec being the furthest spin in one direction while 2200 usec is the furthest in the opposite. You can test this with a signal generator/Arduino and an oscilloscope.
 +
 
 +
== Motor Controller ==
 +
We want the robot to be able to move, so we need motors and wheels. We decided to go with <sdr item id=2316>PWM Motor Controller 16A</sdr item> (qty 4). This is easy to use and a cheaper alternative to other motor controllers. It also was a lower voltage alternative taking only 12 volts to power while some require around 24+ volts. We sell a large variety of <sdr category id=5>Motor Controllers</sdr category> which may be needed for other applications.
 
<br />
 
<br />
 
[[Category:Autonomous]]
 
[[Category:Autonomous]]

Revision as of 15:09, 10 March 2021

The image below is the Autonomous Wi-Fi Robot we will be programming. This is the promotions robot give-away we did in 2013. This support page deals with the programming of the robot. My name is Matt. I am a recent hire at SuperDroid Robots and my first task was to program this robot and let you know my experience and provide code samples.

TP-950-001 250.jpg

The Project Scope

This robot is a Mecanum Wheel Vectoring Robot Autonomous Arduino Platform. It was built, designed, and programmed specifically as a promotional robot to be given away to a lucky winner! This robot was designed to be a good start for any robot enthusiast. The starter application we will be supplying (link to this software will be coming soon) to you will be a free movement program. This will allow the robot to automatically travel around any room predicting the safest path to take while broadcasting video back to a local computer. Each part of this code will be commented on to explain its purpose and how it can be edited to make changes. This will allow you to learn how the code works and create new functionality for this robot or any similar robot. Along with these program comments, we will also be explaining some problems we ran into while building this robot in the hopes you will have material to refer to if you get stuck. This will be split up between two sections of Hardware and Software. This autonomous Arduino Mega powered Mecanum wheel robot platform is designed and fabricated in North Carolina, USA and fully supported by SuperDroid Robots, an industry leader in robotics. This robot is built from the IG32 Mecanum Vectoring Robot. The chassis is cut on our CNC plasma table and bent on our CNC break press. Its made of 3/32" thick Aluminum. This robot platform is specifically designed for direct driving with Mecanum wheels and hubs (listed below). See our vectoring robot page for more details of the cool things a Mecanum wheel robot can do.

Below is a full list of the components used on our robot directly after that will be the reasoning behind choosing each part and some of the problems I ran into and solved while constructing the robot.

Bill of Materials

Arduino Board

We knew we wanted to use the Arduino Mega because of its strength and ease to use. Along with this, we knew we needed an Ethernet Shield to receive drive commands over wifi. This Ethernet shield will be attached to a router that will do the broadcasting. After attaching the Arduino's Ethernet shield, we found it was difficult to reach the pins we planned to use this project. We decided to use our SDR Custom Arduino Mega Shield. This allowed us to have access to the pins we wanted to use while thinking ahead about wire management.

Ultrasonic Sensors

We decided at an early stage that ultrasonic sensors would be the best for our robot. They are a cheaper alternative to other proximity sensing tools. An ultrasonic sensor works just like how a bat detects what is around it. It shoots out a sound wave and waits for a reflection of that wave. The amount of time it takes for the wave to come back determines the distance from the object you are.

With this robot we are hoping to get no closer to an obstacle than 3-5 inches. Knowing this we were able to pick out a sensor with high precision in this range. We ended up picking two HRLV-MaxSonar-EZ4 Ultrasonic Range Finders because of the signal strength in this area from the sensor.

We were able to test the sonar sensor by providing power and ground to the circuit to power it on. We then connected the output pin to a voltmeter. From this point, we could see the voltage move up and down depending on how close we held the sensor to something. This quickly confirmed this was the proper distance sensor for us.

There are several different types of sonar sensors with a difference of range, width and precision of the reflect signal. Here is our list of Ultrasonic Range Finders.

Servos

Now that we have sonar sensors, we need a way to make them move. This is to allow two sensors to see 360 degrees around the robot. They can(and have) been programmed to sweep different sides of the robot.This movement was accomplished by using two HS-422 Servos. This allowed for a 180-degree rotation but you can customize your servo purchases for different projects. This is our list of Servos. To mount the ultrasonic sensors to the servos we used Maxbotics Sonar Servo Arm Brackets. We used Servo Standoff Mounting Hardware to mount the servos to the chassis.

The servos expect power, ground and a signal to work properly. The input signal needs a pulse every 1500 usec. The servo knows to spin when this pulse frequency is changed. The acceptable frequency is 800 usec to 2200 usec without 800 usec being the furthest spin in one direction while 2200 usec is the furthest in the opposite. You can test this with a signal generator/Arduino and an oscilloscope.

Motor Controller

We want the robot to be able to move, so we need motors and wheels. We decided to go with PWM Motor Controller 16A (qty 4). This is easy to use and a cheaper alternative to other motor controllers. It also was a lower voltage alternative taking only 12 volts to power while some require around 24+ volts. We sell a large variety of Motor Controllers which may be needed for other applications.