My HC-SR04 sensor box
prusaprinters
<p>My HC-SR04 sensor box</p> <p>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:<br/> <a href="https://www.instructables.com/id/Arduino-Relay-Circuit/">https://www.instructables.com/id/Arduino-Relay-Circuit/</a></p> <p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>I am still learning prusaprinters. I just discovered that I cannot upload a txt file or a pdf file. I got them on my screen and took a screen shot of each. Sorry about that. This is for the sketch and schematic.</p> <p>the list<br/> 1 Arduino Nano<br/> 1 HC-SR04 sensor<br/> 1 MP1584EN power supply<br/> 1 Songle SRD-05VDC-SL-C relay<br/> 1 BC548 transistor<br/> 1 1N4007 diode<br/> 1 LED<br/> 1 330 ohm resistor<br/> 1 2.2k ohm resistor<br/> 2 KF301-2P screw terminals<br/> 1 8-32 X 1 ½ screw, nut, washer</p> <p>Printed in PLA, .2 layer, 25% infill</p>
With this file you will be able to print My HC-SR04 sensor box with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on My HC-SR04 sensor box.