First off, why did we decide to call this thing SODAR? SOnic Detection and Ranging, or SODAR, is a lot like SONAR and RADAR. However, we don't feel comfortable calling it SONAR because we have no desire to use it for navigation and we aren't under water. Also, it's definitely not RADAR as we are using ultrasonic pulses, not radio waves to find objects. 

With the technicalities out of the way, here are the project's objectives:
 1) To create a freely rotatable SODAR system that can continuously detect objects
 2) To create a UI that displays objects similarly to radar
 3) To make it as portable as possible

To accomplish objective #1, we need a way to prevent wires from tangling while the motor spins. There are two ways that we thought would be relatively easily implementable. The first method would be to use two Arduinos and transceivers for a wireless transmission of data from the spinning platform to the computer for display. The other method would be to use something similar to a rotating electrical connection (REC), where the electrical connection would be maintained using a conductive liquid at the intersection. 

While it seems to go against objective #3, we decided to go with the rotating electrical connection idea. This is mostly because we didn't know if it'd work and wanted to try something new. On top of this, commercial slip rings are upwards of 20 dollars (price found by ellisgl) and we wanted to see how hard it would be to make a reliable REC. In our project, we are using a vinegar-salt solution as an electrical conductive liquid because it is functional and inexpensive.

Future Work Suggestion:

Use wireless transceivers so the project can be placed in one area and send data to the laptop in another area.


Electrical circuit designer/builder extraordinaire: intensePancake

Step 1: Get Materials

Non-electrical materials:

1) PVC couplings - 2", 3", and 4" diameter
2) PVC Bushing - 1"X3/4"
3) Household Goop adhesive (water-proof)
4) Gorilla glue adhesive
5) Elmer's glue adhesive
6) 12" x 12" commercial vinyl tile
7) 6" diameter cylindrical styrofoam
8) Balsa wood: 1/2"x1/2"x36", and 3/8"x3/8"x36"
9) Fun tack
10) Coupler (we used a pen body)
11) Extra cardboard (from packaging, etc)
12) Clear tape
13) White vinegar
14) NaCl
15) 3/4" Dowel

Electrical materials:

1) Arduino Uno board
2) Parallax PING))) Ultrasonic Distance Sensor
3) Stepper motor
4) SN754410 H-Bridge motor driver
5) LM7805 5V voltage regulator
6) 1kΩ resistor (1)
7) 100μF electrolytic capacitor (1)
8) 100nF capacitor (1)
9) Perforated board (1)
10) 9V batteries (2)
11) 9V battery connectors (2)
12) alligator clips (2)
13) connection wire
14) soldering iron and solder
15) solderless breadboard

PVC sidenote: We bought 4 PVC pieces thinking we would need 3 spaces for liquid electrical conductors (ground, power, signal), but we found that our vinegar-salt solution couldn't transfer 5V to the sensor, so we only ended up using two sections and put a 9V on the spinning platform.
<p>Arduino:1.8.0 (Windows 10), Kart:&quot;Arduino/Genuino Uno&quot;</p><p>sodar:62: error: 'angle' has not been declared</p><p> void writeData(float cm, angle)</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino: In function 'void loop()':</p><p>sodar:49: error: too few arguments to function 'void writeData(float, int)'</p><p> writeData(cm);</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino:62:6: note: declared here</p><p> void writeData(float cm, angle)</p><p> ^</p><p>sodar:54: error: too few arguments to function 'void writeData(float, int)'</p><p> writeData(cm);</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino:62:6: note: declared here</p><p> void writeData(float cm, angle)</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino: At global scope:</p><p>sodar:62: error: 'angle' has not been declared</p><p> void writeData(float cm, angle)</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino: In function 'void writeData(float, int)':</p><p>sodar:72: error: redeclaration of 'byte buffer [4]'</p><p> byte buffer[bufSize];</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino:64:8: note: 'byte buffer [4]' previously declared here</p><p> byte buffer[bufSize];</p><p> ^</p><p>sodar:74: error: 'angle' was not declared in this scope</p><p> floatToBuffer(buffer, angle);</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino: In function 'void longToBuffer(byte*, long int)':</p><p>D:\Belgeler\Arduino\sodar\sodar.ino:120:30: warning: right shift count &gt;= width of type</p><p> buffer[2] = (byte) data &gt;&gt; 16;</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\sodar.ino:121:30: warning: right shift count &gt;= width of type</p><p> buffer[3] = (byte) data &gt;&gt; 24;</p><p> ^</p><p>D:\Belgeler\Arduino\sodar\serial.ino: In function 'void execute(byte)':</p><p>serial:45: error: 'class Stepper' has no member named 'setAngle'</p><p> motor.setAngle(angle);</p><p> ^</p><p>exit status 1</p><p>'angle' has not been declared</p><p>This report would have more information with</p><p>&quot;Show verbose output during compilation&quot;</p><p>option enabled in File -&gt; Preferences.</p><p>how can i fix this errors</p>
<p>This is probably happening because the compiler is trying to use the default Stepper library instead of our edited one. We altered the Stepper library to support some basic angle functions that we wanted to use in this project. As stated in Step 7, you should replace the libraries/Stepper directory with the Stepper folder from our repository. This libraries/Stepper directory should be in the Arduino program files (where the executable is for the actual Arduino program). As a side note, we did not alter any of the default functions in the library, so you do not have to worry about our version messing up your other projects that involve the Stepper library. If this does not work, please let me know.</p><p>Also, this has been asked before in the comments, so I would like to make this more obvious in the Instructable itself. Would making Step 7 more descriptive have been helpful or should I add a comment to the Arduino code to remind others to use the Stepper library we edited?</p>
Hello again <br>I used your stepper library. But all errors again. I use arduino 1.8.0 and processing 3.2.3 on Windows 10.1
<p>Alright, your error seems to originate from line 49 and line 54 in sodar.ino where it is saying that it is only getting one argument (cm) when it should be getting two arguments (cm, angle). In both cases the variable angle is being set by motor.getAngle(). My guess is that motor.getAngle() is returning void instead of the current motor angle, possibly because the Arduino and stepper are not communicating correctly. Can you check this? Maybe by putting Serial.print(motor.getAngle()) at line 48?</p>
Hello again<br>I'm solved this problem. <br><br>void writeData(float cm)<br>{<br> byte buffer[bufSize];<br> <br> // fill the buffer with the distance reading<br> floatToBuffer(buffer, cm);<br> Serial.write(buffer, bufSize);<br> //Serial.print(cm);<br> //Serial.print(&quot; cm @ &quot;);<br> }<br>void writeData(float angle){<br> // fill the buffer with the angle<br> floatToBuffer(buffer, angle);<br> Serial.write(buffer, bufSize);<br> //Serial.print(angle);<br> //Serial.println(&quot; degrees&quot;);<br>}<br><br>Thank you for support
<p>Sorry to say, but this won't work. A compiler will overwrite a function when another function has the same name. So only the second function will exist. The variable &quot;buffer&quot; is not initialized in the second function, which would break the program. And even if you fix this, you are only sending the angle to the Processing code, so your data won't visualize correctly. </p><p>Did you do what I asked in the last comment? If in your Arduino IDE terminal there isn't a number being output, then the motor.getAngle() function is not working for some reason. If a number is being output, then the only other thing I saw in your error was that line 62 was written as &quot;void writeData(float cm, angle)&quot; instead of &quot;void writeData(float cm, float angle)&quot;. On GitHub it is written the correct way, but could this be your issue? </p>
<p>when i download files from your Github site, I see 2 arduino code file(.ino file). They are serial anh sodar. So, What file I have to program the board? thank you.</p>
<p>You'll need to open both files in a single sketch. They are both required.</p>
<p>I haven't made this yet, I see you have a radar kinda thing in the picture of your computer screen, I can't see it in the GitHub files. Is that part of the project and is there somewhere I can download it?</p>
<p>You'll need a visualization program called Processing to open the radar UI for this project. In the GitHub files, the code for this is under the folder &quot;UI.&quot;</p><p>See Step 7 for links to Processing. You should be able to run our code and at least see the UI, even if you don't have the rest of the project done yet.</p>
Hello burstolava<br><br>Thank you for your reply of May 5, 2016.2: 27 PM<br>Now the monitor-console is working properly<br><br>Thank you for your efforts<br><br>greetings from Switzerland<br>UrsT
<p>I have copied<br>your DIY 360 &deg; -Radar with small changes. I have a adafruit-slip ring used and<br>a 1: 1 gear driven.<br><br><br><br>With the software of github.com all is well.<br><br><br><br>However, I do not succeed, by Tab key the various nodes (speed / rpm, pps,<br>history, move, clear, stop, start, exit, help) display.<br><br>What am I doing wrong?<br><br>I might need additional software?</p><p>My email-adress:<br>urstrueb@bluewin.ch</p><p>greetings from Switzerland</p>
<p>Hello! If I'm reading this correctly, you are having issues with the Tab completion in the Processing code? Is the program not completing the tab correctly or the command is not executing correctly? The only software you should need would be from Processing and Arduino to run the code. We've only tested on Linux and Windows though.</p>
Hello burstolava<br><br>I have Processing 2.2.1 (Processing revision 0227) installed.<br><br>When I run the file &quot;UI.pde&quot; appears a second window with the &quot;radar screen&quot; and which continuous moving green sector. Objects in the area of the sensor are correctly identified and displayed<br><br>Now if I press the PC key &quot;Tab&quot;, nothing happens. The black box to the right of the &quot;radar screen&quot; remains empty.<br><br>greetings from Switzerland<br><br><br>
<p>Hey, so I've downloaded both Processing 2.2.1 and Processing 3.0.2, and the UI seems to work okay on my windows machine. I wrote the tab completion just to make the &quot;console&quot; feel more like a console. But it doesn't have every feature of a console because I wrote this from scratch. If you haven't typed anything, hitting tab will not &quot;complete&quot; because it doesn't know what you are trying to say. But if you type &quot;sp&quot; and then hit the tab key, it should tab complete to &quot;speed.&quot;</p>
<p>Hi</p><p>What level of distance measurement accuracy may one expect from this setup?</p><p>Thank you</p>
<p>Hi, the accuracy of this device will be entirely dependent upon the PING sensor specifications. The furthest distance measurable by this sensor is ~3 meters, but the PING sensor manual would be a better reference for the sensor accuracy and such.</p>
Thank you<br><br>I am interested in a range of 10cm-50cm.<br><br>What precision should I expect?<br><br>Alternatively, a link to the sensor manual is appreciated
<p>Hello! May i know how many watts the resistors and the capacitors should be? The electrical shop wont give them because they have many kinds that have different wattage. Also, what would be the brand of the stepper motor?</p><p>This is for our research, btw.</p><p>(We did proper citation, just so you know)</p>
<p>Hello,</p><p>From what we remember, the resistors were probably 1/4 watt, but all the components we used were pretty ordinary.</p><p>As for the stepper motor, we used Sparkfun part number ROB-09238.</p>
<p>please let me know if used Xbee series instead of REC circuit then it will be a wireless as you said in future work suggestions ? and another question is if i used 2 motors then will it be possible to rotate it 360 degrees please reply because i am working on it as my final year project</p><p>Thank you</p>
<p>If you're using Xbee shields instead of the REC, that sounds like the alternative approach which we touched on in the introduction, but not necessarily the 'future work.' The future work we were suggesting would involve wireless connection between the SODAR device and the computer with the interactive console, so you could put the SODAR device in one room/area and observe what it is sensing from another room/area. </p><p>As for your other question, I'm not sure if I understand what you're asking, but our device is already capable of rotating continuously (all 360 degrees with one stepper motor). </p>
<p>can someone compile all the code into one file because I cannot do so effecively and link it to github etc.</p>
<p>Hi..</p><p>Is there anyway to use HC-SR04 sensor instead of ping? I can't seem to find it in my country and importing it costs around 65$</p>
<p>There would be some changes to the project you would have to make because the HC-SR04 looks to be a 4 pin sensor instead of 3 pin. But the NewPing library supports the HC-SR04, so you should be able to use it.</p>
<p>hello, am making now the sodar system as my final project and its almost finish with using a serial communication the uart to send and receive the data wireless. i want to ask u about the two pins that going into pvc, are they the echo and trigger or the 5V and gnd ? </p><p>thank you and ur help is really appreciated </p>
<p>The circuit diagrams in steps 8 and 9 should be helpful for your question. Specifically, the PING signal and ground signal are the two pins that project into the PVC apparatus. Instead of a 5V wire into the PVC, we put a battery on the top of the styrofoam and connected it to the PING sensor. Hopefully this helps!</p>
<p>good job <a href="https://www.instructables.com/member/burstolava/" rel="nofollow">burstolava</a> ;) </p>
<p>what code arduino???</p>
Will your sodar system operate upside down ? Also , if I do use wireless transceivers how far away can the system be from the laptop before it stops producing information on the laptop's screen ?
<p>well done</p><p>this is definitely going to my future DIY projects list.</p><p>i will make it and post it when im done and probably going to do both the REC and and try it with wireless communication </p>
<p>Awesome! Good luck and please post back here when you're up and running...or if you have any questions!</p>
<p>hi how are you i need your help i want to do your radar as my project can u please me all the details regarding to it plz plz plz i shalll be very thankfull to yo here is my yahoo email address and as well as my yahoo profile id plz help me. </p><p>excellence_happy@yahoo.com</p><p>https://www.facebook.com/inam.u.haq.92</p>
<p>hi how are you i need your help i want to do your radar as my project can u please me all the details regarding to it plz plz plz i shalll be very thankfull to yo here is my yahoo email address and as well as my yahoo profile id plz help me. </p><p>excellence_happy@yahoo.com</p><p>https://www.facebook.com/inam.u.haq.92</p>
hey..this is indeed an awesome project.. I am currently working on something similar for my project but I am making use of an ATMEL microcontroller. Any advice as to my project? also making use of a stepper motor for its rotation. although there isn't an connection with a computer. Just a LCD display to show the number of objects detected. Do u mind also sharing your email address so I can contact you more often and tell you more about my project.
<p>Sounds like a good idea. We used an Arduino, which has an Atmel microcontroller. You'll need to find a way to program your microcontroller and be sure to use the correct pin-out for that specific microcontroller. As for your LCD, you can use the Arduino LCD library as a reference. Although you won't be using an Arduino, the LCD code will be very similar. Most of our Arduino code for the sensor and motor control is directly applicable but the Processing code obviously won't work for your application. </p>
thanks a lot..
<p>Could you help me with this:</p><p>I assemble it all and upload sodar.ino u Arduino, and open UI in Processing. As soon as I upload sodar.ino the stepper motor starts spinning. When I press Run in Processing it shows error: &quot;Error opening serial port COM6: Port busy&quot;</p><p>This is weird because my Arduino connected to COM11...</p><p>Any ideas? Thank you!</p>
<p>Also, if you would prefer the motor to not automatically start spinning when the code is uploaded to the Arduino, you can initialize the stopMotor boolean to true in the sodar.ino file.</p>
<p>Hey! So it sounds like your error might be due to <a href="https://github.com/intensePancake/sodar/blob/master/UI/UI.pde#L55" rel="nofollow">this</a> line. There are two ways that we could think would easily fix this: </p><p>1) Disconnect all USB connections and connect the Arduino first.</p><p>2) Change the referenced index of the Serial.list() (eg Serial.list()[1] or Serial.list()[2] ...) until you locate the correct index.</p>
<p>Have you figured out a way to make it wireless yet?</p>
<p>We haven't been working on making this project wireless. We saw that as a potential next step for those who were interested and wanted to build upon the project. Two of the possible ways to go about this would be using a bluetooth shield or radio transceivers for the communication between the sensor and the terminal.</p>
<p>Hi, Great instructable. I will try to get it running. The processing code is excellent.</p><p>I found a website that shows using a stepper motor and an adafruit slip ring connected via gears. I will try to build it. </p><p>see <a href="http://curantilrobot.wordpress.com/2013/08/04/range-finder-the-construction/" rel="nofollow">http://curantilrobot.wordpress.com/2013/08/04/rang...</a></p><p>If anyone can help with the cutting out of the mounting frame pieces I would really appreciate the help.</p><p><br></p>
can i use this sensor in this project ??? <br>http://www.rhydolabz.com/index.php?main_page=product_info&amp;products_id=307
<p>The NewPing library doesn't document whether or not it supports that sensor specifically. A major concern with it is that it has a minimum input pulse width of 10 microseconds, while it's only 5 microseconds for our ping sensor. From looking at the NewPing source code, it seems like it'll work for sensors with an input pulse width less than 18 milliseconds, but because it's not specifically mentioned, there is a chance it may not work.</p><p><br>That being said, it's probably worth a shot to try out our code as written. It looks like it'll work, but we can't be completely sure. If you're set on using that sensor and it doesn't work, you could always rewrite that part of the code specifically for your sensor. You'd probably learn something from doing that.</p>
can i use L293D instead of SN754410 ???
As long as it is a Quadruple Half-H Motor Driver, it will work for this project. However, you should compare the datasheets of the L293D and SN754410 to see if there are any differences in how the connections have to be set up. If there are, the circuit you have to build won't be exactly the one we built, but it should work.
its showing error in the code: <br>'NewPing' does not name a type <br>plz help <br>

About This Instructable



More by burstolava:DIY 360 Degree SODAR Device 
Add instructable to: