How to Attach an Ultrasonic Sensor Onto a Servo SECURELY Cheaply and Easily
by square1a in Circuits > Reuse
1575 Views, 2 Favorites, 0 Comments
How to Attach an Ultrasonic Sensor Onto a Servo SECURELY Cheaply and Easily
It is very common to attach an ultrasonic sensor onto a servo in robotics. However, from my research, all the existing solutions use 3D-printed, specially made plastic or cumbersome parts, such as:
https://www.instructables.com/Ultrasonic-Sensor-Regulable-Mount/ (3D-printed)
https://www.youtube.com/watch?v=dCpNBFHPAPY&ab_channel=EEEnthusiast (probably 3D-printed)
https://www.youtube.com/watch?v=-XHhLfzvzBY&ab_channel=Science%26FunClub (special plastic parts)
https://www.instructables.com/how-to-attach-ultrasonic-to-servo-motor/ (custom made plastic)
https://www.youtube.com/watch?v=-xBkxMtc2JM (cumbersome)
My solution offers an innovative, simple, secure and compact alternative method. This method also works for other types of sensors (e.g. infrared). My method of attachment only uses recycled material, so the cost is effectively zero. Step 3 will elaborate the benefits and cost effectiveness of my design.
Supplies
See photo above. The glue is just normal stationery glue, nothing special.
Watch the Video
Scroll down for optional supporting information.
Supporting Information
If you have never used a servo with Arduino before, read the comments in the code in the image above. I have also attached the code in the file: calibrate_servo.ino below
Tips:
- if possible attach the servo next to a right angle (see the end of the video in Step 1), so you can apply double sided tap to both back and bottom of the servo
- Don't mount too much weight onto the servo, which shifts the center of gravity up making the servo unstable
- At the bottom of https://www.arduino.cc/reference/en/libraries/servo/ page, it talks about other function in Servo.h library, with commonly used ones being .write(), .read() and .attach()
Downloads
Explanation of the Design (OPTIONAL)
This section is the last step and is OPTIONAL. It explains my design philosophy and choices.
Being secure: the cardboard is attached onto the servo using the screw, which is a very secure and solid method of attachment. The design utilizes the property that glue sticks well to paper and cardboard, so the attachment between paper and cardboard is secure. Glue does not stick so well to the metal cylinders on the ultrasonic sensor. To compensate this, the paper (being flexible) can be wrapped around the metallic surface, increasing the surface area, which makes the attachment secure.
Environment friendly: this method only uses paper, cardboard and some non-toxic glue. The alternative is to use 3D-printed/plastic parts, which are often not biodegradable and harder to recycle than paper and cardboard. The cardboard and paper I used were already used prior, so this project actually reuses material.
Low budget: since it only uses recycled material, the cost is effectively zero. You do not need any expensive equipment, like a 3D printer, or buy filament for the printer.
Reversible (can be dismantled): since I only used paper, cardboard, and regular glue (instead of super-glue or hot glue). Being able to be dismantled gives flexibility, allowing the ultrasonic sensor and servo to be repurposed and used in a different future project. This reduces the need of having to buy multiple of them, saving cost and the environment.
Simplicity: this project uses easily accessible material, and its simplicity makes it incredibly beginner friendly. In this project, I strove and challenged myself to come up with the simplest design, since I believe simplicity has many benefits:
- cheap and quick to build
- uses less material (so also more environmentally friendly)
- Less likely to break and easier to fix if it breaks
The end result might be simple, but the journey to get to this end result is not so. I researched, considered and experimented with many design options, such as using a block of wood, strings or simply sticky taping. I did all this, because I value simplicity in design.