Skip to content

HC-SR04 sensor box

Advertising
Advertising
?
Creation quality: 5.0/5 (1 vote)
Evaluation of members on the printability, utility, level of detail, etc.

  • 3.5k views
  • 1 like
  • 63 downloads

License
3D design format
PDF, STL, and TXT Folder details Close
  • HC-SR04-ino.txt
  • sch.pdf
  • sensor box.stl
  • sensor door 15.stl
  • sensor door 6.stl
  • sensor lid.stl
  • sensor rings.stl

Learn more about the formats

Publication date 2020-10-25 at 15:07
Design number 217112

3D printer file info

3D model description

My HC-SR04 sensor box

I designed this box that will house a HC-SR04 ultrasonic sensor, an arduino nano, a MP1584EN adjustable 3A bucking power supply, a Songle SRD-05VDC-SL-C relay, a 5mm LED, and 2, 2 pole pcb screw terminals. The sketch and schematic are included. I used the arduino relay circuit from here:
https://www.instructables.com/id/Arduino-Relay-Circuit/

My goal was to create an ultrasonic eye that I can install into a packaging machine that has 24vdc for a supply and will need a NO dry contact for a signal. I tried to make it look industrial, even though I am using hobby grade components. Industrial grade ultrasonic sensors costs upwards of $500.00 and I think I can mimic their operation for about $10.00. The HC-SR04 looks suspiciously similar in the $500.00 units.

There is a box, a lid, and a door. It measures 60mm X 60mm X 30mm, when assembled, with a through hole in the middle for an 8-32 screw. The screw will hold the lid on and provide a mounting point. I have 2 different doors. One has a 15mm access hole. You can program the nano through this hole. The other door has a 6mm hole, just big enough for a small 4 conductor cable to pass through.

I also designed a set of eyes, or focusing rings. Basically, they are sleeves that slide over the transmitter and receiver round housings, trying to extend them a little. I am trying to narrow the cone or funnel shape of the sensing area. Trying to make it a little more focused instead of fanning out so much. More like a spot light instead a flood light.

The HC-SR04 will slide into the 2 holes. You will need to straighten out the 4 little pins. The wiring will pretty much hold it in place, but it will be a little loose. Add a blob of silicone to hold it in place. The relay will fit into it's pocket upside down so the 5 pins are sticking straight up. The 5mm LED is press fit into it's hole. It's tight. The MP1584EN will slide into it's 2 channels over the nano. The nano slides into it's 2 channels. Both the nano and ps are held in place with little locking tabs in the channels. The 4 pole terminal fits into it's pocket with the wires soldered to the pins on the bottom side. All of these components should hold themselves in position. If you are nervous about them moving then add a drop of super glue to each component.

I like these little pcb screw terminals. KF301-2P. They have little locking tabs so you can lock them together and form longer terminal strips. They are on a 5mm pitch. I soldered wires to the pcb terminals and ran the wires where they needed to go. I wanted to be able to pre-wire this up and drop the components into the housing. The 4 screw terminals are the wiring connections to the outside world, to the packaging machine. 24vdc and ground, and 2 wires for a NO dry contact. If you need a NC contact then you will need to choose the NC terminal on the relay, instead of the NO terminal like I did.

The sensing range is set to 48” and I have an off delay timer set to 4 seconds in the sketch. I considered adding 2 pots to make these two values variable but I ran out of room in the housing so I went with preset 4 feet and 4 seconds. If you need to change it then get out your laptop and program the nano. The distance is set in line 20 and the off delay time is set in line 23.

the list
1 Arduino Nano
1 HC-SR04 sensor
1 MP1584EN power supply
1 Songle SRD-05VDC-SL-C relay
1 BC548 transistor
1 1N4007 diode
1 LED
1 330 ohm resistor
1 2.2k ohm resistor
2 KF301-2P screw terminals
1 8-32 X 1 Β½ screw, nut, washer

3D printing settings

Printed in PLA, .2 layer, 25% infill

Advertising


Issue with this design? Report a problem.

Would you like to support Cults?

You like Cults and you want to help us continue the adventure independently? Please note that we are a small team of 3 people, therefore it is very simple to support us to maintain the activity and create future developments. Here are 4 solutions accessible to all:

  • ADVERTISING: Disable your banner blocker (AdBlock, …) and click on our banner ads.

  • AFFILIATION: Make your purchases online by clicking on our affiliate links here Amazon.

  • DONATE: If you want, you can make a donation via Ko-Fi πŸ’œ.

  • WORD OF MOUTH: Invite your friends to come, discover the platform and the magnificent 3D files shared by the community!


Sharing and downloading on Cults3D guarantees that designs remain in makers community hands! And not in the hands of the 3D printing or software giants who own the competing platforms and exploit the designs for their own commercial interests.

Cults3D is an independent, self-financed site that is not accountable to any investor or brand. Almost all of the site's revenues are paid back to the platform's makers. The content published on the site serves only the interests of its authors and not those of 3D printer brands who also wish to control the 3D modeling market.

100% secure payment by credit card, PayPal, Apple Pay, Google Pay, etc.
View all payment options.