Introduction: A Mysterious Box- Ultrasonic Range Finder(Arduino)
There are two news, which one you want to hear first? Ok. Let me tell you the good news- Our Elecrow company growing fast in support of maker partners and Arduino enthusiasts, we have added a lot of staffs, so we need a bigger place to accommodate us. We have completed the relocation of new offices in the past two weeks, we came to a bigger and better environment. Everything is perfect here. I believe that we able to offer more better services and products in the new years. However, the unfortunately thing. We lost our toolkit in the relocation process. Of course, this is not a serious matter. Although we do need to use his time in the layout of the new office. So the problem came. My partner kevin and me, we are assigned a task: according the size of tables and chairs in the room to have a reasonable layout.
So what’s the method to solve the problem now? We have to made something for simplely mesurement. and we have Arduino, which is the world's most powerful tool. Finally, we did it as pictures shows, it tooks us about half an hour to made this Ultrasonic Range Finder.
Step 1: What We Need For?
About ranging, first of all we think of is an ultrasonic ranging module -HC-SR04, the most familiar and suitable module. Next we need to make the serial output data be displayed. Yes. A LCD1602 display is needed, use with the Arduino-nano 328. OK. Basic prototype has been completed.
So in general, we need these:
5: 9V Battery x 1
6: Box x 1
Step 2: Step 1: Main Controller
First, we fecth out our main controller- Arduino Nano 328, it's not only use for our brain of rangefinder, but also our rangefinder's body. the other “organs” will be set up on him. We will scrub it clean, straight and placed in there,
Step 3: Step 2: Transit Station
Now we need to connect the nano 328 to a transit station, our brains and his connection with organs will become more easier through this module. Yes, his name is Crowtail-Nano Base Board, it has four kinds of port: Digital port, Analog port, IIC port and UART port, all of them be marked with initials. You can distinguish easily. It will be inserted on the nano 328, and then we could directly plug other modules onto baseboard by using Crowtail cables,
Step 4: Step 3：IIC LCD
Next we need a display module, a crowtail-IIC LCD which have a crowtail interface, we can make use of it to eliminate a lot of wiring and module build troubles, connect the LCD to Crowtail nano base board, Please use the "I" port when you plug it onto the base board.
Step 5: Step 4: Ranging Module
The finally came protagonist is ranging module, A distance measurement module that use the ultrasound, when you power it, it will launch a wave, when "he" encountered obstacles, "he" will run back. And then is received by the receiver. We can calculate the distance between the current and the obstacle according to the speed of sound propagation and the consumption of time that acoustic wave be received .
Step 6: Step 5: Software
All the hardware part have been finished. Next one is put the soul- program into it. Upload the attached files and put the library files into your Arduino library first, then upload the program into your Arduino nano. Try to run it.
Step 7: Step 6: Power
OK, we have to think about how to make it became a portable equipment. because we can't move with taking a computer, unless you want to have some exercise. So, what we can do ? The power supply is the main problem, that's ok, a 9V battery absolutely meet our requirement. When we upload the program to Arduino nano 328, it works well.
we have to admit it looks like a mess even only a few modules. Our colleague called Yuki which is a careful girl give us a tip: why not put it into a tiny box?
Wonderful! So we found a box and dug several holes. You could place these module as you like, it was a perfect project.
Step 8: Step 7：Let It Work！
OK. Although it was a simple project, we still found happy and got a sense of achievement. look! he was so cute. We mearsured the size of tables and chairs, according to the area of the room we perfectly placed these furnitures. look at these photos，don't you think we have done something exciting?
Life does not lack creativity and fun, just missing your participation.