SparkFun Electronics Commentsurn:uuid:214d0e4e-f1b1-d287-ce26-ac5b4c9f82492024-03-29T09:32:59-06:00SparkFun ElectronicsCustomer #751049 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #751049urn:uuid:d6c1894c-fcff-1314-eb5f-768cbd01ee2b2019-05-23T06:59:44-06:00<p>Some interesting piece of information for people regarding this sensor (<a href="https://forum.arduino.cc/index.php?topic=243076.0" rel="nofollow">source</a>), practical measurement of the sensor characteristics:<ul>
<li>FOV (full cone): horizontal ~20º, vertical ~13º</li>
<li>Spatial resolution (full cone): ~0.6-1.4º</li>
<li>Range: tested from 5 to 200 cm</li>
<li>Accuracy: relative error ~0/5% (-1.3 ±4.6 %); absolute error ~-0.5/-1.5 cm (-0.4 ±1.2 cm).</li>
<li>Precision: standard deviation ~0.1/0.5 cm (0.3 ±0.6 cm)</li>
</ul><p>Hope this helps, especially having a sense of the accuracy of the sensor.</p></p>
M-Short on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04M-Shorturn:uuid:08911411-64ee-6e72-0f63-ef0202ffc8282019-02-08T09:12:12-07:00<p>I'm sorry about that. Please double check your spam folder (sometimes emails responses from techsupport end up there). They usually should get back to you in a day or 2, but I'll make sure they got your email.</p>
Customer #1500382 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #1500382urn:uuid:c53552b1-3882-0194-68ba-add9eb9a02952019-02-08T08:45:34-07:00<p>These sensors are horrible! I ordered 12 Inventor's Kits for my classroom and half of the sensors are bad. This makes it really difficult to teach classes when students need to share parts. To make it worse, Sparkfun customer support has been completely unresponsive when I contact them. I will not be purchasing anything else from them, which is unfortunate because they offer some really great products.</p>
Customer #139104 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #139104urn:uuid:fd6ca090-490d-3a1e-1116-5671d3625a142018-10-06T20:27:09-06:00<p>I discovered this particular version to be totally useless within a new school building where it was to be used. It it terribly susceptible to electrical noise in a modern building. I eventually bought three thinking I had a dud after buying the first one. The device worked perfectly at home where I developed at least four different physical designs and countless software tricks trying to discover and mitigate the problem. In the final attempt the sensor and Arduino controlling it were next to each other all within a metal enclosure.<p>I rolled the device in its finished form on a cart through the new building to observe its behavior. In one remote egress stairwell the device worked well enough to possibly be functional for its intended purpose, which was to be in a classroom situation. The only location where it worked perfectly just like at home was within an elevator cab with the door closed. Oddly, there was one particular location in a hallway where it functioned to some degree better than the nonsense it showed in most locations. Everywhere else it would read either very low distances, i.e. the echo signal is coming back too soon, or there would be random zinger interspersed with a very rare correct distance reading.</p><p>Keep in mind the unit worked perfectly at home and in the elevator cab. The project design included capacitor filters mounted close to the device. The capacitors made a performance improvement at home.</p><p>Needless to say I am terribly disappointed. I am guessing the electrical noise is from all the HVAC motor circuits on frequency drive controllers.</p></p>
Customer #680509 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #680509urn:uuid:3e045923-8abd-664e-5f58-5d678555097b2018-07-12T01:02:02-06:00<p>Will I be able to measure liquid levels with this?</p>
Customer #763187 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #763187urn:uuid:4cdf5a80-f3b4-3aa9-46fd-9b44cf6c656b2018-05-18T13:29:05-06:00<p>At first I could not get this device to work -- the SparkFun Inventor's kit sample code always came back as 0.11 inches no matter was in front of it. I contacted customer support and they asked if I was in an office setting with fluorescent lights and/or HVAC nearby. I had both overhead. I took everything to another room without LED lights and no HVAC, and the device worked perfectly. Apparently, things can interfere with the ultrasonic sensing.</p>
Customer #763187 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #763187urn:uuid:f3cec2e3-39e9-20cd-88d0-eaf5454d6f922018-04-27T11:07:57-06:00<p>I had a project where I really needed a reliable sensor, and I found that the HC-SR04 had too many bad readings. I switched to the PING))) sensor, which I agree was significantly more expensive, but it worked consistently. I never once had a problem with it.</p>
Jorge P. on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Jorge P.urn:uuid:2ae5fc87-bf9d-87b2-443a-5090722546942018-01-20T06:23:36-07:00<p>Code for Parallax Propeller is <a href="http://forums.parallax.com/discussion/comment/1429887/#Comment_1429887" rel="nofollow">on the Parallax Forums</a> use at least a 1K resistor between the propeller (3.3V) and the Echo Pin(5v). Measurements are accurate from the surface of the PCB! My code can be cleaned up a bit, but it works great. Sparkfun can use the code to make available on GitHub at their discretion.</p>
Customer #909211 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #909211urn:uuid:ca3cecbb-da9c-80b5-b926-9ea3d4e0cc8a2018-01-13T14:19:30-07:00<p>Would this board be suitable for measuring speed of a 3.5cm (1-3/8") ball coming at it? Working range would need to be from 0 to ~15-20cm (6-8") and an horizonal angle of about 90* and same vertical plane.</p>
Jordan Tallent on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Jordan Tallenturn:uuid:aa24397c-d902-b598-d5ec-b39ffc4dc3882018-01-05T06:12:14-07:00<p>What size are the mounting holes?</p>
Customer #1148635 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #1148635urn:uuid:32af481f-a383-9ef3-0e8b-fc8a601d9d452017-09-23T17:56:20-06:00<p>Hello,
I have this Ultrasonic Sensor - HC-SR04 and SparkFun RedBot Mainboard. How does the sensor assembled?<p>Thanks</p><p>Andrea</p></p>
Customer #845958 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #845958urn:uuid:5d962506-1cb8-0323-bf12-3ddc999f2ad92017-05-15T21:22:07-06:00<p>Measuring tanks, grain silos and the like is a major use of ultrasonic sensors. The ones used in industry cost about $30 (just for the transducer) and have longer range but this hobby grade device would work for smaller tank. these have a wide angle of vie and might detect the tank rim. They trigger on the closest object. Somount it low and near the tank's center might</p>
Customer #959091 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #959091urn:uuid:f6f4000e-fb9c-a983-13d3-fbb2b018e50f2017-04-21T22:56:27-06:00<p>Can this detect the distance to a surface of water? Thinking of mounting it above a fish tank to measure the water level.</p>
Customer #501584 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #501584urn:uuid:fa95bf15-e614-feb5-e2d7-c575b6670eb52017-02-01T18:38:11-07:00<p>We have a cat that would sit outside our bedroom door and cry incessantly for food promptly at 4:00 am. This was obviously driving us insane. In a sleep deprived stupor, I purchased a few items from Sparkfun (Ultrasonic sensor / 16x2 LCD / Voltage regulator / Power supply) and acquired a Particle Photon, 10V solenoid, a toilet flange from Home Depot and an air can. I can say that this sensor will most definitely detect cats. When triggered by the sensor, the solenoid pumps the air can for a quick second of PSSSSSSSTTT!!! followed by sweet silence. Thank you Sparkfun for a restful sleep!</p>
CF on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04CFurn:uuid:3f4d716f-9781-fa01-8ef8-3b4d77b94c812017-02-01T17:30:46-07:00<p>Not underground. If they are above ground, then yes.</p>
Customer #149813 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #149813urn:uuid:287add35-0350-e106-7354-6bd4b1a3b4072017-02-01T15:05:41-07:00<p>possible to generally detect rocks couple inches under the ground?</p>
OHoilett on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04OHoiletturn:uuid:fb38996e-43f8-1a07-728f-31e01efb31af2016-11-24T11:46:44-07:00<p>Not surprised these things sold out so soon. They're incredibly popular and useful. Good job SparkFun on making these available in your store.</p>
Customer #829327 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #829327urn:uuid:3a59af19-df59-5825-040f-7db0888dd2b52016-09-02T14:57:11-06:00<p>Works well, but is inaccurate below 20 cm and on non-flat surfaces (such as hands), if powered with 3V3. I suggest to take the average of several values to get a more precise measurement
The example code didn't work on a teensy, as the echo pin is not explicitly declared as input.
Hope this may help someone else</p>
Customer #187451 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #187451urn:uuid:dd3502d7-e409-1dc0-74ec-ed7fa91417532016-08-31T00:36:07-06:00<p>I haven't used this particular version before, but I've used a similar version and it works ok. A capacitor across VCC-GND did wonders stabilizing readings (1uF - 3.3uF). Not sure how much range you will get without the MAX232 (that was used as a voltage stepper which "rang" the ultrasonic speaker at +12/-12). The PING is significantly more robust, but it is more expensive no doubt.<p>Following is some useful information. Hopefully it helps someone.</p><ul>
<li><p><a href="http://www.electro-tech-online.com/blog-entries/playing-with-ultrasound-distance-sensors-ping.255/" rel="nofollow">ping example</a></p></li>
<li><p><a href="http://www.electro-tech-online.com/blog-entries/playing-with-ultrasound-distance-sensors-sr04.256/" rel="nofollow">hc-sr04 example</a></p></li>
<li><p><a href="http://elecfreaks.com/estore/download/EF03085-HC-SR04_Ultrasonic_Module_User_Guide.pdf" rel="nofollow">user guide</a></p></li>
</ul></p>
Customer #367420 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #367420urn:uuid:d577c14d-b341-1666-7439-c952b79b937e2016-08-28T20:50:05-06:00<p>FYI, at 5v I get garbage readings and lots of OUT OF RANGE from the sample code, but at 3.3v all is smooth and accurate.</p>
Customer #484945 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #484945urn:uuid:f3b6ecb7-cbba-ddbd-d285-0aa5c6ec5feb2016-08-19T21:51:23-06:00<p>Pro tip: you can tie the trigger and receive pins together and save yourself a pin. They're never active at the same time. The receiver is locked out for a very brief period after the pulse is sent (if I had to guess, I'd say about how long sound takes to travel 2cm and back.) Search for SRF-04 if you're trying to find a good datasheet.</p>
bfesser on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04bfesserurn:uuid:015a82f6-05c4-82ae-bedc-3b860f1eaf732016-08-13T04:18:37-06:00<p>Thank you for that explanation, Matix. I stand corrected. :)</p>
Matix on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Matixurn:uuid:6e2b9348-6793-8ffd-e2f4-728a836491f32016-08-12T21:50:55-06:00<p>Hi, I work at Parallax and yes, we do sell the PING))) for much more than the HC-SR04. Quite a bit is happening in the micro on the PING))), allowing it to work in noisier environments more accurately with high resolution.<p>As much as I wish we did, we don't make huge profits - We cater to schools, and schools need durable, reliable parts and in-depth, thorough documentation and support. All of our revenue gets reinvested in making open-source curriculum materials for schools and R&D on future products that support maker education. Hobbyists are comfortable digging around the web to find what they need to get a project of the ground, but students and teachers don't usually have the patience or the time, so we work hard to get everything they need in one place and as user-friendly as possible.</p><p>I know Sparkfun is working on supporting maker education too, and I know that when you purchase from Sparkfun, Adafruit, and Parallax, you're supporting American manufacturing, jobs, and the work we all do with and for schools.</p></p>
Customer #5515 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #5515urn:uuid:b99f9aa0-029c-e070-374a-99d0edf00a112016-08-12T16:38:08-06:00<p>I have not used this particular sensor, but, based on my past experience with similar ultrasonic sensors, you will not detect a fluffy cat with it. (The sensors I have used before even struggled to detect clothed humans...naked humans (or shaved cats?) do seem to be reflective enough. YMMV).<p>Of course, if you can shoot at a wall or other hard surface in a no-cat state and then look for a major change in that reading as the cat absorbs the sound, you might be in business...</p></p>
tpobrienjr on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04tpobrienjrurn:uuid:0e134b9a-fec0-1dd0-2f77-5cb3ab5652902016-08-12T15:28:11-06:00<p>I just read over the datasheet. Somebody please get the maker to correct the errors! Lots of technical errors and even more language errors. That said, this is sure cheap - hope it works.</p>
172pilot on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04172piloturn:uuid:1438bd46-e568-a632-69c1-049ac2a5a6812016-08-12T14:04:39-06:00<p>So.. that's interesting, because I was actually coming here to post a question about it's ability to DETECT a cat.. The video says it works best with a flat surface (of course) but if I just need to detect the existance of a fluffy cat getting ready to jump up on a birdcage, would it work... OR, would the 40khz be annoying enough to keep the cat away, and/or should I NOT do it because it will annoy/hurt the canary?!</p>
Jess2 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Jess2urn:uuid:1491090b-45b2-98c2-ec32-0b7a7c9915d62016-08-12T14:03:31-06:00<p>I understand and agree what you are saying about the price disparity to a degree; with that being said much of the time the quality of the 78 cent sensor can certainly be suspect. I ordered 2 last month, both came in crushed after waiting 3 weeks so I can't comment on the quality of those. One of my friends gave me one purchased from amazon for a couple dollars last weekend to play with, turns out it was DOA (the receiver side operated intermittently.) I ordered 5 more early this week from amazon with the hopes that at least a couple will turn out problem free. If I would have been able to purchase one from Sparkfun originally, there would have been a working distance sensor on my quad 3 weeks ago; also I would have enjoyed the added benefit of less lost hair. To summarize, I have found Sparkfuns quality to far exceed the quality of their cheap Chinese competitors on more than one occasion; if you have a pressing project in mind you just want to work, it's certainly (to me at least) worth the few extra bucks. If you just want to play with a sensor and don't mind the wait or potential problems, get the 88 cent one; in fact there is valuable learning experience available troubleshooting suspect parts. Please don't take this the wrong way though, there are plenty of perfectly functional, high value parts available on the extreme cheap that certainly represent an excellent value! Who knows, if the original box didn't come in crushed, I may have been able to crush them on my quad-copter and would be saying "Why would I pay 5x as much for a sensor I'm just going to destroy in a rough landing anyway."</p>
Chiel on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Chielurn:uuid:b695eda5-a5c0-da7a-26da-4bc4a4b922fa2016-08-12T14:02:22-06:00<p>Many sonar sensors use 40khz as it's working frequency and yeah that is in within hearing range of animals, But the pulses created by sonar sensors are very short and not at all powerfull. It is not harmfull and none of my cats have ever responded even remotely to any of my sonar sensors, not even a twitch in the ear.</p>
172pilot on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04172piloturn:uuid:0af6c530-71dc-da5c-03aa-74c9a3fc4f862016-08-12T14:01:08-06:00<p>For me, it's the reliability and consistent quality, the support site, and often times the speed to get it to me.. I buy my fair share of "cheap stuff" off of the internet when I see something interesting, but dont have a particlar project in mind, but if I know I need something specific, I try to go to sparkfun.</p>
rsp on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04rspurn:uuid:a01c992e-7532-b83e-0b5d-fa5194ef5eba2016-08-12T13:54:43-06:00<p>Sparkfun support of their products is great, no doubt. But this is not a Sparkfun product. There's no schematic and the datasheet is from an eBay version of the HC-SR04. I'm guessing this is not a Sparkfun engineered or manufactured product, rather it's a cheap Chinese import with a beefy markup by Sparkfun. Like maybe this one? https://korean.alibaba.com/product-detail/ultrasonic-transmitter-and-receiver-sensor-hc-sr04-40khz-ultrasonic-sensor-60126024326.html</p>
Valen on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Valenurn:uuid:9de2486b-2b9b-97b9-7140-e0bbde4e1dd82016-08-12T11:22:16-06:00<p>This one seems significantly different from other HC-SR04 modules. It seems to lack the 3rd chip, a MAX232-like chip (TTL to RS232 chargepump converter) to boost the transmitter voltage. Not sure if this means less performance though, since I've read that it could also be the source of internal ringing noise in the detection circuit. Could be interesting to test and compare.</p>
Customer #360077 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #360077urn:uuid:f9538ea3-54c8-0f77-0e97-1515da60310f2016-08-12T11:22:15-06:00<p>This device operates with an audio signal at 40KHz. That is within the hearing range of cats and dogs. I would never use this in a project that would operate in or around my home.</p>
Customer #623105 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #623105urn:uuid:a7783107-4969-9817-bd4c-4798e1d3d61c2016-08-12T10:16:45-06:00<p>I have young kids in my house, so I try to buy lead-free whenever possible. I love that SparkFun marks so many components as RoHS (and I'm bummed that Adafruit has been doing it less).<p>The cheap sensors and Arduino knock-offs you get on eBay are never lead-free, as far as I can tell. It's worth the extra few bucks for me.</p></p>
Chiel on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Chielurn:uuid:b9c5a08c-5164-e030-904f-cc1fb1d9fad22016-08-12T09:24:12-06:00<p>Sonar sensors have gotten pretty cheap over the past decade. I remember each costing atleast 15$ as a minimum and the Ping))) costing 30$ back then aswell. Now you can get sensors for a few bucks a piece. So i would guess that the Ping is just a older more expensive sensor.<p>To be fair tough looking at the back of the ping it is a little more complicated in design and probably a little bit more complicated. The SR04 is pretty simplistic. can't say for certain tough.</p></p>
bfesser on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04bfesserurn:uuid:50b85e04-04f5-a788-b99a-116f742ab4c72016-08-12T09:17:32-06:00<p>Parallax makes (or made?) huge profits by selling to schools. Hence, product names like "Board of Education". They don't really focus on individual customers (makers). Because of this, their prices have always been ridiculously high. I remember buying a BS2 rev. B from them back in the day for $50! I don't know if Arduino existed yet or if I just wasn't aware of it.</p>
kg6hxm on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04kg6hxmurn:uuid:c9fd9566-46e9-2788-ba95-3c3cbfd0c4e62016-08-12T07:18:26-06:00<p>Sparkfun is relying on the community and support they offer to keep you coming back for more parts and assistance. Sure you can buy 10 of them for super cheap on Ebay, but that comes with no support. Sparkfun has guides and people to help you learn and when you have issues. Very few places have that.<p>For me, they are just down the road, so I get my parts reliably, and much quicker than I would with Ebay.</p></p>
Customer #367806 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Customer #367806urn:uuid:d5b346c3-0f2e-226c-e70e-cfddd168d96a2016-08-12T07:13:41-06:00<p>Sort of the opposite of member #114323's comment - I noticed this is about 1/10 the price of the Parallax PING Ultrasonic sensor which I usually see retail for around $30 (e.g. Jameco Electronics p/n 282861). Does Parallax just have an insane markup, or is there some quality/accuracy difference that explains the huge price gap?</p>
Alwyn Smith on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Alwyn Smithurn:uuid:9e90955b-04da-d669-ac10-9c7c14e44de62016-08-12T06:57:45-06:00<p>I'm sincerely curious about how business for this module (and similar components) works. You can get one of these on ebay for a dollar, if you need one. And you can get 10 of them for about 78 cents each. They work great.<p>I've got faith in the quality of the design and manufacturing of SparkFun's products, but this costs about 4 times as much. Why go through the effort of offering this, when you can't compete on price?</p><p>And lest anyone think I'm trolling or being rude, I mean no disrespect. I've got a side-hustle as a freelance electrical engineer doing embedded systems and PCB layouts and would like to learn more about how U.S. & European businesses can compete with cheap Chinese manufacturing in this space.</p></p>
Lefty4000 on SEN-13959 - Ultrasonic Distance Sensor - HC-SR04Lefty4000urn:uuid:6c1db536-9e90-dc6b-8b80-18a5832e16d82016-08-11T16:45:49-06:00<p>Just curious, is there any reason this wasn't designed with copper pours?</p>