3.27v doesn't work, 3.29v does? HC-SR04 Audiosonic sensor

So, I've got my normal 5v HC-SR04 Audiosonic sensors in house, which I can provide anywhere near 5v and get a pretty good response.

I ordered a new set to play with, but I ordered the ones that (supposedly) can handle anywhere between 3v and 5.5v:

https://www.ebay.com/i/191763587427?chn=ps

To my surprise, these things seem to be way, way, way more sensitive than the strictly 5v ones, to a degree that makes me think I'm missing something. I tested firing these up with a series of different power supplies, and one (and only one) of them will consistently get it to work. The rest just bomb out and give no readings back:

2.25v (18650 battery coming thru a resistor) - no go
3.27v (18650 battery going thru 3.3v voltage regulator) - no go
3.29v (coming off a NodeMCU's 3.3v pin) - works great!
3.88v (straight off 18650 battery) - no go
4.43v (straight off 3xAA battery pack) - no go
4.99v (9v battery gong thru a 5v voltage regulator) no go

I've swapped out multiple modules, same behavior. The only thing changing between tests is the power supply for the HC-SR04. Could this thing really be so sensitive that a difference of .02 volts makes the difference between working or not? Or am I missing something?

P.S. I don't know how much current I was providing in each of these tests, but given that I went thru a voltage regular that has a 300 ma max and tried going straight off a battery, I assume I couldn't be undercutting the current requirements.

Thanks!
Matt

Nor sure... that's strange, maybe try some caps. any reason for needing the operation at 3vdc?
if they were cheap they are probably garbage.

No real reason, I just figured I'd be building several of these units and I'd like the flexibility to use either. My concern has been that I could never really be sure of which model I was going to get when I ordered off eBay, Alibaba, etc. so I wanted to design my prototype so that it could handle either.

It's possible they're all just junk. I'm tempted to order another batch from a different seller and see, but I'm hoping someone else knows something I don't about these units.

Using a serial resistor to create a lower voltage is not the best. If the current consumtion varies, have spikes or other " ups and downs" Your voltage reading is probable some averige not showing the bad short lows but maybe important voltages.
Your tests using stabilized voltage tells that the objects might be rejects from the production line.

I also think that the modules deserve a strong power supply for the pulse emission, i.e. add caps near the power pins A scope were helpful in monitoring the power line.

elveax:
I've swapped out multiple modules, same behavior. The only thing changing between tests is the power supply for the HC-SR04. Could this thing really be so sensitive that a difference of .02 volts makes the difference between working or not? Or am I missing something?

Yeah.....maybe you are missing something. You're using a 3.3 V regulator, right? See what happens if you do the same thing....but instead of regulating the 18650 battery voltage, try (for test only) applying a higher input voltage to the regulator ..... eg. 5V DC source voltage (with maybe 2 amp current rating). That is, get rid of the 18650 for the moment, and apply 5V DC to the regulator..... and then see if your device works.

Also..... get your multimeter and put it on the continuity setting, and check to see if the grounds of your arduino, and your device, and your battery (supply) are all electrically connected together.

Do you have the GROUND of the sensor connected to the NodeMCU as well? Or only trig/echo? Without a shared ground guaranteed no-go.

Hi everyone, all good suggestions. I haven't had the time to test any of them yet, but I'll report back when I do. My gut reactions on some of these:

"Using a serial resistor to create a lower voltage is not the best. If the current consumtion varies, have spikes or other " ups and downs" Your voltage reading is probable some averige not showing the bad short lows but maybe important voltages."

Possibly. But, I have to wonder why the 5v modules work so well off a battery + voltage regulator.

"I also think that the modules deserve a strong power supply for the pulse emission, i.e. add caps near the power pins"

Same as above, it could just be that my voltage warbles a bit coming out of the regulator, I'll see what I can do to test that. But, the 5v modules work with no issue out of a regulator, so that'd have to mean the 3.3v are a lot less flexible than their 5v counterparts.

"Yeah.....maybe you are missing something. You're using a 3.3 V regulator, right? See what happens if you do the same thing....but instead of regulating the 18650 battery voltage, try (for test only) applying a higher input voltage to the regulator ..... eg. 5V DC source voltage"

I may have tested this at one point, but I'll try it again. I can easily hook up a 9v and drop it thru the 3.3v to see what happens.

"Do you have the GROUND of the sensor connected to the NodeMCU as well? Or only trig/echo? Without a shared ground guaranteed no-go."

In each test, I just took the power/ground of a power supply and connected each lead to either the voltage regulator or the HC-SR04 itself. So, when testing the 18650 battery, I just used jumpers to touch the pos/neg ends of the battery to vin/ground of the regulator (and later the module itself). With the NodeMCU, same thing - I used jumpers to connect the 3.3v/ground to the vin/ground of the module. Does that make sense?

elveax:
In each test, I just took the power/ground of a power supply and connected each lead to either the voltage regulator or the HC-SR04 itself. So, when testing the 18650 battery, I just used jumpers to touch the pos/neg ends of the battery to vin/ground of the regulator (and later the module itself). With the NodeMCU, same thing - I used jumpers to connect the 3.3v/ground to the vin/ground of the module. Does that make sense?

Sounds like you did not keep the ground of NodeMCU connected to the ground of the sensor when using a different power supply. If so, then that's your problem.

wvmarle:
Sounds like you did not keep the ground of NodeMCU connected to the ground of the sensor when using a different power supply. If so, then that's your problem.

I'm a bit confused here, let me make sure I'm illustrating how this testing worked correctly. For the record, I want to make clear that using the NodeMCU is the one test that did work, the rest of them failed.

So, this is how the test looks. I've got a bare ESP-12F sitting in a socket programmer connected to a breadboard. (This is what I mean by socket programmer: https://www.amazon.com/ESP8266-ESP-12-programmer-Arduino-PlatformIO/dp/B071P48B6T)

The ESP-12F is running a standard HC-SR04 sketch (trigger send burst, echo listen, report distance, wash/rinse/repeat). I connect the trigger and echo pins of the HC-SR04 to the breadboard via female to male jumpers. Then, I connect the VIN/GND pins of the HC-SR04 to different power supplies, also via female to male jumpers. I'm connected to the socket programmer via USB on my laptop, where I'm using the serial monitor to watch the distance readings.

The NodeMCU only comes into the mix because I'm using it as a way to provide a clean 3.3v. It's plugged into another USB port, but otherwise it's not doing anything, just providing juice.

So, testing the 5v module this way yields good readings from almost any power source north of 4 volts. But, testing the 3v module this way only yields good readings when I provide the module voltage/GND from that separate NodeMCU.

Draw some schematic diagrams (not Fritzings, real schematics please - hand drawn is just fine) with all parts, power supplies, connections, whatnot. Don't be worried about providing too much detail as the problem tends to be in the part you left out. That's going to be a lot clearer.

I strongly suspect it's a missing ground connection, as that's perfectly compatible with your symptoms.

Sure, not much to see here, but here's a schematic.

That 'POS Power Source' could be: the positive end of a battery, the VOUT pin of a voltage regulator, or the 3.3v of a NodeMCU, depending on the test. The 'NEG Power Source' could be the negative end of a battery, the GND pin of the voltage regulator, or the GND pin of the NodeMCU, respectively.

Indeed. GND of the ESP is not connected to GND of the sensor. That's a major problem.

I do assume that the ESP has it's own, separate power supply (which you left out) - I guess that somehow that power supply has its ground shared with your NodeMCU making that work, but you not including the power supply of the ESP12 in the schematic makes that a guess. I also have to assume the ESP12 has the appropriate external resistors to make it boot (which you also left out). Why oh why is "complete" such a difficult word for people asking help on this forum?!

By the way, you must also make sure the signal coming out of the sensor does not exceed 5V or you may destroy your input pin (or the complete ESP module). A level shifter or voltage divider is needed.

wvmarle:
I do assume that the ESP has it's own, separate power supply (which you left out) - I guess that somehow that power supply has its ground shared with your NodeMCU making that work

No, you're misunderstanding the setup. And there's no need to be rude. I appreciate your assistance, but leave the grievances about what you think I'm doing right or wrong at the door (or move on), please.

The ESP-12F is in a socket programmer, as I explained earlier. The socket programmer is powered by USB, and the resistors to pull up/down the ESP are built into that. It's not going to add or remove anything from the diagram for me to add in what the socket programmer is doing.

The NodeMCU does not share a ground with the ESP-12F. I'm not sure how else to make this clear. Look at that diagram - imagine a jumper connecting the 3.3v of the NodeMCU to the VIN of the HC-SR04. Now imagine a jumper connecting the GND of the NodeMCU to the GND of the HC-SR04. That's it. That is the only connection the NodeMCU has to the schematic. It does not touch the ESP-12F or it's ground in any way, shape, or form.

And that works just fine, by the way. It's the other options that don't work.

"By the way, you must also make sure the signal coming out of the sensor does not exceed 5V or you may destroy your input pin (or the complete ESP module). A level shifter or voltage divider is needed."

I've been testing this arrangement for a few days with the 5V and 3V modules of the HC-SR04, no issues damaging the input pin.

And to really drive this point home - if I use the 5V version of the HC-SR04, and I can power the unit with almost anything (again, no common ground with the ESP-12F) and it works on each occasion. Last time I tried this, I grabbed a battery pack of 3x AA's and touched the leads to the VIN/GND of the HC-SR04 and got perfect readings.

Have you got a digi-pic (phone-pic) of the system, and also a complete wiring diagram? That will help a lot. wvmarle was asking for one of those diagrams already.

Also... the previous 'schematic' you uploaded wasn't complete because it didn't show those jumpers or ground connections etc.

At least it should have looked something like this (..... the electrolytic capacitor is just added as an option).

elveax:
3.29v (coming off a NodeMCU's 3.3v pin) - works great!

If that particular device works consistently when powered from the arduino's 3.3V pin, then that same device (the one that is working right now) will definitely work when powered from some other 3.3V source. Some kind of fundamental mistake with wiring is the likely reason for all the other cases that you presented.

Also, need to be sure that this model of HC-SR04 really does have 3.3V to 5V supply range handling, since the original versions were 5V devices.

elveax:
The ESP-12F is in a socket programmer, as I explained earlier. The socket programmer is powered by USB,

elveax:
The NodeMCU [is] plugged into another USB port

So the NodeMCU as power supply, and your socket programmer, do in fact share grounds (courtesy of the ground loop provided by the USB connections).